Automatic energy management strategy optimization method based on stochastic optimization algorithm
By employing an automated energy management strategy based on stochastic optimization algorithms, and leveraging the Internet of Things and deep learning to optimize energy allocation, the flexibility and adaptability issues of traditional strategies are addressed, resulting in more efficient and reliable energy management and cost reduction.
Patent Information
- Application Number
- CN202511177668.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-21
- Publication Date
- 2025-12-23
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional energy management strategies lack flexibility and adaptability, making it difficult to effectively integrate renewable energy, optimize energy consumption, reduce operating costs, and minimize environmental impact, especially in complex and dynamic energy supply and demand scenarios.
An automated energy management strategy based on stochastic optimization algorithms is adopted. Data is collected through IoT devices, and the energy management strategy is optimized using deep learning and improved stochastic optimization algorithms. Combined with dynamic prediction models, adjustments are made in real time to optimize energy allocation and utilization plans. The implementation effect is displayed through a user interface, and the algorithm parameters are adjusted periodically to adapt to changes.
It improved energy efficiency, reduced costs, enhanced the system's adaptability to environmental changes, and increased user transparency and satisfaction with policy implementation.
Smart Images

Figure CN121189682A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of energy management technology, and in particular to an automated energy management strategy optimization method based on stochastic optimization algorithms. Background Technology
[0002] In the current field of energy management, with the increasing global focus on energy efficiency and the promotion of renewable energy use, traditional energy management strategies are facing unprecedented challenges and reform needs. Traditional methods often rely on fixed rules and pre-set models for energy allocation and utilization, which not only limits the efficiency of energy use but also makes it difficult to adapt to the rapidly changing energy supply and demand situation and increasingly stringent environmental protection requirements. In addition, with the continuous increase in the proportion of renewable energy, the uncertainty and volatility of energy supply have also increased significantly, bringing new challenges to energy management.
[0003] This invention aims to address the limitations of existing energy management methods in dealing with complex and dynamic energy supply and demand scenarios, particularly the technical challenges of effectively integrating renewable energy, optimizing energy consumption, reducing operating costs, and minimizing environmental impact. Faced with these challenges, traditional energy management strategies often fail to meet the needs of modern energy systems due to their lack of flexibility and adaptability.
[0004] Therefore, developing an intelligent energy management strategy that can dynamically predict energy demand and supply and optimize energy allocation and utilization plans in real time has become an urgent technical challenge to be solved. Summary of the Invention
[0005] To achieve the above objectives, this invention provides an automated energy management strategy optimization method based on a stochastic optimization algorithm.
[0006] An optimization method for automated energy management strategies based on stochastic optimization algorithms includes the following steps:
[0007] S1: Collect data including renewable energy production, traditional energy consumption, forecasted demand, and environmental parameters through IoT devices and sensor networks;
[0008] S2: Use deep learning to clean, normalize, and extract features from the data collected in S1;
[0009] S3: Based on the data processed in S2, an improved stochastic optimization algorithm is applied to optimize the energy management strategy in order to find the optimal energy management strategy;
[0010] S4: Adjust the energy allocation and utilization plan based on the optimal energy management strategy obtained in S3;
[0011] S5: Using a preset dynamic forecasting model, based on real-time energy system data in S1 and energy management strategies in S4, predict future energy demand and renewable energy supply.
[0012] S6: Display the implementation effects of energy management strategies through the user interface, including performance indicators such as reduced energy consumption, cost savings, and reduced carbon emissions;
[0013] S7: Periodically adjust the parameters of the stochastic optimization algorithm and the energy management strategy based on the prediction results of S5 and the feedback from the implementation of the energy management strategy.
[0014] Furthermore, S1 specifically includes:
[0015] S11: Deploy IoT devices, including smart meters, solar panel monitors, anemometers, and temperature and humidity sensors. Each IoT device is distributed in predetermined locations within the energy system, including renewable energy power plants, energy consumption points, and environmental monitoring stations, to achieve comprehensive coverage.
[0016] S12: Construct a sensor network to connect the various IoT devices deployed in S11 into a network through wireless communication technology. This network is used to transmit data collected by IoT devices to the central processing system in real time.
[0017] S13: Collect renewable energy production data, specifically using smart meters and solar panel monitors to monitor and record the electricity production from solar power generation systems and wind power generation systems in real time. This electricity production data is used to reflect the real-time generation capacity of renewable energy.
[0018] S14: Collect traditional energy consumption data. Monitor and record the energy consumption of buildings, factories and homes through smart meters installed at various consumption points. Home energy consumption includes electricity, natural gas and water consumption.
[0019] S15: Collect forecast demand data, use historical energy consumption data and current environmental parameter data, and combine them with a preset dynamic forecasting model to estimate energy demand in the future.
[0020] S16: Collect environmental parameter data. Through environmental monitoring equipment such as temperature and humidity sensors, light sensors, and anemometers, collect parameters of ambient temperature, humidity, light intensity, and wind speed in real time.
[0021] Furthermore, S2 specifically includes:
[0022] S21: First, clean the data collected in step S1, including removing or correcting inaccurate, incomplete, or unconventional data records. The data cleaning formula is: D cleaned =f(Draw ), where D raw D represents the original dataset. cleaned This represents the cleaned dataset, where f is the cleaning function responsible for identifying and handling outliers and missing values.
[0023] S22: Then, the data D obtained in step S21... cleaned To eliminate the influence of different dimensions, a normalization process is performed. The normalization formula is as follows:
[0024] Where x represents the original data value, x′ is the normalized value, and min(x) and max(x) represent the minimum and maximum values in the dataset, respectively;
[0025] S23: Finally, using an RNN deep learning model, features are extracted from the data processed in S22. Let the normalized dataset be , and the feature extraction formula is expressed as: in, H represents the normalized data input at time point t. t-1 Ft represents the hidden state at the previous time point t-1, and Ft represents the feature set extracted at time point t.
[0026] Furthermore, S3 specifically includes:
[0027] S31: First, clarify the optimization objectives and constraints. The optimization objectives include maximizing energy efficiency and minimizing energy costs, while the constraints include the reliability of energy supply and environmental impact limitations.
[0028] S32: Based on the improved stochastic optimization algorithm, the parameters of the algorithm are initialized, including population size, number of iterations, crossover rate and mutation rate. The improved stochastic optimization algorithm integrates the characteristics of particle swarm optimization algorithm PSO and genetic algorithm GA, and combines the search capability of PSO and the genetic mechanism of GA for processing.
[0029] S33: Based on the parameters in step S32, randomly generate a set of initial solutions as the starting point of the algorithm. Each solution represents an energy management strategy, including energy allocation schemes and utilization plans.
[0030] S34: Evaluate each solution generated in step S33, and calculate the fitness value according to the defined optimization objective and constraints. The higher the fitness value, the closer it is to the optimal solution.
[0031] S35: Based on the fitness value, select solutions with high fitness for crossover and mutation operations to generate a new generation of solution sets;
[0032] S36: Iterative optimization, repeat steps S34 and S35 until the termination condition is met, including reaching the maximum number of iterations or the improvement of the solution is less than a preset threshold.
[0033] S37: Select the solution with the highest fitness from the final solution set as the optimal energy management strategy, and output the detailed configuration information of the strategy.
[0034] Furthermore, S34 specifically includes:
[0035] S341: Define the fitness function. Based on the optimization objective and constraints, define the fitness function. Let the optimization objective be maximizing energy efficiency (E) and minimizing energy cost (C), while ensuring that the reliability R of energy supply is not lower than a preset threshold R0. min The fitness function is then expressed as:
[0036] F(s) = w1·E(s) - w2·C(s), where F(s) represents the fitness value of strategy s, used to measure the quality of the strategy; s represents the solution of the energy management strategy; w1 and w2 are weight coefficients, representing the importance of energy efficiency and energy cost in the optimization objective, respectively; E(s) is the energy efficiency of strategy s; and C(s) is the energy cost of strategy s, including the total cost of all energy types.
[0037] S342: Calculate the energy efficiency. For each solution s, the energy efficiency E(s) is calculated using the following formula:
[0038] S343: Calculate the energy cost, C(s), according to the following formula: Where C(s) is the energy cost of strategy s; c i Let q be the unit price of the i-th energy source; i Let be the consumption of the i-th energy source under strategy s; n is the number of energy types.
[0039] S344: When the solution s does not satisfy the constraints, the fitness value is penalized to reduce the selection probability. The penalty method is to add a negative penalty term to the fitness value. The specific function formula is: F(s) = F(s) - Penalty if R(s) <R min Where F(s) represents the fitness value of strategy s, which is reduced by a penalty term when strategy s fails to meet the constraints; Penalty represents the penalty term used to reduce the fitness value of strategies that fail to meet the constraints; R(s) represents the energy supply reliability achieved by strategy s; R min The minimum acceptable value representing the reliability of energy supply;
[0040] S345: Combining the steps S341-S345 above, for each solution s, calculate its fitness value according to the fitness function F(s). The higher the fitness value, the better the solution is, that is, the higher the energy efficiency and the lower the energy cost.
[0041] Furthermore, S35 specifically includes:
[0042] S351: The roulette wheel selection method is used to select solutions from the current solution set based on their fitness values for reproduction. Assume the selection probability is P(s). i The specific calculation formula is as follows: Wherein, P(s) i ) represents s i The probability of being selected; F(s) i ) represents s i The fitness value; N is the total number of solutions in the solution set; The sum of fitness values of all solutions in the solution set is used to normalize the selection probability of each solution;
[0043] S352: Selected solution pairs generate offspring through a crossover operation, with a crossover rate c set. r For each pair of parent solutions, with probability c r By exchanging some of their genes, two new solutions are generated. The crossover operation is expressed by the formula:
[0044] s′=crossover(s a s b ), where (s a s b ) represents a pair of parent solutions participating in the crossover operation, representing two different energy management strategies, and s′ represents a new solution generated by the crossover operation;
[0045] S353: Perform a mutation operation on the newly generated solution to increase the diversity of the solution set, setting the mutation rate to m. r For each gene in each new solution, with probability m r To perform random mutation, the mutation operation function is expressed as:
[0046] s″=mutate(s′,m r ), where m r s is the mutation rate, representing the probability that each gene in the solution will mutate; s′ is the solution to be mutated, i.e., the new solution generated after the crossover operation; s″ is the new solution after the mutation operation.
[0047] S354: All new solutions generated through crossover and mutation operations are combined into a new generation of solution set, which replaces the original solution set for the next round of iterative optimization. The update function of the new generation of solution set is expressed as:
[0048] S new={s1″,s2″,s n "}, where S new This is the solution set for the next generation, consisting of all new solutions generated through crossover and mutation operations; {s1″, s2″, ..., s N "} represents all new solutions in the next generation solution set.
[0049] Furthermore, S4 specifically includes:
[0050] S41: First, parse the optimal energy management strategy obtained in S3 into specific operation instructions. The information of the optimal strategy includes the utilization ratio of renewable energy and traditional energy, the priority of energy consumption, and the energy demand forecast within the time period.
[0051] S42: Based on the energy utilization ratio in the optimal strategy, calculate the allocation ratio of various energy sources in different time periods. The specific formula is as follows: Among them, P type This indicates the allocation ratio of different types of energy, including solar, wind, and fossil fuels. E type It is the allocation amount of this type of energy, ∑E total It is the total distribution of all types of energy;
[0052] S43: Optimize the priority of energy consumption according to the optimal strategy, specifically, prioritize the use of renewable energy, followed by lower-cost traditional energy, and finally energy with higher costs or greater environmental impact.
[0053] S44: Based on energy demand forecasts and optimal strategies, dynamically adjust energy supply and consumption plans. The specific adjustment method is formulated as follows: Q new (t)=Q opt (t)·(1+ΔP), where Q new (t) represents the amount of new energy supplied at time t, Q opt (t) is the initial energy supply at time t under the optimal strategy, and ΔP is the adjustment ratio based on real-time demand changes;
[0054] S45: Finally, the specific energy allocation ratio and utilization plan obtained will be implemented into the energy management system.
[0055] Furthermore, S5 specifically includes:
[0056] S51: Integrate the real-time energy system data collected in step S1 and the optimal energy management strategy obtained in step S4, including current energy consumption data, renewable energy production, environmental parameters, and planned energy allocation and utilization.
[0057] S52: Preprocess the data collected in step S51, including data cleaning, normalization, and time series analysis. The preprocessed data is used as input for the dynamic prediction model.
[0058] S53: The preprocessed data is analyzed using a pre-defined dynamic prediction model. This model is specifically a time series prediction model based on machine learning. The prediction model generates predicted values for future energy demand and renewable energy supply based on the input data. The prediction formula is expressed as follows:
[0059] (D future RE future Model(D) current RE current E params S opt ),
[0060] Among them, D future Forecast of future energy demand; RE future The model represents the predicted future renewable energy supply; Model is a pre-defined dynamic forecasting model; D current RE represents the current energy demand, indicating the actual energy demand at the time of forecasting. current E represents the current renewable energy supply situation, indicating the actual renewable energy supply at the time of forecasting; params For environmental parameters; S opt The optimal energy management strategy;
[0061] S54: Output the prediction results from step S53, which include energy demand and renewable energy supply for a future period of time.
[0062] Furthermore, S6 specifically includes:
[0063] S61: Create a user interface module to demonstrate the effectiveness of energy management strategies. This module includes charts and metrics for energy consumption, cost savings, and carbon emissions.
[0064] S62: Collect data before and after the implementation of energy management strategies, including energy consumption, energy costs and carbon emissions. Based on the collected data, calculate the percentage reduction in energy consumption, the amount of cost savings and the amount of carbon emission reduction.
[0065] S63: In the user interface module, a graphical comparison of energy consumption, cost savings, and carbon emissions before and after the implementation of the energy management strategy is displayed.
[0066] S64: The user interface provides a function button that allows users to download a report containing detailed information on the effectiveness of energy management strategies. The report includes data aggregation, calculation methods, specific effects of the implementation strategies, and improvement suggestions.
[0067] Furthermore, S7 specifically includes:
[0068] S71: Regularly collect feedback information on the implementation of energy management strategies, including energy consumption data, cost data, and user satisfaction, and summarize the energy demand and supply forecast results from step S5.
[0069] S72: Evaluate the performance of the current energy management strategy based on the collected implementation feedback and forecast data;
[0070] S73: Based on the performance evaluation results, identify the parameters and strategies that need to be adjusted or optimized;
[0071] S74: Based on the identified parameters and strategies that need to be adjusted or optimized, adjust the parameter settings of the stochastic optimization algorithm;
[0072] S75: Based on the analysis and adjustments in steps S73 and S74, update the energy management strategy, specifically including modifying the energy supply plan, adjusting the utilization rate of renewable energy, or reallocating energy storage resources.
[0073] The beneficial effects of this invention are:
[0074] This invention, by employing an improved stochastic optimization algorithm and a machine learning-based dynamic prediction model, can more accurately predict future energy demand and renewable energy supply. This enables energy management strategies to be adjusted and optimized more flexibly, improving energy utilization efficiency and reducing energy costs. In particular, by optimizing the use of renewable energy, it reduces dependence on traditional fossil fuels.
[0075] This invention ensures that the energy system can continuously adapt to changes in the external environment and internal system by periodically adjusting the parameters and strategies of the stochastic optimization algorithm based on the forecast results of energy demand and supply and the feedback from the implementation of energy management strategies. This dynamic adjustment mechanism enhances the reliability and adaptability of the energy system in the face of demand fluctuations and unstable renewable energy supply.
[0076] This invention visually displays the effects of energy management strategies through a user interface, such as performance indicators like reduced energy consumption, cost savings, and reduced carbon emissions. This improves the transparency of strategy implementation, allowing users to intuitively understand the benefits of the strategies, thereby increasing user engagement and satisfaction. Attached Figure Description
[0077] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only for this invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0078] Figure 1 This is a schematic diagram of the automated energy management strategy optimization method according to an embodiment of the present invention;
[0079] Figure 2 This is a schematic diagram of the application improvement stochastic optimization algorithm in an embodiment of the present invention. Detailed Implementation
[0080] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments.
[0081] It should be noted that, unless otherwise defined, the technical or scientific terms used in this invention should have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "first," "second," and similar terms used in this invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0082] like Figure 1-2 As shown, the optimization method for automated energy management strategies based on stochastic optimization algorithms includes the following steps:
[0083] S1: Collect data including renewable energy production, traditional energy consumption, forecasted demand, and environmental parameters through IoT devices and sensor networks;
[0084] S2: Deep learning is used to clean, normalize, and extract features from the data collected in S1, providing accurate input data for the stochastic optimization algorithm;
[0085] S3: Based on the data processed by S2, an improved stochastic optimization algorithm is applied to optimize the energy management strategy in order to find the optimal energy management strategy. The improved stochastic optimization algorithm combines the search capability of particle swarm optimization algorithm and the genetic mechanism of genetic algorithm.
[0086] S4: Based on the optimal energy management strategy obtained in S3, adjust the energy allocation and utilization plan, including the amount of renewable energy connected, the amount of traditional energy used, and the optimization of energy storage and allocation plans;
[0087] S5: Using a preset dynamic forecasting model, based on real-time energy system data in S1 and energy management strategies in S4, predict future energy demand and renewable energy supply.
[0088] S6: Display the implementation effects of energy management strategies through the user interface, including performance indicators such as reduced energy consumption, cost savings, and reduced carbon emissions, to improve the transparency of energy use and promote user participation in energy management;
[0089] S7: Periodically adjust the parameters of the stochastic optimization algorithm and the energy management strategy based on the prediction results of S5 and the feedback from the implementation of the energy management strategy, in order to adapt to changes in the energy market and technological advancements.
[0090] S1 specifically includes:
[0091] S11: Deploy IoT devices, including smart meters, solar panel monitors, anemometers, and temperature and humidity sensors. Each IoT device is distributed in predetermined locations within the energy system, including renewable energy power plants, energy consumption points, and environmental monitoring stations, to achieve comprehensive coverage.
[0092] S12: Build a sensor network to connect the various IoT devices deployed in S11 into a network through wireless communication technologies (such as LoRaWAN, 5G or Wi-Fi). This network is used to transmit data collected by IoT devices to the central processing system in real time.
[0093] S13: Collect renewable energy production data, specifically using smart meters and solar panel monitors to monitor and record the electricity production from solar power generation systems and wind power generation systems in real time. This electricity production data is used to reflect the real-time generation capacity of renewable energy.
[0094] S14: Collect traditional energy consumption data. Monitor and record the energy consumption of buildings, factories and homes through smart meters installed at various consumption points. Home energy consumption includes electricity, natural gas and water consumption.
[0095] S15: Collect forecast demand data, use historical energy consumption data and current environmental parameter data, and combine them with a preset dynamic forecasting model to estimate energy demand in the future. This step relies on deep learning and time series analysis technology to analyze and predict energy consumption patterns.
[0096] S16: Collect environmental parameter data. Through environmental monitoring equipment such as temperature and humidity sensors, light sensors, and anemometers, collect parameters of ambient temperature, humidity, light intensity, and wind speed in real time. These parameters are of great significance for predicting renewable energy production and energy demand.
[0097] Each step S11-S16 above is designed to ensure that the energy management system can accurately and in real time collect key data, providing the necessary input for the stochastic optimization algorithm to achieve the optimal energy management strategy. This approach not only improves the efficiency and reliability of energy utilization but also enhances the adaptability of the energy system to environmental changes.
[0098] S2 specifically includes:
[0099] S21: First, clean the data collected in step S1, including removing or correcting inaccurate, incomplete, or unconventional data records. The data cleaning formula is: D cleaned =f(D raw ), where D raw D represents the original dataset. cleaned This represents the cleaned dataset, where f is the cleaning function responsible for identifying and handling outliers and missing values.
[0100] S22: Then, the data D obtained in step S21... cleaned Normalization is performed to eliminate the influence of different units of measurement and improve the convergence speed of deep learning models. The normalization formula is as follows:
[0101] Where x represents the original data value, x′ is the normalized value, and min(x) and max(x) represent the minimum and maximum values in the dataset, respectively;
[0102] S23: Finally, an RNN deep learning model is used to extract features from the data processed in S22. Recurrent neural networks are particularly suitable for processing time series data because they can use previous information output to influence current and future decisions. This characteristic makes them especially useful in energy data analysis. Let the normalized dataset be , and the feature extraction formula is expressed as: in, H represents the normalized data input at time point t. t-1 H represents the hidden state at the previous time point t-1, and Ft represents the feature set extracted at time point t. The recurrent neural network updates the hidden state H iteratively. t Recurrent neural networks update the hidden state H iteratively. tThis approach captures long-term dependencies in time series data. The output of each step depends not only on the current input but also on the hidden state of the previous step, effectively extracting time-related features from sequence data. This provides internal feature information that deep learning models cannot directly observe for stochastic optimization algorithms. By using RNNs to process normalized energy data, it can capture dynamic patterns of energy consumption and output changes over time. These patterns are crucial for optimizing energy management strategies. The extracted features can reflect the periodic changes in energy demand, the impact of unforeseen events on the energy system, and the impact of environmental factors on energy output, thus supporting the development of more accurate and efficient energy management strategies.
[0103] S3 specifically includes:
[0104] S31: First, clarify the optimization objectives and constraints. The optimization objectives include maximizing energy efficiency and minimizing energy costs. The constraints include the reliability of energy supply and environmental impact limitations. This step establishes the problem framework that the optimization algorithm needs to solve.
[0105] S32: Based on the improved stochastic optimization algorithm, the parameters of the algorithm are initialized, including population size, number of iterations, crossover rate and mutation rate. The improved stochastic optimization algorithm integrates the characteristics of particle swarm optimization algorithm PSO and genetic algorithm GA, and combines the search capability of PSO and the genetic mechanism of GA for processing.
[0106] S33: Based on the parameters in step S32, randomly generate a set of initial solutions as the starting point of the algorithm. Each solution represents an energy management strategy, including energy allocation schemes and utilization plans.
[0107] S34: Evaluate each solution generated in step S33, and calculate the fitness value according to the defined optimization objective and constraints. The higher the fitness value, the closer it is to the optimal solution.
[0108] S35: Based on the fitness value, select solutions with high fitness for crossover and mutation operations to generate a new generation of solution sets. The crossover operation allows two solutions to exchange some information, while the mutation operation randomly changes the solutions to increase the diversity of the solution set.
[0109] S36: Iterative optimization, repeat steps S34 and S35 until the termination condition is met, including reaching the maximum number of iterations or the improvement of the solution is less than a preset threshold. In each iteration, the algorithm gradually improves the solution set and approaches the optimal energy management strategy.
[0110] S37: Select the solution with the highest fitness from the final solution set as the optimal energy management strategy, and output the detailed configuration information of the strategy;
[0111] Through the above steps, the improved stochastic optimization algorithm can effectively search for the optimal solution in complex energy management scenarios. This algorithm combines the global search capability of particle swarm optimization and the genetic mechanism of genetic algorithm, which can avoid getting trapped in local optima while ensuring search efficiency, thereby finding the optimal energy management strategy that satisfies the multi-objective optimization conditions.
[0112] S34 specifically includes:
[0113] S341: Define the fitness function. Based on the optimization objective and constraints, define the fitness function. Let the optimization objective be maximizing energy efficiency (E) and minimizing energy cost (C), while ensuring that the reliability R of energy supply is not lower than a preset threshold R0. min The fitness function is then expressed as:
[0114] F(s) = w1·E(s) - w2·C(s), where F(s) represents the fitness value of strategy s, used to measure the quality of the strategy; s represents the energy management strategy, which includes specific plans on how to allocate and utilize different types of energy (including renewable and traditional energy); w1 and w2 are weight coefficients, representing the importance of energy efficiency and energy cost in the optimization objective, respectively. These two coefficients can be adjusted according to the actual situation to reflect the priority of different optimization objectives; E(s) is the energy efficiency of strategy s, which measures the proportion of renewable energy in the total energy supply; C(s) is the energy cost of strategy s, which includes the total consumption cost of all energy types.
[0115] S342: Calculate the energy efficiency. For each solution s, the energy efficiency E(s) is calculated using the following formula: This formula reflects the proportion of renewable energy in total energy production and encourages the use of more renewable energy.
[0116] S343: Calculate the energy cost, C(s), according to the following formula: Where C(s) is the energy cost of strategy s; c i Let be the unit price of the i-th energy source, representing the cost required to produce one unit of that energy; for example, the unit price of electricity might be the cost per kilowatt-hour (kWh); q i Let be the consumption of the i-th energy source under strategy s, representing the amount of that energy consumed during the implementation of strategy s. For example, electricity consumption can be the number of kilowatt-hours consumed within a certain period of time. n is the number of energy types, representing the total number of different energy types considered in the system. The total cost is obtained by multiplying the consumption of each energy source by its corresponding unit price and then summing them up.
[0117] S344: When the solution s does not satisfy the constraints, such as the reliability of energy supply R(s) being less than R minIf the fitness value is negatively penalized to reduce the selection probability, the penalty method is to add a negative penalty term to the fitness value. The specific function formula is: F(s) = F(s) - Penalty if R(s) <R min Where F(s) represents the fitness value of strategy s, which is reduced by a penalty term when strategy s fails to meet the constraints; Penalty represents the penalty term, used to reduce the fitness value of strategies that fail to meet the constraints, and its value should be large enough to ensure that strategies that fail to meet the constraints are not selected as the optimal solution; R(s) represents the energy supply reliability achieved by strategy s, representing a measure of the continuity and stability of energy supply that strategy s can guarantee; R min The minimum acceptable value representing the reliability of energy supply indicates the minimum standard of energy supply reliability required for the system to operate;
[0118] S345: Combining the steps S341-S345 above, for each solution s, calculate its fitness value according to the fitness function F(s). The higher the fitness value, the better the solution is, that is, the higher the energy efficiency and the lower the energy cost.
[0119] Through the above steps, the fitness of each energy management strategy solution can be effectively evaluated, ensuring that the optimal solution is selected to optimize the entire energy management system. The fitness evaluation not only considers the optimization objective, but also fully considers the constraints in actual operation, ensuring that the obtained strategy is both economical and reliable.
[0120] S35 specifically includes:
[0121] S351: The roulette wheel selection method is used to select solutions from the current solution set based on their fitness values for reproduction. Assume the selection probability is P(s). i The specific calculation formula is as follows: Wherein, P(s) i ) represents s i The probability of being selected is based on the proportion of the fitness value of a solution to the total fitness value of the entire solution set; F(s) i ) represents s i The fitness value represents the ability of the energy management strategy solution to meet the optimization objectives (such as improving energy efficiency and reducing costs); N is the total number of solutions in the solution set, representing the number of energy management strategy solutions in the current generation that can be used to generate subsequent generations; The sum of the fitness values of all solutions in the solution set is used to normalize the selection probability of each solution. This method ensures that solutions with high fitness are selected more frequently.
[0122] S352: Selected solution pairs generate offspring through a crossover operation, with a crossover rate c set. r For each pair of parent solutions, with probability c rBy exchanging some of their genes, two new solutions are generated. The crossover operation is expressed by the formula:
[0123] s′=crossover(s a s b ), where (s a s b s) represents a pair of parent solutions participating in the crossover operation. They are selected from the current solution set based on their fitness values and represent two different energy management strategies. s′ represents a new solution generated by the crossover operation, which includes solutions from the parent solutions s. a and s b Genetic information;
[0124] S353: Perform a mutation operation on the newly generated solution to increase the diversity of the solution set, setting the mutation rate to m. r For each gene in each new solution, with probability m r To perform random mutation, the mutation operation function is expressed as:
[0125] s″=mutate(s′,m r ), where m r is the mutation rate, representing the probability that each gene in the solution will mutate. This parameter controls the degree of diversity introduced into the solution set, which helps the algorithm avoid local optima; s′ is the solution to be mutated, that is, the new solution generated after the crossover operation; s″ is the new solution after the mutation operation, which is generated by randomly modifying a part of the genes in s′. These changes increase the diversity of the solution set.
[0126] S354: All new solutions generated through crossover and mutation operations are combined into a new generation of solution set, which replaces the original solution set for the next round of iterative optimization. The update function of the new generation of solution set is expressed as:
[0127] S new ={s1″,s2″,s N "}, where S new This is the next generation of solution set, consisting of all new solutions generated through crossover and mutation operations. This solution set will be used for the next round of iterative optimization of the algorithm; {s1″, s2″, ..., s N "} represents all new solutions in the next generation solution set, and each solution s i "These are all generated from the previous generation of solutions through crossover and mutation operations, representing new energy management strategies."
[0128] Through the above steps, it can be ensured that the solution set can continuously evolve through genetic operations in each iteration, increasing diversity, while tending to retain solutions with high fitness, thereby effectively searching for the optimal energy management strategy solution. This process mimics the process of natural selection and genetic mutation and is a core part of the genetic algorithm.
[0129] S4 specifically includes:
[0130] S41: First, parse the optimal energy management strategy obtained in S3 into specific operation instructions. The information of the optimal strategy includes the utilization ratio of renewable energy and traditional energy, the priority of energy consumption, and the energy demand forecast within the time period.
[0131] S42: Based on the energy utilization ratio in the optimal strategy, calculate the allocation ratio of various energy sources in different time periods. The specific formula is as follows: Among them, P type This indicates the allocation ratio of different types of energy, including solar, wind, and fossil fuels. E type It is the allocation amount of this type of energy, ∑E total It is the total distribution of all types of energy;
[0132] S43: Optimize the priority of energy consumption according to the optimal strategy, specifically, prioritize the use of renewable energy, followed by lower-cost traditional energy, and finally energy with higher costs or greater environmental impact.
[0133] S44: Based on energy demand forecasts and optimal strategies, dynamically adjust energy supply and consumption plans. The specific adjustment method is formulated as follows: Q new (t)=Q opt (t)·(1+ΔP), where Q new (t) represents the amount of new energy supplied at time t, Q opt (t) is the initial energy supply at time t under the optimal strategy, and ΔP is the adjustment ratio based on real-time demand changes;
[0134] S45: Finally, the specific energy allocation ratio and utilization plan obtained will be implemented into the energy management system. This may involve adjustments to the automated control system, such as energy dispatching of the smart grid, and adjustments to the operating modes of energy-using equipment. Through the above steps, the optimization of energy supply and consumption can be ensured, energy efficiency can be improved, costs and environmental impact can be reduced, and sustainable energy management can be achieved.
[0135] S5 specifically includes:
[0136] S51: Integrate the real-time energy system data collected in step S1 and the optimal energy management strategy obtained in step S4, including current energy consumption data, renewable energy production, environmental parameters (such as weather conditions), and predetermined energy allocation and utilization plans.
[0137] S52: Preprocess the data collected in step S51, including data cleaning, normalization, and time series analysis. The preprocessed data is used as input for the dynamic prediction model.
[0138] S53: Analyze the preprocessed data using a pre-defined dynamic prediction model. This model is specifically a machine learning-based time series prediction model, such as a recurrent neural network (RNN) or a long short-term memory network (LSTM) model. The prediction model will generate predicted values for future energy demand and renewable energy supply based on the input data. The prediction formula is expressed as follows:
[0139] (D future RE future Model(D) current RE current E params S opt ),
[0140] Among them, D future Forecasted future energy demand represents the total amount of energy that the energy system is expected to need to meet within a specific future time period; RE future For the predicted future renewable energy supply, it represents the amount of energy that renewable energy systems (such as solar and wind power) are expected to provide within a specific future time period; Model is a pre-defined dynamic forecasting model, which is a model built based on historical and current data using machine learning algorithms (such as recurrent neural networks (RNNs) or long short-term memory networks (LSTMs)) to predict future energy demand and renewable energy supply; D current RE represents the current energy demand, indicating the actual energy demand at the time of forecasting. This is based on data obtained from real-time data acquisition systems (such as smart meters). current E represents the current renewable energy supply situation, indicating the actual renewable energy supply at the time of forecasting, such as the amount of energy currently generated through solar panels and wind turbines; params These are environmental parameters that directly impact energy demand and renewable energy supply, including but not limited to weather conditions (such as temperature, sunshine, and wind speed), which are typically provided by environmental monitoring stations; S opt The optimal energy management strategy is derived through an improved stochastic optimization algorithm, which includes how to allocate and utilize different types of energy resources (including renewable and traditional energy) to achieve optimal energy efficiency and cost-effectiveness.
[0141] S54: Output the forecast results from step S53. These forecast results include energy demand and renewable energy supply in the future. These forecast results provide an important basis for energy management decisions and help adjust and optimize future energy allocation and utilization plans.
[0142] Through the above steps, the present invention can effectively utilize real-time data and optimal energy management strategies, and accurately predict future energy demand and renewable energy supply through a preset dynamic prediction model, thereby providing support for achieving more efficient and sustainable energy management. This method ensures that the energy system can flexibly respond to future changes and optimize the allocation and utilization of energy resources.
[0143] S6 specifically includes:
[0144] S61: Create a user interface module to demonstrate the effectiveness of energy management strategies. This module includes charts and metrics for energy consumption, cost savings, and carbon emissions.
[0145] S62: Collect data before and after the implementation of the energy management strategy, including energy consumption, energy costs, and carbon emissions. Based on the collected data, calculate the percentage reduction in energy consumption, cost savings, and carbon emission reduction. The specific calculation formula is as follows:
[0146]
[0147] Cost savings = Cost before consumption - Cost after consumption;
[0148] Carbon emission reduction = carbon emissions before consumption - carbon emissions after consumption;
[0149] S63: In the user interface module, the comparison of energy consumption, cost savings and carbon emissions before and after the implementation of energy management strategies is displayed in a graphical way. In order to improve the readability and ease of understanding of the information, these indicators can be displayed in the form of charts such as bar charts, line charts and pie charts.
[0150] S64: The user interface provides a function button that allows users to download a report containing detailed information on the effectiveness of energy management strategies. The report includes data aggregation, calculation methods, specific effects of the implementation strategies, and improvement suggestions.
[0151] S7 specifically includes:
[0152] S71: Regularly collect feedback information on the implementation of energy management strategies, including energy consumption data, cost data, and user satisfaction, and summarize the energy demand and supply forecast results from step S5.
[0153] S72: Based on the collected implementation feedback and forecast data, evaluate the performance of the current energy management strategy, including comparing the deviations of actual energy consumption, cost savings and carbon emission reductions from the forecast values, and analyzing user feedback to determine the effectiveness and acceptance of the strategy.
[0154] S73: Based on the performance evaluation results, identify the parameters and strategies that need to be adjusted or optimized. This may include adjusting the parameters of the stochastic optimization algorithm (such as mutation rate, crossover rate, etc.) or adjusting the energy allocation and utilization plan to better match the predicted demand and supply.
[0155] S74: Based on the identification of parameters and strategies that need to be adjusted or optimized, adjust the parameter settings of the stochastic optimization algorithm. For example, if it is found that actual energy consumption often exceeds the prediction range, it may be necessary to adjust the algorithm to increase its adaptability to future changes.
[0156] S75: Based on the analysis and adjustments in steps S73 and S74, update the energy management strategy, specifically including modifying the energy supply plan, adjusting the utilization rate of renewable energy, or reallocating energy storage resources to improve the efficiency and reliability of the overall system.
[0157] Through the above steps, the parameters of the stochastic optimization algorithm and the energy management strategy can be regularly adjusted and optimized based on the forecast results of energy demand and supply and the feedback from the implementation of energy management strategies. This dynamic adjustment and optimization process ensures that the energy management strategy can continuously adapt to changes in the external environment and internal system, improve energy utilization efficiency, reduce costs, and reduce environmental impact.
[0158] This invention is intended to cover all such substitutions, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. An optimization method for automated energy management strategies based on stochastic optimization algorithms, characterized in that, Includes the following steps: S1: Collect data including renewable energy production, traditional energy consumption, forecasted demand, and environmental parameters through IoT devices and sensor networks; S2: Use deep learning to clean, normalize, and extract features from the data collected in S1; S3: Based on the data processed in S2, an improved stochastic optimization algorithm is applied to optimize the energy management strategy in order to find the optimal energy management strategy; S4: Adjust the energy allocation and utilization plan based on the optimal energy management strategy obtained in S3; S5: Using a preset dynamic forecasting model, based on real-time energy system data in S1 and energy management strategies in S4, predict future energy demand and renewable energy supply. S6: Display the implementation effects of energy management strategies through the user interface, including performance indicators such as reduced energy consumption, cost savings, and reduced carbon emissions; S7: Periodically adjust the parameters of the stochastic optimization algorithm and the energy management strategy based on the prediction results of S5 and the feedback from the implementation of the energy management strategy.
2. The automated energy management strategy optimization method based on stochastic optimization algorithm according to claim 1, characterized in that, S1 specifically includes: S11: Deploy IoT devices, including smart meters, solar panel monitors, anemometers, and temperature and humidity sensors. Each IoT device is distributed in predetermined locations within the energy system, including renewable energy power plants, energy consumption points, and environmental monitoring stations, to achieve comprehensive coverage. S12: Construct a sensor network to connect the various IoT devices deployed in S11 into a network through wireless communication technology. This network is used to transmit data collected by IoT devices to the central processing system in real time. S13: Collect renewable energy production data, specifically using smart meters and solar panel monitors to monitor and record the electricity production from solar power systems and wind power systems in real time. This electricity production data is used to reflect the real-time generation capacity of renewable energy. S14: Collect traditional energy consumption data. Monitor and record the energy consumption of buildings, factories and homes through smart meters installed at various consumption points. Home energy consumption includes electricity, natural gas and water consumption. S15: Collect forecast demand data, use historical energy consumption data and current environmental parameter data, and combine them with a preset dynamic forecasting model to estimate energy demand in the future. S16: Collect environmental parameter data. Through environmental monitoring equipment such as temperature and humidity sensors, light sensors, and anemometers, collect parameters of ambient temperature, humidity, light intensity, and wind speed in real time.
3. The automated energy management strategy optimization method based on stochastic optimization algorithm according to claim 2, characterized in that, S2 specifically includes: S21: First, clean the data collected in step S1, including removing or correcting inaccurate, incomplete, or unconventional data records. The data cleaning formula is: D cleaned =f(D raw ), where D raw D represents the original dataset. cleaned This represents the cleaned dataset, where f is the cleaning function responsible for identifying and handling outliers and missing values. S22: Then, the data D obtained in step S21... cleaned To eliminate the influence of different dimensions, a normalization process is performed. The normalization formula is as follows: Where x represents the original data value, x′ is the normalized value, and min(x) and max(x) represent the minimum and maximum values in the dataset, respectively; S23: Finally, using an RNN deep learning model, features are extracted from the data processed in S22. Let the normalized dataset be , and the feature extraction formula is expressed as: in, H represents the normalized data input at time point t. t-1 Ft represents the hidden state at the previous time point t-1, and Ft represents the feature set extracted at time point t.
4. The automated energy management strategy optimization method based on stochastic optimization algorithm according to claim 3, characterized in that, S3 specifically includes: S31: First, clarify the optimization objectives and constraints. The optimization objectives include maximizing energy efficiency and minimizing energy costs, while the constraints include the reliability of energy supply and environmental impact limitations. S32: Based on the improved stochastic optimization algorithm, the parameters of the algorithm are initialized, including population size, number of iterations, crossover rate and mutation rate. The improved stochastic optimization algorithm integrates the characteristics of particle swarm optimization algorithm PSO and genetic algorithm GA, and combines the search capability of PSO and the genetic mechanism of GA for processing. S33: Based on the parameters in step S32, randomly generate a set of initial solutions as the starting point of the algorithm. Each solution represents an energy management strategy, including energy allocation schemes and utilization plans. S34: Evaluate each solution generated in step S33, and calculate the fitness value according to the defined optimization objective and constraints. The higher the fitness value, the closer it is to the optimal solution. S35: Based on the fitness value, select solutions with high fitness for crossover and mutation operations to generate a new generation of solution sets; S36: Iterative optimization, repeat steps S34 and S35 until the termination condition is met, including reaching the maximum number of iterations or the improvement of the solution is less than a preset threshold. S37: Select the solution with the highest fitness from the final solution set as the optimal energy management strategy, and output the detailed configuration information of the strategy.
5. The automated energy management strategy optimization method based on stochastic optimization algorithm according to claim 4, characterized in that, S34 specifically includes: S341: Define the fitness function. Based on the optimization objective and constraints, define the fitness function. Let the optimization objective be maximizing energy efficiency (E) and minimizing energy cost (C), while ensuring that the reliability R of energy supply is not lower than a preset threshold R0. min The fitness function is then expressed as: F(s) = w1·E(s) - w2·C(s), where F(s) represents the fitness value of strategy s, used to measure the quality of the strategy; s represents the solution of the energy management strategy; w1 and w2 are weight coefficients, representing the importance of energy efficiency and energy cost in the optimization objective, respectively; E(s) is the energy efficiency of strategy s; and C(s) is the energy cost of strategy s, including the total cost of all energy types. S342: Calculate the energy efficiency. For each solution s, the energy efficiency E(s) is calculated using the following formula: S343: Calculate the energy cost, C(s), according to the following formula: Where C(s) is the energy cost of strategy s; c i Let q be the unit price of the i-th energy source; i Let be the consumption of the i-th energy source under strategy s; n is the number of energy types. S344: When the solution s does not satisfy the constraints, the fitness value is penalized to reduce the selection probability. The penalty method is to add a negative penalty term to the fitness value. The specific function formula is: F(s) = F(s) - Penalty if R(s) <R min Where F(s) represents the fitness value of strategy s, which is reduced by a penalty term when strategy s fails to meet the constraints; Penalty represents the penalty term used to reduce the fitness value of strategies that fail to meet the constraints; R(s) represents the energy supply reliability achieved by strategy s; R min The minimum acceptable value representing the reliability of energy supply; S345: Combining the steps S341-S345 above, for each solution s, calculate its fitness value according to the fitness function F(s). The higher the fitness value, the better the solution is, that is, the higher the energy efficiency and the lower the energy cost.
6. The automated energy management strategy optimization method based on stochastic optimization algorithm according to claim 5, characterized in that, Specifically, S35 includes: S351: The roulette wheel selection method is used to select solutions from the current solution set based on their fitness values for reproduction. Assume the selection probability is P(s). i The specific calculation formula is as follows: Wherein, P(s) i ) represents s i The probability of being selected; F(s) i ) represents s i The fitness value; N is the total number of solutions in the solution set; The sum of fitness values of all solutions in the solution set is used to normalize the selection probability of each solution; S352: Selected solution pairs generate offspring through a crossover operation, with a crossover rate c set. r For each pair of parent solutions, with probability c r By exchanging some of their genes, two new solutions are generated. The crossover operation is expressed by the formula: s′=crossover(s a s b ), where (s a s b ) represents a pair of parent solutions participating in the crossover operation, representing two different energy management strategies, and s′ represents a new solution generated by the crossover operation; S353: Perform a mutation operation on the newly generated solution to increase the diversity of the solution set, setting the mutation rate to m. r For each gene in each new solution, with probability m r To perform random mutation, the mutation operation function is expressed as: s″=mutate(s′,m r ), where m r s is the mutation rate, representing the probability that each gene in the solution will mutate; s′ is the solution to be mutated, i.e., the new solution generated after the crossover operation; s″ is the new solution after the mutation operation. S354: All new solutions generated through crossover and mutation operations are combined into a new generation of solution set, which replaces the original solution set for the next round of iterative optimization. The update function of the new generation of solution set is expressed as: S new ={s1″,s2″,s N "}, where S new This is the solution set for the next generation, consisting of all new solutions generated through crossover and mutation operations; {s1″, s2″, ..., s N "} represents all new solutions in the next generation solution set.
7. The automated energy management strategy optimization method based on stochastic optimization algorithm according to claim 6, characterized in that, S4 specifically includes: S41: First, parse the optimal energy management strategy obtained in S3 into specific operation instructions. The information of the optimal strategy includes the utilization ratio of renewable energy and traditional energy, the priority of energy consumption, and the energy demand forecast within the time period. S42: Based on the energy utilization ratio in the optimal strategy, calculate the allocation ratio of various energy sources in different time periods. The specific formula is as follows: Among them, P type This indicates the allocation ratio of different types of energy, including solar, wind, and fossil fuels. E type It is the allocation amount of this type of energy, ∑E total It is the total distribution of all types of energy; S43: Optimize the priority of energy consumption according to the optimal strategy, specifically, prioritize the use of renewable energy, followed by lower-cost traditional energy, and finally energy with higher costs or greater environmental impact. S44: Based on energy demand forecasts and optimal strategies, dynamically adjust energy supply and consumption plans. The specific adjustment method is formulated as follows: Q new (t)=Q opt (t)·(1+ΔP), where Q new (t) represents the amount of new energy supplied at time t, Q opt (t) is the initial energy supply at time t under the optimal strategy, and ΔP is the adjustment ratio based on real-time demand changes; S45: Finally, the specific energy allocation ratio and utilization plan obtained will be implemented into the energy management system.
8. The automated energy management strategy optimization method based on stochastic optimization algorithm according to claim 7, characterized in that, S5 specifically includes: S51: Integrate the real-time energy system data collected in step S1 and the optimal energy management strategy obtained in step S4, including current energy consumption data, renewable energy production, environmental parameters, and planned energy allocation and utilization. S52: Preprocess the data collected in step S51, including data cleaning, normalization, and time series analysis. The preprocessed data is used as input for the dynamic prediction model. S53: The preprocessed data is analyzed using a pre-defined dynamic prediction model. This model is specifically a time series prediction model based on machine learning. The prediction model generates predicted values for future energy demand and renewable energy supply based on the input data. The prediction formula is expressed as follows: (D future ,RE future )Model(D current ,RE current ,E params ,S opt ), Among them, D future Forecast of future energy demand; RE future The model represents the predicted future renewable energy supply; Model is a pre-defined dynamic forecasting model; D current RE represents the current energy demand, indicating the actual energy demand at the time of forecasting. current E represents the current renewable energy supply situation, indicating the actual renewable energy supply at the time of forecasting; params For environmental parameters; S opt The optimal energy management strategy; S54: Output the prediction results from step S53, which include energy demand and renewable energy supply for a future period of time.
9. The automated energy management strategy optimization method based on stochastic optimization algorithm according to claim 8, characterized in that, S6 specifically includes: S61: Create a user interface module to demonstrate the effectiveness of energy management strategies. This module includes charts and metrics for energy consumption, cost savings, and carbon emissions. S62: Collect data before and after the implementation of energy management strategies, including energy consumption, energy costs and carbon emissions. Based on the collected data, calculate the percentage reduction in energy consumption, the amount of cost savings and the amount of carbon emission reduction. S63: In the user interface module, a graphical comparison of energy consumption, cost savings, and carbon emissions before and after the implementation of the energy management strategy is displayed. S64: The user interface provides a function button that allows users to download a report containing detailed information on the effectiveness of energy management strategies. The report includes data aggregation, calculation methods, specific effects of the implementation strategies, and improvement suggestions.
10. The method for optimizing automated energy management strategies based on stochastic optimization algorithms according to claim 9, characterized in that, Specifically, S7 includes: S71: Regularly collect feedback information on the implementation of energy management strategies, including energy consumption data, cost data, and user satisfaction, and summarize the energy demand and supply forecast results from step S5. S72: Evaluate the performance of the current energy management strategy based on the collected implementation feedback and forecast data; S73: Based on the performance evaluation results, identify the parameters and strategies that need to be adjusted or optimized; S74: Based on the identified parameters and strategies that need to be adjusted or optimized, adjust the parameter settings of the stochastic optimization algorithm; S75: Based on the analysis and adjustments in steps S73 and S74, update the energy management strategy, specifically including modifying the energy supply plan, adjusting the utilization rate of renewable energy, or reallocating energy storage resources.