Enterprise electricity consumption analysis and prediction method based on data mining

Through the data mining method, a multiple timing prediction model is constructed, which solves the problem of insufficient electricity consumption prediction accuracy and stability caused by the differences in new energy volatility and industry electricity consumption patterns in the existing technology, and achieves higher prediction accuracy and better new energy adaptability.

CN119692556AInactive Publication Date: 2025-03-25TONGLING POWER SUPPLY CO OF STATE GRID ANHUI ELECTRIC POWER CO
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202411841194.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-03-25
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing power consumption prediction model is difficult to adapt to the volatility of new energy and the differences in power consumption patterns in different industries, resulting in insufficient prediction accuracy and stability.

Method used

Using a data mining method, by obtaining historical electricity consumption data, multi-directional electricity consumption characteristics are analyzed, exponential smoothing, ARIMA, SARIMA and LSTM neural network multiple timing prediction models are constructed, and the optimal model is selected for electricity consumption prediction.

Benefits of technology

It improves the accuracy and stability of electricity consumption prediction, enhances the model's adaptability to new energy volatility, helps enterprises optimize power resource allocation and reduce power costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119692556A_ABST
    Figure CN119692556A_ABST
Patent Text Reader

Abstract

The invention discloses an enterprise electricity consumption analysis and prediction method based on data mining, and relates to the technical field of DC power supply monitoring, historical electricity consumption data is acquired, and electricity consumption characteristic analysis and mining are performed from multiple directions according to the historical electricity consumption data to obtain electricity consumption rule information and seasonal change characteristics; analyzing the scale and speed increase of the agent electricity purchasing users and the annual change trend of the agent electricity purchasing quantity to obtain development and operation information of agent electricity purchasing; based on historical electric quantity data, constructing exponential smoothing, ARIMA, SARIMA and LSTM neural network multiple time sequence prediction models, and performing comparison to select an optimal model; through accurate power consumption prediction, the enterprise is helped to optimize power resource configuration, plan power purchase work in advance and reduce the power cost of the enterprise, and especially under the condition that the power market fluctuates greatly, the enterprise can better understand the market dynamic condition and formulate a corresponding power purchase strategy by predicting the scale and speed increase of the proxy power purchase user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of direct current power supply monitoring technology, and more specifically, to a method for analyzing and predicting enterprise electricity consumption based on data mining. Background Art

[0002] The power industry is a very important basic industry for the entire country. It is of great significance to the security of the entire country, the stability of society and all aspects of people's lives. Electric energy cannot be stored like other products, but has the special feature of being used as it is generated, and cannot be stored. This puts higher requirements on the generation, transmission and sales of electric energy. It cannot be in excess of demand, wasting energy resources, nor can it be in short supply, failing to meet the electricity needs of electricity users. Therefore, power forecasting comes along. By analyzing historical power, the later power situation can be obtained to formulate plans for power generation, transmission and power supply in advance. The prediction of power demand determines the size of the new capacity of the power generation, transmission and distribution systems and the installed type of power generation equipment. How to improve power planning and maximize the quality of planning and do a good job in power forecasting is gradually becoming a hot topic in the power industry. However, in actual use, with the rapid development of new energy sources such as wind and solar energy, the volatility of these energy sources has brought additional complexity to the power system, and the data collection of enterprises may be missing or discontinuous. Especially in old industrial facilities, the lack or failure of data collection equipment may lead to incomplete data, and the challenges of forecasting technology have also increased. More accurate quantity and price forecasting technology is needed to cope with this uncertainty. There are significant differences in electricity consumption patterns and electricity demands among different industries. For example, the electricity consumption characteristics of manufacturing, data centers, and commercial buildings vary, and existing forecasting models are difficult to adapt to the specific electricity consumption patterns of these industries. Summary of the invention

[0003] In order to solve the above problems, the present invention provides a method for analyzing and predicting enterprise electricity consumption based on data mining.

[0004] The present invention provides a method for analyzing and predicting enterprise electricity consumption based on data mining, and the specific steps are as follows: Step 1: Obtain historical electricity consumption data, and analyze electricity consumption characteristics from multiple directions based on the historical electricity consumption data to mine electricity consumption regularity information and seasonal variation characteristics; Step 2: Analyze the scale and growth rate of power purchasing agents and the annual trend of the power purchasing agent volume to obtain the development and operation information of power purchasing agents; Step 3: Based on the historical electricity data, construct multiple time series forecasting models including exponential smoothing, ARIMA, SARIMA and LSTM neural network, and compare them to select the optimal model; Step 4: Perform residual analysis and cross-validation on the selected model, use MSE, RMSE, and MAE indicators to measure the accuracy of the model, and ensure that the model prediction trend is consistent with the actual trend; Step 5: Use the verified optimal model to analyze electricity consumption characteristics from multiple directions, and mine the information on electricity consumption patterns, seasonal variation characteristics, and the development and operation information of power purchasing agents to predict electricity consumption and obtain prediction results.

[0005] Preferably, the specific steps of obtaining historical electricity consumption data are as follows: Obtain historical electricity consumption data, including electricity consumption information for the entire city, region, industry, and industrial enterprises above designated size; it should be noted that historical electricity consumption data is obtained through historical data from power supply companies; Integrate the collected data to form a unified data set; The collected data is cleaned, missing values ​​are processed, the quality and integrity of the data are ensured, and historical electricity consumption data is obtained.

