A multi-element load prediction method for integrated energy systems based on a genetic algorithm

By combining bidirectional long short-term memory networks and an improved random forest model with genetic algorithm optimization, the accuracy and real-time performance issues of energy load forecasting in existing technologies have been resolved, resulting in more efficient energy load forecasting and providing more accurate decision support.

CN118246581BActive Publication Date: 2026-02-03NORTH CHINA UNIVERSITY OF TECHNOLOGY +2
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311510931.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-13
Publication Date
2026-02-03
Estimated Expiration
2043-11-13

AI Technical Summary

Technical Problem

Existing energy load forecasting methods have poor forecasting performance when dealing with complex, nonlinear, and dynamically changing data, and require a lot of manual feature engineering and model tuning, failing to fully capture the dependencies of time series data.

Method used

A bidirectional long short-term memory network is used for feature extraction, and an improved random forest model is combined with a genetic algorithm to optimize network weights and biases. Sample weights and adaptive optimization strategies are introduced to construct a multivariate load prediction model for integrated energy systems.

Benefits of technology

It improves the accuracy and real-time performance of energy load forecasting, enables better understanding and processing of time-series data, achieves more accurate load forecasting, and provides real-time decision-making support for energy management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118246581B_ABST
    Figure CN118246581B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on genetic algorithm's comprehensive energy system multivariate load prediction method, utilizes the various sensors of setting in comprehensive energy system and gathers energy load data, including electric power, heat energy and cold energy data;The data collected are preprocessed, including data cleaning, data conversion and data division processing;For the data after preprocessing, using bidirectional long short-term memory network algorithm carries out feature extraction;The features after feature extraction are input into improved random forest model, and a comprehensive energy system multivariate load prediction model is constructed;Training set data divided is used to train the prediction model, and after training is completed, the trained prediction model is used for load prediction.The method is based on field sensor data for load prediction, which can realize real-time prediction and provide more real-time and effective decision basis for energy management.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of energy load prediction, and particularly relates to a comprehensive energy system multi-element load prediction method based on a genetic algorithm. BACKGROUND

[0002] At present, in the field of energy management, accurate prediction of energy load is crucial, which not only ensures the stability of energy supply, but also optimizes energy distribution, thereby reducing energy cost and environmental impact. However, due to the influence of various complex factors on energy load, including weather, equipment status, electricity consumption behavior, etc., predicting energy load is a challenging task.

[0003] Traditional energy load prediction methods are usually based on statistics and machine learning techniques. Statistical methods, such as autoregressive models, moving average models and time series analysis models, are widely used in energy load prediction due to their simple model assumptions and mature theories. However, these models often assume that data is linear and stable, and their prediction performance is often not ideal for complex nonlinear and dynamic energy load data; machine learning methods, such as support vector machines, artificial neural networks and random forests, have achieved some results in energy load prediction due to their strong nonlinear fitting ability and adaptive adjustment of model complexity. However, these methods often require a lot of manual feature engineering and model tuning, and may not fully capture the temporal dependence of data when processing time series data. SUMMARY

[0004] The purpose of the present application is to provide a comprehensive energy system multi-element load prediction method based on a genetic algorithm, which can realize real-time prediction based on field sensor data and provide more real-time and effective decision-making basis for energy management.

[0005] The purpose of the present application is achieved by the following technical solutions:

[0006] A comprehensive energy system multi-element load prediction method based on a genetic algorithm, the method comprising:

[0007] Step 1, collecting energy load data, including power, heat and cold energy data, using various sensors installed in the comprehensive energy system;

[0008] Step 2, preprocessing the data collected in step 1, including data cleaning, data conversion and data division processing;

[0009] Step 3, using a bidirectional long short-term memory network algorithm to extract features from the preprocessed data;

[0010] Step 4, input the features extracted in step 3 into the improved random forest model to build a comprehensive energy system multi-element load prediction model;

[0011] Step 5, use the training set data divided in step 2 to train the prediction model in step 4, and after training, use the trained prediction model to predict the load.

