Industrial large user electricity purchase strategy optimization method based on large-scale data analysis

Through the big data computing and data stream processing framework, combined with deep learning models and multi-objective optimization algorithms, it solves the problem that traditional methods are difficult to process large-scale power information, and achieves efficient optimization of power purchase strategies for large industrial users and improvement of power stability. .

CN118586532APending Publication Date: 2024-09-03SHENYANG INST OF COMPUTING TECH CO LTD THE CHINESE ACAD OF SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310181628.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-01
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

In the power market, traditional data analysis methods are difficult to effectively process large-scale power information, resulting in poor optimization of power purchase strategies for large industrial users, poor real-time performance, and the inability to fully consider complex factors, affecting power resource allocation and power consumption stability.

Method used

The big data computing framework Hadoop and the data stream processing framework Flink are used to predict real-time electricity prices through the parallel KNN interpolation algorithm and Autoformer model. It is combined with the NSGA-II algorithm to establish a multi-objective optimization model to optimize the electricity purchase strategy.

Benefits of technology

It achieves efficient optimization of power purchase strategies for large industrial users, improves prediction accuracy and calculation speed, ensures the rationality and stability of power consumption strategies, and can predict power price trends in multiple dimensions and avoid power transaction risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118586532A
    Figure CN118586532A
Patent Text Reader

Abstract

The invention relates to an industrial large user electricity purchasing strategy optimization method based on large-scale data analysis, and the method comprises the following steps: collecting original data, building a multi-factor data set, carrying out the correlation analysis of a plurality of factors affecting the real-time electricity price, and removing variables with non-significant correlation; preprocessing the data set to obtain a data stream; the data stream is input into a machine learning model, and real-time electricity price prediction is realized through a deep learning time sequence prediction model; and constructing an electricity purchasing strategy optimization multi-target model, and based on the prediction data of the real-time electricity price, solving the model to obtain an electricity purchasing strategy optimization result. According to the invention, a multi-objective optimization model of the power purchase strategy of the industrial large users is provided, the predicted real-time electricity price information is combined with the multi-objective optimization model, and the power consumption strategy is optimized in real time according to the conditions of the users while the power consumption comfort, the economy and the power consumption stability are considered. And therefore, the industrial power consumption large users can efficiently obtain the optimal power consumption strategy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of power information big data analysis and decision-making, and in particular to a method for optimizing power purchasing strategies for large industrial users based on large-scale data analysis. Background Art

[0002] With the increasing demand for electricity in my country, China's electricity market construction is progressing steadily. Among them, power informatization is the core of the advancement of power market reform. Large-scale data analysis of power information can provide data support and risk warning, thereby optimizing users' future power purchase strategies, guiding scientific and reasonable power load distribution, and ensuring the reasonable benefits of power market participants. In the context of power marketization, real-time electricity prices are an important mechanism for regulating the balance of supply and demand in the power market. Its instantaneous fluctuations affect the distribution and flow of various resources in the power market, and play a key role in economic leverage in the power market. At the same time, real-time electricity prices are also an important data basis for optimizing power consumption strategies. Based on accurate real-time electricity price forecasts, the power purchase strategies of large industrial users can be more effectively optimized.

[0003] In the real power market, the power information data is large in scale and time-sensitive, while the traditional small-scale data processing method is difficult to achieve the ideal effect in large-scale data processing due to its low parallelism and poor real-time performance. Moreover, time series such as electricity prices and power loads are often affected by a variety of complex factors, such as policy factors, climate factors, and socio-economic factors, showing complex nonlinear dynamic characteristics with high uncertainty and volatility. The power consumption of large industrial users is complex, the power consumption characteristics are diverse, and the power demand changes rapidly. It is necessary to monitor and adjust the power consumption strategy in real time. In addition, the power consumption of large industrial users is huge, and the power stability requirements are high, so it is necessary to configure it reasonably. However, the traditional decision optimization modeling has poor real-time performance, slow optimization speed, and low accuracy. It is difficult to fully consider various factors when formulating power consumption strategies, and the optimization effect of power purchase strategies is often poor. Therefore, the present invention proposes a power purchase strategy optimization method for large industrial users based on large-scale data analysis. For the data preprocessing and sample generation of large-scale offline and online data, based on the accurate prediction of real-time electricity prices, a multi-objective optimization model for operation stability, power cost, and power comfort is established, which effectively guides users to formulate reasonable power purchase strategies and optimizes the power resource allocation of the power grid. Summary of the invention

[0004] In view of the optimization problem of power purchase strategy, the purpose of this application is to propose an optimization method for user power purchase strategy for large-scale data analysis of power information. It overcomes the shortcomings of the current power market based on traditional data analysis, can generate training samples of real-time electricity prices based on the big data computing framework, predict large-scale power information based on long-term time series prediction algorithms, model with multi-objective optimization models, and solve through NSGA-II algorithm, so as to effectively optimize the power purchase strategy of large industrial users.