[0006] Preferably, the specific steps of cleaning the collected data and processing missing values ​​are: Arrange the collected data in chronological order and determine which time points have missing data; For each direction, including the whole city, region, industry and industrial enterprises above designated size, the mean of known electricity consumption data is calculated respectively, according to the formula , calculated, where is the known power consumption data point in each direction, is the number of known data points, and the mean is calculated to fill the missing values ​​in the corresponding direction; For each missing data point, it is replaced with the mean of the corresponding direction.

[0007] Preferably, the specific steps of analyzing electricity consumption characteristics from multiple directions based on historical electricity consumption data and mining electricity consumption regularity information and seasonal variation characteristics are as follows: First, using the year as the unit, obtain the electricity consumption information of the entire city, region, industry and industrial enterprises above designated size in a fixed time period before the current time point, and obtain the annual electricity consumption data in a fixed time period; Divide the annual electricity consumption data within a fixed time period into several stages; For each phase electricity consumption data point, calculate the Euclidean distance between it and all other phase data points; For each stage of electricity consumption data point, determine its k nearest neighbor points, calculate the average value of the Euclidean distances of these nearest neighbor points, and then take the inverse of the average value to obtain the local reachability density LRD; For each power consumption data point in each stage, the average value of the local reachability density LRD of its k nearest neighbor points is calculated and compared with the LRD of the data point to obtain the local outlier factor LOF; Determine an abnormal threshold to distinguish abnormal and non-abnormal data points. If the LOF value of a data point in a certain stage is greater than this threshold, it is marked as an abnormal stage; otherwise, it is marked as a normal stage. According to the comparison result between the LOF value and the abnormal threshold, the stages marked as abnormal are removed, and the stages marked as normal are retained to obtain the normal stage data.

[0008] Preferably, for the annual electricity consumption data in the normal stage, the year-on-year growth rate is calculated, and the growth or decline trend of the annual electricity consumption is identified through the year-on-year growth rate; For the annual electricity consumption data in the normal stage, further analyze the monthly electricity consumption data to identify the monthly electricity consumption fluctuations, including seasonal fluctuations and non-seasonal fluctuations; For the annual electricity consumption data in the normal stage, we further extract the electricity consumption data on weekdays and weekends, and calculate the difference between the two to identify the electricity consumption patterns on weekdays and non-working days; For the annual electricity consumption data in the normal stage, further analyze the changes in electricity consumption in different time periods within a day to obtain the peak and trough periods of electricity consumption within the day; The above data are used as information on electricity consumption patterns and seasonal variation characteristics.

[0009] Preferably, the specific working method of step 2 is as follows: Based on the current data of proxy electricity purchase users, analyze the number of proxy electricity purchase users in the city and their proportion to all users participating in market-based electricity purchase; Based on the current historical annual increase in the number of electricity purchasing agents, analyze the annual increase in the number of electricity purchasing agents in the city and the year-on-year growth rate; Use the above data as development and operation information for power purchase by proxy; It also includes collecting the amount of electricity generated by renewable energy, dividing the amount of electricity generated by renewable energy in a fixed time period by the total electricity generated to obtain the proportion of electricity generated by renewable energy.

[0010] Preferably, the specific working method of step three is as follows: Based on the information on electricity consumption patterns, seasonal variation characteristics, the development and operation information of power purchasing agents, and the proportion of new energy power generation, the training set and test set were divided to build an exponential smoothing prediction model; Based on the information on electricity consumption patterns, seasonal variation characteristics, the development and operation information of power purchasing agents, and the proportion of new energy power generation, the training set and test set were divided to build an ARIMA forecasting model; Based on the information on electricity consumption patterns, seasonal variation characteristics, the development and operation information of power purchasing agents, and the proportion of new energy power generation, the training set and test set were divided to build a SARIMA prediction model; Based on the information on electricity consumption patterns, seasonal variation characteristics, the development and operation information of power purchasing agents, and the proportion of new energy power generation, the training set and test set are divided, and an LSTM neural network model is constructed.

[0011] Preferably, the specific steps of step 4 are as follows: Exponential smoothing model validation, residual analysis and cross-validation of model prediction results to measure the accuracy of the model; ARIMA model validation, performing residual analysis on the model prediction results and calculating the mean absolute error and root mean square error to measure the accuracy of the model; SARIMA model validation, performing residual analysis on the model prediction results and calculating the mean absolute error and root mean square error to measure the accuracy of the model; The LSTM neural network model is verified by using mean square error, root mean square error, R-squared, and mean absolute error to measure the accuracy of the model.

[0012] Preferably, in step 5, the specific steps of selecting and using the verified optimal model are: For each model, the mean squared error was obtained by measuring the average of the sum of squares of the differences between the predicted values ​​and the actual values; By taking the square root of the mean square error, we get the root mean square error; The mean absolute error is the average of the absolute values ​​of the differences between the predicted and actual values; Analyze the residuals of each model to check whether the residuals are close to white noise distribution, that is, normal distribution with mean 0 and constant variance; The model with the smallest error index and the residual analysis mean closest to 0 is selected as the optimal model.