[0012] From the above technical solutions provided by the present application, it can be seen that the above method uses a bidirectional long short-term memory network for feature extraction, which can better understand and process time series data, capture the information before and after the data, and thus more accurately predict the energy load; At the same time, an improved random forest prediction model is proposed, which introduces sample weight and adaptive optimization strategy, further improving the accuracy of the prediction model. BRIEF DESCRIPTION OF DRAWINGS

[0013] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and those skilled in the art can obtain other drawings according to these drawings without creative labor.

[0014] Figure 1 The flowchart of the comprehensive energy system multi-element load prediction method based on genetic algorithm provided by the embodiment of the present application;

[0015] Figure 2 The structure diagram of the bidirectional LSTM described in the embodiment of the present application;

[0016] Figure 3 The structure diagram of the LSTM model described in the embodiment of the present application. DETAILED DESCRIPTION

[0017] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all embodiments of the present application, which do not constitute a limitation on the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0018] As Figure 1 The flowchart of the comprehensive energy system multi-element load prediction method based on genetic algorithm provided by the embodiment of the present application is shown, the method comprises:

[0019] Step 1, use various sensors arranged in the comprehensive energy system to collect energy load data, including power, heat and cold energy data;

[0020] In this step, various sensors provided in the integrated energy system provide real-time energy load data, which generally monitor and record detailed information of various energy use.

[0021] Step 2, the data collected in step 1 is preprocessed, including data cleaning, data conversion and data division processing;

[0022] In this step, the collected data may have problems such as noise, missing values, outliers, etc., and need to be preprocessed to ensure the accuracy of the prediction model.

[0023] In a specific implementation, the data cleaning process is to clean the data, remove invalid data, duplicate data and abnormal data;

[0024] The data conversion process is to standardize and normalize the data so as to better apply it to machine learning algorithms;

[0025] The data division processing is to divide the collected data into training set, validation set and test set according to a certain proportion, so as to train, optimize and test the model.

[0026] Step 3, for the preprocessed data, a bidirectional long short-term memory network (Bi-LSTM) algorithm is used for feature extraction;

[0027] In this step, the bidirectional long short-term memory network is abbreviated as Bi-LSTM, which can fully utilize the forward and backward context information, so that the model can better understand the sentence semantics.

[0028] As Figure 2 The structure diagram of the bidirectional LSTM described in the embodiment of the application is shown, the component unit of the bidirectional long short-term memory network is LSTM, and the LSTM is a mature general model in the field, as Figure 3 The structure diagram of the LSTM model described in the embodiment of the application is shown, and the LSTM model is often composed of multiple LSTM neural units, and is composed of an input layer, an LSTM layer and an output layer.

[0029] The bidirectional long short-term memory network used in the application is composed of two directions of LSTM units, one is a forward LSTM which processes the sequence from front to back, and the other is a backward LSTM which processes the sequence from back to front; the hidden states of the forward LSTM and the backward LSTM at the same time step t are respectively denoted as And

[0030] The calculation process of the hidden state of the forward LSTM is as follows:

[0031] Forgotten Gate:

[0032] Input Gate:

[0033] Cell status:

[0034] Final cell state:

[0035] Output gate:

[0036] Final hidden state:

[0037] Hidden state of backward LSTM The calculation process is the same as that of forward LSTM, except that the input sequence is processed in the opposite direction.

[0038] Ultimately and By splicing the data, we obtain the hidden states h of the bidirectional long short-term memory network. t , is represented as:

[0039]

[0040] Hidden state h of a bidirectional long short-term memory network t That is, the preprocessed input data x t The feature representation includes x t And related information in the preceding and following text;

[0041] The parameters involved are explained as follows:

[0042] The hidden state of the feedforward LSTM at time step t;

[0043] The hidden state of the backward LSTM at time step t;

[0044] The output of the feedforward LSTM at time step t is the forget gate.

[0045] σ: Sigmoid activation function, which compresses the input to the range (0,1);

