Method, system and equipment for predicting energy consumption of enterprise
By combining ARIMA and CCSO-BiLSTM models, linear and nonlinear prediction of historical energy consumption data is solved, and the problem of timeliness and accuracy of energy consumption monitoring in small and medium-sized enterprises is achieved, and energy consumption prediction with higher accuracy is achieved.
Patent Information
- Application Number
- CN202411453193.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-17
- Publication Date
- 2025-04-04
AI Technical Summary
In the prior art, the monitoring time of energy consumption of small and medium-sized enterprises is too long and the feedback time is low, resulting in low statistical accuracy of energy consumption and the inability to make an accurate prediction model of future energy consumption.
The ARIMA model is used to predict the historical energy consumption data linearly, and the residual data is obtained by making a difference with the prediction results. The residual data is then nonlinearly predicted by using the CCSO-BiLSTM model. By combining the prediction results of the two models, the final energy consumption prediction results are obtained.
It improves the accuracy of energy consumption prediction, can more accurately predict the future energy consumption of enterprises, and provides more reliable energy consumption prediction and analysis support for regional enterprises and government departments.
Smart Images

Figure CN119761405A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of energy forecasting, and in particular relates to a method, system and device for forecasting enterprise energy consumption. Background Art
[0002] Energy is the lifeblood of modern social development and the foundation for the rapid development of the national economy. With the rapid development of all walks of life in society, the problems of high energy consumption and low energy utilization are becoming increasingly prominent. The overall energy consumption needs to be reasonably controlled.
[0003] Energy conservation and consumption reduction requires first of all a good monitoring of energy consumption, so as to make a good energy consumption forecasting plan. All provinces in the country have deployed monitoring mechanisms and online monitoring platforms for energy consumption of major enterprises. However, except for major enterprises, the monitoring time of energy consumption of small and medium-sized enterprises is too long, and the feedback timeliness is low, resulting in low accuracy of overall energy consumption statistics and inability to make an accurate forecasting model for future energy consumption. Therefore, there is a technical problem of low accuracy in energy consumption forecasting in the existing technology. Summary of the invention
[0004] The purpose of the present invention is to provide a method, system and device for predicting enterprise energy consumption with high prediction accuracy in view of the above-mentioned problems existing in the prior art.
[0005] To achieve the above objectives, the technical solution of the present invention is as follows:
[0006] In a first aspect, the present invention provides a method for predicting energy consumption of an enterprise, the method comprising:
[0007] S1. Obtain a historical data set and perform a stabilization process on the historical data set to obtain linear data of the historical data set; the historical data set includes energy consumption, electricity consumption, and GDP;
[0008] S2. Use a pre-built first energy consumption prediction model to predict the linear data of the historical data set to obtain a first model prediction result; the first energy consumption prediction model is an ARIMA model;
[0009] S3, subtracting the historical data set from the prediction result of the first model to obtain residual data of the energy consumption data set;
[0010] S4. Predict the residual data of the energy consumption data set using a pre-built second energy consumption prediction model to obtain a second model prediction result; the second energy consumption prediction model is a CCSO-BiLSTM model, and the CCSO-BiLSTM model is obtained by first optimizing the parameters of the BiLSTM model using a chaotic chicken swarm optimization algorithm, and then substituting the obtained optimal parameters into the BiLSTM model for training;
[0011] S5. Combining the prediction result of the first model and the prediction result of the second model to obtain a final energy consumption prediction result.
[0012] In S4, the process of optimizing the parameters of the BiLSTM model using the chaotic chicken swarm optimization algorithm is as follows:
[0013] S41, initialization parameters;
[0014] S42, initialize the chicken flock, group the chicken flock according to the number of roosters, and assign hens and chicks to each group according to the fitness value;
[0015] S43, start iteration and update the position of the chicken group;
[0016] S44, replacing the rooster particles with poor fitness by the hen particles with better fitness obtained by using the chaotic search algorithm;
[0017] S45, updating the chicken position, calculating the chicken fitness value, and judging whether the chicken particle is trapped in the local optimal position, if so, randomly assigning mutations to it;
[0018] S46, updating individual fitness values and searching for the global optimal position;
[0019] S47, determine whether the maximum number of iterations has been reached, if not, return to S43 to continue iterating, if reached, output the optimal parameters.
[0020] The position update formula of the i-th rooster is:
[0021]
[0022] In the above formula, Respectively represent the position of the i-th rooster after and before the update; randn(0,σ 2 ) has a mean of 0 and a standard deviation of σ 2 Normal distribution; ψ is an infinitely small positive number; f i represents the fitness value of the i-th rooster; f k Represents the fitness value of any rooster in the flock except the i-th rooster;
[0023] The hen position update formula is expressed as:
[0024]
[0025] In the above formula, They represent the positions of the hen before and after the update; rand represents a random number between 0 and 1; f i' represents the fitness value of the i'th hen; f r 、f s are the fitness values of the rth and sth hens respectively; They represent the positions of the rth and sth hens before updating respectively;
[0026] The calculation formula of the adaptive learning factor is:
[0027]
[0028] In the above formula, λ is the relative rate of change; f i″ (t) is the fitness value of the i″th chick in the tth iteration; f best The optimal fitness value for the iterative process of the chick;
[0029] The chicken position update formula is expressed as:
[0030]
[0031] In the above formula, Respectively represent the position of the i″th chicken after and before the update; represents the adaptive learning factor; m k is the number of chicks; f i″ is the fitness value of the i″th chick; is the average fitness value of chicks; f is the normalization factor.
[0032] In S45, the chicken mutation operator is calculated. If the chicken mutation operator reaches a preset threshold, it means that the chicken particle is trapped in a local optimal position and a random mutation operation needs to be performed on the chicken. The calculation formula of the chicken mutation operator is:
[0033]
[0034] In the above formula, is the chicken mutation operator.
[0035] In a second aspect, the present invention provides a device for predicting energy consumption of an enterprise, the device comprising:
[0036] A data acquisition device, used to acquire a historical data set and perform a stabilization process on the historical data set to obtain linear data of the historical data set; the historical data set includes energy consumption, electricity consumption, and GDP;
[0037] A first prediction module is used to predict the linear data of the historical data set using a pre-built first energy consumption prediction model to obtain a first model prediction result; the first energy consumption prediction model is an ARIMA model;
[0038] A residual calculation module, used for performing a difference between the historical data set and the first energy consumption prediction result to obtain residual data of the energy consumption data set;
[0039] The second prediction module is used to predict the residual data of the energy consumption data set by using a pre-built second energy consumption prediction model to obtain a second model prediction result; the second energy consumption prediction model is a CCSO-BiLSTM model, and the CCSO-BiLSTM model is obtained by first optimizing the parameters of the BiLSTM model by using a chaotic chicken swarm optimization algorithm, and then substituting the obtained optimal parameters into the BiLSTM model for training;
[0040] The combined prediction module is used to combine the prediction result of the first model and the prediction result of the second model to obtain the final energy consumption prediction result.
[0041] The process of optimizing the parameters of the BiLSTM model using the chaotic chicken swarm optimization algorithm is as follows:
[0042] S41, initialization parameters;
[0043] S42, initialize the chicken flock, group the chicken flock according to the number of roosters, and assign hens and chicks to each group according to the fitness value;
[0044] S43, start iteration and update the position of the chicken group;
[0045] S44, replacing the rooster particles with poor fitness by the hen particles with better fitness obtained by using the chaotic search algorithm;
[0046] S45, updating the chicken position, calculating the chicken fitness value, and judging whether the chicken particle is trapped in the local optimal position, if so, randomly assigning mutations to it;
[0047] S46, updating individual fitness values and searching for the global optimal position;
[0048] S47, determine whether the maximum number of iterations has been reached, if not, return to S43 to continue iterating, if reached, output the optimal parameters.
[0049] The rooster position update formula is:
[0050]
[0051] In the above formula, Respectively represent the position of the i-th rooster after and before the update; randn(0,σ 2 ) has a mean of 0 and a standard deviation of σ 2 Normal distribution; ψ is an infinitely small positive number; f i represents the fitness value of the i-th rooster; f k Represents the fitness value of any rooster in the flock except the i-th rooster;
[0052] The hen position update formula is expressed as:
[0053]
[0054] In the above formula, They represent the positions of the hen before and after the update; rand represents a random number between 0 and 1; f i' represents the fitness value of the i'th hen; f r 、f s are the fitness values of the rth and sth hens respectively; They represent the positions of the rth and sth hens before updating respectively;
[0055] The calculation formula of the adaptive learning factor is:
[0056]
[0057] In the above formula, λ is the relative rate of change; f i″ (t) is the fitness value of the i″th chick in the tth iteration; f best The optimal fitness value for the iterative process of the chick;
[0058] The chicken position update formula is expressed as:
[0059]
[0060] In the above formula, Respectively represent the position of the i″th chicken after and before the update; represents the adaptive learning factor; m k is the number of chicks; f i″ is the fitness value of the i″th chick; is the average fitness value of chicks; f is the normalization factor.
[0061] In S45, the chicken mutation operator is calculated. If the chicken mutation operator reaches a preset threshold, it means that the chicken particle is trapped in a local optimal position and a random mutation operation needs to be performed on the chicken. The calculation formula of the chicken mutation operator is:
[0062]
[0063] In the above formula, is the chicken mutation operator.
[0064] In a third aspect, the present invention provides a device for predicting enterprise energy consumption, the device comprising a memory and a processor;
[0065] The memory is used to store computer program code and transmit the computer program code to the processor;
[0066] The processor is used to execute the aforementioned method according to the instructions in the computer program code.
[0067] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the aforementioned method when executed by a processor.
[0068] Compared with the prior art, the present invention has the following beneficial effects:
[0069] The present invention provides a method for predicting enterprise energy consumption. The method uses a pre-built first energy consumption prediction model to predict the linear data of a historical data set to obtain a first model prediction result, and then makes a difference based on the historical data set and the first model prediction result to obtain residual data of the energy consumption data set. The pre-built second energy consumption prediction model is used to predict the residual data of the energy consumption data set to obtain a second model prediction result. The first model prediction result and the second model prediction result are combined to obtain the final energy consumption prediction result. In the first aspect, since the first energy consumption prediction model adopts the ARIMA model and the second energy consumption prediction model adopts the CCSO-BiLSTM model, since the ARIMA model is used for the linear data of the time series data set, the energy consumption data set is predicted by the first energy consumption prediction model. Strong prediction ability. BiLSTM has strong nonlinear prediction ability for time series data. Therefore, the combined model composed of ARIMA and BiLSTM is used for time series data prediction, which can effectively improve the prediction accuracy of the model and provide method support for the prediction and analysis of energy consumption of regional enterprises and government departments. Secondly, since the CCSO-BiLSTM model is to optimize the parameters of the BiLSTM model by first using the chaotic chicken swarm optimization algorithm, the chaotic chicken swarm optimization algorithm combines chaos theory and the chicken swarm optimization algorithm. Compared with other traditional meta-heuristic algorithms, the chaotic chicken swarm optimization algorithm is more robust and converges faster. The optimal parameters searched by the chaotic chicken swarm optimization algorithm are substituted into the BiLSTM model for training, which can shorten the training time and improve the search speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] Figure 1 The figure is a flow chart of the prediction method of the present invention.
[0071] Figure 2 This is a flow chart for constructing the CCSO-BiLSTM model in the present invention.
[0072] Figure 3 This is the BiLSTM model network topology diagram of the CCSO-BiLSTM model in the present invention.
[0073] Figure 4 It is a comparison chart of the prediction results of the traditional APTMA model and the method described in the present invention.
[0074] Figure 5 It is a comparison chart of the prediction errors of the traditional APTMA model and the method described in the present invention.
[0075] Figure 6 It is a structural block diagram of the prediction system described in the present invention.
[0076] Figure 7 A network architecture diagram constructed for the present invention including enterprise and government statistical agencies, a cloud service management platform, and an energy consumption prediction and processing center.
[0077] Figure 8 This is a structural block diagram of the prediction device described in the present invention. DETAILED DESCRIPTION
[0078] The present invention is further described in detail below in conjunction with specific implementations and drawings.
[0079] Embodiment 1:
[0080] See also Figure 1 , a method for predicting enterprise energy consumption, is carried out in the following steps:
[0081] S1. Obtain a historical data set and perform a stabilization process on the historical data set to obtain linear data of the historical data set; the historical data set includes energy consumption, electricity consumption, and GDP;
[0082] S2. Use the pre-built first energy consumption prediction model to predict the linear data of the historical data set to obtain the first model prediction result; the first energy consumption prediction model is an ARIMA (autoregressive differential moving average model) model, including autoregressive AR, moving average MA, autoregressive term p, number of moving average terms q, and the number of differences d processed when the time series is converted into a stationary time series; when building the ARIMA model, first use the unit root test (ADF) to determine the stationarity of the data. After the time series data is stabilized, the ARIMA (p, d, q) model is converted into an ARMA (p, q) model. After the sequence becomes a stationary series after d times of differentiation, the ARIMA (p, d, q) model is established:
[0083]
[0084] In the above formula, w, z, and v represent the time series data of energy consumption, electricity consumption, and GDP respectively, and u is a white noise sequence; historical data from ti to t-1 are used; u t is the white noise sequence in the tth year, which obeys the independent normal distribution N(0,σ 2 ), p, r, s are all autoregressive terms; q is the number of moving average terms; φ i , α i , β i ,θ i are all model parameters; γ is a constant, indicating that the sequence data is not zero-meaned;
[0085] The autocorrelation function (ACF) and partial autocorrelation function (PACF) are used to determine the coefficients and order of the ARIMA model. After the order of the time series analysis model is determined, the least squares method is used to estimate the parameters of the ARIMA model.
[0086] S3, based on the historical data set and the first model prediction result, a difference is made to obtain residual data of the energy consumption data set; specifically, the difference between the historical data set and the first energy consumption prediction result;
[0087] S4. Use the pre-built second energy consumption prediction model to predict the residual data of the energy consumption data set to obtain the second model prediction result; the second energy consumption prediction model is a CCSO-BiLSTM model, such as Figure 2 As shown, the CCSO-BiLSTM model is obtained by first optimizing the parameters of the bidirectional long short-term memory network model (BiLSTM) using the chaotic chicken swarm optimization algorithm (CCSO), and then substituting the obtained optimal parameters into the BiLSTM model for training;
[0088] The BiLSTM model is Figure 3 As shown in the figure, it includes forward LSTM and backward LSTM. It reduces the risk of long sequence information loss through bidirectional information processing and has strong processing performance for nonlinear time data sequences. The specific update process is as follows:
[0089] Forget gate: f t =sigmoid(W f ·[h t-1 ,x t ]+b f );
[0090] Input gate: i t =sigmoid(w i [h t-1 ,x t ]+b i );
[0091] Candidate neuron status:
[0092] Update neuron state: C t =f t ×C t-1 +i t ×C t ;
[0093] Output gate: O t =sigmoid(w o [h t-1 ,x t ]+b o );
[0094] Update hidden state: h t =O t ×tanh(C t );
[0095] In the above formula, f t is the state of the forget gate; W f is the forget gate weight matrix; h t-1 is the hidden layer state information at time t-1; x t b is the input information at time t; f is the forget gate bias vector; i t is the input gate state; w i is the weight moment of the input gate unit; b i is the input gate bias vector; is the candidate neuron state; w c is the candidate state unit weight matrix; b c is the candidate state unit bias vector; C t is the state of the memory unit at time t; C t-1 is the state of the memory unit at time t-1; O t is the state quantity of the output gate; w o is the output weight matrix; b o is the output bias vector;
[0096] By averaging the hidden states of the forward LSTM and the backward LSTM to produce the final output at each time step;
[0097] In order to further improve the data processing capability of the BiLSTM model, the CCSO algorithm is used to optimize the BiLSTM parameters; the optimization process of the chaotic chicken swarm optimization algorithm is as follows:
[0098] S41, initialization parameters;
[0099] S42, initialize the chicken flock, group the chicken flock according to the number of roosters, and assign hens and chicks to each group according to the fitness value;
[0100] S43, start iteration and update the position of the chicken group;
[0101] S44, replacing the rooster particles with poor fitness in the same group with the hen particles with better fitness obtained by using the chaotic search algorithm;
[0102] S45, updating the chicken position, calculating the chicken fitness value, and judging whether the chicken particle is trapped in the local optimal position, if so, randomly assigning mutations to it;
[0103] S46, updating individual fitness values and searching for the global optimal position;
[0104] S47, judging whether the maximum number of iterations has been reached, if not, returning to S43 to continue iterating, if reached, outputting the optimal parameters;
[0105] In S43, the rooster position update formula is:
[0106]
[0107] In the above formula, Respectively represent the position of the i-th rooster after and before the update; randn(0,σ 2 ) has a mean of 0 and a standard deviation of σ 2 Normal distribution; ψ is an infinitely small positive number; f i represents the fitness value of the i-th rooster; f k Represents the fitness value of any rooster in the flock except the i-th rooster;
[0108] In the chicken group optimization algorithm, the foraging ability of roosters is the strongest, followed by hens, and the worst is chicks. With the deepening of iteration, the search ability of rooster particles will deteriorate. In addition, since the number of hen particles is the largest, the search results of hen particles have a great influence on the algorithm results. By adopting the chaotic search algorithm, the hen particles with better fitness (for example, the top 10%) are searched to randomly replace the roosters with poor fitness in the same group, thereby speeding up the search speed of the group.
[0109] The hen position update formula is expressed as:
[0110]
[0111] In the above formula, They represent the positions of the hen before and after the update; rand represents a random number between 0 and 1; f i' represents the fitness value of the i'th hen; f r 、f s are the fitness values of the rth and sth hens respectively (the rth and sth hens are randomly selected); They represent the positions of the rth and sth hens before updating respectively;
[0112] The traditional chicken flock optimization algorithm includes rooster particles, hen particles and chick particles. Roosters have the strongest foraging ability, followed by hens, and chicks are the worst. In order to improve the foraging ability of chicks, an adaptive learning factor is introduced. The chicken position update formula after the introduction of the adaptive learning factor is expressed as:
[0113]
[0114] In the above formula, Respectively represent the position of the i″th chicken after and before the update; represents the adaptive learning factor; m k is the number of chicks; f i″ is the fitness value of the i″th chick; is the average fitness value of the chicks; f is the normalization factor;
[0115] The calculation formula of the adaptive learning factor is:
[0116]
[0117] In the above formula, λ is the relative rate of change; f i″ (t) is the fitness value of the i″th chick in the tth iteration; f best The optimal fitness value for the iterative process of the chick;
[0118] Since the chicken fitness variance reflects the aggregation degree of the chicken fitness value, the smaller the chicken fitness variance is, the higher the aggregation degree of the chicken fitness value is. When the chicken particle falls into the local extreme value, the fitness variance tends to 0. Therefore, the chicken fitness variance is used as the chicken mutation operator. When the chicken mutation operator reaches the preset threshold, the chicken is mutated. Through the mutation operation, the search space of the chicken can be broadened. The calculation formula of the chicken mutation operator is:
[0119]
[0120] In the above formula, is the chicken mutation operator;
[0121] S5. Combining the prediction result of the first model and the prediction result of the second model to obtain a final energy consumption prediction result; the combination operation specifically adds the prediction result of the first model and the prediction result of the second model.
[0122] To verify the effectiveness of the present invention, the energy consumption data of a province from 2000 to 2020 is taken as an example, and the traditional ARIMA model and the method of the present invention are used for prediction respectively; the prediction results and prediction errors are obtained as follows: Figure 4 , Figure 5 As shown, it can be seen that the prediction accuracy of the present invention is higher than that of the traditional ARIMA model.
[0123] Embodiment 2:
[0124] See also Figure 6, a prediction device for enterprise energy consumption, comprising a data acquisition device, a first prediction module, a residual calculation module, a second prediction module, and a combined prediction module; the data acquisition device is used to acquire a historical data set and perform a stabilization process on the historical data set to obtain linear data of the historical data set; the historical data set includes energy consumption, electricity consumption, and GDP; the first prediction module is used to predict the linear data of the historical data set using a pre-built first energy consumption prediction model to obtain a first model prediction result, wherein the first energy consumption prediction model is an ARIMA model; the residual calculation module is used to perform a difference between the historical data set and the first energy consumption prediction result to obtain residual data of the energy consumption data set; the second prediction module is used to predict the residual data of the energy consumption data set using a pre-built second energy consumption prediction model to obtain a second model prediction result, wherein the second energy consumption prediction model is a CCSO-BiLSTM model, wherein the CCSO-BiLSTM model is obtained by first performing parameter optimization on the BiLSTM model using a chaotic chicken flock optimization algorithm, and then substituting the obtained optimal parameters into the BiLSTM model for training; the optimization process of the chaotic chicken flock optimization algorithm is as follows:
[0125] S41, initialization parameters;
[0126] S42, initialize the chicken flock, group the chicken flock according to the number of roosters, and assign hens and chicks to each group according to the fitness value;
[0127] S43, start iteration and update the position of the chicken group;
[0128] S44, replacing the rooster particles with poor fitness by the hen particles with better fitness obtained by using the chaotic search algorithm;
[0129] S45, updating the chicken position, calculating the chicken fitness value, and judging whether the chicken particle is trapped in the local optimal position, if so, randomly assigning mutations to it;
[0130] S46, updating individual fitness values and searching for the global optimal position;
[0131] S47, judging whether the maximum number of iterations has been reached, if not, returning to S43 to continue iterating, if reached, outputting the optimal parameters;
[0132] The rooster position update formula is:
[0133]
[0134] In the above formula, Respectively represent the position of the i-th rooster after and before the update; randn(0,σ 2 ) has a mean of 0 and a standard deviation of σ2 Normal distribution; ψ is an infinitely small positive number; f i represents the fitness value of the i-th rooster; f k Represents the fitness value of any rooster in the flock except the i-th rooster;
[0135] The hen position update formula is expressed as:
[0136]
[0137] In the above formula, They represent the positions of the hen i′ before and after the update; rand represents a random number between 0 and 1; f i' represents the fitness value of the ith hen; f r 、f s are the fitness values of the rth and sth hens respectively; They represent the positions of the rth and sth hens before updating respectively;
[0138] By introducing an adaptive learning factor, the foraging ability of chicks can be improved; the chicken position update formula after the introduction of the adaptive learning factor is expressed as:
[0139]
[0140] In the above formula, Respectively represent the position of the i″th chicken after and before the update; represents the adaptive learning factor; m k is the number of chicks; f i″ is the fitness value of the i″th chick; is the average fitness value of the chicks; f is the normalization factor;
[0141] The chicken position update formula is expressed as:
[0142]
[0143] In the above formula, Respectively represent the position of the i″th chicken after and before the update; represents the adaptive learning factor; m k is the number of chicks; f i″ is the fitness value of the i″th chick; is the average fitness value of the chicks; f is the normalization factor;
[0144] The calculation formula of the adaptive learning factor is:
[0145]
[0146] In the above formula, λ is the relative rate of change; f i″ (t) is the fitness value of the i″th chick in the tth iteration; f best The optimal fitness value for the iterative process of the chick;
[0147] The combined prediction module is used to combine the prediction results of the first model and the prediction results of the second model to obtain the final energy consumption prediction result; the combination operation is specifically to add the prediction results of the first model and the second model.
[0148] This embodiment also builds a network architecture including enterprises and government statistical agencies, cloud service management platform, and energy consumption prediction processing center, and the energy consumption prediction processing center is equipped with the prediction device of the present invention; Figure 7 As shown in the figure, first, the enterprise transmits its own energy consumption, electricity usage attributes and GDP data of the government statistical agency to the network bus through the network interface; then the cloud service management platform receives and processes these data through the network bus, and stores these data in the database for later use; finally, the energy consumption prediction and processing center interacts with the cloud service management platform, analyzes and predicts the data obtained, and obtains the required energy consumption forecast value for a certain time period and a certain place.
[0149] Embodiment 3:
[0150] See also Figure 3 , a device for predicting enterprise energy consumption, comprising a memory and a processor; the memory is used to store computer program code and transmit the computer program code to the processor; the processor is used to execute the method described in Example 1 according to the instructions in the computer program code.
[0151] Embodiment 4:
[0152] A computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the method described in Embodiment 1 when executed by a processor.
[0153] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1A device that provides the functions specified in a block or multiple blocks.
[0154] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0155] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0156] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0157] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for predicting enterprise energy consumption, characterized by: The prediction method comprises: S1. Obtain a historical data set and perform a stabilization process on the historical data set to obtain linear data of the historical data set; the historical data set includes energy consumption, electricity consumption, and GDP; S2. Use a pre-built first energy consumption prediction model to predict the linear data of the historical data set to obtain a first model prediction result; the first energy consumption prediction model is an ARIMA model; S3, obtaining residual data of the energy consumption data set based on the difference between the historical data set and the prediction result of the first model; S4. Predict the residual data of the energy consumption data set using a pre-built second energy consumption prediction model to obtain a second model prediction result; the second energy consumption prediction model is a CCSO-BiLSTM model, and the CCSO-BiLSTM model is obtained by first optimizing the parameters of the BiLSTM model using a chaotic chicken swarm optimization algorithm, and then substituting the obtained optimal parameters into the BiLSTM model for training; S5. Combining the prediction result of the first model and the prediction result of the second model to obtain a final energy consumption prediction result.
2. The method for predicting enterprise energy consumption according to claim 1, characterized in that: In S4, the process of optimizing the parameters of the BiLSTM model using the chaotic chicken swarm optimization algorithm is as follows: S41, initialization parameters; S42, initialize the chicken flock, group the chicken flock according to the number of roosters, and assign hens and chicks to each group according to the fitness value; S43, start iteration and update the position of the chicken group; S44, replacing the rooster particles with poor fitness by the hen particles with better fitness obtained by using the chaotic search algorithm; S45, updating the chicken position, calculating the chicken fitness value, and judging whether the chicken particle is trapped in the local optimal position, if so, randomly assigning mutations to it; S46, updating individual fitness values and searching for the global optimal position; S47, determine whether the maximum number of iterations has been reached, if not, return to S43 to continue iterating, if reached, output the optimal parameters.
3. The method for predicting enterprise energy consumption according to claim 2, characterized in that: The rooster position update formula is: In the above formula, Respectively represent the position of the i-th rooster after and before the update; randn(0,σ 2 ) has a mean of 0 and a standard deviation of σ 2 Normal distribution; ψ is an infinitely small positive number; f i represents the fitness value of the i-th rooster; f k Represents the fitness value of any rooster in the flock except the i-th rooster; The hen position update formula is expressed as: In the above formula, They represent the positions of the hen i′ before and after the update; rand represents a random number between 0 and 1; f i ' represents the fitness value of the ith hen; f r 、f s are the fitness values of the rth and sth hens respectively; They represent the positions of the rth and sth hens before updating respectively; The chicken position update formula is expressed as: In the above formula, Respectively represent the position of the i″th chicken after and before the update; represents the adaptive learning factor; m k is the number of chicks; f i″ is the fitness value of the i″th chick; is the average fitness value of the chicks; f is the normalization factor; The calculation formula of the adaptive learning factor is: In the above formula, λ is the relative rate of change; f i″ (t) is the fitness value of the i'th chick in the t-th iteration; f best is the optimal fitness value for the chick iteration process.
4. The method for predicting enterprise energy consumption according to claim 3, characterized in that: In S45, the chicken mutation operator is calculated. If the chicken mutation operator reaches a preset threshold, it means that the chicken particle is trapped in a local optimal position and a random mutation operation needs to be performed on the chicken. The calculation formula of the chicken mutation operator is: In the above formula, is the chicken mutation operator.
5. A device for predicting enterprise energy consumption, characterized in that: The prediction device comprises: A data acquisition device, used to acquire a historical data set and perform a stabilization process on the historical data set to obtain linear data of the historical data set; the historical data set includes energy consumption, electricity consumption, and GDP; A first prediction module is used to predict the linear data of the historical data set using a pre-built first energy consumption prediction model to obtain a first model prediction result; the first energy consumption prediction model is an ARIMA model; A residual calculation module, used to obtain residual data of the energy consumption data set based on the difference between the historical data set and the first energy consumption prediction result; The second prediction module is used to predict the residual data of the energy consumption data set by using a pre-built second energy consumption prediction model to obtain a second model prediction result; the second energy consumption prediction model is a CCSO-BiLSTM model, and the CCSO-BiLSTM model is obtained by first optimizing the parameters of the BiLSTM model by using a chaotic chicken swarm optimization algorithm, and then substituting the obtained optimal parameters into the BiLSTM model for training; The combined prediction module is used to combine the prediction result of the first model and the prediction result of the second model to obtain the final energy consumption prediction result.
6. The device for predicting enterprise energy consumption according to claim 5, characterized in that: The process of optimizing the parameters of the BiLSTM model using the chaotic chicken swarm optimization algorithm is as follows: S41, initialization parameters; S42, initialize the chicken flock, group the chicken flock according to the number of roosters, and assign hens and chicks to each group according to the fitness value; S43, start iteration and update the position of the chicken group; S44, replacing the rooster particles with poor fitness by the hen particles with better fitness obtained by using the chaotic search algorithm; S45, updating the chicken position, calculating the chicken fitness value, and judging whether the chicken particle is trapped in the local optimal position, if so, randomly assigning mutations to it; S46, updating individual fitness values and searching for the global optimal position; S47, determine whether the maximum number of iterations has been reached, if not, return to S43 to continue iterating, if reached, output the optimal parameters.
7. The device for predicting enterprise energy consumption according to claim 5, characterized in that: The rooster position update formula is: In the above formula, Respectively represent the position of the i-th rooster after and before the update; randn(0,σ 2 ) has a mean of 0 and a standard deviation of σ 2 Normal distribution; ψ is an infinitely small positive number; f i represents the fitness value of the i-th rooster; f k Represents the fitness value of any rooster in the flock except the i-th rooster; The hen position update formula is expressed as: In the above formula, They represent the positions of the hen i′ before and after the update; rand represents a random number between 0 and 1; f i ' represents the fitness value of the ith hen; f r 、f s are the fitness values of the rth and sth hens respectively; They represent the positions of the rth and sth hens before updating respectively; The chicken position update formula is expressed as: In the above formula, Respectively represent the position of the i″th chicken after and before the update; represents the adaptive learning factor; m k is the number of chicks; f i″ is the fitness value of the i'th chick; is the average fitness value of the chicks; f is the normalization factor; The calculation formula of the adaptive learning factor is: In the above formula, λ is the relative rate of change; f i″ (t) is the fitness value of the i'th chick in the t-th iteration; f best is the optimal fitness value for the chick iteration process.
8. The device for predicting enterprise energy consumption according to claim 7, characterized in that: In S45, the chicken mutation operator is calculated. If the chicken mutation operator reaches a preset threshold, it means that the chicken particle is trapped in a local optimal position and a random mutation operation needs to be performed on the chicken. The calculation formula of the chicken mutation operator is: In the above formula, is the chicken mutation operator.
9. A device for predicting enterprise energy consumption, characterized in that: The prediction device includes a memory and a processor; The memory is used to store computer program code and transmit the computer program code to the processor; The processor is configured to execute the method according to any one of claims 1 to 4 according to instructions in the computer program code.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
Citation Information
Cited By
Dual-stage wind power generation capacity prediction method and device considering meteorological factors
CN121663481A