[0013] Preferably, the specific steps of step 5 are as follows: The city's electricity consumption forecast, based on the selected model and combined with historical monthly electricity consumption data, predicts the city's electricity consumption in a fixed time period in the future; Regional electricity consumption forecast: Based on the selected model and combined with historical monthly electricity consumption data, the electricity consumption in the future fixed time period within the jurisdiction of each district and county company is predicted; Industry electricity consumption forecast: Based on the selected model and combined with historical monthly electricity consumption data, the electricity consumption of each industry in a fixed time period in the future is predicted; Electricity consumption forecast for industrial enterprises above designated size: Based on the selected model and combined with the historical monthly electricity consumption data of industrial enterprises above designated size, the electricity consumption of industrial enterprises above designated size in a fixed time period in the future is forecasted; The proxy power purchase forecast, based on the selected model, is combined to predict the proxy power purchase amount in a future fixed time period.

[0014] Beneficial effects: By adopting multi-directional power consumption characteristic analysis, this solution can deeply explore the unique power consumption patterns and seasonal variation characteristics of different industries such as manufacturing, data centers and commercial buildings. This detailed analysis helps to build a more accurate prediction model, thereby improving the accuracy of power consumption prediction. At the same time, considering the information on the development and utilization of new energy, the solution can reduce the volatility of the prediction results and enhance the model's adaptability to the volatility of new energy. This method of comprehensive consideration of multiple factors makes the prediction results more stable and provides reliable data support for enterprise power planning and management; Through accurate electricity consumption forecasts, we help enterprises optimize the allocation of electricity resources, plan electricity procurement in advance, and reduce the electricity costs of enterprises. Especially when the electricity market fluctuates greatly, by predicting the scale and growth rate of proxy electricity purchasing users, enterprises can better understand market dynamics and formulate corresponding electricity purchasing strategies, thereby further reducing electricity purchasing costs while ensuring the stability of electricity consumption. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 It is a flow chart of the method of the present invention. DETAILED DESCRIPTION

[0016] Application scenarios: In actual use, with the rapid development of new energy sources such as wind and solar energy, the volatility of these energy sources has brought additional complexity to the power system, and the data collection of enterprises may be missing or discontinuous. Especially in old industrial facilities, the lack or failure of data collection equipment may lead to incomplete data, and the challenges of prediction technology have also increased. More accurate quantity and price prediction technology is needed to deal with this uncertainty; There are significant differences in electricity consumption patterns and electricity demands among different industries. For example, the electricity consumption characteristics of manufacturing, data centers, and commercial buildings vary, and existing forecasting models are difficult to adapt to the specific electricity consumption patterns of these industries.

[0017] like Figure 1 As shown: A method for analyzing and predicting enterprise electricity consumption based on data mining, the specific steps are as follows: Step 1: Obtain historical electricity consumption data, and analyze electricity consumption characteristics from multiple directions based on the historical electricity consumption data, and mine electricity consumption law information and seasonal variation characteristics; It should be noted that in this embodiment, the historical electricity consumption data can be used to analyze electricity consumption characteristics from four directions: the entire city, region, industry, and industrial enterprises above designated size, and mine electricity consumption laws and seasonal variation characteristics; By collecting this information, we can consider the significant differences in electricity consumption patterns and electricity demand in different industries, such as the different electricity consumption characteristics of manufacturing, data centers and commercial buildings, which is conducive to the stability of subsequent forecasts; Step 2: Analyze the scale and growth rate of power purchasing agents and the annual trend of the power purchasing agent volume to obtain the development and operation information of power purchasing agents; It should be noted that proxy electricity purchasers refer to those industrial and commercial users who have not yet directly participated in electricity market transactions. The power grid companies purchase electricity from the power market on behalf of these users to ensure that the users' electricity needs are met. The power grid companies need to regularly forecast the electricity consumption and typical load curves of proxy electricity purchasers, which helps the power grid companies to track the changes in the proxy electricity purchase market trend in a timely manner. When forecasting electricity consumption, it is necessary to add the development and operation information of proxy electricity purchases; It should be noted that, in this embodiment, the information on the development and utilization ratio of new energy can also be combined to reduce the volatility of subsequent predictions; Step 3: Based on the historical electricity data, construct multiple time series forecasting models including exponential smoothing, ARIMA, SARIMA and LSTM neural network, and compare them to select the optimal model; Step 4: Perform residual analysis and cross-validation on the selected model, use MSE, RMSE, and MAE indicators to measure the accuracy of the model, and ensure that the model prediction trend is consistent with the actual trend; Step 5: Use the verified optimal model to analyze electricity consumption characteristics from multiple directions, and mine the information on electricity consumption patterns, seasonal variation characteristics, and the development and operation information of power purchasing agents to predict electricity consumption and obtain prediction results.