[0046] The weight matrix of the forget gate;

[0047] The hidden state of the feedforward LSTM at time step t-1;

[0048] x t : The input vector at time step t;

[0049] The bias vector of the forget gate;

[0050] The input gate output of the feedforward LSTM at time step t;

[0051] The weight matrix of the input gate;

[0052] The bias vector of the input gate;

[0053] The candidate cell state of the forward LSTM at time step t;

[0054] tanh: Hyperbolic tangent activation function, which compresses the input to the range (-1, 1);

[0055] The weight matrix of the unit state;

[0056] The bias vector of the cell state;

[0057] The final cell state of the forward LSTM at time step t;

[0058] ⊙: Hadamard product, which is element-wise multiplication;

[0059] The output gate of the forward LSTM is output at time step t;

[0060] The weight matrix of the output gate;

[0061] The bias vector of the output gate;

[0062] The final hidden state of the forward LSTM at time step t.

[0063] Furthermore, this application also utilizes a genetic algorithm to globally optimize the weights and biases of the bidirectional long short-term memory network. The genetic algorithm is a global optimization algorithm that simulates the biological evolution process; it simulates natural selection and heredity to a certain extent. The specific optimization process is as follows:

[0064] 1) Initialization

[0065] First, a set of parameters for a bidirectional long short-term memory network, including weights and biases, is randomly generated as the initial population. Let the population size be N, then the initial population is P0 = {p 0,1 p 0,2 , ..., p 0,N}, where p 0,i For the i-th network parameter set;

[0066] 2) Select

[0067] Each set of network parameters in the initial population is evaluated, and the better set of parameters is selected based on performance. Let the population of generation i be P. i Then, based on the evaluation function f, the selected operation is:

[0068]

[0069] Where f is the evaluation function; It is the set of the (i+1)th generation population after the selection operation; Let j be the set of network parameters in the (i+1)th generation population;

[0070] 3) Cross

[0071] Two network parameter sets are randomly selected and cross-operated to generate a new network parameter set; let the cross-operation probability be pc, then the cross-operation is as follows:

[0072]

[0073] Where cross represents the crossover operation; This is the result of the crossover operation on the j-th network parameter set in the (i+1)-th generation population.

[0074] 4) Variation

[0075] The network parameter set is mutated with a certain probability to increase the diversity of the population; let the mutation probability be pm, then the mutation operation is:

[0076]

[0077] Where mutate is the mutation operation; p i+1,j This is the result of the mutation operation on the j-th network parameter set in the (i+1)-th generation population.

[0078] Step 4: Input the features extracted in Step 3 into the improved random forest model to construct a multivariate load prediction model for the integrated energy system;

[0079] In this step, the improved random forest model incorporates sample weights and an adaptive optimization strategy into the original random forest model, thereby improving prediction accuracy.

[0080] The introduction of sample weights is to reduce the weight of correctly predicted samples and increase the weight of incorrectly predicted samples in each iteration, thereby making the model pay more attention to samples that are difficult to predict.

[0081] The adaptive optimization strategy continuously adjusts the weight of each tree during training, assigning higher weights to trees with high prediction accuracy and lower weights to trees with low prediction accuracy. During the prediction phase, the votes of each tree are weighted according to their weights to obtain the final prediction result.

[0082] The specific process is as follows:

[0083] Regarding the adjustment of sample weights, let w be the weight of the i-th sample in the sample set D. i In the initial stage, w i = 1 / n, where n is the total number of samples;

[0084] In each iteration, the weight of a correctly predicted sample is multiplied by a decay factor β, where 0 < β < 1.

[0085] w i =δw i

[0086] The above formula is based on the premise that the sample is correctly predicted.

[0087] For samples that are incorrectly predicted, the weights remain unchanged;

[0088] Regarding the adjustment of decision tree weights, let the prediction accuracy of decision tree T on the training set be acc(T), then the weight of T, weight(T), is:

[0089] weight(T) = acc(T) 2

