Power measurement adaptive scheduling method and system based on reinforcement learning, and medium
By combining deep Q-networks and multi-layer ant colony algorithms, an adaptive power metering scheduling method is proposed, which solves the problem of insufficient flexibility of traditional power scheduling methods in complex environments and realizes efficient, stable and flexible scheduling decisions for power systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-25
- Publication Date
- 2026-03-13
AI Technical Summary
Traditional power dispatching methods struggle to provide flexible and efficient dispatching solutions when faced with complex power demand fluctuations and emergencies. In particular, when combined with historical power dispatching data, real-time feedback information, and load fluctuations, it is difficult to achieve globally optimal dispatching decisions.
By combining deep Q-networks and multi-layer ant colony algorithms, a power dispatching decision model is constructed by collecting data in real time through a power metering system, performing local and global optimizations, dynamically adjusting the power dispatching scheme, and optimizing the model parameters through feedback information.
It improves the dispatch efficiency, stability, and flexibility of the power system, ensures the balance of power supply, enhances the system's responsiveness and adaptability, and can effectively cope with complex and ever-changing power demands.
Smart Images

Figure CN121663514A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power metering and adaptive dispatching technology, and in particular to a power metering adaptive dispatching method, system and medium based on reinforcement learning. Background Technology
[0002] With the increasing complexity of power systems and the continuous growth of electricity demand, power dispatch and load allocation have become increasingly important. Traditional power dispatch methods mainly rely on rule-based dispatch strategies or empirical rules. These methods work well under stable power demand conditions, but they often fail to meet the requirements of efficiency and flexibility when facing complex demand fluctuations and emergencies.
[0003] Existing power dispatching methods typically collect real-time power consumption data through power metering systems, including power load, equipment status, and load change information, to formulate power dispatching plans. These plans usually rely on traditional optimization algorithms or rule derivations based on expert experience.
[0004] With the introduction of intelligent equipment and renewable energy into the power system, the volatility of electricity consumption has increased. Traditional methods are becoming increasingly rigid and unable to effectively adapt to complex situations such as fluctuations in electricity demand, equipment failures, and emergencies.
[0005] Reinforcement learning algorithms can continuously optimize the decision-making process through interaction with the environment, providing more flexible scheduling strategies, especially when facing complex and dynamically changing power demands. However, the application of a single reinforcement learning method in power dispatch still has limitations, particularly when it is necessary to combine historical power dispatch data, real-time feedback information, and load fluctuations, making it difficult to achieve globally optimal dispatch decisions.
[0006] Ant colony optimization (ACO), an optimization algorithm that simulates the foraging behavior of ants in nature, has been widely used in path optimization, task scheduling, and other problems. However, traditional ACO still faces challenges such as excessively rapid pheromone convergence and high computational complexity when dealing with large-scale, multi-objective scheduling problems.
[0007] How to provide an adaptive power dispatching method that combines reinforcement learning and multi-layer ant colony algorithm to cope with complex and ever-changing power demands and improve the intelligence and flexibility of power dispatching is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0008] One objective of this invention is to propose a power metering adaptive dispatching method, system, and medium based on reinforcement learning. Addressing the lack of flexibility in traditional power dispatching methods when dealing with power demand fluctuations and emergencies, this invention proposes an optimized power dispatching scheme combining deep Q-networks and a multi-layer ant colony algorithm. By learning the relationship between power consumption patterns and dispatching strategies through deep Q-networks and combining this with the multi-layer ant colony algorithm for local and global optimization, this invention can intelligently optimize the power dispatching scheme under conditions of dynamic power demand changes and equipment failures. This method effectively improves the dispatching efficiency, stability, and flexibility of the power system, ensures a balanced power supply, and enhances the system's responsiveness and adaptability, demonstrating good practical application results.
[0009] The technical solution adopted by this invention to solve its technical problem is: a power metering adaptive scheduling method based on reinforcement learning, comprising the following steps:
[0010] Step 1: Collect electricity consumption data in real time through the electricity metering system, preprocess the electricity consumption data, and generate preprocessed electricity consumption data;
[0011] Step 2: Based on the preprocessed power consumption data, construct time series data of power consumption, and combine the time series data with historical power dispatch data to generate training data;
[0012] Step 3: Based on the time series data, a power dispatch decision model is constructed using a deep Q-network algorithm. The power dispatch decision model learns the relationship between power consumption patterns and the optimal power dispatch scheme through training data, and uses a multi-layer ant colony algorithm for local search optimization.
[0013] Step 4: Based on real-time power consumption data, generate a power dispatching scheme using the power dispatching decision model;
[0014] Step 5: Dynamically adjust the power dispatching plan in response to real-time fluctuations in power demand;
[0015] Step Six: Evaluate the dynamically adjusted power dispatching scheme based on feedback information from the power metering system, adjust the parameters of the power dispatching decision model based on the evaluation results, and optimize the power dispatching scheme.
[0016] Step 7: Execute the optimized power dispatching scheme and continuously monitor the real-time power consumption data generated during the execution process, and update the power dispatching decision model in real time.
[0017] Optionally, step one specifically includes:
[0018] The power consumption data is collected in real time by sensors in the power metering system. The power consumption data includes power load, status of electrical equipment and load change information.
[0019] The power consumption data is then subjected to noise reduction, missing value imputation, and normalization to generate standardized power consumption data.
[0020] Optionally, step two specifically includes:
[0021] Based on the preprocessed power consumption data, a time series of power consumption data is constructed. The time series data contains power consumption patterns in multiple different time periods. The power load data, electrical equipment status data, and load change data at each moment are converted into a time series format to form a continuous power consumption sequence.
[0022] By performing cluster analysis on the time series data, periodic changes and trend fluctuations can be identified to reflect the electricity consumption patterns in different time periods, and then the peak and trough periods of electricity demand and their changing trends can be analyzed.
[0023] By combining historical power dispatch data with current time series data, a complete set of training data is generated.
[0024] Optionally, step three specifically includes:
[0025] Based on the time series data, features containing power consumption patterns are selected;
[0026] A power dispatch decision model is established using a deep reinforcement learning algorithm. The input of the power dispatch decision model is the features containing power consumption patterns. The features are processed through a neural network architecture. The input layer of the neural network receives information on power load, power equipment status, and load change. Feature extraction is performed through multiple hidden layers, and the final output is a power dispatch strategy.
[0027] During the training process of the power dispatch decision model, a deep Q-network algorithm is used to train the power dispatch decision model. By minimizing the objective function of dispatch error and system load fluctuation, the power dispatch strategy is gradually optimized.
[0028] During the training process, the power dispatch decision model uses reinforcement learning algorithms to adjust weights based on real-time power consumption and historical power dispatch data to continuously optimize the power dispatch strategy. The objective functions include load balancing objective, power demand optimization objective, and emergency load allocation objective.
[0029] By combining the multi-level ant colony algorithm to perform local search optimization on the power dispatch decision model, and utilizing the global optimization characteristics of the multi-level ant colony algorithm, load allocation is optimized by simulating the process of ants foraging.
[0030] Optionally, the power dispatch decision model is specifically as follows:
[0031] During training, a deep Q-network is constructed to evaluate the value of the power dispatch strategy at each time step. The input of the Q-network is the current state information, including power load, equipment status, and load change information. The output of the network is the Q value corresponding to each possible action.
[0032] ;
[0033] in, Indicates the state Take action below Expected returns For instant rewards, As a discount factor, This indicates the maximum expected return in the next state;
[0034] The algorithm combines a multi-level ant colony algorithm for local search optimization. The algorithm divides the optimization process into multiple levels. Each level of ant colony performs local optimization independently. Ant colonies at different levels explore different ranges of power load distribution and cooperate and influence each other through pheromones.
[0035] ;
[0036] in, For the first The ant colony at time t+1 starts from the path node To path node The concentration of pheromones on the surface For the first A layer of ants moves from a path node at time t. To path node The concentration of pheromones on the surface The volatility coefficient is... For the first A layer of ants moves from a path node at time t. To path node Incremental pheromones;
[0037] Deep Q-networks are used to predict power consumption patterns, while multi-level ant colony algorithms optimize power load allocation through collaborative optimization at each level.
[0038] Optionally, step four specifically includes:
[0039] Based on real-time power consumption data, a power dispatching scheme is generated using the power dispatching decision model. The real-time power consumption data includes power load, equipment status, and load change information.
[0040] By inputting the real-time power consumption data, the power dispatch decision model predicts future power consumption patterns based on a deep reinforcement learning algorithm and generates prediction results, which include power consumption trends and load demand over a future period of time.
[0041] Based on the prediction results, the power dispatching decision model is used to calculate and optimize the power dispatching scheme to ensure the stability and flexibility of power supply. The power dispatching scheme includes power load allocation, power supply period and emergency backup scheme.
[0042] Optionally, step five specifically includes the following steps:
[0043] Under real-time fluctuations in electricity demand, by analyzing real-time electricity consumption data, we can identify changes in the status of the electricity metering system and adjust the power dispatching scheme to ensure system stability and flexibility.
[0044] By combining historical power dispatch data and real-time feedback, load allocation is dynamically adjusted and power load is redistributed.
[0045] The adjusted power dispatching plan is evaluated in real time to verify the deviation from actual power consumption;
[0046] Generate and implement dynamically adjusted power dispatching schemes, continuously monitor power consumption data, and ensure continuous optimization of the dispatching process.
[0047] Optionally, step six specifically includes:
[0048] After executing the dynamically adjusted power dispatching scheme, the power metering system generates real-time feedback information, which includes power load, equipment status, and load fluctuation data.
[0049] The feedback information is analyzed to evaluate the effectiveness of the power dispatching scheme, determine the rationality of power load allocation, check whether the power supply is sufficient, and verify whether the equipment is operating normally as expected.
[0050] The system analyzes feedback information to evaluate the response capability of the power metering system and compares the actual effect of the power dispatching scheme with the expected effect.
[0051] The results of the assessment are used to determine whether adjustments to the power dispatching scheme are needed to better adapt to actual power demand;
[0052] Based on the assessment results, the power dispatching scheme was optimized.
[0053] Optionally, step seven specifically includes the following steps:
[0054] Implement the optimized power dispatching plan to ensure that power load allocation and power supply periods are carried out in accordance with the optimized power dispatching plan;
[0055] During execution, real-time monitoring of power consumption data, including power load, equipment status, and load change information, is conducted to ensure the effectiveness of the power dispatching plan.
[0056] The power dispatch decision model is updated in real time based on real-time monitored power consumption data.
[0057] Another technical solution adopted by the present invention to solve its technical problem is: a power metering adaptive dispatching system based on reinforcement learning, comprising:
[0058] The data collection and preprocessing module is used to collect electricity consumption data in real time through the electricity metering system and to preprocess the electricity consumption data.
[0059] The training data generation module is used to construct time series data of power consumption based on preprocessed power consumption data, and combine the time series data with historical power dispatch data to generate training data;
[0060] The power dispatch decision model construction module is used to construct a power dispatch decision model based on the training data using a deep Q-network algorithm, and to perform local search optimization using a multi-layer ant colony algorithm.
[0061] The power dispatching scheme generation module is used to generate a power dispatching scheme based on real-time power consumption data and the power dispatching decision model.
[0062] The dynamic adjustment module is used to dynamically adjust the power dispatching scheme in response to real-time fluctuations in power demand.
[0063] The evaluation and optimization module is used to evaluate the dynamically adjusted power dispatching scheme based on feedback information from the power metering system, adjust the parameters of the power dispatching decision model based on the evaluation results, and optimize the power dispatching scheme.
[0064] The execution module is used to execute the optimized power dispatching scheme and continuously monitor real-time power consumption data to update the power dispatching decision model.
[0065] Another technical solution adopted by the present invention to solve its technical problem is: a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the aforementioned power metering adaptive scheduling method based on reinforcement learning.
[0066] The beneficial effects of this invention:
[0067] 1. This invention proposes a reinforcement learning-based adaptive power metering scheduling method by combining deep Q-networks with a multi-layer ant colony algorithm. In existing technologies, traditional power scheduling methods mostly rely on rule-based optimization strategies or expert experience. These methods often struggle to provide flexible and efficient scheduling solutions when facing fluctuations in power demand, sudden events, and the complexity of power systems. Compared with existing technologies, this invention has significant innovations and advantages in several aspects.
[0068] 2. This invention collects real-time electricity metering data, including electricity load, equipment status, and load change information. It then uses a deep Q-network to train a power dispatching decision model and combines this with a multi-layer ant colony algorithm for local search optimization of the dispatching scheme. Under fluctuating electricity demand, the deep Q-network effectively improves the accuracy of electricity load allocation by continuously adjusting and optimizing its strategy, ensuring the flexibility and stability of the power dispatching scheme. This method overcomes the limitations of traditional power dispatching algorithms, enabling the dispatching system to adapt to different electricity demand scenarios and provide real-time response capabilities.
[0069] 3. The multi-layer ant colony algorithm employed in this invention introduces a hierarchical search mechanism during the scheduling process. Each layer of the ant colony optimizes for different scheduling objectives. Lower-level ant colonies are responsible for local search and load balancing optimization, while higher-level ant colonies are responsible for global optimization and long-term planning. Through pheromone transfer and cooperation between layers, the global search capability of the scheduling scheme is enhanced, significantly improving scheduling efficiency and accuracy. Compared to traditional single-ant colony algorithms or other global optimization algorithms, this invention demonstrates superior search capability and adaptability in large-scale power systems, effectively addressing complex power demands and scheduling tasks.
[0070] 4. This invention provides a reinforcement learning-based adaptive power metering and dispatching method. By combining deep Q-networks with multi-layer ant colony algorithms, it effectively addresses the shortcomings of existing power dispatching systems in responding to power demand fluctuations and emergencies, demonstrating significant technical advantages and broad application prospects. This method not only optimizes the operating efficiency of the power system but also enhances its dispatching capabilities in complex and dynamic environments, possessing high practical application value. Attached Figure Description
[0071] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0072] Figure 1This is a flowchart of a power metering adaptive scheduling method based on reinforcement learning proposed in this invention;
[0073] Figure 2 This is a diagram of the multi-layer ant colony algorithm architecture proposed in this invention. Detailed Implementation
[0074] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the present invention will be briefly introduced below in conjunction with the accompanying drawings and descriptions of the embodiments or the prior art. Obviously, the following description of the structure of the accompanying drawings is only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. It should be noted that the description of these embodiments is for the purpose of helping to understand the present invention, but does not constitute a limitation of the present invention.
[0075] It should be understood that the terms “comprising” and “having”, and any variations thereof, are intended to cover non-exclusive inclusion, for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such process, method, product, or device.
[0076] Example 1:
[0077] according to Figure 1 and Figure 2 The present invention provides a power metering adaptive scheduling method based on reinforcement learning, comprising the following steps:
[0078] Step 1: Collect electricity consumption data in real time through the electricity metering system, preprocess the electricity consumption data, and generate preprocessed electricity consumption data;
[0079] Step 2: Based on the preprocessed power consumption data, construct time series data of power consumption, and combine the time series data with historical power dispatch data to generate training data;
[0080] Step 3: Based on the time series data, a power dispatch decision model is constructed using a deep Q-network algorithm. The power dispatch decision model learns the relationship between power consumption patterns and the optimal power dispatch scheme through training data, and uses a multi-layer ant colony algorithm for local search optimization.
[0081] Step 4: Based on real-time power consumption data, generate a power dispatching scheme using the power dispatching decision model;
[0082] Step 5: Dynamically adjust the power dispatching plan in response to real-time fluctuations in power demand;
[0083] Step Six: Evaluate the dynamically adjusted power dispatching scheme based on feedback information from the power metering system, adjust the parameters of the power dispatching decision model based on the evaluation results, and optimize the power dispatching scheme.
[0084] Step 7: Execute the optimized power dispatching scheme and continuously monitor the real-time power consumption data generated during the execution process, and update the power dispatching decision model in real time.
[0085] In some implementations, step one specifically includes:
[0086] The power consumption data is collected in real time by sensors in the power metering system. The power consumption data includes power load, status of electrical equipment and load change information.
[0087] The power consumption data is then subjected to noise reduction, missing value imputation, and normalization to generate standardized power consumption data.
[0088] In some implementations, step two specifically includes:
[0089] Based on the preprocessed power consumption data, a time series of power consumption data is constructed. The time series data contains power consumption patterns in multiple different time periods. The power load data, electrical equipment status data, and load change data at each moment are converted into a time series format to form a continuous power consumption sequence.
[0090] By performing cluster analysis on the time series data, periodic changes and trend fluctuations can be identified to reflect the electricity consumption patterns in different time periods, and then the peak and trough periods of electricity demand and their changing trends can be analyzed.
[0091] By combining historical power dispatch data with current time series data, a complete set of training data is generated.
[0092] In some implementations, step three specifically includes:
[0093] Based on the time series data, features containing power consumption patterns are selected;
[0094] A power dispatch decision model is established using a deep reinforcement learning algorithm. The input of the power dispatch decision model is the features containing power consumption patterns. The features are processed through a neural network architecture. The input layer of the neural network receives information on power load, power equipment status, and load change. Feature extraction is performed through multiple hidden layers, and the final output is a power dispatch strategy.
[0095] During the training process of the power dispatch decision model, a deep Q-network algorithm is used to train the power dispatch decision model. By minimizing the objective function of dispatch error and system load fluctuation, the power dispatch strategy is gradually optimized.
[0096] During the training process, the power dispatch decision model uses reinforcement learning algorithms to adjust weights based on real-time power consumption and historical power dispatch data to continuously optimize the power dispatch strategy. The objective functions include load balancing objective, power demand optimization objective, and emergency load allocation objective.
[0097] By combining the multi-level ant colony algorithm to perform local search optimization on the power dispatch decision model, and utilizing the global optimization characteristics of the multi-level ant colony algorithm, load allocation is optimized by simulating the process of ants foraging.
[0098] In some implementations, the power dispatch decision model specifically refers to:
[0099] During training, a deep Q-network is constructed to evaluate the value of the power dispatch strategy at each time step. The input of the Q-network is the current state information, including power load, equipment status, and load change information. The output of the network is the Q value corresponding to each possible action.
[0100] ;
[0101] in, Indicates the state Take action below Expected returns For instant rewards, As a discount factor, This indicates the maximum expected return in the next state;
[0102] The algorithm combines a multi-level ant colony algorithm for local search optimization. The algorithm divides the optimization process into multiple levels. Each level of ant colony performs local optimization independently. Ant colonies at different levels explore different ranges of power load distribution and cooperate and influence each other through pheromones.
[0103] ;
[0104] in, For the first The ant colony at time t+1 starts from the path node To path node The concentration of pheromones on the surface For the first A layer of ants moves from a path node at time t. To path node The concentration of pheromones on the surface The volatility coefficient is... For the first A layer of ants moves from a path node at time t. To path node Incremental pheromones;
[0105] Deep Q-networks are used to predict power consumption patterns, while multi-level ant colony algorithms optimize power load allocation through collaborative optimization at each level.
[0106] In some implementations, step four specifically includes:
[0107] Based on real-time power consumption data, a power dispatching scheme is generated using the power dispatching decision model. The real-time power consumption data includes power load, equipment status, and load change information.
[0108] By inputting the real-time power consumption data, the power dispatch decision model predicts future power consumption patterns based on a deep reinforcement learning algorithm and generates prediction results, which include power consumption trends and load demand over a future period of time.
[0109] Based on the prediction results, the power dispatching decision model is used to calculate and optimize the power dispatching scheme to ensure the stability and flexibility of power supply. The power dispatching scheme includes power load allocation, power supply period and emergency backup scheme.
[0110] In some implementations, step five specifically includes the following steps:
[0111] Under real-time fluctuations in electricity demand, by analyzing real-time electricity consumption data, we can identify changes in the status of the electricity metering system and adjust the power dispatching scheme to ensure system stability and flexibility.
[0112] By combining historical power dispatch data and real-time feedback, load allocation is dynamically adjusted and power load is redistributed.
[0113] The adjusted power dispatching plan is evaluated in real time to verify the deviation from actual power consumption;
[0114] Generate and implement dynamically adjusted power dispatching schemes, continuously monitor power consumption data, and ensure continuous optimization of the dispatching process.
[0115] In some implementations, step six specifically includes:
[0116] After executing the dynamically adjusted power dispatching scheme, the power metering system generates real-time feedback information, which includes power load, equipment status, and load fluctuation data.
[0117] The feedback information is analyzed to evaluate the effectiveness of the power dispatching scheme, determine the rationality of power load allocation, check whether the power supply is sufficient, and verify whether the equipment is operating normally as expected.
[0118] The system analyzes feedback information to evaluate the response capability of the power metering system and compares the actual effect of the power dispatching scheme with the expected effect.
[0119] The results of the assessment are used to determine whether adjustments to the power dispatching scheme are needed to better adapt to actual power demand;
[0120] Based on the assessment results, the power dispatching scheme was optimized.
[0121] In some implementations, step seven specifically includes the following steps:
[0122] Implement the optimized power dispatching plan to ensure that power load allocation and power supply periods are carried out in accordance with the optimized power dispatching plan;
[0123] During execution, real-time monitoring of power consumption data, including power load, equipment status, and load change information, is conducted to ensure the effectiveness of the power dispatching plan.
[0124] The power dispatch decision model is updated in real time based on real-time monitored power consumption data.
[0125] Example 2:
[0126] To verify the feasibility of this invention in practice, it was applied to power dispatch optimization in a smart grid system of a provincial power company. For a batch of power systems with different load demands and equipment failure patterns, power load optimization and dispatch scheme prediction were performed. In this application scenario, traditional methods rely on manual experience and rule-based dispatch strategies to adjust load allocation and dispatch plans. Each manual adjustment of the dispatch scheme involves a long response time, and traditional methods cannot respond quickly and make optimization adjustments in the event of power demand fluctuations or equipment failures. Therefore, this invention proposes an adaptive power dispatch method based on a combination of deep Q-networks and multi-layer ant colony algorithms to solve the problems of insufficient flexibility and slow response speed in existing technologies.
[0127] One of the core innovations of this invention lies in the adoption of a three-layer ant colony optimization (MACO) algorithm. This algorithm decomposes the power dispatch optimization problem into three levels through a hierarchical structure: local load optimization, global load allocation, and long-term planning and strategy. Each layer of the ant colony works according to different dispatch objectives and optimization requirements, and achieves global optimization through pheromone transmission and feedback cooperation, thereby effectively improving the efficiency and accuracy of power dispatch.
[0128] During implementation, the system first collects real-time data on power load, equipment status, and load changes through a power metering system. This data is then preprocessed to generate time-series data. Combined with historical power dispatch data, the system generates a training dataset. A deep Q-network is used to train the power dispatch decision model, which learns the relationship between power consumption patterns and dispatch strategies. Through the local optimization capabilities of a multi-layer ant colony algorithm, power load allocation is significantly improved.
[0129] In this invention, the application of a three-layer ant colony algorithm significantly improves the optimization effect of power dispatching schemes. The task of the first-layer ant colony is local load optimization. Each subsystem in the power system may experience load imbalances during certain periods, requiring local optimization to ensure the stability of power consumption. At this level, the ants search for different load allocation schemes, attempting to find the optimal solution to balance the load of various devices. Each ant represents a possible load allocation method, and through multiple searches and pheromone transmissions, the system eventually finds the optimal local load allocation scheme. The higher the pheromone concentration, the better the scheme. In this way, the first-layer ant colony can effectively optimize load allocation within a short time frame.
[0130] The second-layer ant colony is responsible for optimizing global load distribution. Unlike the first-layer ant colony, the second-layer optimization target is the load distribution of the entire power system, taking into account the mutual influence between different subsystems. Through pheromone transmission, the second-layer ant colony can perform a global search and find the most suitable load distribution scheme based on the load demand of each subsystem and the overall power supply capacity. This layer of optimization ensures the rationality of the power dispatch scheme on a global scale and can effectively cope with the synergistic effects between equipment and sudden changes in load demand.
[0131] The task of the third-layer ant colony is to conduct long-term planning and strategy optimization of the power system. Compared with the local optimization and global load allocation of the first two layers, the third-layer ant colony focuses on future electricity demand forecasting and long-term electricity supply planning. This layer of ants explores possible future electricity demand and supply conditions to formulate long-term power dispatching schemes to ensure the stability and sustainability of the power system in long-term operation. The optimization of the third-layer ant colony not only considers current load allocation but also comprehensively considers long-term factors such as power system development trends, equipment aging, and changes in the energy structure.
[0132] During model training and optimization, the system underwent 50 rounds of iterative training, adjusting the model parameters based on real-time feedback after each round. After 20 rounds of optimization, the model's prediction accuracy and scheduling efficiency were significantly improved. During optimization, the learning rate of the deep Q-network was set to 0.005, the discount factor to 0.9, the number of ants in the ant colony algorithm to 30, and the pheromone evaporation factor to 0.3.
[0133] To verify the effectiveness of the scheduling scheme, this embodiment used 10 actual power load samples for testing. The tests included the accuracy of power load prediction under different scenarios and the system's adjustment capability in the event of equipment failure. The results show that, based on the scheduling scheme of this invention, the prediction error of power load is controlled within ±5% in most cases, and the system can dynamically adjust the scheduling scheme within 30 minutes in the event of equipment failure. This significantly shortens the response time compared to traditional methods and improves the flexibility and efficiency of the scheduling system.
[0134] Table 1 below shows the comparison data of the power load prediction error of the present invention with that of the traditional method in actual testing:
[0135]
[0136] Table 1. Comparison of power load prediction error between the present invention and traditional methods in actual tests.
[0137] As can be clearly seen from the data in Table 1, the present invention generally performs worse than traditional methods in terms of power load forecasting error, and the system's performance is particularly outstanding under equipment failure conditions. For example, the forecasting error for the 08:00-09:00 period decreased from 4.12% to 1.94% compared to the traditional method, while the error for the 09:00-10:00 period decreased from 2.86% to 0.97%. This result fully demonstrates the efficiency and accuracy of the present invention in handling power load scheduling optimization, especially in the case of power demand fluctuations and equipment failures, enabling it to respond better and make optimal decisions.
[0138] The results of this embodiment verify the effectiveness of the present invention in power system dispatching, particularly in terms of power load optimization, system flexibility, and rapid response capability, demonstrating significant technical advantages. By combining deep Q-networks and multi-layer ant colony algorithms, the present invention not only optimizes the accuracy and efficiency of power dispatching schemes but also improves the stability and resilience of power systems in complex environments. This method provides a reliable optimization solution for power dispatching systems in smart grids and has significant practical application value.
[0139] Example 3:
[0140] An adaptive power metering and dispatching system based on reinforcement learning includes:
[0141] The data collection and preprocessing module is used to collect electricity consumption data in real time through the electricity metering system and to preprocess the electricity consumption data.
[0142] The training data generation module is used to construct time series data of power consumption based on preprocessed power consumption data, and combine the time series data with historical power dispatch data to generate training data;
[0143] The power dispatch decision model construction module is used to construct a power dispatch decision model based on the training data using a deep Q-network algorithm, and to perform local search optimization using a multi-layer ant colony algorithm.
[0144] The power dispatching scheme generation module is used to generate a power dispatching scheme based on real-time power consumption data and the power dispatching decision model.
[0145] The dynamic adjustment module is used to dynamically adjust the power dispatching scheme in response to real-time fluctuations in power demand.
[0146] The evaluation and optimization module is used to evaluate the dynamically adjusted power dispatching scheme based on feedback information from the power metering system, adjust the parameters of the power dispatching decision model based on the evaluation results, and optimize the power dispatching scheme.
[0147] The execution module is used to execute the optimized power dispatching scheme and continuously monitor real-time power consumption data to update the power dispatching decision model.
[0148] Example 4:
[0149] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the aforementioned reinforcement learning-based adaptive scheduling method for power metering.
[0150] The functions described herein can be implemented in hardware, software executed by a processor, firmware, or any combination thereof. If implemented in software executed by a processor, the functions can be stored as one or more instructions or codes on or transmitted via a computer-readable medium. Other examples and embodiments are within the scope and spirit of this invention and the appended claims. For example, due to the nature of software, the functions described above can be implemented using software executed by a processor, hardware, firmware, hardwired, or any combination thereof. Furthermore, the functional units can be integrated into a single processing unit, or each unit can exist physically separately, or two or more units can be integrated into a single unit.
[0151] The units described as separate components may or may not be physically separate. Similarly, the components of the control device may or may not be physical units; they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0152] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory, random access memory, portable hard drives, magnetic disks, or optical disks.
[0153] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be covered within the scope of the claims and specification of the present invention.
Claims
1. A power metering adaptive scheduling method based on reinforcement learning, characterized in that, Includes the following steps: Step 1: Collect electricity consumption data in real time through the electricity metering system and preprocess the electricity consumption data; Step 2: Based on the preprocessed power consumption data, construct time series data of power consumption, and combine the time series data with historical power dispatch data to generate training data; Step 3: Based on the training data, a power dispatching decision model is constructed using the deep Q-network algorithm, and a multi-layer ant colony algorithm is used for local search optimization; Step 4: Based on real-time power consumption data, generate a power dispatching scheme using the power dispatching decision model; Step 5: Dynamically adjust the power dispatching plan in response to real-time fluctuations in power demand; Step Six: Evaluate the dynamically adjusted power dispatching scheme based on feedback information from the power metering system, adjust the parameters of the power dispatching decision model based on the evaluation results, and optimize the power dispatching scheme. Step 7: Execute the optimized power dispatching scheme and continuously monitor real-time power consumption data to update the power dispatching decision model.
2. The power metering adaptive scheduling method based on reinforcement learning according to claim 1, characterized in that, Step one specifically includes: The power consumption data is collected in real time by sensors in the power metering system. The power consumption data includes power load, status of electrical equipment and load change information. The power consumption data is then subjected to noise reduction, missing value imputation, and normalization to generate standardized power consumption data.
3. The power metering adaptive scheduling method based on reinforcement learning according to claim 1, characterized in that, Step two specifically includes: Based on the preprocessed power consumption data, a time series of power consumption data is constructed. The time series data contains power consumption patterns in multiple different time periods. The power load data, electrical equipment status data, and load change data at each moment are converted into a time series format to form a continuous power consumption sequence. By performing cluster analysis on the time series data, periodic changes and trend fluctuations can be identified to reflect the electricity consumption patterns in different time periods, and then the peak and trough periods of electricity demand and their changing trends can be analyzed. By combining historical power dispatch data with current time series data, a complete set of training data is generated.
4. The power metering adaptive scheduling method based on reinforcement learning according to claim 1, characterized in that, Step three specifically includes: Based on the time series data, features containing power consumption patterns are selected; A power dispatch decision model is established using a deep reinforcement learning algorithm. The input of the power dispatch decision model is the features containing power consumption patterns. The features are processed through a neural network architecture. The input layer of the neural network receives information on power load, power equipment status, and load change. Feature extraction is performed through multiple hidden layers, and the final output is a power dispatch strategy. During the training process of the power dispatch decision model, a deep Q-network algorithm is used to train the power dispatch decision model. By minimizing the objective function of dispatch error and system load fluctuation, the power dispatch strategy is gradually optimized. During the training process, the power dispatch decision model uses reinforcement learning algorithms to adjust weights based on real-time power consumption and historical power dispatch data to continuously optimize the power dispatch strategy. The objective functions include load balancing objective, power demand optimization objective, and emergency load allocation objective. The power dispatch decision model is optimized by combining the multi-level ant colony algorithm for local search. The global optimization characteristics of the multi-level ant colony algorithm are utilized to optimize the power load allocation by simulating the foraging process of ants. Specifically, the power dispatch decision model is as follows: During training, a deep Q-network is constructed to evaluate the value of the power dispatch strategy at each time step. The input of the Q-network is the current state information, including power load, equipment status, and load change information. The output of the network is the Q value corresponding to each possible action. ; in, Indicates the state Take action below Expected returns For instant rewards, As a discount factor, This indicates the maximum expected return in the next state; The algorithm combines a multi-level ant colony algorithm for local search optimization. The algorithm divides the optimization process into multiple levels. Each level of ant colony performs local optimization independently. Ant colonies at different levels explore different ranges of power load distribution and cooperate and influence each other through pheromones. ; in, For the first The ant colony at time t+1 starts from the path node To path node The concentration of pheromones on the surface For the first A layer of ants moves from path nodes at time t. Move to path node The concentration of pheromones on the surface The volatility coefficient is... For the first A layer of ants moves from a path node at time t. To path node Incremental pheromones; Deep Q-networks are used to predict power consumption patterns, while multi-level ant colony algorithms optimize power load allocation through collaborative optimization at each level.
5. The power metering adaptive scheduling method based on reinforcement learning according to claim 1, characterized in that, Step four specifically includes: Based on real-time power consumption data, a power dispatching scheme is generated using the power dispatching decision model; the real-time power consumption data includes power load, equipment status, and load change information. By inputting the real-time power consumption data, the power dispatch decision model predicts future power consumption patterns based on a deep reinforcement learning algorithm and generates prediction results, which include power consumption trends and load demand over a future period of time. Based on the prediction results, the power dispatching scheme is calculated and optimized using the power dispatching decision model. The power dispatching scheme includes power load allocation, power supply period and emergency backup scheme.
6. The power metering adaptive scheduling method based on reinforcement learning according to claim 1, characterized in that, Step five specifically includes the following steps: Under real-time fluctuations in electricity demand, by analyzing real-time electricity consumption data, we can identify changes in the status of the electricity metering system and adjust the power dispatching scheme to ensure system stability and flexibility. By combining historical power dispatch data and real-time feedback, load allocation is dynamically adjusted and power load is redistributed. The adjusted power dispatching plan is evaluated in real time to verify the deviation from actual power consumption; Generate and implement dynamically adjusted power dispatching schemes, continuously monitor power consumption data, and ensure continuous optimization of the dispatching process.
7. The power metering adaptive scheduling method based on reinforcement learning according to claim 1, characterized in that, Step six specifically includes: After executing the dynamically adjusted power dispatching scheme, the power metering system generates real-time feedback information, which includes power load, equipment status, and load fluctuation data. The feedback information is analyzed to evaluate the effectiveness of the power dispatching scheme, determine the rationality of power load allocation, check whether the power supply is sufficient, and verify whether the equipment is operating normally as expected. The system analyzes feedback information to evaluate the response capability of the power metering system and compares the actual effect of the power dispatching scheme with the expected effect. The results of the assessment are used to determine whether adjustments to the power dispatching scheme are necessary. Based on the assessment results, the power dispatching scheme was optimized.
8. The power metering adaptive scheduling method based on reinforcement learning according to claim 1, characterized in that, Step seven specifically includes the following steps: Implement the optimized power dispatching plan to ensure that power load allocation and power supply periods are carried out in accordance with the optimized power dispatching plan; During execution, real-time monitoring of power consumption data, including power load, equipment status, and load change information, is conducted to ensure the effectiveness of the power dispatching plan. The power dispatch decision model is updated in real time based on real-time monitored power consumption data.
9. A power metering adaptive dispatch system based on reinforcement learning, characterized in that, include: The data collection and preprocessing module is used to collect electricity consumption data in real time through the electricity metering system and to preprocess the electricity consumption data. The training data generation module is used to construct time series data of power consumption based on preprocessed power consumption data, and combine the time series data with historical power dispatch data to generate training data; The power dispatch decision model construction module is used to construct a power dispatch decision model based on the training data using a deep Q-network algorithm, and to perform local search optimization using a multi-layer ant colony algorithm. The power dispatching scheme generation module is used to generate a power dispatching scheme based on real-time power consumption data and the power dispatching decision model. The dynamic adjustment module is used to dynamically adjust the power dispatching scheme in response to real-time fluctuations in power demand. The evaluation and optimization module is used to evaluate the dynamically adjusted power dispatching scheme based on feedback information from the power metering system, adjust the parameters of the power dispatching decision model based on the evaluation results, and optimize the power dispatching scheme. The execution module is used to execute the optimized power dispatching scheme and continuously monitor real-time power consumption data to update the power dispatching decision model.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements a power metering adaptive scheduling method based on reinforcement learning as described in any one of claims 1-8.