[0018] It should be noted that by adopting multi-directional power consumption characteristic analysis, this solution can deeply explore the unique power consumption patterns and seasonal variation characteristics of different industries such as manufacturing, data centers and commercial buildings. This detailed analysis helps to build a more accurate prediction model, thereby improving the accuracy of power consumption prediction. At the same time, considering the information on the development and utilization of new energy, the solution can reduce the volatility of the prediction results and enhance the model's adaptability to the volatility of new energy. This method of comprehensive consideration of multiple factors makes the prediction results more stable and provides reliable data support for enterprise power planning and management; Through accurate electricity consumption forecasting, it helps enterprises optimize the allocation of electricity resources, plan electricity procurement in advance, and reduce the electricity costs of enterprises. Especially when the electricity market fluctuates greatly, by predicting the scale and growth rate of proxy electricity purchase users, enterprises can better understand the market dynamics and formulate corresponding electricity purchase strategies, thereby ensuring the stability of electricity consumption and further reducing the electricity purchase costs; It should be noted that the power industry is a very important basic industry for the entire country. It is of great significance to the security of the entire country, the stability of society and all aspects of people's lives. Electric energy cannot be stored like other products, but has the special feature of being used as it is generated, and cannot be stored. This puts higher requirements on the generation, transmission and sales of electric energy. It cannot be in excess of demand, wasting energy resources, nor can it be in short supply, failing to meet the electricity needs of electricity users. Therefore, power forecasting comes along. By analyzing historical power, the later power situation can be obtained to formulate plans for power generation, transmission and power supply in advance. The prediction of power demand determines the size of the new capacity of the power generation, transmission and distribution systems and the installed type of power generation equipment. How to improve power planning and maximize the quality of planning and do a good job in power forecasting is gradually becoming a hot topic in the power industry. However, in actual use, with the rapid development of new energy sources such as wind and solar energy, the volatility of these energy sources has brought additional complexity to the power system, and the data collection of enterprises may be missing or discontinuous. Especially in old industrial facilities, the lack or failure of data collection equipment may lead to incomplete data, and the challenges of forecasting technology have also increased. More accurate quantity and price forecasting technology is needed to cope with this uncertainty. There are significant differences in electricity consumption patterns and electricity demands among different industries. For example, the electricity consumption characteristics of manufacturing, data centers, and commercial buildings vary, and existing forecasting models are difficult to adapt to the specific electricity consumption patterns of these industries.

[0019] As an optional embodiment: the specific steps of obtaining historical power consumption data are as follows: Obtain historical electricity consumption data, including electricity consumption information for the entire city, region, industry, and industrial enterprises above designated size; it should be noted that historical electricity consumption data is obtained through historical data from power supply companies; Integrate the collected data to form a unified data set; Clean the collected data, process missing values, ensure data quality and integrity, and obtain historical electricity consumption data; It should be noted that the data collection of enterprises may be missing or discontinuous, especially in old industrial facilities, where insufficient or faulty data collection equipment may lead to incomplete data; This technical solution can process missing values ​​in the collected data and reduce the impact on subsequent feature extraction.

[0020] As an optional embodiment: the specific steps of cleaning the collected data and processing missing values ​​are: Arrange the collected data in chronological order and determine which time points have missing data; For each direction, including the whole city, region, industry and industrial enterprises above designated size, the mean of known electricity consumption data is calculated respectively, according to the formula , calculated, where is the known power consumption data point in each direction, is the number of known data points, and the mean is calculated to fill the missing values ​​in the corresponding direction; For each missing data point, it is replaced with the mean of the corresponding direction.

[0021] It can effectively handle missing values ​​in historical power data, ensure the integrity of the data set, and provide an accurate data basis for further analysis and prediction.

[0022] As an optional embodiment: the specific steps of analyzing the electricity consumption characteristics from multiple directions based on the historical electricity consumption data and mining the electricity consumption regularity information and seasonal variation characteristics are as follows: First, using the year as the unit, obtain the electricity consumption information of the entire city, region, industry and industrial enterprises above designated size in a fixed time period before the current time point, and obtain the annual electricity consumption data in a fixed time period; Divide the annual electricity consumption data within a fixed time period into several stages; for example, if there is 20 years of data, it can be divided into 5 stages, each containing 4 years of data; For each stage of electricity consumption data point, calculate the Euclidean distance between it and all other stage data points; since the data points are two-dimensional, the Euclidean formula can be directly applied for calculation; For each stage of electricity consumption data point, determine its k nearest neighbor points, calculate the average value of the Euclidean distances of these nearest neighbor points, and then take the inverse of the average value to obtain the local reachability density LRD; For each power consumption data point in each stage, the average value of the local reachability density LRD of its k nearest neighbor points is calculated and compared with the LRD of the data point to obtain the local outlier factor LOF; Determine an abnormal threshold to distinguish abnormal and non-abnormal data points. If the LOF value of a data point in a certain stage is greater than this threshold, it is marked as an abnormal stage; otherwise, it is marked as a normal stage. According to the comparison result between the LOF value and the abnormal threshold, the stages marked as abnormal are removed, and the stages marked as normal are retained to obtain the normal stage data.