[0005] Firstly, the parallel KNN interpolation algorithm is implemented by using the big data computing framework Hadoop to preprocess the missing values ​​of the historical data of the power market, and obtain the electricity price series with high data quality to establish an offline data set; online learning samples are generated through the data stream processing framework Flink; a large-scale database of multivariate associations such as electricity price, power load and climate is established; data is passed to downstream prediction computing tasks through the message queue Kafka framework; the prediction algorithm is based on the new decomposition architecture in the Autoformer model, which decomposes more predictable components from complex long-term time series. At the same time, based on the theory of random processes, the classic attention mechanism is replaced by the autocorrelation mechanism, which greatly optimizes the accuracy and calculation speed of the prediction; based on the data prediction results and user electricity consumption information, a multi-objective optimization model is used to build a model, and the NSGA-II algorithm is used to solve it, and then the electricity purchase strategy is optimized, and the prediction results are output through the electricity consumption strategy visualization output system. The rationality and efficiency of the power purchase decision of large industrial users are guaranteed.

[0006] The technical solution adopted by the present invention to achieve the above-mentioned purpose is: a method for optimizing the power purchasing strategy of large industrial users based on large-scale data analysis, comprising the following steps:

[0007] Obtain data on multiple factors of a regional power market, establish a multi-factor data set, conduct correlation analysis on multiple factors affecting real-time electricity prices, and eliminate irrelevant variables; and pre-process the data set to obtain a data stream;

[0008] Input the data stream into the time series prediction model based on deep learning, and use the time series prediction model to predict the real-time electricity price;

[0009] A multi-objective model for optimizing power purchase strategy is constructed. Based on the forecast data of real-time electricity prices, the multi-objective model for optimizing power purchase strategy is solved by NSGA-II algorithm to obtain the optimization result of power purchase strategy.

[0010] A method for optimizing the power purchasing strategy of large industrial users based on large-scale data analysis is proposed. The optimization results of the power consumption strategy are visualized based on Matplotlib and PyQT5 libraries.

[0011] The multi-factor data are historical data corresponding to a certain moment, including real-time electricity price, power load, weather, temperature, economy, and society.

[0012] The preprocessing of the data set comprises the following steps:

[0013] Interpolate the missing values ​​of the offline data set and form multiple data streams;

[0014] Multiple data streams are superimposed and aggregated to form a unified sample data corresponding to a certain moment, including real-time electricity prices, power load, weather, temperature, economy, and society, which can be used as samples for the time series prediction model.

[0015] The time series prediction model based on deep learning is an Autoformer model;

[0016] The training of the deep learning time series prediction model is specifically as follows: inputting the data stream into the time series prediction model for training, and outputting a time series representing the real-time electricity price;

[0017] The method of realizing the prediction of real-time electricity price by using the time series prediction model is specifically as follows: inputting the data stream into the time series prediction model to obtain the time series representing the real-time electricity price at the future moment.

[0018] After the deep learning-based time series model is trained, the mean absolute percentage error (MAPE), mean absolute error (MAE), and root mean square error (RMSE) are calculated through the test set, and the difference with the true value is compared to evaluate the time series prediction model.

[0019] The multi-objective model for optimizing the power purchase strategy is constructed as follows:

[0020] argminG(W)={G1(W),2(W),3(W)}

[0021]

[0022] st i,min ≤W i (t)≤W i,nax ,i=1,2,…,M

[0023]

[0024] Among them, α1, α2 and α3 are the weight coefficients of economy, comfort and equipment stability, G is the goal of the multi-objective optimization model; W i (t) is the power consumption of electrical equipment i in time period t, M is the total number of electrical appliances, and N is the number of daily time intervals; C t is the real-time electricity price at time t; W i0 (t) is the original electricity strategy

[0025] is the electrical work that must be done every day, W i,min and W i,max are the upper and lower limits of the work done by the electrical appliance per unit time, and α is the threshold for adjusting the electrical load;