[0090] This is because trees with higher prediction accuracy should have a greater influence in the final vote. At the same time, to avoid overfitting, the squared form here has a stronger penalty effect, which means that only those trees with very high prediction accuracy can get a large weight.

[0091] Step 5: Use the training set data divided in Step 2 to train the prediction model in Step 4. After training, use the trained prediction model to predict the load.

[0092] In this step, when predicting the label of a new sample using the trained prediction model, for a given sample x, the prediction result T(x) of sample x on each tree is calculated, and weighted by the weights of the trees. The class with the largest weighted result is taken as the final prediction result, that is:

[0093]

[0094] Ra(·) is an indicator function that takes the value 1 when the condition in parentheses is true, and 0 otherwise.

[0095] Therefore, the improved random forest model improves prediction accuracy by adaptively adjusting sample weights, allowing the model to focus more on samples that are difficult to predict. By introducing the weights of decision trees in the prediction stage, the influence of decision trees with high prediction accuracy is increased, while the influence of decision trees with low prediction accuracy is reduced, further improving prediction accuracy.

[0096] It is worth noting that the contents not described in detail in the embodiments of the present invention belong to the prior art known to those skilled in the art.

[0097] In summary, the prediction method described in the embodiments of the present invention has the following advantages:

[0098] 1. Using a bidirectional long short-term memory network for feature extraction can better understand and process time series data, capture information from before and after the data, and thus predict energy load more accurately;

[0099] 2. Utilize genetic algorithms to optimize bidirectional long short-term memory networks, globally optimizing network weights and biases to enhance the model's generalization and predictive capabilities.

[0100] 3. An improved random forest prediction model is proposed, which introduces sample weights and an adaptive optimization strategy to further improve the accuracy of the prediction model;

[0101] 4. Load forecasting based on on-site sensor data enables real-time forecasting, providing a more real-time and effective basis for energy management decisions.

[0102] Furthermore, those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware, and the corresponding program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0103] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims. The information disclosed in the background section is intended only to enhance the understanding of the overall background technology of the present invention and should not be construed as an admission or implication in any way that such information constitutes prior art known to those skilled in the art.

Claims

1. A multi-element load forecasting method for integrated energy systems based on genetic algorithms, characterized in that, The method includes: Step 1: Collect energy load data, including electricity, heat and cooling data, using various sensors installed in the integrated energy system; Step 2: Preprocess the data collected in Step 1, including data cleaning, data transformation, and data partitioning. Step 3: For the preprocessed data, use the bidirectional long short-term memory network algorithm to extract features; The weights and biases of a bidirectional long short-term memory network are globally optimized using a genetic algorithm. The specific process is as follows: 1) Initialization First, a set of parameters for a bidirectional long short-term memory network, including weights and biases, is randomly generated as the initial population. Let the population size be N, then the initial population is P0 = {p 0,1 p 0,2 , ..., p 0,N }, where p 0,i For the i-th network parameter set; 2) Select Each set of network parameters in the initial population is evaluated, and the better set of parameters is selected based on performance. Let the population of the i-th generation be P. i Then, based on the evaluation function f, the selected operation is: Where f is the evaluation function; It is the set of the (i+1)th generation population after the selection operation; Let j be the set of network parameters in the (i+1)th generation population; 3) Cross Two network parameter sets are randomly selected and cross-operated to generate a new network parameter set; let the cross-operation probability be pc, then the cross-operation is as follows: Where cross represents the crossover operation; This is the result of the crossover operation on the j-th network parameter set in the (i+1)-th generation population. 4) Variation The network parameter set is mutated with a certain probability to increase the diversity of the population; let the mutation probability be pm, then the mutation operation is: Where mutate is the mutation operation; p i+1,j This is the result of the mutation operation on the j-th network parameter set in the (i+1)-th generation population. Step 4: Input the features extracted in Step 3 into the improved random forest model to construct a multivariate load prediction model for the integrated energy system; The improved random forest model incorporates sample weights and an adaptive optimization strategy into the original random forest model, wherein: The introduction of sample weights is to reduce the weight of correctly predicted samples and increase the weight of incorrectly predicted samples in each iteration, thereby making the model pay more attention to samples that are difficult to predict. The adaptive optimization strategy continuously adjusts the weight of each tree during training, assigning higher weights to trees with high prediction accuracy and lower weights to trees with low prediction accuracy. During the prediction phase, the votes of each tree are weighted according to their weights to obtain the final prediction result. The specific process is as follows: Regarding the adjustment of sample weights, let w be the weight of the i-th sample in the sample set D. i In the initial stage, w i = 1 / n, where n is the total number of samples; In each iteration, for a correctly predicted sample, its weight is multiplied by a decay factor β, where 0 < β < 1. In i =βw i For samples that are incorrectly predicted, the weights remain unchanged; Regarding the adjustment of decision tree weights, let the prediction accuracy of decision tree T on the training set be acc(T), then the weight of T, weight(T), is: weight(T)=acc(T) 2 ; Step 5: Use the training set data divided in Step 2 to train the prediction model in Step 4. After training, use the trained prediction model to predict the load.