[0023] After the above steps, we can get the annual electricity consumption data in the normal stage, which will be used for further analysis and prediction; It should be noted that the electricity consumption data in a city, when viewed on an annual basis, will also be affected by a variety of environmental factors. For example, in the three years since the epidemic, the development of some cities has stagnated, and electricity consumption has decreased instead of increased. This is abnormal in a large cycle. How to make long-term predictions, for example, select the annual electricity consumption in the 20 years before the current time point, divide the 20 years into 5 or 10 stages, analyze each stage, remove abnormal stages, and then make predictions according to the remaining stages to calculate data such as year-on-year growth rate; In this embodiment, the annual electricity consumption data of each stage is analyzed, and the abnormal stages are removed to obtain the annual electricity consumption data in the normal stage in the following specific manner: For each data point, i.e., the power consumption in the i-th phase , calculate the Euclidean distance between it and all other data points (i.e., the power consumption in other stages). In this embodiment, the data points are two-dimensional and can be directly calculated using the Euclidean formula; For each data point, i.e., the power consumption in the i-th phase , calculate the average of the Euclidean distances of its k nearest neighbors, and then take the inverse to get the local reachability density LRD; For each data point, i.e., the power consumption in the i-th phase , calculate the ratio of the average value of the local reachable density LRD of its k nearest neighbor points to the LRD of the i-th data point, and get the local outlier factor LOF value; Determine an abnormal threshold. In this embodiment, for the LOF algorithm, a threshold such as 1.5 or 2 is often used to distinguish abnormal and non-abnormal data points. If the local outlier factor LOF value of a data point in a certain stage is greater than the abnormal threshold, it is marked as an abnormal stage, and the rest are marked as normal stages; It can identify and remove abnormal phases from data within a period of time, and obtain annual electricity consumption data within the normal phase, providing an accurate data basis for further analysis and prediction; For example, suppose there are 20 years of annual electricity consumption data, with the following specific values: from 2000 to 2019, the annual electricity consumption is 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88 and 9 billion kWh respectively. Divide the 20 years of data into 5 equal stages, each stage contains 4 years of data; First, analyze the electricity consumption data of each stage to identify whether there are abnormal stages. In this example, the local outlier factor (LOF) algorithm will be used to identify abnormal stages. The LOF algorithm identifies anomalies by calculating the density deviation of each data point from its neighboring points. The specific steps are as follows: For each phase’s electricity consumption data, calculate its Euclidean distance from all other phases’ electricity consumption data, which will help determine the position of each phase relative to other phases; Next, determine the k nearest neighbor points of each stage and calculate the average of the Euclidean distances of these nearest neighbor points. Then, take the inverse of this average to obtain the local reachability density (LRD) of each stage. Calculate the local outlier factor (LOF) value of each stage by comparing the average LRD of its k nearest neighbors with the LRD of that stage; Set an abnormal threshold, such as 1.5. If the LOF value of a certain stage is greater than this threshold, it is marked as an abnormal stage.

[0024] As an optional embodiment: for the annual electricity consumption data in the normal stage, the year-on-year growth rate is calculated, and the growth or decline trend of the annual electricity consumption is identified through the year-on-year growth rate; it should be noted that in this embodiment, the year-on-year growth rate is obtained by subtracting the electricity consumption of the previous period from the electricity consumption of the current period and then dividing it by the electricity consumption of the previous period; For the annual electricity consumption data in the normal stage, the monthly electricity consumption data is further analyzed to identify the monthly electricity consumption fluctuations, including seasonal fluctuations and non-seasonal fluctuations; it should be noted that the specific steps include determining the period of seasonal changes (such as periodicity in months), using the moving average method to separate trends, and separating seasonal components; For the annual electricity consumption data in the normal stage, we further extract the electricity consumption data on weekdays and weekends, and calculate the difference between the two to identify the electricity consumption patterns on weekdays and non-working days; For the annual electricity consumption data in the normal stage, further analyze the changes in electricity consumption in different time periods within a day to obtain the peak and trough periods of electricity consumption within the day; it should be noted that the electricity consumption data of weekdays and weekends are compared and the difference between the two is analyzed to identify the electricity consumption patterns of weekdays and non-working days. This can be achieved by calculating the average electricity consumption of weekdays and weekends and comparing the difference; The above data are used as information on electricity consumption patterns and seasonal variation characteristics.

[0025] As an optional embodiment: the specific working method of step 2 is as follows: Based on the current proxy electricity purchasing user profile data, the number of proxy electricity purchasing users in the city and their proportion to all users participating in market-based electricity purchasing are analyzed; it should be noted that in this embodiment, the specific calculation method is to divide the number of proxy electricity purchasing users by the total number of market-based electricity purchasing users; Based on the current historical annual increase in the number of electricity purchasing agents, analyze the annual increase in the number of electricity purchasing agents in the city and the year-on-year growth rate; The above data is used as the development and operation information of the proxy power purchase; it should be noted that, in this embodiment, it can be obtained by subtracting the number of new users in the previous year from the number of new users in the current year and then dividing it by the number of new users in the previous year; It should be noted that the number and proportion of power purchasing agents as well as the annual number of new users and the changing trend of power purchase can be systematically analyzed to provide data support for power market management and decision-making; It also includes collecting the renewable energy power generation, dividing the renewable energy power generation in a fixed time period by the total power generation to obtain the renewable energy power generation ratio. It should be noted that in this embodiment, the fixed time period may be one year before the current time period.

[0026] As an optional embodiment: the specific working method of step three is as follows: Based on the information of electricity consumption patterns, seasonal variation characteristics, development and operation information of power purchasing agents and the proportion of new energy power generation, the training set and test set are divided to construct an exponential smoothing prediction model. It should be noted that the basic formula of the exponential smoothing method is: St=a*yt+(1-a)*St-1, where St is the smoothed value of time, yt is the actual value of time, St-1 is the smoothed value of time t-1, and a is a smoothing constant, whose value range is [0.1] According to the number of smoothing times, exponential smoothing is divided into: single exponential smoothing, double exponential smoothing and triple exponential smoothing, etc. The model selection is based on the actual situation. Based on the information of electricity consumption patterns, seasonal variation characteristics, development and operation information of proxy power purchase and the proportion of new energy power generation, the training set and the test set are divided to build the ARIMA prediction model; it should be noted that in this embodiment, the time series mining-autoregressive integral moving average model ARIMA model is an autoregressive integral moving average model, which is suitable for time series analysis in various fields. Its modeling idea is to regard the data sequence formed by the prediction object over time as a random sequence. Although the single sequence constituting the time series has uncertainty, the change of the entire sequence has a certain regularity. In ARIMA (p, d, q), AR is "autoregression", I is "difference method", and MA is "moving average"; p is the number of autoregressive terms, q is the number of moving average terms, and d is the number of differences (order) made to make it a stationary sequence; The specific steps are to use a unit root test (such as the ADF test) to determine the stationarity of the time series; If the time series is non-stationary, perform first-order or multi-order differences until the series is stationary; Identify appropriate ARIMA model parameters (p, d, q): p: number of autoregressive terms, determined from the autocorrelation function (ACF) plot.