[0026] W i (t (as the optimization result of the user's electricity purchasing strategy.

[0027] A large industrial user power purchase strategy optimization system based on large-scale data analysis, including:

[0028] The data set construction module is used to obtain data on multiple factors of a regional power market, establish a multi-factor data set, conduct correlation analysis on multiple factors affecting real-time electricity prices, and eliminate irrelevant variables; and pre-process the data set to obtain a data stream;

[0029] The electricity price prediction module is used to input the data stream into the time series prediction model based on deep learning, and realize the prediction of real-time electricity prices through the time series prediction model;

[0030] A strategy optimization module is constructed to construct a multi-objective model for optimizing power purchase strategies. Based on the forecast data of real-time electricity prices, the multi-objective model for optimizing power purchase strategies is solved by the NSGA-II algorithm to obtain the optimization results of power purchase strategies.

[0031] A device for optimizing power purchasing strategies for large industrial users based on large-scale data analysis comprises a memory and a processor; the memory is used to store a computer program; the processor is used to implement a method for optimizing power purchasing strategies for large industrial users based on large-scale data analysis when executing the computer program.

[0032] A computer-readable storage medium stores a computer program. When the computer program is executed by a processor, a method for optimizing a power purchasing strategy for a large industrial user based on large-scale data analysis is implemented.

[0033] The present invention has the following beneficial effects and advantages:

[0034] 1. The present invention can effectively solve the problem of generating power data samples: using Hadoop's parallel computing to implement a distributed KNN interpolation algorithm to generate offline samples for training models; designing a technical solution for Flink to generate online samples of real-time electricity prices. Compared with traditional methods, this patented method can establish a large-scale database of multi-variable associations such as electricity prices, power loads, and climate, and can achieve in-depth mining of long-sequence power information while ensuring low latency and high throughput for decision optimization. However, traditional methods cannot achieve the processing of long-sequence large-scale power information and power consumption decisions.

[0035] 2. The Autoformer forecasting model is applied to the industrial electricity consumption decision-making problem for the first time. Based on the seasonal deep decomposition architecture and autocorrelation mechanism, the long-term time series forecast of real-time electricity prices is carried out, which improves the accuracy and real-time performance of the forecasting model. The forecasting method is simple and fast, and guarantees the accuracy of the forecast results and better time complexity. It has strong robustness and generalization ability, and can achieve accurate industrial electricity consumption decisions that cannot be achieved by existing technologies.

[0036] 3. Based on accurate and efficient real-time database and electricity price forecasts, a multi-objective optimization model for the electricity purchasing strategy of large industrial users is proposed. By combining the predicted real-time electricity price information with the multi-objective optimization model, real-time adjustments can be made according to actual conditions while considering the comfort, economy and stability of electricity consumption, so that large industrial electricity users can obtain the best electricity consumption strategy in the shortest time.

[0037]

[0038] In the field of power market power consumption strategy analysis, this method has strong stability and universality, and can solve most industrial power consumption strategy optimization problems. It helps to make multi-dimensional and accurate predictions of electricity price trends in multiple regions, and provides effective multi-objective optimization of power consumption strategies, helping large industrial power users avoid power trading risks and ensure the stability of the power market. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 It is the overall framework diagram of the present invention;

[0040] Figure 2 This is a framework diagram of the KNN algorithm implemented based on MapReduce in the present invention;

[0041] Figure 3 This is a framework diagram of the power time series prediction algorithm of the present invention;

[0042] Figure 4 This is a schematic diagram of the multi-objective optimization model of the power purchasing strategy for large industrial users of the present invention. DETAILED DESCRIPTION

[0043] The present invention is further described in detail below in conjunction with the accompanying drawings and embodiments.

[0044] like Figure 1 As shown, the system framework includes the following processing steps:

[0045] 1. Input raw data: Input multi-dimensional data such as real-time electricity price data, power load data, and weather data (such as temperature, humidity, and radiation intensity).

[0046] 2. Multidimensional data modeling: Perform multidimensional modeling on the input data to establish a more comprehensive and accurate data model.

[0047] 3. Offline data sample generation: Use MapReduce (Hadoop) to implement parallel KNN interpolation technology to generate offline data samples.

[0048] 4. Online data sample generation: Use Flink to generate online data samples.

[0049] 5. Time series preprocessing: Perform time series preprocessing on the generated sample data, such as wavelet transform denoising and window smoothing.

[0050] 6. Autoformer long sequence prediction model training: Use the Autoformer long sequence prediction model to train the processed sample data to obtain real-time electricity price prediction results.

[0051] 7. Multi-objective optimization of electricity consumption decision-making: Based on the real-time electricity price forecast results, the user's original decision and the electricity consumption information of large industrial users, a multi-objective optimization model for electricity consumption decision-making is established, taking into account factors such as economy, equipment stability and comfort, to obtain the optimal electricity consumption strategy.

[0052] 8. Visual output: The results are output to the user intuitively through the power consumption strategy visual output system. The power consumption strategy visual output system includes the following functional points:

[0053] 8.1 Use a line graph to display the real-time electricity price forecast results, and use a bar graph to display the electricity consumption in each time period. Use pie charts and other graphics to show the various distribution situations of electricity consumption strategies, which is implemented through Matplotlib.

[0054] 8.2 Perform data analysis on the generated results and display various statistical data in the form of reports;

[0055] 8.3 An interactive interface is implemented based on the PyQT5 library, which supports users to interactively operate the results so that they can quickly understand the results.

[0056] like Figure 2 As shown, the technical steps to implement parallel KNN are as follows:

[0057] 1. Distribute data: First, all sample data are distributed to various servers.

[0058] 2. Map phase: In the Map phase, the Euclidean distance from the actual data to all samples is calculated. Then, the K samples with the smallest distance are found as the K nearest neighbors of the missing samples.

[0059] 3. Shuffle phase: In the Shuffle phase, the K nearest neighbors found are sorted and grouped together to form a key-value pair where the key is the missing sample label and the value is the list S of the K nearest neighbors.

[0060] 4.Reduce phase: In the Reduce phase, the means of the K nearest neighbors are calculated with respect to the missing value component. Then, they are output as key-value pairs where the key is the missing sample label and the value is the mean of the K nearest neighbors.

[0061] 5. Estimate missing values: Finally, use the mean of the K nearest neighbors to estimate the missing values.

[0062] This algorithm uses K-nearest neighbor interpolation, which is an interpolation algorithm based on nearest neighbor samples. It estimates the missing value by finding the K samples closest to the missing sample. Using MapReduce parallel processing can greatly improve the computational efficiency of the algorithm.

[0063] Autoformer is a deep learning model based on autocorrelation mechanism and novel decomposition architecture. It is used in this patent to predict real-time electricity prices. The algorithm architecture is as follows: Figure 3 As shown, the following are the technical steps of Autoformer in real-time electricity price prediction:

[0064] 1. Data preprocessing: First, preprocess the data obtained from multidimensional modeling and sample generation and convert it into a format suitable for model input.

[0065] 2. Build the Autoformer model: Build the Autoformer model and configure the parameters in the Autoformer model: determine the encoder and decoder input size according to the data scale, select the Gelu activation function to avoid the gradient vanishing problem, set the input and output paths, select the time feature encoding method, determine the training set, test set, and validation set division ratio, set the learning rate, number of runs and other parameters.

[0066] 3. Train the model: Use sample data to train the Autoformer model to minimize the prediction error.

[0067] 4. Prediction: The model outputs the predicted real-time electricity price and saves it to the database in real time through Kafka.

[0068] 5. Evaluation: Evaluate the prediction accuracy of the Autoformer model, calculate the MAPE, MAE, and RMSE indicators to quantitatively measure the error level, and evaluate the performance of the model.

[0069] Through the above steps, the Autoformer model can accurately predict the real-time electricity price and provide strong support for the electricity consumption decisions of large industrial users.

[0070] like Figure 4 The technical details of the model are as follows:

[0071] 1. Optimization objectives:

[0072] The purpose of the multi-objective optimization model is to optimize the electricity purchasing strategy of large industrial electricity users. It includes three objectives: economic objective, electricity comfort objective and equipment stability objective.

[0073] 1.1 The economic goal is to evaluate the cost function by summing the product of the real-time electricity price at each moment of the day and the power consumption of each industrial equipment. In other words, the electricity cost under this strategy is evaluated by calculating the sum of the electricity cost at each moment.

[0074] 1.2 The electricity consumption comfort target is measured by evaluating the degree of change of the electricity consumption strategy. Among them, the user's original electricity consumption strategy is regarded as the most comfortable way of electricity consumption, and the deviation between the optimized electricity consumption strategy and the original electricity consumption strategy is regarded as the degree of change of the electricity consumption strategy. Therefore, this target is used to ensure that the electricity consumption method is comfortable for the user.

[0075] 1.3 The equipment stability target is evaluated based on the operating stability of the electrical equipment. The stability of the equipment is evaluated by defining the equipment load fluctuation variance. The purpose of this target is to ensure that the equipment runs relatively smoothly.

[0076] 2. Constraints:

[0077] 2.1 The constraints in this model include that the total amount of work done by each electrical instrument every day must be greater than or equal to the required electrical work done every day.

[0078] 2.2 Each electrical appliance has a maximum power and a minimum power, so the electrical work done per unit time has an upper and lower limit.

[0079] 3. Decision variables: The decision variables of this model refer to the maximum and minimum power of industrial equipment and the power load adjustment threshold α used to control the change range of the optimization algorithm on the original strategy.

[0080] 4. Optimization algorithm:

[0081] In order to solve this model, this patent adopts the NSGA-II algorithm, which can effectively solve the high computational complexity problem of the traditional NSGA algorithm. Compared with the previous generation NSGA algorithm, this algorithm reduces the time complexity to O(MN 3 ) is reduced to O(MN 2 ), which is conducive to the rapid solution of multi-objective optimization problems.

[0082] A method for optimizing power purchasing strategies of large industrial users based on large-scale data analysis includes the following steps:

[0083] S1. Data collection: Obtain historical data on multiple factors such as real-time electricity prices, power loads, weather (such as air humidity, solar radiation intensity, precipitation, etc.), temperature, economy (such as enterprise shipments, output, turnover, regional income level, etc.), and society (such as regional prices, etc.) in the corresponding region (country, province, city); For real-time power data, establish associations between real-time data through time based on Flink: First, define the time characteristics and select event time or processing time. Then assign timestamps and watermarks to identify the order and delay of events. Use windows or processing functions to group and aggregate data according to time characteristics. Use join or connect operations to associate different data streams according to time conditions. Generate online learning samples, pass data through Kafka message queues, and establish real-time input data streams after the above information is aggregated.

[0084] S2. Correlation analysis: Multi-dimensional feature data modeling is performed to conduct correlation analysis on multiple factors affecting real-time electricity prices, using the Maximum Information Coefficient (MIC) as the correlation index.

[0085]

[0086] X and Y represent two variables that measure correlation, i.e., any two factors; B is a threshold parameter, usually set to the 0.6th power of the data volume. The MIC values ​​between samples are calculated to measure the correlation between variables, draw a heat map of variable correlation, and eliminate variables with insignificant correlation.

[0087] S3. Offline data processing: interpolate the missing values ​​of offline data and implement the KNN interpolation algorithm based on the MapReduce big data computing framework: define the data set R = {c1, c2, c3, ..., c m}, calculate the sample c corresponding to the missing value i The Euclidean distance to all samples is calculated, and the results are sorted. The K samples with the smallest distance are taken as the nearest neighbor set S = {e1, e2, ..., e k}, that is, the K closest neighbors in space, and the average value of the corresponding components of the K nearest neighbor samples is used to estimate the value of the missing data point.

[0088]

[0089] e ij is the j component value of sample i, e fj is the missing data, that is, the jth component of the sample corresponding to the fth moment.

[0090] KNN interpolation algorithm implementation method in MapReduce framework: All samples have a total of m data, c i Represents the i-th data. First, R={c1,c2,c3,...,c m The data is distributed to each server. In the Map phase, the distance between the element and other elements is calculated at the same time, and a list of K nearest neighbors S = {e1, e2, ..., e k}; In the Reduce phase, find the average value e of the components corresponding to the K samples with the closest distance ij , which is used to estimate the values ​​of missing data points.

[0091] S4. Online data processing: First, create a power information data stream. Use Flink's DataStream API to create several power information data streams, each representing a different power information data source. Then, superimpose the data streams. Use Flink's union operation to superimpose multiple power information data streams to form a unified data stream. Aggregate the data streams. Use Flink's keyby operation to aggregate the data streams and determine the change trend of power information within a certain period of time. Finally, generate the aggregated data stream as a machine learning sample to train the machine learning model.

[0092] Online data processing provides sample verification and filters samples based on data consistency and standardization. Finally, the samples are output to the Kafka message queue for prediction by the machine learning algorithm. In addition, fault handling is provided for online machine learning. When an abnormality occurs, an alarm is issued in time, the online training task is immediately suspended, and the model stops updating to avoid affecting the model prediction effect.

[0093] S5. Prediction algorithm: Based on the Autoformer model, long-sequence real-time electricity price prediction is performed through historical data. Configure the parameters in the Autoformer model: determine the encoder and decoder input size according to the data scale, select the Gelu activation function to avoid the gradient vanishing problem, set the input and output paths, select the time feature encoding method, determine the training set, test set, and validation set division ratio, set the learning rate, number of runs and other parameters.

[0094] Autoformer is a long-term sequence prediction model based on deep decomposition architecture and autocorrelation mechanism.

[0095] The electricity price sequence is input into the encoder of the Autoformer, and features are extracted through a multi-layer self-attention mechanism.

[0096] In the encoder, the sliding average idea is used to gradually decompose the trend term and period term of the electricity price series, and pass them to the decoder as latent variables.

[0097] In the decoder, an autocorrelation mechanism is used to connect latent variables at the sequence level to expand the information utility, and the trend term and period term are modeled separately.

[0098] During the prediction process, the prediction result optimization and sequence decomposition are performed alternately to achieve progressive decomposition.

[0099] The predicted trend items and cycle items are accumulated to obtain the final electricity price forecast result. The error level is quantitatively measured by calculating the MAPE, MAE, and RMSE indicators.

[0100]

[0101] n is the number of samples, that is, the number of single prediction results. is the i-th record of the predicted value, y i is the i-th record in the real data.

[0102] S6. During the forecasting process, the Matplotlib tool can be used to draw a line graph of the electricity price time series and save the intermediate results, which can be used to record and analyze the real-time electricity price trend, and help the electricity market participants to analyze the real-time electricity price forecast results.

[0103] S7. Power purchase strategy optimization algorithm: This patent uses a data-driven approach to analyze power purchase strategies. Based on the forecast data of real-time electricity prices, this optimization algorithm starts from the user side and analyzes the economy and comfort of power consumption by large industrial users, as well as the stability of equipment. A multi-objective optimization model that considers the operating stability of power equipment, power cost, and power comfort is constructed to solve the optimal strategy for power purchase by large industrial users.

[0104] argminG(W)=α1G1(W)+α2G2(W)+α3G3(W)

[0105] Among them, α1, α2 and α3 are the weight coefficients of economy, comfort and equipment stability, which can be adjusted according to the actual situation. G is the goal of the multi-objective optimization model. W is defined as follows:

[0106]

[0107] In the above formula, W i (t) is the power consumption of electrical equipment i in time period t, M is the total number of electrical appliances, and N is the number of daily time intervals.

[0108] S8. Economic objectives based on real-time electricity price forecast cost calculation. Through the above real-time electricity price forecast, the product of the real-time electricity price at each moment of the day and the power consumption of each industrial equipment can be summed as the cost function, and its minimization can be used as the economic optimization goal of multi-objective decision-making.

[0109]

[0110] In the above formula, C t is the real-time electricity price at time t.

[0111] S9. Power consumption comfort target based on the degree of change of power consumption strategy. Large industrial users often have strict power consumption plans. When optimizing power consumption strategies, we should not only consider the economic goals of power consumption cost, but also consider power consumption comfort to avoid disrupting the original power consumption plan. Therefore, taking the user's original power consumption strategy as the most comfortable way of power consumption, the deviation between the optimized power consumption strategy and the original equipment power consumption strategy is defined as the degree of change, as the goal of measuring power consumption comfort, and minimizing it as the power consumption comfort target of multi-objective decision-making.

[0112]

[0113] is the electric power consumed by the original power consumption strategy at time t.

[0114] S15. Equipment stability target based on the analysis of the smoothness of the operation of power equipment. For most industrial power equipment, additional maintenance and operation costs are required when the power is turned off and enabled, which will also affect its operating life. Therefore, it is necessary to focus on the cost loss of turning on and off large power equipment. In order to avoid frequent equipment switching, in the optimization of power consumption strategy, the equipment load fluctuation degree is defined by the equipment load fluctuation variance, and its minimization is used as the stability target of multi-objective decision-making.

[0115]

[0116] In the above formula It is the average power load of a certain device in one day.

[0117] S10. Determine the optimization constraints. First, for the optimized strategy, the total amount of work done by each electrical instrument every day must be greater than or equal to the required electrical work done every day, which is recorded as W. i,dayAt the same time, each electrical appliance has a maximum power and a minimum power, so the electrical work done per unit time has an upper and lower limit. The upper and lower limits of the work done per unit time by each electrical appliance are recorded as W i,min and W i,max .

[0118] W i,min ≤W i (t)≤W i,max ,i=1,2,…,M

[0119]

[0120]

[0121] α is the power load adjustment threshold, which is selected according to the user's actual power consumption scale and power consumption habits, and is used to control the change range of the optimization algorithm on the original strategy.

[0122] S11. Solve the multi-objective optimization problem shown in the following formula

[0123]

[0124] This patent uses the NSGA-II algorithm to solve this optimization problem. This is a fast non-dominated sorting genetic algorithm with an elite strategy. It introduces an elite preservation strategy to improve the retention rate of excellent individuals, which can effectively solve the high computational complexity problem of the traditional NSGA algorithm. Compared with the previous generation NSGA algorithm, the time complexity is reduced to O(MN 3 ) is reduced to O(MN 2 ), and has a good convergence speed. By comparison, the performance and effect of NSGA-II algorithm on this multi-objective optimization problem are superior to other algorithms.

[0125] S12. Output and visualization of optimization strategy calculation results: The output system is implemented based on Matplotlib and PyQT5 libraries, providing users with the input of strategy information, output of real-time electricity price forecast curves, and query functions for optimization strategies. It can intuitively display the improvements in large industrial electricity consumption before and after the optimization of electricity consumption strategies, and provide report output and printing functions.

[0126] In order to demonstrate the practicality and significant effect of the present invention, the specific implementation of a large-scale manufacturing electricity-consuming enterprise in a certain region is cited as an example for illustration. Real-time electricity prices, society, economy, climate, and electricity consumption information of a large industrial electricity user in the region are verified with real data. This region has a population of 500w, the electricity market started early, and it has a relatively complete electricity spot market response mechanism. This large electricity user is a typical manufacturing enterprise in this region. Therefore, its real data is typical for the electricity consumption decision-making of large users.

[0127] This embodiment includes the following steps:

[0128] 1. Gather the real-time electricity price, power load, climate, temperature, socio-economic indicators and other data of the target area every half hour from 2003 to 2021; resample the real-time electricity price, power load and other data of this area in time series, and sample the sampling frequency of each data indicator in hourly units; collect the power load, operating time and power information of each power-consuming equipment of this power-consuming enterprise.

[0129] 2. Carry out correlation analysis on multi-factor indicators related to real-time electricity prices, use the maximum information coefficient MIC as the correlation indicator, measure the correlation between variables, draw a variable correlation heat map, and eliminate variables with insignificant correlation.

[0130] 3. For example, in an embodiment of the present application, the real real-time electricity price information of the local power system for 19 years is collected, and the real-time power load, weather station temperature, humidity, and solar radiation conditions in the area are used as the main variables for large-scale data mining.

[0131] 4. Interpolate the missing data using the KNN interpolation algorithm implemented based on the MapReduce framework. In the Map stage, find the distance of each missing point to other samples and take the smallest K samples. In the Reduce stage, solve the average of the K samples corresponding to this variable as the interpolation value. In addition, the K value in the KNN algorithm needs to be determined according to the actual data scale. After testing, in this embodiment, the interpolation effect is best when the K value is set to 3.

[0132] 5. Use the Flink data stream processing framework to generate samples for online machine learning and format the data stream.

[0133] 6. Perform wavelet transform denoising on the noisy power load time series.

[0134] 7. The real-time electricity price is predicted based on the Autoformer prediction model, and the LSTM single variable classic prediction model is set up as a control. During the prediction process, the prediction results of each time period are output to the database in real time through the message queue Kafka.

[0135] 8. Calculate the error indicators using the pre-divided test set: mean absolute percentage error (MAPE), mean absolute error (MAE), and root mean square error (RMSE) to measure the prediction effects of the two models.

[0136] 9. Use Matplotlib to draw time series images of historical and predicted prices, which makes it easier for users to analyze and determine the trend of real-time electricity prices in this area, and serves as a reference for pricing and electricity consumption.

[0137] 10. Based on the analysis of the prediction results of real-time electricity prices, the electricity consumption strategy is modeled through a multi-objective optimization model. A multi-objective optimization model that takes into account electricity economy, electricity comfort and equipment stability is constructed.

[0138] argminG(W)={G1(W),2(W),3(W)}

[0139] At the same time, two comparative models are established: a dual-objective model that only considers the electricity comfort goal and the economic goal, and a multi-objective optimization model that only considers the economic goal, to illustrate the significant effect of this patented multi-objective optimization model applied to large electricity users in the embodiment.

[0140] 11. The NSGA-II multi-objective genetic algorithm is used to solve this optimization problem. The population is initialized, the parent and child populations are merged, and a new population is generated. If a new parent population is not generated, the objective function in the new population is calculated, and a fast non-dominated sort is performed, the crowding degree is calculated, and the elite strategy is implemented to generate a new parent population. The generated parent population is selected, crossed, and mutated to generate a child population. Iterate several times until convergence, and the algorithm ends to obtain the output result. The NSGA-II algorithm described above is implemented based on the built-in crowding-based selection function tools.selNSGA2 in the DEAP library in Python.

[0141] 12. The output system is implemented based on Matplotlib and PyQT5 libraries, providing users with the input of strategy information, the output of real-time electricity price forecast curves, and the query function of optimization strategy. It can intuitively display the improvement of large industrial electricity consumption before and after the optimization of electricity strategy, and provide report saving and printing functions.

[0142] The present invention collects historical data such as real-time electricity prices, power loads, climate, temperature, and economy in the power market, completes data through the KNN algorithm based on the Hadoop framework, and then generates online machine learning samples through the stream data processing framework Flink to obtain a large-scale power information database; then based on the deep decomposition architecture and autocorrelation mechanism of Autoformer, long-term time series prediction of real-time electricity prices is performed. The prediction results are highly consistent with the actual electricity prices, the change trends are close, and the accuracy of the prediction results and the better time complexity are guaranteed; at the same time, the use of NSGA-Ⅱ to solve the multi-objective optimization model can provide the optimal power consumption strategy optimization solution.

[0143] Measuring the effect of the prediction model: Referring to the real data of real-time electricity prices of large-scale power plants in the reference embodiment area, the error rate of the prediction results of daily real-time electricity prices is less than 3%. As a comparison model, the complexity of LSTM is about 20%, which has basically no reference value for the prediction of long-sequence real-time electricity prices and cannot provide support for subsequent decision-making optimization algorithms. The prediction model selected in this patent has strong prediction capabilities.

[0144] Measuring the optimization effect of the multi-objective optimization algorithm on the electricity consumption strategy of this manufacturing enterprise: In order to measure the superiority of the multi-objective optimization model, this embodiment compares a dual-objective model that only considers comfort and economic objectives, and a multi-objective optimization model that only considers economic objectives.

[0145] This large industrial user hopes to achieve the best balance in terms of electricity comfort, economy and stability. The multi-objective optimization model can calculate the comprehensive score of each electricity strategy through this user trade-off factor (in this embodiment, the weight coefficients are set according to the actual situation of the large user: the electricity comfort target is 0.2, the economy target is 0.6, and the electricity stability target is 0.2). The solution provided by the dual-objective optimization model gives the highest comprehensive score for electricity comfort and economy. The single-objective optimization model only considers the highest score for electricity economy. Finally, the comprehensive scores of the strategies obtained daily by different models are calculated and compared. After normalization, the average score of the multi-objective model in this embodiment is about 86 points, the average score of the dual-objective model is 74 points, and the average score of the single-objective model is about 23 points. It shows that the multi-objective decision-making integrates the multi-faceted needs of large industrial users and has a significant optimization effect.

[0146] Finally, the above-described contents are only embodiments of the present invention based on a typical region, but the protection scope of the patent of the present invention is not limited thereto. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for optimizing power purchasing strategies for large industrial users based on large-scale data analysis, characterized in that: The following steps are involved: Obtain data on multiple factors of a regional power market, establish a multi-factor data set, conduct correlation analysis on multiple factors affecting real-time electricity prices, and eliminate irrelevant variables; and pre-process the data set to obtain a data stream; Input the data stream into the time series prediction model based on deep learning, and use the time series prediction model to predict the real-time electricity price; A multi-objective model for optimizing power purchase strategy is constructed. Based on the forecast data of real-time electricity prices, the multi-objective model for optimizing power purchase strategy is solved by NSGA-II algorithm to obtain the optimization result of power purchase strategy.

2. According to the method for optimizing power purchasing strategies for large industrial users based on large-scale data analysis described in claim 1, the optimization results of power consumption strategies are visualized based on Matplotlib and PyQT5 libraries.

3. The method for optimizing power purchasing strategy for large industrial users based on large-scale data analysis according to claim 1 is characterized in that: The multi-factor data are historical data corresponding to a certain moment, including real-time electricity price, power load, weather, temperature, economy, and society.

4. The method for optimizing the power purchasing strategy of large industrial users based on large-scale data analysis according to claim 1 is characterized in that: The preprocessing of the data set comprises the following steps: Interpolate the missing values ​​of the offline data set and form multiple data streams; Multiple data streams are superimposed and aggregated to form a unified sample data corresponding to a certain moment, including real-time electricity prices, power loads, weather, temperature, economy, and society, which can be used as samples for the time series prediction model.

5. The method for optimizing power purchasing strategy for large industrial users based on large-scale data analysis according to claim 1 is characterized in that: The time series prediction model based on deep learning is an Autoformer model; The training of the deep learning time series prediction model is specifically as follows: inputting the data stream into the time series prediction model for training, and outputting a time series representing the real-time electricity price; The method of realizing the prediction of real-time electricity price by using the time series prediction model is specifically as follows: inputting the data stream into the time series prediction model to obtain the time series representing the real-time electricity price at the future moment.

6. The method for optimizing the power purchasing strategy of large industrial users based on large-scale data analysis according to claim 1 is characterized in that: After the deep learning-based time series model is trained, the mean absolute percentage error (MAPE), mean absolute error (MAE), and root mean square error (RMSE) are calculated through the test set, and the difference with the true value is compared to evaluate the time series prediction model.

7. The method for optimizing power purchasing strategy for large industrial users based on large-scale data analysis according to claim 1 is characterized in that: The multi-objective model for optimizing the power purchase strategy is constructed as follows: argminG(W)={G1(W), G2(W), G3(W)} s.t.W i,min ≤W i (t)≤W i,max ,i=1,2,...,M Among them, α1, α2 and α3 are the weight coefficients of economy, comfort and equipment stability, G is the goal of the multi-objective optimization model; W i (t) is the power consumption of electrical equipment i in time period t, M is the total number of electrical appliances, and N is the number of daily time intervals; C t is the real-time electricity price at time t; W i 0 (t) is the electric power consumed by the original power consumption strategy at time t; is the average power load of a certain device in one day; W i,day is the electrical work that must be done every day, W i,min and W i,max are the upper and lower limits of the work done by the electrical appliance per unit time, and α is the threshold for adjusting the electrical load; W i (t(as the optimization result of the user’s electricity purchasing strategy.

8. A large industrial user electricity purchasing strategy optimization system based on large-scale data analysis, characterized in that: include: The data set construction module is used to obtain data on multiple factors of a regional power market, establish a multi-factor data set, conduct correlation analysis on multiple factors affecting real-time electricity prices, and eliminate irrelevant variables; and pre-process the data set to obtain a data stream; The electricity price prediction module is used to input the data stream into the time series prediction model based on deep learning, and realize the prediction of real-time electricity prices through the time series prediction model; A strategy optimization module is constructed to construct a multi-objective model for optimizing power purchase strategies. Based on the forecast data of real-time electricity prices, the multi-objective model for optimizing power purchase strategies is solved by the NSGA-II algorithm to obtain the optimization results of power purchase strategies.

9. A device for optimizing power purchasing strategies for large industrial users based on large-scale data analysis, characterized in that: It comprises a memory and a processor; the memory is used to store a computer program; the processor is used to implement a method for optimizing electricity purchasing strategy for large industrial users based on large-scale data analysis as described in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the processor, the method for optimizing the electricity purchasing strategy of large industrial users based on large-scale data analysis as described in any one of claims 1 to 7 is implemented.