2. The multi-element load forecasting method for integrated energy systems based on genetic algorithms according to claim 1, characterized in that, In step 2, the data cleaning process involves cleaning the data to remove invalid, duplicate, and abnormal data. The data transformation process involves standardizing and normalizing the data so that it can be better applied to machine learning algorithms. The data partitioning process involves dividing the collected data into training, validation, and test sets according to a certain ratio, in order to train, optimize, and test the model.

3. The multi-element load forecasting method for integrated energy systems based on genetic algorithms according to claim 1, characterized in that, In step 3, the bidirectional Long Short-Term Memory (LSTM) network consists of two directional LSTM units: a forward LSTM that processes sequences from front to back, and a backward LSTM that processes sequences from back to front. The hidden states of the forward and backward LSTMs at the same time step t are denoted as follows: and Hidden state of forward LSTM The calculation process is as follows: Forgotten Gate: Input Gate: Cell status: Final cell state: Output gate: Final hidden state: Hidden state of backward LSTM The computation process is the same as that of forward LSTM, except that the input sequence is processed in the opposite direction. Ultimately and By splicing the data, we obtain the hidden states h of the bidirectional long short-term memory network. t , represented as: Hidden state h of a bidirectional long short-term memory network t That is, the preprocessed input data x t The feature representation includes x t And related information in the preceding and following text; The parameters involved are explained as follows: The hidden state of the forward LSTM at time step t; The hidden state of the backward LSTM at time step t; The output of the forward LSTM at time step t is the forget gate. σ: Sigmoid activation function, which compresses the input to the range (0,1); The weight matrix of the forget gate; The hidden state of the forward LSTM at time step t-1; x t : The input vector at time step t; The bias vector of the forget gate; The input gate output of the feedforward LSTM at time step t; The weight matrix of the input gate; The bias vector of the input gate; The candidate cell state of the forward LSTM at time step t; tanh: Hyperbolic tangent activation function, which compresses the input to the range (-1, 1); The weight matrix of the cell state; The bias vector of the cell state; The final cell state of the forward LSTM at time step t; ⊙: Hadamard product, which is element-wise multiplication; The output gate of the forward LSTM is output at time step t; The weight matrix of the output gate; The bias vector of the output gate; The final hidden state of the forward LSTM at time step t.

4. The multi-element load forecasting method for integrated energy systems based on genetic algorithms according to claim 1, characterized in that, In step 5, when predicting the label of a new sample using the trained prediction model, for a given sample x, the prediction result T(x) of sample x on each tree is calculated, and weighted by the weights of the trees. The class with the largest weighted result is taken as the final prediction result, that is: Ra(·) is an indicator function that takes the value 1 when the condition in parentheses is true, and 0 otherwise.

Citation Information

Patent Citations

  • Intelligent load balancing method and system based on multipath fusion

    CN120856649A