[0027] d: number of differences, determined by stationarity test; q: number of moving average terms, determined by the partial autocorrelation function (PACF) plot; According to the identified parameters, an ARIMA (p, d, q) model is established; Based on the information of electricity consumption patterns, seasonal variation characteristics, the development and operation information of power purchasing agents, and the proportion of new energy power generation, the training set and test set are divided to build the SARIMA forecasting model; it should be noted that the seasonal difference autoregressive moving average model is an extension of the ARIMA model and can support time series data with seasonal components. On the basis of ARIMA (p, d, q), three hyperparameters (P, D, Q) are added, namely the seasonal autoregressive coefficient (P), the seasonal difference coefficient (D), and the seasonal moving average coefficient (Q), as well as an additional seasonal cycle parameter S; Based on the information of electricity consumption patterns, seasonal variation characteristics, the development and operation information of power purchasing agents, and the proportion of new energy power generation, the training set and test set were divided to build the LSTM neural network model. It should be noted that the long short-term memory network controls the memory of neurons for historical information through three gate structures: forget gate, input gate, and output gate. Specifically, the data is divided into feature sets (X) and labels (y), where the feature sets contain the input variables of the time series and the labels are the predicted target variables; The dataset is further divided into training set and test set; Design the LSTM network structure and determine hyperparameters such as the number of network layers, number of hidden units, and learning rate; Build an LSTM model using a deep learning framework such as TensorFlow or PyTorch; Use the training set data to train the LSTM model; The model weights are adjusted through the back-propagation algorithm and an optimizer such as Adam or RMSprop.

[0028] As an optional embodiment: the specific steps of step 4 are as follows: Exponential smoothing model validation, residual analysis and cross-validation of model prediction results to measure the accuracy of the model; it should be noted that cross-validation includes mean square error (MSE), root mean square error (RMSE) or coefficient of determination (R^2) indicators, cross-validation is performed to analyze the consistency between the trend predicted by the model and the actual trend to ensure that the model can capture the main characteristics of the time series; ARIMA model verification, residual analysis of model prediction results and calculation of mean absolute error (MAE) and root mean square error (RMSE) to measure the accuracy of the model; it should be noted that the prediction results of the ARIMA model are compared with the actual values, residuals are calculated, and it is checked whether the residuals are close to the white noise distribution, and mean absolute error (MAE) and root mean square error (RMSE) are calculated; SARIMA model verification, residual analysis of model prediction results and calculation of mean absolute error (MAE) and root mean square error (RMSE) to measure the accuracy of the model; SARIMA model verification, residual analysis of the model prediction results and calculation of mean absolute error (MAE) and root mean square error (RMSE) to measure the accuracy of the model; it should be noted that, similar to the ARIMA model, residual analysis of the SARIMA model prediction results is performed to calculate MAE and RMSE. The formula is the same as the ARIMA model verification, and the consistency between the model prediction trend and the actual trend is analyzed to ensure that the model can adapt to seasonal changes; LSTM neural network model verification, the model prediction results are measured by mean square error (MSE), root mean square error (RMSE), R-squared (R^2), and mean absolute error (MAE) to measure the accuracy of the model. It should be noted that the prediction results of the LSTM model are compared with the actual values, and the residuals are calculated to calculate the mean square error (MSE), root mean square error (RMSE), R-squared (R^2), and mean absolute error (MAE): MSE, RMSE, MAE: as defined in the exponential smoothing model, R^2: as defined in the exponential smoothing model, analyze the consistency of the trend predicted by the LSTM model and the actual trend to ensure that the model can capture the long-term dependency of the time series.

[0029] As an optional embodiment: in step 5, the specific steps of selecting and using the verified optimal model are: For each model, the mean square error (MSE) was obtained by measuring the average of the sum of squares of the differences between the predicted values ​​and the actual values; The root mean square error (RMSE) is obtained by taking the square root of the mean square error (MSE); it is used to measure the size of the prediction error; The mean absolute error (MAE) is the average of the absolute values ​​of the differences between the predicted and actual values; Analyze the residuals (actual value - predicted value) of each model to check whether the residuals are close to white noise distribution, that is, normal distribution with mean 0 and constant variance; The model with the smallest error index and the residual analysis mean closest to 0 is selected as the optimal model.

[0030] It should be noted that through the above steps, the prediction performance of different models can be systematically compared, and the optimal model that best suits the actual data characteristics can be selected for electricity consumption prediction.

[0031] As an optional embodiment: the specific steps of step 5 are as follows: The city's electricity consumption forecast, based on the selected model and combined with historical monthly electricity consumption data, predicts the city's electricity consumption in a fixed time period in the future; the fixed time period can be a set period such as one month or one year, and analyzes and predicts the time trend of electricity consumption and the year-on-year and month-on-month changes, providing data support for the company's overall distribution network capacity expansion and reconstruction plan; Regional electricity consumption forecast, based on the selected model and combined with historical monthly electricity consumption data, predicts the electricity consumption in the future fixed time period within the jurisdiction of each district and county company; analyzes the predicted electricity changes in each district and county, and provides data support for each district and county to reasonably carry out the planning and guidance of distribution network construction according to changes in their own electricity demand.

