Power consumption prediction method, device and equipment for high-energy-load park, and medium
By establishing a high-energy-loading park power consumption prediction method based on LSO algorithm to improve the LSSVM model, the problems of large and difficult to predict power consumption are solved, and more accurate power consumption prediction and lower power consumption costs are achieved.
Patent Information
- Application Number
- CN202411674423.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-03-14
AI Technical Summary
The electricity consumption of high-energy-loading parks is affected by a variety of factors, resulting in large fluctuations in electricity consumption, which is difficult to accurately predict, affecting the reliability and stability of power supply, and increasing electricity consumption costs.
By obtaining data on historical electricity consumption and related influencing factors, normalizing and sample set division, using the LSO algorithm to improve the LSSVM model, automatically find the kernel function σ and penalty function C, and establish a high-energy-loading park power consumption prediction model.
It improves the accuracy of electricity consumption forecasting, helps park enterprises to formulate reasonable electricity consumption plans, reduce electricity costs, ensure electricity safety, and avoid power shortages or excess.
Smart Images

Figure CN119623707A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of fuzzy evaluation technology, and more specifically, to a method for predicting electricity consumption in a high-energy-load park. Background Art
[0002] With the advancement of my country's industrialization process, high-energy-load parks dominated by energy-intensive industries occupy an important position in the national economy. The concentration of high-energy-load enterprises in the park can form an industrial chain, improve resource utilization efficiency, reduce production costs, and enhance overall competitiveness. The demand for energy in high-energy-load parks continues to grow. The production process is highly dependent on electricity. The electricity consumption is usually much higher than that of general industrial enterprises. In addition, the production process is often affected by factors such as market demand, price, and raw material supply, and the electricity consumption often fluctuates greatly. At the same time, enterprises in high-energy-load parks often use a variety of electrical equipment, such as power equipment, large machinery, lighting equipment, etc. The power consumption structure is complex and has high requirements for power supply reliability and stability. The electricity cost of enterprises in high-energy-load parks accounts for a high proportion of production costs, and they are very sensitive to fluctuations in electricity prices. Therefore, the electricity consumption of high-energy-load parks is affected by many factors, and it is difficult to predict it. Summary of the invention
[0003] In order to overcome the above-mentioned defects of the prior art, an embodiment of the present invention provides a method for predicting electricity consumption in a high-load energy park, which improves the accuracy of the prediction, ensures the safety of electricity consumption in the park, and avoids power shortage or surplus.
[0004] According to a first aspect of the present disclosure, a method for predicting electricity consumption in a high-load energy park is provided, comprising: obtaining a time period to be predicted, the time period to be predicted including multiple time points; collecting first data corresponding to the electricity consumption of the high-load energy park in a historical time series, the first data including electricity consumption data and a series of related influencing factors; performing normalization processing based on the first data and the historical time series to generate a sample set, and training the sample set to obtain a high-load energy park electricity consumption prediction model; inputting the time period to be tested into the high-load energy park electricity consumption prediction model to obtain the high-load energy park electricity consumption at each time point in the time period to be predicted.
[0005] According to the second aspect of the present disclosure, there is also provided a device for predicting electricity consumption based on a high-load energy park, including: an acquisition module, for acquiring a time period to be predicted, wherein the time period to be predicted includes multiple time points; a collection module, for collecting first data corresponding to the electricity consumption of the high-load energy park in a historical time series, wherein the first data includes electricity consumption data and a sequence of related influencing factors; a construction module, for performing normalization processing based on the first data and the historical time series, generating a sample set, and training the sample set to obtain a high-load energy park electricity consumption prediction model; a prediction module, for inputting the time period to be tested into the high-load energy park electricity consumption prediction model to obtain the high-load energy park electricity consumption at each time point in the time period to be predicted.
[0006] According to the third aspect of the present disclosure, an electronic device is also provided, including a processor, and a memory and a network interface connected to the processor; the network interface is connected to a non-volatile memory in a server; when the processor is running, it calls a computer program from the non-volatile memory through the network interface, and runs the computer program through the memory to execute the above-mentioned method for predicting electricity consumption based on a high-load energy park.
[0007] According to a fourth aspect of the present disclosure, a storage medium is also provided, on which computer program instructions are stored. When the instructions are executed by a processor, the processor executes the method for predicting electricity consumption based on a high-load energy park as described above.
[0008] The technical effects and advantages of the method for predicting electricity consumption in a high-energy-load park of the present invention are as follows:
[0009] The high-load energy park electricity consumption prediction method described in the present invention fully considers the historical data information of the high-load energy park electricity consumption and its influencing factors, normalizes the relevant sequence data and divides the data set, and uses the LSO algorithm to automatically optimize and determine the kernel function σ and penalty function C of the LSSVM model, thereby overcoming the shortcomings of the traditional human subjective determination of parameters, and can improve the prediction effect of the high-load energy park electricity consumption, and obtain the most accurate high-load energy park electricity consumption prediction data, which is helpful for park enterprises to understand the trend of electricity consumption changes, formulate reasonable electricity consumption plans, and take measures to save energy and reduce consumption, thereby reducing electricity costs and promoting green and low-carbon development; it is helpful for power companies to make arrangements and arrangements for power resources in advance, ensure the safety of power consumption in the park, and avoid power shortages or surpluses; it is helpful for park managers to understand the development status of the park, formulate reasonable plans and management measures, and improve the management level of the park. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 A schematic diagram of a method for predicting electricity consumption in a high-energy-load park disclosed in the present invention is presented;
[0011] Figure 2A block diagram of the high-energy-load park electricity consumption prediction device disclosed in the present invention is presented;
[0012] Figure 3 A structural diagram of a computing device of the present disclosure is presented. DETAILED DESCRIPTION
[0013] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0014] Embodiment 1, Figure 1 The present invention provides a method for predicting electricity consumption in a high-load energy park, comprising the following steps: obtaining a time period to be predicted; wherein, S1: the prediction time period includes at least multiple time points; S2: obtaining influencing factors affecting the electricity consumption in the high-load energy park; wherein, the influencing factors include at least multiple factor points; S3: inputting the time period to be predicted into a pre-trained high-load energy park electricity consumption prediction model to obtain the high-load energy park electricity consumption at each time point in the time period to be predicted; wherein, the high-load energy park electricity consumption prediction model is obtained by training an LSSVM model improved by an LSO algorithm according to the electricity consumption corresponding to the historical time series of the high-load energy park electricity consumption and the historical time series of related influencing factors.
[0015] Furthermore, it also includes:
[0016] Collect the electricity consumption data of high-load energy parks corresponding to the historical time series and the series of related influencing factors;
[0017] According to the electricity consumption data corresponding to the historical time series of the high-load park electricity consumption, the relevant influencing factor series, and the historical time series, normalization processing is performed to generate a sample set;
[0018] Divide the samples in the sample set into training samples and test samples according to a certain method;
[0019] Use the training samples to train the LSO algorithm to improve the LSSVM model;
[0020] The trained LSO algorithm-improved LSSVM model is tested using test samples. When the test passes, a trained high-load park electricity consumption prediction model is obtained.
[0021] Furthermore, the normalization processing method of the high-load energy park electricity consumption and its related influencing factors is as follows: the related influencing factors include: output value, electricity price, life cycle stage data; the data range scales of the related influencing factors are different. If there is a very large scale range of data, the impact of the small scale range of data on model training is easily ignored, so normalization is required. Maximum-minimum normalization is to process each data using the following formula to convert the data into a [0,1] standardized form to better meet the requirements of the model.
[0022]
[0023] Where: x is the original sequence data, and x' is the sequence data after logarithmic normalization.
[0024] The data set division method of this embodiment is: after data normalization, before model training, the data set needs to be divided into a training set and a test set. The k-fold cross-validation method is used for division, and the data set is divided into k folds, each fold is used as a test set in turn, and the remaining k-1 folds are used as training sets, and cross-validation is performed multiple times. The specific steps are: first, the original data set is divided into k non-overlapping subsets, each subset is called a fold; secondly, for each fold i, the i-th fold is used as a test set, and the remaining k-1 folds are used as training sets; again, the model is trained on the training set, and the performance is evaluated on the test set; then, the performance indicators of the model in the i-th cross-validation, such as accuracy, precision, recall, etc., are calculated; finally, the above process is repeated until each fold is used as a test set, thereby completing k cross-validations, and the performance indicators of each cross-validation are averaged to obtain the average performance estimate of the model. Through the above-mentioned data normalization processing and data set division method, the data is converted into a format suitable for model input, and the LSO algorithm suitable for the task is selected to improve the LSSVM model. The preprocessed output value, electricity price, and life cycle stage data are passed to the model as input variables, and the electricity consumption of the high-load energy park is used as the output variable. The model is used to predict the electricity consumption of the high-load energy park.
[0025] The training process of the LSO algorithm to improve the LSSVM model is as follows: Initialize the LSO optimization algorithm parameters: set the upper bound (ub) and lower bound (lb) of the search space. Randomly generate the initial population, and each individual is represented as:
[0026] v i =lb+(ub-lb)·rand(1,d)
[0027] Where d is the dimension of the problem, rand(1,d) is a uniform random number vector of length d generated between [0,1].
[0028] Calculate fitness: Use the objective function f(x) to calculate the fitness value of each individual. The fitness function is defined by the root mean square error (RMSE) between the predicted value and the actual value based on the LSSVM model:
[0029]
[0030] Where: y i and are the actual high-load energy park electricity consumption value and training output value respectively, and n is the number of training samples.
[0031] Given m training samples Among them, x i ∈R n is a sample input vector, containing the power consumption of high-energy-load parks and related influencing factors, y i ∈R is the sample output vector, which is the electricity consumption data of the high-load energy park. The LSSVM model optimization objective function J is:
[0032]
[0033] Where: w is the weight vector; C is the error penalty function; ξ i is the slack variable; b is the deviation; is the kernel space mapping function; m is the number of samples.
[0034] Construct the following l agrange function L:
[0035]
[0036] Where: a i is the Lagrange multiplier.
[0037] According to the KKT condition, we can obtain the partial derivative of the above formula:
[0038]
[0039] Eliminate w and ξ i ,available:
[0040]
[0041] Where: Q = [1, ..., 1] T , A=[a1,a2,…,a m ] T , Y=[y1,y2,…,y m ] T .
[0042] By solving the above formula, the function estimate of LSSVM can be obtained as:
[0043]
[0044] K(x,x i )=exp{-||xx i || 2 / 2σ 2}
[0045] When using the LSSVM model to predict the electricity consumption of high-load energy parks, the LSSVM model has a kernel function σ and a penalty function C that need to be determined. The traditional method is to select the initial kernel function σ and penalty function C based on human experience, but this will affect the prediction accuracy of the model. Considering the shortcomings of this method, the LSO algorithm is used to automatically optimize and determine the kernel function σ and penalty function C of the LSSVM model, so as to improve the prediction effect of the electricity consumption of high-load energy parks.
[0046] Update global and personal best solutions: Initialize the global best solution (GBest) and personal best solution (PBest). In each iteration, update GBest and PBest according to the fitness value.
[0047] Spectral Dispersion: Calculates the normal vector for internal refraction, internal reflection, and external refraction. These vectors are calculated based on the current solution, the global best solution, and a randomly selected solution. They are normalized using the following formula:
[0048]
[0049] Where: ‖x‖ is the norm of vector x.
[0050] Scattering phase: First scattering phase: Generate a new solution based on the current solution, the global best solution, and a randomly selected solution. Second scattering phase: Generate rays based on the new position and update using the following formula:
[0051] new_position=α.current_position+(1-α)·best_position+β·random_vector
[0052] Where: α and β are randomly generated numbers, and random_vector is a randomly generated vector between [0,1].
[0053] Exchange phase: According to the predefined probability P e Switching is performed between the first scattering stage and the second scattering stage.
[0054] Iteration and convergence: Repeat the above steps until the predetermined number of iterations is reached or the prediction accuracy convergence condition is met.
[0055] When using the test sample for verification in this embodiment, the root mean square error RMSE and the mean absolute error MAE are used to measure the accuracy of the prediction;
[0056] The mean absolute error MAE is expressed as:
[0057]
[0058] Where: y i and are the actual high-load energy park electricity consumption value and training output value respectively, and n is the number of training samples.
[0059] The present invention also provides a device for predicting power consumption in a high-energy-load park. Figure 2 As shown, it includes: an acquisition module, which acquires the time period to be predicted, and the time period to be predicted includes multiple time points; a collection module, which collects the first data corresponding to the electricity consumption of the high-load energy park in the historical time series, and the first data includes electricity consumption data and a series of related influencing factors; a construction module, which performs normalization processing according to the first data and the historical time series, generates a sample set, and trains the sample set to obtain a high-load energy park electricity consumption prediction model; a prediction module, which inputs the time period to be tested into the high-load energy park electricity consumption prediction model to obtain the high-load energy park electricity consumption at each time point in the time period to be predicted.
[0060] Figure 3 is a structural diagram of the hardware architecture of a computing device provided by an embodiment of the present disclosure. Figure 3 As shown, the computing device 700 includes an input device 701, an input interface 702, a central processing unit 703, a memory 704, an output interface 705, and an output device 707. The input interface 702, the central processing unit 703, the memory 704, and the output interface 705 are connected to each other via a bus 710, and the input device 701 and the output device 706 are connected to the bus 710 via the input interface 702 and the output interface 705, respectively, and are further connected to other components of the computing device 700.
[0061] Figure 3 The computing device shown can also be implemented as a high-load park electricity consumption prediction device, which may include: a processor and a memory storing computer-executable instructions; when executing the computer-executable instructions, the processor can implement the training method for high-load park electricity consumption prediction provided in an embodiment of the present invention.
[0062] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented by software, the above embodiments may be implemented in whole or in part in the form of a computer program product.
[0063] Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0064] An embodiment of the present invention also provides a computer-readable storage medium, on which computer program instructions are stored; when the computer program instructions are executed by a processor, the high-load energy park electricity consumption prediction method provided by the embodiment of the present invention is implemented, or the high-load energy park electricity consumption prediction method provided by the embodiment of the present invention is implemented.
[0065] In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0066] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0067] Finally: The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. 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 predicting electricity consumption in a high-energy-load park, characterized in that: The steps include: Acquire a time period to be predicted, where the time period to be predicted includes multiple time points; Collecting first data corresponding to the electricity consumption of the high-load energy park in the historical time series, wherein the first data includes electricity consumption data and a sequence of related influencing factors; According to the first data and the historical time series, normalization processing is performed to generate a sample set, and the sample set is trained to obtain a high-load park electricity consumption prediction model; The time period to be tested is input into the high-load energy park electricity consumption prediction model to obtain the high-load energy park electricity consumption at each time point in the time period to be predicted.
2. The method for predicting power consumption in a high-energy-load park according to claim 1 is characterized in that: The training of the sample set to obtain a high-energy-load park electricity consumption prediction model specifically includes: Divide the samples in the sample set into training samples and test samples; Use the training samples to train the LSO algorithm to improve the LSSVM model; The trained LSO algorithm-improved LSSVM model is tested using test samples. When the test passes, a trained high-load park electricity consumption prediction model is obtained.
3. The method for predicting power consumption in a high-energy-load park according to claim 2 is characterized in that: According to the first data and the historical time series, normalization processing is performed, specifically by converting the data into a [0,1] standardized form. The specific formula is: Where: x is the original sequence data, and x' is the sequence data after logarithmic normalization.
4. The method for predicting power consumption in a high-energy-load park according to claim 2 is characterized in that: The method of using the test sample to test the trained LSO algorithm to improve the LSSVM model specifically includes: Initialize LSO optimization algorithm parameters; Use the objective function and calculate the fitness value of each individual; Given m training samples, establish the LSSVM model to optimize the objective function and solve it.
5. The method for predicting power consumption in a high-energy-load park according to claim 4 is characterized in that: The fitness value is calculated by using the objective function, and the fitness function is defined by the root mean square error RMSE between the predicted value and the actual value based on the LSSVM model: Where: y i and are the actual high-load energy park electricity consumption value and training output value respectively, and n is the number of training samples.
6. The method for predicting power consumption in a high-energy-load park according to claim 1 is characterized in that: When using the test sample for verification, the mean absolute error (MAE) is used to measure the accuracy of the prediction; The mean absolute error MAE is expressed as: Where: y i and are the actual high-load energy park electricity consumption value and training output value respectively, and n is the number of training samples.
7. A device for predicting power consumption in a high-energy-load park, characterized in that: include: An acquisition module is used to acquire a time period to be predicted, where the time period to be predicted includes multiple time points; A collection module, collecting first data corresponding to the electricity consumption of the high-load energy park in the historical time series, wherein the first data includes electricity consumption data and a sequence of related influencing factors; A construction module is used to perform normalization processing based on the first data and the historical time series to generate a sample set, and the sample set is trained to obtain a high-load park electricity consumption prediction model; The prediction module inputs the time period to be tested into the high-load energy park electricity consumption prediction model to obtain the high-load energy park electricity consumption at each time point in the time period to be predicted.
8. An electronic device, characterized in that: It includes a processor, and a memory and a network interface connected to the processor; the network interface is connected to a non-volatile memory in a server; when the processor is running, it calls a computer program from the non-volatile memory through the network interface, and runs the computer program through the memory to execute the method described in any one of claims 1 to 6.
9. A storage medium, characterized in that: The computer storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the method according to any one of claims 1 to 6 is implemented.