[0032] Industry electricity consumption forecast: Based on the selected model and combined with historical monthly electricity consumption data, forecast the electricity consumption of each industry in a fixed time period in the future; analyze the changes in the predicted electricity consumption of each industry to provide data support for ensuring the stability of electricity consumption in the future of each industry; Electricity consumption forecast for industrial enterprises above designated size: Based on the selected model and combined with the historical monthly electricity consumption data of industrial enterprises above designated size, the electricity consumption of industrial enterprises above designated size in a fixed time period in the future is predicted; the predicted electricity consumption changes of industrial enterprises above designated size are analyzed to assist industrial enterprises above designated size in optimizing the allocation of electricity resources, planning electricity procurement in advance, and ensuring stable electricity consumption; The proxy power purchase volume forecast, based on the selected model, predicts the proxy power purchase volume in a fixed time period in the future; analyzes and predicts the changes in the power purchase volume, supports power grid companies and power purchasing companies to sign medium- and long-term power purchase and sales contracts with power generation companies, ensures the stability of residents' electricity consumption and further reduces the cost of power purchase.

[0033] How it works By adopting multi-directional power consumption characteristic analysis, this solution can deeply explore the unique power consumption patterns and seasonal variation characteristics of different industries such as manufacturing, data centers and commercial buildings. This detailed analysis helps to build a more accurate prediction model, thereby improving the accuracy of power consumption prediction. At the same time, considering the information on the development and utilization of new energy, the solution can reduce the volatility of the prediction results and enhance the model's adaptability to the volatility of new energy. This method of comprehensive consideration of multiple factors makes the prediction results more stable and provides reliable data support for enterprise power planning and management; Through accurate electricity consumption forecasts, we help enterprises optimize the allocation of electricity resources, plan electricity procurement in advance, and reduce the electricity costs of enterprises. Especially when the electricity market fluctuates greatly, by predicting the scale and growth rate of proxy electricity purchasing users, enterprises can better understand market dynamics and formulate corresponding electricity purchasing strategies, thereby further reducing electricity purchasing costs while ensuring the stability of electricity consumption.

[0034] The above are only preferred implementations of the present invention. The protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technical staff in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of this template.

Claims

1. A method for analyzing and predicting enterprise electricity consumption based on data mining, characterized in that: The specific steps are as follows: Step 1: Obtain historical electricity consumption data, and analyze electricity consumption characteristics from multiple directions based on the historical electricity consumption data to mine electricity consumption regularity information and seasonal variation characteristics; Step 2: Analyze the scale and growth rate of power purchasing agents and the annual trend of the power purchasing agent volume to obtain the development and operation information of power purchasing agents; Step 3: Based on the historical electricity data, construct multiple time series forecasting models including exponential smoothing, ARIMA, SARIMA and LSTM neural network, and compare them to select the optimal model; Step 4: Perform residual analysis and cross-validation on the selected model, use MSE, RMSE, and MAE indicators to measure the accuracy of the model, and ensure that the model prediction trend is consistent with the actual trend; Step 5: Use the verified optimal model to analyze electricity consumption characteristics from multiple directions, and mine the information on electricity consumption patterns, seasonal variation characteristics, and the development and operation information of power purchasing agents to predict electricity consumption and obtain prediction results.

2. According to the method for analyzing and predicting enterprise electricity consumption based on data mining in claim 1, it is characterized in that: The specific steps of obtaining historical electricity consumption data are as follows: Obtain historical electricity consumption data, including electricity consumption information for the entire city, region, industry, and industrial enterprises above designated size; Integrate the collected data to form a unified data set; The collected data is cleaned, missing values ​​are processed, the quality and integrity of the data are ensured, and historical electricity consumption data is obtained.

3. The method for analyzing and predicting enterprise electricity consumption based on data mining according to claim 2 is characterized in that: The specific steps of cleaning the collected data and processing missing values ​​are as follows: Arrange the collected data in chronological order and determine which time points have missing data; For each direction, including the whole city, region, industry and industrial enterprises above designated size, the mean of known electricity consumption data is calculated respectively, according to the formula , calculated, where is the known power consumption data point in each direction, is the number of known data points, and the mean is calculated to fill the missing values ​​in the corresponding direction; For each missing data point, it is replaced with the mean of the corresponding direction.

4. The method for analyzing and predicting enterprise electricity consumption based on data mining according to claim 2 is characterized in that: The specific steps of analyzing electricity consumption characteristics from multiple directions and mining electricity consumption regularity information and seasonal variation characteristics based on historical electricity consumption data are as follows: First, using the year as the unit, obtain the electricity consumption information of the entire city, region, industry and industrial enterprises above designated size in a fixed time period before the current time point, and obtain the annual electricity consumption data in a fixed time period; Divide the annual electricity consumption data within a fixed time period into several stages; For each phase electricity consumption data point, calculate the Euclidean distance between it and all other phase data points; For each stage of electricity consumption data point, determine its k nearest neighbor points, calculate the average value of the Euclidean distances of these nearest neighbor points, and then take the inverse of the average value to obtain the local reachability density LRD; For each power consumption data point in each stage, the average value of the local reachability density LRD of its k nearest neighbor points is calculated and compared with the LRD of the data point to obtain the local outlier factor LOF; Determine an abnormal threshold to distinguish abnormal and non-abnormal data points. If the LOF value of a data point in a certain stage is greater than this threshold, it is marked as an abnormal stage. Otherwise, it is marked as normal stage; According to the comparison result between the LOF value and the abnormal threshold, the stages marked as abnormal are removed, and the stages marked as normal are retained to obtain the normal stage data.

5. The method for analyzing and predicting enterprise electricity consumption based on data mining according to claim 4 is characterized in that: For the annual electricity consumption data in the normal stage, calculate its year-on-year growth rate each year, and identify the growth or decline trend of annual electricity consumption through the year-on-year growth rate; For the annual electricity consumption data in the normal stage, further analyze the monthly electricity consumption data to identify the monthly electricity consumption fluctuations, including seasonal fluctuations and non-seasonal fluctuations; For the annual electricity consumption data in the normal stage, we further extract the electricity consumption data on weekdays and weekends, and calculate the difference between the two to identify the electricity consumption patterns on weekdays and non-working days; For the annual electricity consumption data in the normal stage, further analyze the changes in electricity consumption in different time periods within a day to obtain the peak and trough periods of electricity consumption within the day; The above data are used as information on electricity consumption patterns and seasonal variation characteristics.

6. The method for analyzing and predicting enterprise electricity consumption based on data mining according to claim 5 is characterized in that: The specific working method of step 2 is as follows: Based on the current data of proxy electricity purchase users, analyze the number of proxy electricity purchase users in the city and their proportion to all users participating in market-based electricity purchase; Based on the current historical annual increase in the number of electricity purchasing agents, analyze the annual increase in the number of electricity purchasing agents in the city and the year-on-year growth rate; Use the above data as development and operation information for power purchase by proxy; It also includes collecting the amount of electricity generated by renewable energy, dividing the amount of electricity generated by renewable energy in a fixed time period by the total electricity generated to obtain the proportion of electricity generated by renewable energy.

7. The method for analyzing and predicting enterprise electricity consumption based on data mining according to claim 1 is characterized in that: The specific working method of step three is as follows: Based on the information on electricity consumption patterns, seasonal variation characteristics, the development and operation information of power purchasing agents, and the proportion of new energy power generation, the training set and test set were divided to build an exponential smoothing prediction model; Based on the information on electricity consumption patterns, seasonal variation characteristics, the development and operation information of power purchasing agents, and the proportion of new energy power generation, the training set and test set were divided to build an ARIMA forecasting model; Based on the information on electricity consumption patterns, seasonal variation characteristics, the development and operation information of power purchasing agents, and the proportion of new energy power generation, the training set and test set were divided to build a SARIMA prediction model; Based on the information on electricity consumption patterns, seasonal variation characteristics, the development and operation information of power purchasing agents, and the proportion of new energy power generation, the training set and test set are divided, and an LSTM neural network model is constructed.

8. The method for analyzing and predicting enterprise electricity consumption based on data mining according to claim 7 is characterized in that: The specific steps of step 4 are as follows: Exponential smoothing model validation, residual analysis and cross-validation of model prediction results to measure the accuracy of the model; ARIMA model validation, performing residual analysis on the model prediction results and calculating the mean absolute error and root mean square error to measure the accuracy of the model; SARIMA model validation, performing residual analysis on the model prediction results and calculating the mean absolute error and root mean square error to measure the accuracy of the model; The LSTM neural network model is verified by using mean square error, root mean square error, R-squared, and mean absolute error to measure the accuracy of the model.

9. The method for analyzing and predicting enterprise electricity consumption based on data mining according to claim 8 is characterized in that: In step 5, the specific steps of selecting and using the verified optimal model are: For each model, the mean squared error was obtained by measuring the average of the sum of squares of the differences between the predicted values ​​and the actual values; By taking the square root of the mean square error, we get the root mean square error; The mean absolute error is the average of the absolute values ​​of the differences between the predicted and actual values; Analyze the residuals of each model to check whether the residuals are close to white noise distribution, that is, normal distribution with mean 0 and constant variance; The model with the smallest error index and the residual analysis mean closest to 0 is selected as the optimal model.

10. The method for analyzing and predicting enterprise electricity consumption based on data mining according to claim 9 is characterized in that: The specific steps of step five are as follows: The city's electricity consumption forecast, based on the selected model and combined with historical monthly electricity consumption data, predicts the city's electricity consumption in a fixed time period in the future; Regional electricity consumption forecast: Based on the selected model and combined with historical monthly electricity consumption data, the electricity consumption in the future fixed time period within the jurisdiction of each district and county company is predicted; Industry electricity consumption forecast: Based on the selected model and combined with historical monthly electricity consumption data, the electricity consumption of each industry in a fixed time period in the future is predicted; Electricity consumption forecast for industrial enterprises above designated size: Based on the selected model and combined with the historical monthly electricity consumption data of industrial enterprises above designated size, the electricity consumption of industrial enterprises above designated size in a fixed time period in the future is predicted; The proxy power purchase forecast, based on the selected model, is combined to predict the proxy power purchase amount in a future fixed time period.

Citation Information

Cited By

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

    CN120124818A

  • Microorganism data visualization chart generation system and method based on model parameters

    CN120388622A

  • Enterprise energy economic management optimization method and system based on artificial intelligence

    CN120893804A

  • An AI-based method and system for optimizing enterprise energy economic management

    CN120893804B