Electric power consumption prediction model optimization method and system
Through the distributed power energy consumption prediction model, combined with anomaly detection, federated learning and blockchain verification, the accuracy and privacy security issues of traditional power energy consumption prediction in complex environments are solved, and efficient and intelligent management of the power system is achieved. .
Patent Information
- Application Number
- CN202411006489.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2024-09-24
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional power consumption prediction methods are difficult to accurately capture complex dynamic changes. Especially in distributed and edge computing environments, there are problems of data islands and model training bottlenecks, and the risk of privacy leakage is high.
Adopt a distributed power consumption prediction model, obtain the power consumption data of edge user nodes for anomaly detection and feature extraction, use distributed storage and federated learning to optimize model parameters, combine with blockchain verification to ensure data security, and build a digital twin The model performs reinforcement learning optimization decisions.
It improves the security and prediction accuracy of the power system, protects user privacy, enhances model generalization capabilities and adaptability, and achieves accurate prediction of power energy consumption and intelligent decision-making for power grid management.
Smart Images

Figure CN118690916A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of big data technology, and in particular to a method and system for optimizing an electric power consumption prediction model. Background Art
[0002] Power consumption forecasting is of vital importance in modern power systems and energy management. Accurate power consumption forecasting can help grid operators maintain a balance between supply and demand, avoid power surplus or shortage, and thus improve the stability and reliability of the grid. Forecasting can help identify possible peak load periods and take measures in advance to prevent grid overload and potential power accidents. By predicting future power demand, power companies can arrange power generation plans more reasonably, optimize the operation of generators, and improve economic benefits. Accurate energy consumption forecasting can reduce the power company's reserve capacity requirements and reduce operating and maintenance costs. The forecast results can help power companies formulate more reasonable electricity price strategies and improve market competitiveness and profitability.
[0003] Traditional electricity energy consumption forecasting methods usually rely on historical data and simple statistical models, which make it difficult to accurately capture the complex dynamic changes in electricity consumption, especially in distributed and edge computing environments, where data silos and model training bottlenecks are particularly prominent; some methods also require centralized collection of user data, which poses a risk of privacy leakage. Summary of the invention
[0004] Based on this, it is necessary for the present invention to provide a method and system for optimizing an electric power consumption prediction model to solve at least one of the above technical problems.
[0005] To achieve the above object, a method for optimizing a power consumption prediction model comprises the following steps: Step S1: Obtain power consumption data of edge user nodes of the power system, perform anomaly detection and preliminary feature extraction on the power consumption data to obtain power feature data; store the power feature data in a distributed manner at the edge nodes to form a local data pool; aggregate the power feature data to the regional data center according to a preset period to obtain comprehensive power feature data; Step S2: Initialize the global model architecture according to the comprehensive data of power characteristics, and distribute the initial model to each edge node. The edge node trains the initial model according to the local data pool to obtain local model parameter data; aggregate the local model parameter data based on the federated average algorithm through the central server to obtain global model parameter data; perform iterative optimization based on the global model parameter data and the local model parameter data to obtain distributed model parameter data; Step S3: The information of the participants is stored in the blockchain according to the distributed model parameter data to obtain the on-chain model hash data; the authenticity of the distributed model parameter data is verified by the on-chain model hash data, and the power consumption is predicted by the distributed model parameter data to obtain the power consumption prediction data; Step S4: semantically enhance the power consumption prediction data to obtain semantically annotated prediction data; construct a digital twin model of the power grid operation environment based on the semantically annotated prediction data; define the parameters and prediction indicators in the digital twin model as the state space of reinforcement learning, obtain adjustable power grid parameters as the action space, and design a reward function based on power grid stability to obtain reward function data; Step S5: Perform PPO-based optimal strategy learning based on the reward function data, and continuously optimize the strategy based on real-time feedback to obtain strategy value function data; convert the strategy value function data into explainable decisions to support human-machine collaborative power grid management.
[0006] The present invention can monitor and identify abnormal situations of power consumption in real time and improve the safety and stability of the power system by acquiring power consumption data of edge user nodes and performing anomaly detection and feature extraction. Distributed storage and aggregation of power feature data help reduce the overhead of data transmission and storage, and provide centralized data resources for subsequent model training and prediction. Using the distributed learning method, edge nodes can perform personalized training on the global model based on the local data pool to adapt to their respective actual conditions and data characteristics. The parameter aggregation of the federated average algorithm can achieve reasonable fusion of model parameters and improve the overall performance and generalization ability of the model. Iterative optimization can further optimize the distributed model parameters and improve the accuracy and prediction ability of the model. Using blockchain storage can ensure the security and immutability of the information of the participants and prevent data from being maliciously tampered or forged. The authenticity of the distributed model parameters can be verified by the on-chain model hash data, and the credibility and consistency of the model parameters can be verified. Power consumption prediction through distributed model parameters can provide accurate energy consumption prediction results, helping the power system to make energy scheduling and optimization decisions. By performing semantic enhancement processing and semantic annotation on the power energy consumption prediction data, richer and more valuable information can be extracted to help understand and explain the operating status of the power system. The construction of a digital twin model of the power grid operation environment can provide virtual simulation and simulation of the power grid state, so that decision makers can evaluate the effects of different operations and strategies in a virtual environment, thereby guiding the operation and management of the actual power grid. By defining the state space and action space, and designing a reward function based on the stability of the power grid, a reinforcement learning framework can be formed to learn the optimal decision strategy through interaction with the environment. The reward function data obtained can be provided to the subsequent strategy optimization and decision-making process to support the intelligent management and optimization of the power grid. Through the optimal strategy learning based on PPO, the decision strategy of power grid management can be automatically optimized according to the reward function data to improve the efficiency and accuracy of the operation. Real-time feedback can help continuously optimize the strategy so that the decision strategy can adapt to changes in the actual power grid environment. The obtained strategy value function data can be converted into an explainable decision result, providing reference and support for decision makers, and realizing human-machine collaborative power grid management.
[0007] The present invention also provides an electric power consumption prediction model optimization system for executing the above-mentioned electric power consumption prediction model optimization method, wherein the electric power consumption prediction model optimization system comprises: The distributed data acquisition module is used to obtain the power consumption data of the edge user nodes of the power system, and perform anomaly detection and preliminary feature extraction on the power consumption data to obtain power feature data; the power feature data is distributed and stored in the edge nodes to form a local data pool; the power feature data is aggregated to the regional data center according to the preset period to obtain comprehensive power feature data; The federated learning optimization module is used to initialize the global model architecture based on the comprehensive data of power characteristics and distribute the initial model to each edge node. The edge node trains the initial model based on the local data pool to obtain local model parameter data; the local model parameter data is aggregated through the central server based on the federated averaging algorithm to obtain the global model parameter data; iterative optimization is performed based on the global model parameter data and the local model parameter data to obtain the distributed model parameter data; The blockchain verification prediction module is used to store the participant information on the blockchain according to the distributed model parameter data to obtain the on-chain model hash data; the authenticity of the distributed model parameter data is verified through the on-chain model hash data, and the power consumption is predicted through the distributed model parameter data to obtain the power consumption prediction data; The digital twin environment construction module is used to perform semantic enhancement processing on the power consumption prediction data to obtain semantically annotated prediction data; construct a digital twin model of the power grid operation environment based on the semantically annotated prediction data; define the parameters and prediction indicators in the digital twin model as the state space of reinforcement learning, obtain the adjustable power grid parameters as the action space, and design a reward function based on power grid stability to obtain reward function data; The intelligent decision-making optimization module is used to learn the optimal strategy based on PPO according to the reward function data, and continuously optimize the strategy according to real-time feedback to obtain the strategy value function data; the strategy value function data is converted into explainable decisions to support human-machine collaborative power grid management.
[0008] The present invention can obtain the power consumption data of the edge user nodes of the power system through the distributed data acquisition module, which helps to understand the power usage of different users and provide basic data for subsequent anomaly detection and feature extraction. Anomaly detection can timely discover abnormal behavior in power consumption data and improve the safety and stability of the power system. Preliminary feature extraction can extract useful features from the original data to provide input for subsequent modeling and analysis. Through the federated learning optimization module, distributed edge nodes can be used for model training without concentrating the data on a central server. This can protect the privacy of users and avoid the leakage of sensitive data. The edge node is trained according to local data to obtain local model parameter data, and the central server obtains global model parameter data by aggregating local model parameter data. This distributed learning method helps to improve the generalization ability and adaptability of the model, so that the model can better adapt to the data characteristics of different edge nodes. The authenticity and credibility of the distributed model parameter data can be guaranteed by verifying the prediction module through the blockchain. Storing the information of the participants on the blockchain can ensure the non-tamperability and traceability of the data. By verifying the hash data of the model on the chain, the integrity and consistency of the distributed model parameter data can be ensured. At the same time, using distributed model parameter data to predict power consumption can provide energy consumption prediction results of the power system and provide a reference for the operation and dispatch of the power system. Through the digital twin environment construction module, the power consumption prediction data can be semantically enhanced to obtain prediction data with more semantic information. This helps to improve the understanding and modeling capabilities of the power system operation environment. The digital twin model of the power grid operation environment can simulate the real power system and form a reinforcement learning environment by defining the state space and action space. In this way, reinforcement learning can be applied to the optimization of power grid management decisions to improve the operation efficiency and stability of the power grid. Through the intelligent decision optimization module, the optimal strategy learning can be performed based on the PPO algorithm to optimize the power grid management decision. Through real-time feedback and continuous optimization of strategies, the decision-making process can be made more intelligent and adaptive. The obtained strategy value function data can provide evaluation and explanation of the decision results to support human-machine collaborative power grid management. In this way, effective cooperation between people and models can be achieved, and the efficiency and interpretability of power grid management can be improved.In summary, the effects of the above steps include: obtaining power consumption data, performing anomaly detection and feature extraction, and improving the security and analysis capabilities of the power system; protecting user privacy and using distributed learning to improve the generalization and adaptability of the model; ensuring the authenticity and credibility of distributed model parameter data through blockchain verification; building a digital twin model to provide understanding of the power system operating environment and decision-making optimization capabilities; the intelligent decision-making optimization module based on reinforcement learning can improve the effectiveness and efficiency of power grid management decisions by learning optimal strategies, thereby optimizing the operation of the power system; the distributed data acquisition module and the federated learning optimization module can use the data of edge nodes for model training and parameter optimization, thereby improving the generalization and adaptability of the model, and further optimizing the analysis and prediction capabilities of power feature data; the blockchain verification prediction module can ensure the authenticity and integrity of the distributed model parameter data, improve the credibility and accuracy of the model prediction results, and thus optimize the prediction results and related decisions of power energy consumption; the digital twin environment construction module can build a simulation environment of a real power system, and improve the understanding and decision-making optimization capabilities of the power system operating environment by semantically enhancing the prediction data, thereby optimizing the effectiveness and stability of power grid management. In summary, the effects of the above steps include optimizing the operation, decision-making and energy consumption forecasting capabilities of the power system, and improving the efficiency, reliability and stability of the power system. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments thereof made with reference to the following drawings: Figure 1 A schematic diagram of the steps of the power energy consumption prediction model optimization method of the present invention; Figure 2 for Figure 1 Detailed step flow diagram of step S1; Figure 3 for Figure 1 Detailed step flow chart of step S2 in FIG. DETAILED DESCRIPTION
[0010] The technical method of the present invention is described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by technicians in this field without creative work are within the scope of protection of the present invention.
[0011] In addition, the accompanying drawings are only schematic illustrations of the present invention and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. The functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor methods and / or microcontroller methods.
[0012] It should be understood that, although the terms "first", "second", etc. may be used herein to describe various units, these units should not be limited by these terms. These terms are used only to distinguish one unit from another unit. For example, without departing from the scope of the exemplary embodiments, the first unit may be referred to as the second unit, and similarly the second unit may be referred to as the first unit. The term "and / or" used herein includes any and all combinations of one or more of the listed associated items.
[0013] To achieve this, please refer to Figures 1 to 3 The present invention provides a method for optimizing an electric power consumption prediction model, comprising the following steps: Step S1: Obtain power consumption data of edge user nodes of the power system, perform anomaly detection and preliminary feature extraction on the power consumption data to obtain power feature data; store the power feature data in a distributed manner at the edge nodes to form a local data pool; aggregate the power feature data to the regional data center according to a preset period to obtain comprehensive power feature data; Step S2: Initialize the global model architecture according to the comprehensive data of power characteristics, and distribute the initial model to each edge node. The edge node trains the initial model according to the local data pool to obtain local model parameter data; aggregate the local model parameter data based on the federated average algorithm through the central server to obtain global model parameter data; perform iterative optimization based on the global model parameter data and the local model parameter data to obtain distributed model parameter data; Step S3: The information of the participants is stored in the blockchain according to the distributed model parameter data to obtain the on-chain model hash data; the authenticity of the distributed model parameter data is verified by the on-chain model hash data, and the power consumption is predicted by the distributed model parameter data to obtain the power consumption prediction data; Step S4: semantically enhance the power consumption prediction data to obtain semantically annotated prediction data; construct a digital twin model of the power grid operation environment based on the semantically annotated prediction data; define the parameters and prediction indicators in the digital twin model as the state space of reinforcement learning, obtain adjustable power grid parameters as the action space, and design a reward function based on power grid stability to obtain reward function data; Step S5: Perform PPO-based optimal strategy learning based on the reward function data, and continuously optimize the strategy based on real-time feedback to obtain strategy value function data; convert the strategy value function data into explainable decisions to support human-machine collaborative power grid management.
[0014] In the embodiment of the present invention, reference Figure 1 The above is a schematic diagram of the steps of a method for optimizing a power consumption prediction model according to the present invention. In this example, the method for optimizing a power consumption prediction model comprises the following steps: Step S1: Obtain power consumption data of edge user nodes of the power system, perform anomaly detection and preliminary feature extraction on the power consumption data to obtain power feature data; store the power feature data in a distributed manner at the edge nodes to form a local data pool; aggregate the power feature data to the regional data center according to a preset period to obtain comprehensive power feature data; The embodiment of the present invention installs data acquisition equipment or sensors, smart meters: used to measure and record power consumption data, can be installed at the user's power supply point; energy monitoring equipment: can be used to monitor the energy consumption of the entire building or equipment, and provide more fine-grained data; Internet of Things sensors: can be used to collect various environmental parameters (such as temperature, humidity, light), and other data related to power consumption. Set up edge computing nodes in user nodes or buildings to receive and store collected data; use appropriate communication protocols and technologies (such as Wi-Fi, LoRaWAN, NB-IoT) to transmit data to the local storage of edge nodes; apply statistical analysis techniques, such as mean, standard deviation, box plot, outlier detection, etc., to detect abnormal behavior in power consumption data; use clustering algorithms (such as K-means clustering) or anomaly detection algorithms (such as isolation forest, local anomaly factor) to identify abnormal energy consumption patterns; use deep neural network models, such as autoencoders, to learn normal energy consumption patterns to detect anomalies.
[0015] Step S2: Initialize the global model architecture according to the comprehensive data of power characteristics, and distribute the initial model to each edge node. The edge node trains the initial model according to the local data pool to obtain local model parameter data; aggregate the local model parameter data based on the federated average algorithm through the central server to obtain global model parameter data; perform iterative optimization based on the global model parameter data and the local model parameter data to obtain distributed model parameter data; In an embodiment of the present invention, a global model architecture, such as a neural network model, is initialized according to comprehensive power characteristic data, and the initial global model is distributed to each edge node. The edge node trains the initial model using data in a local data pool to obtain local model parameter data. The central server aggregates the local model parameter data using a federated averaging algorithm to obtain global model parameter data. The global model parameter data and the local model parameter data are iteratively optimized, for example, using a gradient descent algorithm or other optimization algorithms to obtain distributed model parameter data.
[0016] Step S3: The information of the participants is stored in the blockchain according to the distributed model parameter data to obtain the on-chain model hash data; the authenticity of the distributed model parameter data is verified by the on-chain model hash data, and the power consumption is predicted by the distributed model parameter data to obtain the power consumption prediction data; The embodiment of the present invention stores the participant information (such as edge node identifiers) on the blockchain to ensure the data is tamper-proof and traceable; uses the on-chain model hash data to verify the authenticity of the distributed model parameter data to ensure the integrity and consistency of the model parameter data; uses the distributed model parameter data to predict power consumption, for example, using a regression model or a time series model to obtain power consumption prediction data.
[0017] Step S4: semantically enhance the power consumption prediction data to obtain semantically annotated prediction data; construct a digital twin model of the power grid operation environment based on the semantically annotated prediction data; define the parameters and prediction indicators in the digital twin model as the state space of reinforcement learning, obtain adjustable power grid parameters as the action space, and design a reward function based on power grid stability to obtain reward function data; An embodiment of the present invention performs semantic enhancement processing on the power consumption prediction data, for example, using natural language processing technology or a domain knowledge base to associate the prediction data with semantic information to obtain semantically annotated prediction data; a digital twin model of the power grid operating environment is constructed based on the semantically annotated prediction data, and the model can simulate the operating environment and behavior of a real power system.
[0018] Step S5: Perform PPO-based optimal strategy learning based on the reward function data, and continuously optimize the strategy based on real-time feedback to obtain strategy value function data; convert the strategy value function data into explainable decisions to support human-machine collaborative power grid management.
[0019] The embodiment of the present invention defines the state space in the digital twin model based on reward function data, such as state variables and environmental parameters of the power system; defines adjustable grid parameters as action space, such as adjusting the output power of the generator or the grid connection status; designs a reward function based on grid stability to evaluate the quality of each decision, such as minimizing power loss or maximizing grid stability; uses a reinforcement learning method based on the PPO (Proximal Policy Optimization) algorithm to learn the optimal strategy in a digital twin environment; continuously optimizes the strategy according to real-time feedback and updates the strategy value function data; and converts the strategy value function data into explainable decisions to support human-machine collaborative grid management.
[0020] The present invention can monitor and identify abnormal situations of power consumption in real time and improve the safety and stability of the power system by acquiring power consumption data of edge user nodes and performing anomaly detection and feature extraction. Distributed storage and aggregation of power feature data help reduce the overhead of data transmission and storage, and provide centralized data resources for subsequent model training and prediction. Using the distributed learning method, edge nodes can perform personalized training on the global model based on the local data pool to adapt to their respective actual conditions and data characteristics. The parameter aggregation of the federated average algorithm can achieve reasonable fusion of model parameters and improve the overall performance and generalization ability of the model. Iterative optimization can further optimize the distributed model parameters and improve the accuracy and prediction ability of the model. Using blockchain storage can ensure the security and immutability of the information of the participants and prevent data from being maliciously tampered or forged. The authenticity of the distributed model parameters can be verified by the on-chain model hash data, and the credibility and consistency of the model parameters can be verified. Power consumption prediction through distributed model parameters can provide accurate energy consumption prediction results, helping the power system to make energy scheduling and optimization decisions. By performing semantic enhancement processing and semantic annotation on the power energy consumption prediction data, richer and more valuable information can be extracted to help understand and explain the operating status of the power system. The construction of a digital twin model of the power grid operation environment can provide virtual simulation and simulation of the power grid state, so that decision makers can evaluate the effects of different operations and strategies in a virtual environment, thereby guiding the operation and management of the actual power grid. By defining the state space and action space, and designing a reward function based on the stability of the power grid, a reinforcement learning framework can be formed to learn the optimal decision strategy through interaction with the environment. The reward function data obtained can be provided to the subsequent strategy optimization and decision-making process to support the intelligent management and optimization of the power grid. Through the optimal strategy learning based on PPO, the decision strategy of power grid management can be automatically optimized according to the reward function data to improve the efficiency and accuracy of the operation. Real-time feedback can help continuously optimize the strategy so that the decision strategy can adapt to changes in the actual power grid environment. The obtained strategy value function data can be converted into an explainable decision result, providing reference and support for decision makers, and realizing human-machine collaborative power grid management.
[0021] Preferably, step S1 comprises the following steps: Step S11: Collecting power consumption information of edge user nodes through smart meters to obtain original power consumption data, wherein the original power consumption data includes power consumption data, power data and voltage data; Step S12: normalizing the format of the original power consumption data, removing obvious outliers, and interpolating missing values to obtain cleaned power data; Step S13: performing standardization processing on the cleaning power data to unify the dimension and distribution range, thereby obtaining power consumption data; Step S14: performing an abnormal situation analysis on the power consumption data based on the deep learning-based abnormality detection algorithm, and identifying potential abnormal patterns, thereby obtaining abnormality detection result data; Step S15: extracting time characteristics, load characteristics and environmental characteristics of the power consumption data according to the abnormality detection result data, thereby obtaining power characteristic data; Step S16: Distribute and store the power characteristic data in the edge nodes to form a local data pool; aggregate the power characteristic data to the regional data center according to a preset period to obtain comprehensive power characteristic data.
[0022] As an embodiment of the present invention, refer to Figure 2 As shown, Figure 1 Detailed step flow diagram of step S1 in the embodiment of the present invention, step S1 includes the following steps: Step S11: Collecting power consumption information of edge user nodes through smart meters to obtain original power consumption data, wherein the original power consumption data includes power consumption data, power data and voltage data; The embodiment of the present invention installs the smart meter device at the power supply point of the edge user node, ensures the correct connection between the meter and the power network, and establishes a communication connection with the smart meter; uses an appropriate communication protocol to interact with the smart meter to obtain power consumption information, including power consumption data, power data and voltage data.
[0023] Step S12: normalizing the format of the original power consumption data, removing obvious outliers, and interpolating missing values to obtain cleaned power data; The embodiment of the present invention organizes and standardizes the original power consumption data to ensure the consistency of the data format. For example, the date and time format is unified, the data unit is adjusted, and statistical methods (such as 3 Principles) or domain knowledge are used to identify and eliminate obvious outliers to avoid the impact of outliers on subsequent analysis; for missing data, interpolation methods (such as linear interpolation, mean interpolation) or other applicable technologies are used to fill in the missing data to ensure the integrity and accuracy of the data.
[0024] Step S13: performing standardization processing on the cleaning power data to unify the dimension and distribution range, thereby obtaining power consumption data; The embodiment of the present invention uses a standardization method, such as Z-score standardization or Min-Max standardization, to adjust the cleaned power data to the same dimension and distribution range for subsequent analysis and comparison.
[0025] Step S14: performing an abnormal situation analysis on the power consumption data based on the deep learning-based abnormality detection algorithm, and identifying potential abnormal patterns, thereby obtaining abnormality detection result data; The embodiment of the present invention selects an appropriate deep learning model, such as an autoencoder or a variational autoencoder, according to data characteristics and requirements; uses the cleaned and standardized power consumption data to train the anomaly detection model so that it learns the normal mode, uses the trained model to perform anomaly detection on the power consumption data, judges the abnormal situation by comparing the reconstruction error or the latent variable distribution, and marks the anomaly detection result data as normal or abnormal according to the set threshold or other rules.
[0026] Step S15: extracting time characteristics, load characteristics and environmental characteristics of the power consumption data according to the abnormality detection result data, thereby obtaining power characteristic data; The embodiment of the present invention extracts various time-related features from the timestamp, such as hours, days of the week, seasons, etc.; for load feature extraction, the following methods can be considered: calculate the peak load of the power consumption data, that is, the maximum load value within a period of time; calculate the average load of the power consumption data, that is, the average load value within a period of time; calculate the volatility index of the power consumption data, such as the standard deviation or coefficient of variation, to measure the degree of load fluctuation; analyze the distribution of power consumption data, such as a histogram or density map, to understand the distribution characteristics of the load; extract environmental features related to power consumption, such as temperature, humidity, light and other information, which may have an impact on power consumption. Use feature engineering tools to load the anomaly detection result data, extract time features, load features and environmental features in turn, and obtain power feature data.
[0027] Step S16: Distribute and store the power characteristic data in the edge nodes to form a local data pool; aggregate the power characteristic data to the regional data center according to a preset period to obtain comprehensive power characteristic data.
[0028] The embodiment of the present invention stores the power characteristic data in the local storage of the edge node to form a local data pool. This can reduce the overhead of data transmission and storage and improve the efficiency of data processing. According to a preset period (for example, every hour, every day), the power characteristic data on the edge node is aggregated, and statistical indicators (such as average value, total) are calculated; the aggregated power characteristic data is transmitted to the regional data center for storage and further analysis. Configure local storage on the edge node, store the power characteristic data locally, use the edge computing platform to aggregate the data according to the preset period, and transmit the aggregated data to the regional data center for storage and further processing.
[0029] The present invention collects raw power consumption data through smart meters, and can obtain power consumption information of edge users in real time. The power consumption data, power data and voltage data can be used to fully understand the power consumption of users, providing a basis for subsequent data processing and analysis. Format normalization processing can ensure the consistency and comparability of data, making subsequent data processing more convenient. Eliminating obvious outliers can improve the quality and accuracy of data and avoid the influence of outliers on subsequent analysis. Interpolation of missing values can fill in the gaps in data and reduce the influence of missing data on analysis results. Through standardization processing, data of different dimensions and distribution ranges can be unified to the same scale to eliminate the deviation caused by data differences. The standardized power consumption data is conducive to subsequent data analysis and modeling, ensuring that the influence weights of different features on the model are consistent. The anomaly detection algorithm based on deep learning can help detect and identify anomalies in power consumption data, including sudden abnormal events or potential abnormal patterns. The anomaly detection result data can be provided to operation and maintenance personnel or system managers to promptly discover and handle possible power system faults or abnormal conditions, and improve the reliability and stability of the power system. By extracting time features, load features and environmental features, more useful information can be mined from power consumption data. Time characteristics can help analyze the periodic and trend changes in electricity consumption, load characteristics can reflect the user's electricity consumption behavior and electricity demand pattern, and environmental characteristics can consider the impact of external factors on electricity consumption. Power characteristic data is helpful for subsequent model training and prediction, and improves the management and optimization capabilities of the power system. Distributed storage of power characteristic data can reduce the overhead of data transmission and storage, and improve the efficiency and scalability of the system. Local data pools can provide local data storage and access capabilities for edge nodes, reducing dependence on central data centers. At the same time, aggregating power characteristic data to regional data centers according to preset cycles can realize global data integration and analysis, and provide comprehensive data support for decision-making, energy management, and system optimization. Comprehensive power characteristic data can provide more accurate information and guidance for the monitoring, dispatching, and operation of the power system, and improve the efficiency and reliability of the power system.
[0030] Preferably, step S16 comprises the following steps: Step S161: compressing the power feature data using a lossless compression algorithm to obtain compressed power feature data; and performing local short-term load analysis on the compressed power feature data on the edge device to obtain local short-term load data; The embodiment of the present invention selects an appropriate lossless compression algorithm, such as Lempel-Ziv-Welch (LZW), Huffman coding, Deflate algorithm, etc., according to data characteristics and compression efficiency. The selected lossless compression algorithm is used to compress the power feature data, the original power feature data is used as input, the compression algorithm is applied for encoding, and power feature compressed data is generated. The power feature compressed data is used on the edge device for local short-term load analysis, which may involve using a predefined algorithm or model to analyze the compressed data, extract load pattern and trend information, and obtain local short-term load data.
[0031] Step S162: allocating data storage locations for power feature compressed data according to local short-term load data, and storing the data on a local edge node according to the allocation result, thereby forming a local data pool; The embodiment of the present invention determines a data storage location allocation strategy based on the characteristics and storage requirements of local short-term load data. This may include storing part or all of the data on a local storage medium of an edge device. According to the data storage location allocation strategy, data is stored on the edge device, and the power feature compressed data is stored on the local storage medium according to the allocation result to form a local data pool.
[0032] Step S163: setting a data aggregation trigger based on time or event to obtain aggregation trigger configuration data; and performing preliminary data aggregation on the local data pool according to the aggregation trigger configuration data to obtain pre-aggregated power data; The embodiment of the present invention sets the configuration parameters of the time-based or event-based data aggregation trigger according to the requirements and application scenarios. For example, the data aggregation operation can be triggered based on triggers such as time intervals, data volume thresholds, or specific events. According to the configuration parameters of the aggregation trigger, preliminary data aggregation is performed on the data in the local data pool, which may involve calculating aggregation values such as average values, maximum values, minimum values, etc., so as to reduce the amount of data and retain key information, and finally obtain pre-aggregated power data.
[0033] Step S164: Encrypt and sign the pre-aggregated power data, and transmit it to the regional data center to obtain comprehensive power feature data.
[0034] The embodiment of the present invention performs encryption and signing operations on pre-aggregated power data to ensure the security and integrity of the data, and uses appropriate encryption algorithms and signature algorithms to encrypt and sign the data. The encrypted and signed pre-aggregated power data is transmitted to the regional data center, which may involve the use of secure communication protocols and network connections, such as HTTPS, VPN, etc., to ensure the confidentiality and integrity of data transmission. The encrypted pre-aggregated power data is received and processed in the regional data center, and the data is decrypted and the signature is verified to obtain comprehensive power feature data, which may include comprehensive power feature information of the entire system or region for further analysis, decision-making and application.
[0035] The lossless compression algorithm of the present invention can reduce the storage space requirements of power feature data and reduce the cost of data transmission and storage. The compressed power feature data still maintains complete information, which is helpful for subsequent data processing and analysis. Local short-term load analysis can quickly obtain and analyze short-term load conditions on edge devices, providing support for real-time decision-making and response. Data storage location allocation based on local short-term load data can store data in the most suitable location, optimizing the efficiency of data access and processing. Storing power feature compressed data on local edge nodes to form a local data pool can quickly obtain and process data on edge devices, reduce dependence on central data centers, and improve response speed and system reliability. Setting a data aggregation trigger can trigger data aggregation operations according to preset time or event conditions to ensure the timeliness and accuracy of data. Preliminary data aggregation of the local data pool according to the aggregation trigger configuration data helps reduce data redundancy and storage space occupancy, and improves the efficiency of data processing and transmission. Pre-aggregated power data can provide more efficient data support for subsequent analysis and decision-making. Encrypting and signing pre-aggregated power data can ensure the security and integrity of the data and prevent data from being tampered with or leaked. Data is transmitted to the regional data center by encryption and signing to ensure secure data transmission. After obtaining the comprehensive data on power characteristics, the regional data center can conduct global data analysis and synthesis to provide accurate comprehensive data support for the monitoring, management and optimization of the power system.
[0036] Preferably, step S2 comprises the following steps: Step S21: Selecting a deep neural network architecture to initialize network weight parameters of a global model according to the dimension and distribution of the comprehensive power characteristic data, thereby obtaining an initial global model; Step S22: compressing and quantizing the initial global model, and distributing the compressed and quantized initial global model to each edge node to obtain an edge node local model; Step S23: training the local model of the edge node according to the local data pool to obtain local model parameter data; Step S24: aggregating local model parameter data by using secure multi-party computing technology through the central server to obtain global model parameter data; Step S25: performing an initial global model update according to the global model parameter data by using a federated average algorithm, thereby obtaining a global updated model; Step S26: performing consistency verification processing on each node of the global update model, and dynamically adjusting the learning rate, thereby obtaining adaptive learning rate data; Step S27: Repeat steps S22 to S26 according to the adaptive learning rate data and the global update model until convergence or reaching a predetermined round, thereby obtaining distributed model parameter data.
[0037] As an embodiment of the present invention, refer to Figure 3 As shown, Figure 1 Detailed step flow diagram of step S2 in the embodiment of the present invention, step S2 includes the following steps: Step S21: Selecting a deep neural network architecture to initialize network weight parameters of a global model according to the dimension and distribution of the comprehensive power characteristic data, thereby obtaining an initial global model; The embodiment of the present invention performs dimensionality and distribution analysis on the comprehensive power feature data to understand the characteristics and distribution of the data, which may include statistical and visual analysis of the number, range, distribution, etc. of input and output features. Based on the data analysis results, an appropriate deep neural network architecture is selected to establish a global model. This may involve selecting appropriate network design parameters such as the number of layers, number of neurons, activation function, loss function, etc. to meet the modeling requirements of power feature data. Using the selected neural network architecture, the weight parameters of the network are initialized, which can use a random initialization method, such as uniform distribution or Gaussian distribution, to obtain an initial global model.
[0038] Step S22: compressing and quantizing the initial global model, and distributing the compressed and quantized initial global model to each edge node to obtain an edge node local model; The embodiment of the present invention uses model compression technology to compress the initial global model. Common compression methods include pruning, weight sharing, low-rank decomposition, etc., which reduce the size and computational complexity of the model by eliminating redundant parameters and structures. The compressed model is quantized to convert floating-point weight parameters into fixed-point representation, which can reduce the storage requirements of the model and improve computational efficiency. Common quantization methods include linear quantization, approximate quantization, etc. The compressed and quantized initial global model is distributed to each edge node, and the model parameters can be sent to the local storage of each node through network transmission.
[0039] Step S23: training the local model of the edge node according to the local data pool to obtain local model parameter data; The embodiment of the present invention selects a local data pool for training based on demand and data availability, which can be local data stored on the edge device or data collected from other edge devices. Using the selected local data pool, the local model is trained on the edge node, which may involve using a back propagation algorithm and an optimizer to adjust the weight parameters of the model to minimize the loss function.
[0040] Step S24: aggregating local model parameter data by using secure multi-party computing technology through the central server to obtain global model parameter data; The embodiments of the present invention utilize secure multi-party computing technologies, such as homomorphic encryption, secure multi-party protocols, etc., to ensure data privacy and security when aggregating local model parameter data on a central server. Aggregation operations of local model parameters are performed on the central server, which may include addition or multiplication operations of encrypted model parameters, and decryption to obtain global model parameters.
[0041] Step S25: performing an initial global model update according to the global model parameter data by using a federated average algorithm, thereby obtaining a global updated model; The embodiment of the present invention uses a federated average algorithm to update the initial global model according to the global model parameter data, which generally involves calculating the weight of each edge node and performing weighted average on the global model parameters according to the weight. The initial global model is updated according to the global model parameters calculated by the federated average algorithm. The update can use an optimization algorithm such as gradient descent to adjust the model parameters.
[0042] Step S26: performing consistency verification processing on each node of the global update model, and dynamically adjusting the learning rate, thereby obtaining adaptive learning rate data; The embodiment of the present invention distributes the global update model to each edge node and performs consistency verification processing on the node, which may include using verification data on the edge node to perform model evaluation and compare the performance difference between the global update model and the local model. According to the consistency verification result, the learning rate is dynamically adjusted to improve the convergence and performance of the model. If there is a large difference between the local model of the edge node and the global update model, the learning rate can be reduced to reduce the update step size of the model parameters; on the contrary, if the performance of the two is similar, the learning rate can be increased to speed up the convergence.
[0043] Step S27: Repeat steps S22 to S26 according to the adaptive learning rate data and the global update model until convergence or reaching a predetermined round, thereby obtaining distributed model parameter data.
[0044] According to the learning rate adjustment in step S26, the embodiment of the present invention obtains adaptive learning rate data, which can record the learning rate changes on each node for subsequent model update and training processes. According to the adaptive learning rate data and the global update model, steps S22 to S26 are repeatedly executed, which means that the compressed and quantized global model is distributed to each edge node, and the steps of local model training, parameter aggregation, global model update, consistency verification processing and learning rate adjustment are iterated cyclically until the model converges or reaches a predetermined round.
[0045] The present invention selects a suitable neural network architecture according to the dimension and distribution of the comprehensive data of power characteristics, which can improve the expressiveness and adaptability of the model, thereby better capturing the characteristics and patterns of power data. By initializing the network weight parameters of the global model, a starting point can be provided for subsequent distributed training, reducing the training time and computing cost. Compressing and quantizing the initial global model can reduce the storage and transmission overhead of the model and reduce the communication cost. The compressed and quantized initial global model is distributed to each edge node, and local model updates and training can be performed on the edge device, reducing the dependence on the central server, and improving the efficiency and privacy protection of model training. Using the local data pool to train the local model of the edge node can perform personalized model updates according to the characteristics and distribution of the local data, and improve the performance and adaptability of the model on the local data. Through the training of the local model, the edge node can perform autonomous model learning and optimization for specific power characteristic data. Using secure multi-party computing technology, local model parameters can be aggregated without exposing the original data, protecting user privacy and data security. By aggregating local model parameter data, the update information of the global model can be obtained, thereby integrating the model knowledge and characteristics of each edge node. The federated average algorithm can be used to aggregate and update the model parameters of each edge node under the premise of protecting user privacy to obtain a global update model. The global update model integrates the model knowledge of each node, has better generalization ability and overall performance, and can improve the prediction and analysis capabilities of power characteristics. Consistency verification on each node can ensure the consistency and stability of the global update model on different nodes, and improve the reliability and robustness of the model. Dynamic adjustment of the learning rate can adaptively adjust the learning speed according to the situation of model training, and effectively solve the convergence and performance problems in distributed training. By repeatedly executing steps S22 to S26, the parameters of the distributed model are continuously iterated and optimized using the adaptive learning rate data and the global update model. In this way, the performance and accuracy of the model can be gradually improved by integrating the knowledge and characteristics of each edge node. The repeated iteration process can make the distributed model gradually converge in continuous training, and can reach the predetermined training rounds, thereby obtaining the final distributed model parameter data.
[0046] Preferably, step S3 comprises the following steps: Step S31: Identify all edge node devices and regional data participating in federated learning modeling according to the distributed model parameter data, and record their identity information to obtain participant information data; The embodiment of the present invention can determine the edge node devices and regional data participating in federated learning modeling based on the distributed model parameter data, which may involve parsing the meta information of the distributed model parameter data and determining which devices and regional data have contributed to the model training. For each edge node device and regional data participating in federated learning, its identity information is recorded; this can be a unique identifier of the device, an identifier of the regional data, or other relevant information for subsequent use.
[0047] Step S32: construct a private alliance blockchain network based on the information data of the participants, and set an access permission mechanism to obtain a power blockchain network; The embodiment of the present invention uses the information data of the participants to build a power blockchain network. This can include creating the initial state of the alliance chain, configuring blockchain nodes, network topology, etc. An access permission mechanism is set up in the power blockchain network to ensure that only authorized participants can access and operate blockchain data. This can use identity authentication, encryption technology, smart contracts and other methods to achieve permission control.
[0048] Step S33: performing a hash algorithm operation on the distributed model parameter data to obtain model hash value data; The embodiment of the present invention performs a hash algorithm operation on the distributed model parameter data to convert it into a hash value of fixed length. Commonly used hash algorithms include SHA-256, MD5, etc. The model hash value obtained by the hash algorithm operation is used as data for subsequent on-chain storage and integrity verification.
[0049] Step S34: Packing the model hash value data, participant information data and timestamp, and storing them through the power blockchain network, thereby forming an on-chain model hash data that cannot be tampered with; The embodiment of the present invention packages the model hash value data, the participant information data, and the timestamp and other related data into a data block. Through the power blockchain network, the packaged data block is stored on the blockchain, which can use the storage function of the blockchain to add the data block as a new block and link it to the chain structure of the blockchain.
[0050] Step S35: Perform integrity check on the distributed model parameter data according to the hash value in the on-chain model hash data, thereby obtaining tamper verification data; The embodiment of the present invention obtains on-chain model hash data from the power blockchain network, including model hash value, participant information, and timestamp, etc. The hash value in the obtained on-chain model hash data is used to perform a hash algorithm operation on the distributed model parameter data to obtain the current model hash value, and the current model hash value is compared with the model hash value on the chain to perform integrity verification; according to the result of the integrity verification, tampering verification data is generated to indicate whether the distributed model parameter data has been tampered with.
[0051] Step S36: When the tampering verification data shows that the distributed model parameter data has not been tampered with, power consumption prediction is performed using the distributed model parameter data to obtain power consumption prediction data.
[0052] The embodiment of the present invention determines whether the distributed model parameter data has been tampered with based on the result of the tampering verification data. If the verification data shows that the data has not been tampered with, proceed to the next step; otherwise, it is necessary to take corresponding security measures, such as terminating the prediction process or retraining the model. Use the verified distributed model parameter data to predict power consumption; this may involve using machine learning algorithms, deep learning models or other related methods to perform energy consumption prediction calculations based on input data and model parameters; based on the results of the prediction calculations, obtain power consumption prediction data for subsequent analysis, decision-making or other applications.
[0053] The present invention can ensure the legitimacy and credibility of the participants by identifying and recording the identity information of the edge node devices and regional data participating in the federated learning modeling. This helps to establish a reliable federated learning environment, prevent interference and attacks from illegal nodes, and protect the security of models and data. Building a private alliance blockchain network can provide a secure, distributed storage and sharing platform for storing and managing power-related data and model information. By setting an access permission mechanism, it can be ensured that only authorized participants can access and operate the blockchain network, increasing the security and controllability of data and models. By performing a hash algorithm operation on the distributed model parameter data, the model data can be mapped to a hash value of a fixed length. The hash value is unique and irreversible, and can be used to verify the integrity and consistency of the model data and prevent data tampering or damage. The model hash value data, the participant information data and the timestamp are packaged and stored in the power blockchain network, ensuring the immutability and traceability of the data. The distributed characteristics and encryption algorithm of the blockchain ensure the security and credibility of the data, while providing audit and verification functions for historical data. By comparing the hash value in the on-chain model hash data with the hash value of the current distributed model parameter data, integrity verification can be performed to verify whether the model data has been tampered with. This helps to detect the integrity and security of the data and ensure the credibility and accuracy of the model. By judging the tampering verification data, the integrity and security of the distributed model parameter data can be confirmed. When the verification data shows that the model data has not been tampered with, the distributed model parameters can be safely used for power consumption forecasting to obtain accurate forecast data. This helps to improve the reliability and accuracy of power consumption forecasting and provide useful information for power management and decision-making. In summary, the effects of the above steps include ensuring the legitimacy and credibility of the participants, protecting the security of data and models, verifying the integrity of the model data, providing tamper-proof data storage and traceability capabilities, and improving the reliability and accuracy of power consumption forecasting. These effects jointly promote the application of federated learning in the power sector and provide reliable data support for decision-making and management in the power industry.
[0054] Preferably, step S36 includes the following steps: Step S361: Load the distributed model parameter data that has not been tampered with by displaying the tampering verification data into the prediction environment, thereby obtaining an initial prediction model; The embodiment of the present invention loads the distributed model parameter data that has not been tampered with verified by step S35 into the prediction environment, which may involve importing the model parameter data into an appropriate machine learning or deep learning framework. Based on the loaded model parameter data, an initial prediction model is constructed, which may include instantiating a machine learning model, restoring the weights of a deep neural network, etc.
[0055] Step S362: collecting the latest real-time data on power consumption from the power system; using the initial prediction model to perform short-term prediction on the real-time data on power consumption to obtain short-term power energy consumption prediction data; The embodiment of the present invention obtains the latest real-time data of power consumption from the power system, which can be collected by sensors, meters, monitoring equipment, etc. The collected real-time data of power consumption is input into the model using an initial prediction model to perform short-term prediction, which may involve feature extraction and preprocessing of the real-time data, and then using the model to perform prediction calculations.
[0056] Step S363: acquiring historical power consumption data and external factor data according to preset time range parameters; aligning and merging the historical power consumption data and external factor data, and performing time series decomposition to identify trends, seasonality, and residuals, thereby obtaining time series component data; The embodiment of the present invention obtains historical power consumption data and related external factor data according to preset time range parameters, which can be power consumption records in the past period of time and weather data, population data, etc. related to power consumption. The historical power consumption data and external factor data are aligned and merged to ensure that they have the same timestamp or time index. The merged data is decomposed into time series to identify the trend, seasonality and residual components therein. Common time series decomposition methods include additive model and multiplicative model.
[0057] Step S364: adjusting the model parameters of the initial prediction model based on the medium- and long-term prediction characteristics according to the preset prediction time range, thereby obtaining a medium- and long-term prediction model; The embodiment of the present invention determines the prediction time span and prediction step size according to the required medium- and long-term prediction time range. According to the characteristics of the medium- and long-term prediction, the parameters of the initial prediction model are adjusted, which may include selecting different features, adjusting the model's hyperparameters, using different training algorithms, etc.
[0058] Step S365: using the medium- and long-term prediction model to perform medium- and long-term prediction on the time series component data, thereby obtaining medium- and long-term power consumption prediction data; The embodiment of the present invention uses an adjusted medium- and long-term forecasting model to perform medium- and long-term forecasting on previously obtained time series component data, which can be performed by using a regression model, an ARIMA model, a neural network model, etc. for forecasting calculation.
[0059] Step S366: Perform weighted fusion on the medium- and long-term power consumption forecast data and the short-term power consumption forecast data to obtain the power consumption forecast data.
[0060] The embodiment of the present invention performs weighted fusion on the medium- and long-term power energy consumption forecast data and the short-term power energy consumption forecast data. The weighted fusion can determine the weight according to the time range of the forecast and the importance of the forecast. Common weighted fusion methods include simple weighted average, exponential weighted average, and weighting based on model performance.
[0061] The present invention establishes a credible initial prediction model by loading distributed model parameter data that has not been tampered with. This ensures the accuracy and reliability of the prediction model and provides a good starting point for subsequent power energy consumption prediction. By making short-term predictions on the latest real-time power consumption data, the power energy consumption prediction data for the current and next short term can be obtained in time. This helps the power system operator to make real-time adjustments and decisions to ensure the stability and efficiency of power supply. By obtaining historical power consumption data and external factor data, and performing data alignment merging and time series decomposition, components such as trends, seasonality and residuals in the time series data can be identified. This helps to understand the long-term change trend and seasonality of power consumption and provide a basis for medium- and long-term predictions. According to the requirements of the prediction time range, the initial prediction model is adjusted to adapt to the characteristics of medium- and long-term predictions. In this way, the applicability and accuracy of the prediction model can be improved, and the changing trend of power energy consumption in the future for a long time can be better predicted. By applying the medium- and long-term prediction model to predict the time series component data, the power energy consumption prediction data for a long time in the future can be obtained. This helps the decision-making of power system planning and resource allocation, so that decision makers can make appropriate adjustments and arrangements in advance. By weighted fusion of medium- and long-term and short-term power consumption forecast data, the forecast results on different time scales can be comprehensively considered. This helps to improve the comprehensiveness and accuracy of the forecast, making the power consumption forecast data more operational and reliable. In summary, the effects of the above steps include establishing a credible initial forecast model, providing real-time and short-term power consumption forecast data, understanding the long-term trend and seasonal laws of power consumption, adapting to the characteristics of medium- and long-term forecasts, providing medium- and long-term power consumption forecast data, and comprehensively considering the forecast results on different time scales. These effects help power system operators make real-time adjustments and decisions, optimize the security, stability and efficiency of power supply, and provide guidance and reference information to support the decision-making process of power system planning and resource management.
[0062] Preferably, step S4 comprises the following steps: Step S41: Performing preliminary semantic annotation on the power consumption forecast data by using natural language technology to obtain preliminary semantic annotation data; The embodiment of the present invention utilizes natural language processing (NLP) technology to process and analyze the power consumption forecast data; uses text classification, entity recognition, sentiment analysis and other methods in NLP technology to perform preliminary semantic annotation on the power consumption forecast data, classify it into specific semantic categories or extract key information therein.
[0063] Step S42: collecting and integrating power grid operation context information based on historical power consumption data and preliminary semantic annotation data, and generating semantic annotations to obtain semantic annotation prediction data; The embodiments of the present invention combine historical power consumption data and preliminary semantic annotation data to collect contextual information related to power grid operation, including weather data, load data, equipment status, etc.; utilize historical data and contextual information to generate more accurate and semantically annotated prediction data through machine learning or deep learning methods; this may involve the use of algorithmic models, such as rule-based methods, supervised learning or unsupervised learning, etc.
[0064] Step S43: constructing a digital twin model of the power grid operation environment according to the semantic annotation prediction data; The embodiment of the present invention constructs a digital twin model of the power grid operating environment based on semantically annotated prediction data. The model is a virtual simulation of the actual power grid system and can simulate the operating behavior and status of the power grid system. According to the power energy consumption information and other related parameters in the semantically annotated prediction data, a mathematical description or calculation model of the digital twin model is established, which may include establishing differential equations, probability models, deep neural networks, etc.
[0065] Step S44: Mapping the power grid equipment parameters and predicted power indicators in the digital twin model to the state space in the reinforcement learning environment to obtain state space definition data; The embodiment of the present invention maps the power grid equipment parameters in the digital twin model, such as generator capacity, line impedance, etc., to the state space in the reinforcement learning environment; this may involve normalizing or discretizing the equipment parameters to meet the input requirements of the reinforcement learning algorithm. The predicted power indicators in the digital twin model, such as power consumption, load change rate, etc., are mapped to the state space in the reinforcement learning environment; similarly, the power indicators may need to be processed and converted to meet the requirements of the reinforcement learning algorithm.
[0066] Step S45: determining adjustable grid relay switches and transformer coil control quantities according to the digital twin model as the action space of the reinforcement learning environment, and obtaining action space definition data; The embodiment of the present invention determines adjustable parameters such as relay switch status, transformer coil control amount, etc. based on the power grid equipment and control elements in the digital twin model. The determined adjustable parameters are mapped to the action space of the reinforcement learning environment, which may involve discretization or continuity of the parameters to meet the requirements of the reinforcement learning algorithm.
[0067] Step S46: constructing a grid operation stability index, including frequency deviation, voltage deviation and line loss rate; and designing a reward function according to the grid operation stability index, thereby obtaining initial reward function data; The embodiment of the present invention determines indicators for measuring the stability of power grid operation, such as frequency deviation, voltage deviation, and line loss rate, etc. These indicators can reflect the operating status and performance of the power grid system. According to the power grid operation stability indicators, a reward function is designed to guide the reinforcement learning algorithm to optimize the stability of the power grid during the learning process. The reward function can be defined according to the deviation degree, weight, and optimization target of the indicator.
[0068] Step S47: Determine the environmental constraints on the initial reward function data according to the action space definition data and the state space definition data, thereby obtaining the reward function data.
[0069] The embodiment of the present invention determines the constraints related to the power grid environment based on the action space definition data and the state space definition data. These constraints may include equipment operation restrictions, power grid operation rules, etc., to ensure that the reinforcement learning algorithm complies with the constraints of the real world during the training process. The initial reward function data is adjusted and corrected according to the environmental constraints so that the reward function can effectively guide the learning of the reinforcement learning algorithm under the premise of meeting the constraints.
[0070] The present invention uses natural language technology to perform preliminary semantic annotation on power consumption prediction data, and can convert the data into annotated data with semantic information. This helps to further understand and interpret the power consumption prediction data, and provides a semantic basis for subsequent steps. By integrating historical power consumption data and preliminary semantic annotation data, contextual information related to power grid operation can be obtained. Through semantic annotation generation, data can be further processed and labeled to have richer semantic information. This helps to deeply understand the semantic associations behind power consumption data and provide more accurate and useful data for subsequent steps. By constructing a digital twin model, a simulation model corresponding to the actual power grid operation environment can be established. This model can be continuously optimized as the actual operation data is updated, and is used to simulate the operation state and behavior of the power grid, which helps to provide a virtual test environment for control strategy verification and performance evaluation in various scenarios. By mapping the power grid equipment parameters and predicted power indicators in the digital twin model to the state space in the reinforcement learning environment, the actual state and predicted indicators of the power grid can be converted into a form that can be processed by the reinforcement learning algorithm, which helps to perform state perception and decision-making under the reinforcement learning framework, and provides a basis for optimizing power grid operation. By determining the adjustable power grid equipment parameters in the digital twin model, such as relay switches and transformer coil control quantities, as the action space of the reinforcement learning environment, the adjustable range and options of the decision can be defined, which helps to establish the decision space of power grid operation and provide feasible action options for the reinforcement learning algorithm. By constructing power grid operation stability indicators, such as frequency deviation, voltage deviation, and line loss rate, the operation status and stability of the power grid can be measured. Designing a reward function based on these indicators can guide the reinforcement learning algorithm to optimize the stability and performance of the power grid in the decision-making process, which helps to optimize the power grid operation through the reinforcement learning algorithm and make the decision-making process move in a more stable and efficient direction. By determining the environmental constraints of the action space definition data and the state space definition data, the reward function can be adjusted and refined to make it more accurate and reasonable in the actual power grid operation environment. The optimization of the reward function can prompt the reinforcement learning algorithm to better adapt to the characteristics and constraints of the power grid operation in the decision-making process, thereby improving the operation performance and stability of the power grid. In summary, the effects of the above steps include: providing semantically labeled and annotated prediction data, enhancing the ability to understand and interpret power energy consumption data; building a digital twin model of the power grid, providing a virtual test environment for simulating the operating status and behavior of the power grid; converting power grid equipment parameters and prediction indicators into state space and action space that can be processed by reinforcement learning algorithms, providing a basis for reinforcement learning decision-making; constructing power grid operation stability indicators and reward functions to guide reinforcement learning algorithms to optimize the stability and performance of the power grid; and further adjusting and optimizing the reward function through environmental constraint determination to make it more in line with the characteristics and constraints of the actual power grid operating environment.These effects help improve the efficiency, stability and reliability of grid operation and support the optimization and intelligent management of power systems.
[0071] Preferably, step S47 includes the following steps: Step S471: hard constraint screening is performed on the action space definition data according to the safe operation restrictions of the power grid equipment, and unsafe action combinations are eliminated, so as to obtain action space data with safety constraints; The embodiment of the present invention determines the safe operation limits of the equipment according to the technical specifications, operation manuals or relevant standards of the power grid equipment, and these limits may include limiting conditions in terms of current, voltage, frequency, etc. According to the safe operation limits of the equipment, the action space definition data is screened to eliminate action combinations that do not meet safety requirements; this can be achieved through predefined rules or conditions to ensure that the generated action space data is within a safe range.
[0072] Step S472: constructing a reinforcement learning environment simulator in the digital twin model according to the action space data and the state space definition data, thereby obtaining an RL environment simulator; The embodiment of the present invention constructs a simulator of a reinforcement learning environment based on a digital twin model, action space data, and state space definition data, and the simulator can be used to simulate the state transition and action execution process of a power grid environment. By using the mathematical description or computational model in the digital twin model, combined with the action space data and state space definition data, a reinforcement learning environment simulator is constructed, which can be used to simulate the environmental response after performing a specific action in a given state.
[0073] Step S473: Integrate the initial reward function data into the RL environment simulator, and perform safety constraint rule integration to obtain RL training environment data with safety constraints; The embodiment of the present invention imports the initial reward function data into the RL environment simulator as the basic data of the reward function, which may include indicators and weights related to the stability of power grid operation. The safe operation restrictions of power grid equipment are converted into safety constraint rules and integrated into the RL environment simulator. These constraint rules can be used to restrict the strategies learned by the model during the training process to ensure that the generated actions are within a safe range.
[0074] Step S474: Perform test scenario simulation according to the RL training environment data to generate reward function data.
[0075] The embodiment of the present invention uses an RL environment simulator with safety constraints to generate environment data for training, which includes information about states, actions, rewards, and next states. The RL training environment data is used to simulate test scenarios. In each simulated scenario, an action is selected based on the current state, and the environmental response and the reward obtained are observed. Based on the results of the test scenario simulation, reward function data is generated; this may involve the calculation and adjustment of rewards to reflect the requirements for grid operation stability and safety.
[0076] The present invention can ensure that only action combinations that meet safety requirements are considered in the reinforcement learning process by performing hard constraint screening on the action space according to the safe operation restrictions of the power grid equipment. Eliminating unsafe actions can reduce potential power grid operation risks and ensure the safety and reliability of power grid operation. By constructing a reinforcement learning environment simulator in a digital twin model, action space data and state space definition data can be applied to a simulation environment. Such a simulator can simulate the operating state and behavior of the power grid and provide a controllable environment for training and evaluating reinforcement learning algorithms. Through the simulator, a large number of experiments and tests can be carried out at a lower cost and risk, accelerating the development and verification process of the power grid optimization algorithm. Integrating the initial reward function data into the RL environment simulator can provide a training environment and learning signals for the reinforcement learning algorithm. At the same time, integrating the safety constraint rules into the training environment data can ensure that the reinforcement learning algorithm complies with the safety restrictions of the power grid equipment during the training process, which helps to improve the training effect of the reinforcement learning algorithm so that the decision-making strategy generated by it meets the safety requirements of the power grid. By using the RL training environment data to simulate the test scenario, the performance and effect of the reinforcement learning algorithm in real situations can be evaluated. In the test scenario, the decision-making behavior of the reinforcement learning algorithm can be observed and recorded, and reward function data can be generated accordingly, which helps to analyze and optimize the design of the reward function and further improve the training and decision-making capabilities of the reinforcement learning algorithm. In summary, the effects of the above steps include: ensuring the safety and reliability of power grid operation, eliminating unsafe action combinations by screening the action space; providing a controllable reinforcement learning environment simulator to accelerate the development and verification process of the power grid optimization algorithm; the reinforcement learning algorithm complies with the safety restrictions of the power grid equipment during training and decision-making; evaluating the performance and effect of the reinforcement learning algorithm in real scenarios, and optimizing the design of the reward function. These effects help to improve the safety, reliability and performance of power grid operation, and support the intelligent management and optimization decision-making of the power system.
[0077] Preferably, step S5 comprises the following steps: Step S51: Initialize the policy network and value network model of the PPO algorithm to obtain the PPO model; collect state-action-reward data for the PPO model to be trained according to the reward function data, so as to obtain the policy experience data; The embodiment of the present invention uses the PPO algorithm to initialize the policy network and the value network model. The policy network is used to generate the probability distribution of actions, and the value network is used to evaluate the value of the state. Using the initialized PPO model, actions are performed in the power grid environment, and state-action-reward data are collected according to the reward function. These data include the current state, the selected action, and the corresponding reward.
[0078] Step S52: Calculate the strategy loss and value loss based on the strategy experience data to obtain PPO loss data; The embodiment of the present invention uses the strategy experience data to calculate the strategy loss in the PPO algorithm, which involves calculating the action probability ratio and advantage function of the strategy network; the strategy experience data is used to calculate the value loss in the PPO algorithm, and the loss of the value network is calculated by comparing the actual reward and the predicted state value.
[0079] Step S53: performing gradient descent optimization on the PPO model based on the PPO loss data, thereby obtaining a PPO optimization model; The embodiment of the present invention uses PPO loss data to perform gradient descent optimization on the policy network and value network models, which can use an optimization algorithm (such as Adam) to update the weight parameters of the model.
[0080] Step S54: Integrate the outputs of the strategy network and the value network in the PPO optimization model to obtain strategy value function data; The embodiment of the present invention uses an optimized PPO model to infer states and select actions, and obtains strategy value function data from the outputs of the strategy network and the value network. These data include the value evaluation of the state and the action probability distribution generated by the strategy.
[0081] Step S55: Use SHAP technology to perform interpretable decision analysis on the strategy value function data to obtain interpretable decision data to support human-machine collaborative power grid management.
[0082] The embodiment of the present invention uses SHAP (SHapley Additive exPlanations) technology to perform explanatory analysis on the strategy value function data. SHAP can help explain the contribution of each feature in the model to the decision-making results. Based on the results of the SHAP analysis, interpretable decision data is obtained, which can provide an explanation of the power grid management decision, including which features are important for the decision and how they affect it.
[0083] The present invention can establish an initial PPO model by initializing the policy network and value network model of the PPO algorithm. State-action-reward data based on reward function data is collected to provide experience data for the training of the PPO model. These experience data contain actions taken under different states in power grid operation and corresponding rewards, which help the PPO model learn how to make decisions in the power grid environment. By calculating the policy loss and value loss, the loss data of the PPO model can be obtained. The policy loss reflects the difference between the policy network and the expected policy, and is used to optimize the decision-making ability of the policy. The value loss evaluates the difference between the value function predicted by the value network and the real reward, and is used to optimize the prediction accuracy of the value function. The PPO loss data provides the direction and goal of model training, which helps to optimize and improve the PPO model. By applying the gradient descent optimization algorithm, the parameters of the PPO model are updated according to the PPO loss data. Gradient descent optimization enables the PPO model to gradually adjust the policy network and the value network, and improve its decision-making ability and value function prediction accuracy in the power grid environment. The PPO optimization model is an optimized PPO model with better performance and adaptability. The outputs of the policy network and the value network in the PPO optimization model are integrated to obtain the policy value function data. The policy value function data reflects the decision value and prediction value of the PPO model for actions taken under different states. These data can be used to evaluate and compare the performance and effects of different strategies, and provide reference and support for power grid management decisions. The policy value function data can be analyzed using SHAP (SHapley Additive exPlanations) technology to explain the reasons and influencing factors of the model decision. By analyzing the contribution of each feature to the decision result, interpretable decision data can be obtained. These data provide an explanation and understanding of the model decision, which is helpful for human-machine collaborative power grid management. Personnel can interact and discuss with the model's prediction results based on the interpretable decision data, and jointly make more reasonable and reliable power grid management decisions.In summary, the effects of the above steps include: establishing an initial PPO model to provide a reinforcement learning-based solution for power grid management problems; providing real state-action-reward data for the training of the PPO model through policy experience data collection, so that it can learn the decision-making strategy of power grid operation; calculating the policy loss and value loss, providing the goal and direction of PPO model training to optimize the performance of the policy network and value network; using the gradient descent optimization algorithm to update and optimize the parameters of the PPO model according to the PPO loss data to improve the performance and adaptability of the model; integrating the outputs of the policy network and the value network to obtain the policy value function data for evaluating and comparing the performance and effects of different strategies; using SHAP technology to interpret and analyze the policy value function data to obtain interpretable decision data to support human-machine collaborative power grid management. Such interpretative analysis helps to enhance the understanding and trust of model decisions and promote effective cooperation between people and models. These effects help to improve the efficiency, accuracy and interpretability of power grid management and support intelligent power grid decision-making and operation.
[0084] The present invention also provides an electric power consumption prediction model optimization system for executing the above-mentioned electric power consumption prediction model optimization method, wherein the electric power consumption prediction model optimization system comprises: The distributed data acquisition module is used to obtain the power consumption data of the edge user nodes of the power system, and perform anomaly detection and preliminary feature extraction on the power consumption data to obtain power feature data; the power feature data is distributed and stored in the edge nodes to form a local data pool; the power feature data is aggregated to the regional data center according to the preset period to obtain comprehensive power feature data; The federated learning optimization module is used to initialize the global model architecture based on the comprehensive data of power characteristics and distribute the initial model to each edge node. The edge node trains the initial model based on the local data pool to obtain local model parameter data; the local model parameter data is aggregated through the central server based on the federated averaging algorithm to obtain the global model parameter data; iterative optimization is performed based on the global model parameter data and the local model parameter data to obtain the distributed model parameter data; The blockchain verification prediction module is used to store the participant information on the blockchain according to the distributed model parameter data to obtain the on-chain model hash data; the authenticity of the distributed model parameter data is verified through the on-chain model hash data, and the power consumption is predicted through the distributed model parameter data to obtain the power consumption prediction data; The digital twin environment construction module is used to perform semantic enhancement processing on the power consumption prediction data to obtain semantically annotated prediction data; construct a digital twin model of the power grid operation environment based on the semantically annotated prediction data; define the parameters and prediction indicators in the digital twin model as the state space of reinforcement learning, obtain the adjustable power grid parameters as the action space, and design a reward function based on power grid stability to obtain reward function data; The intelligent decision-making optimization module is used to learn the optimal strategy based on PPO according to the reward function data, and continuously optimize the strategy according to real-time feedback to obtain the strategy value function data; the strategy value function data is converted into explainable decisions to support human-machine collaborative power grid management.
[0085] The present invention can obtain the power consumption data of the edge user nodes of the power system through the distributed data acquisition module, which helps to understand the power usage of different users and provide basic data for subsequent anomaly detection and feature extraction. Anomaly detection can timely discover abnormal behavior in power consumption data and improve the safety and stability of the power system. Preliminary feature extraction can extract useful features from the original data to provide input for subsequent modeling and analysis. Through the federated learning optimization module, distributed edge nodes can be used for model training without concentrating the data on a central server. This can protect the privacy of users and avoid the leakage of sensitive data. The edge node is trained according to local data to obtain local model parameter data, and the central server obtains global model parameter data by aggregating local model parameter data. This distributed learning method helps to improve the generalization ability and adaptability of the model, so that the model can better adapt to the data characteristics of different edge nodes. The authenticity and credibility of the distributed model parameter data can be guaranteed by verifying the prediction module through the blockchain. Storing the information of the participants on the blockchain can ensure the non-tamperability and traceability of the data. By verifying the hash data of the model on the chain, the integrity and consistency of the distributed model parameter data can be ensured. At the same time, using distributed model parameter data to predict power consumption can provide energy consumption prediction results of the power system and provide a reference for the operation and dispatch of the power system. Through the digital twin environment construction module, the power consumption prediction data can be semantically enhanced to obtain prediction data with more semantic information. This helps to improve the understanding and modeling capabilities of the power system operation environment. The digital twin model of the power grid operation environment can simulate the real power system and form a reinforcement learning environment by defining the state space and action space. In this way, reinforcement learning can be applied to the optimization of power grid management decisions to improve the operation efficiency and stability of the power grid. Through the intelligent decision optimization module, the optimal strategy learning can be performed based on the PPO algorithm to optimize the power grid management decision. Through real-time feedback and continuous optimization of strategies, the decision-making process can be made more intelligent and adaptive. The obtained strategy value function data can provide evaluation and explanation of the decision results to support human-machine collaborative power grid management. In this way, effective cooperation between people and models can be achieved, and the efficiency and interpretability of power grid management can be improved.In summary, the effects of the above steps include: obtaining power consumption data, performing anomaly detection and feature extraction, and improving the security and analysis capabilities of the power system; protecting user privacy and using distributed learning to improve the generalization and adaptability of the model; ensuring the authenticity and credibility of distributed model parameter data through blockchain verification; building a digital twin model to provide understanding of the power system operating environment and decision-making optimization capabilities; the intelligent decision-making optimization module based on reinforcement learning can improve the effectiveness and efficiency of power grid management decisions by learning optimal strategies, thereby optimizing the operation of the power system; the distributed data acquisition module and the federated learning optimization module can use the data of edge nodes for model training and parameter optimization, thereby improving the generalization and adaptability of the model, and further optimizing the analysis and prediction capabilities of power feature data; the blockchain verification prediction module can ensure the authenticity and integrity of the distributed model parameter data, improve the credibility and accuracy of the model prediction results, and thus optimize the prediction results and related decisions of power energy consumption; the digital twin environment construction module can build a simulation environment of a real power system, and improve the understanding and decision-making optimization capabilities of the power system operating environment by semantically enhancing the prediction data, thereby optimizing the effectiveness and stability of power grid management. In summary, the effects of the above steps include optimizing the operation, decision-making and energy consumption forecasting capabilities of the power system, and improving the efficiency, reliability and stability of the power system.
[0086] Therefore, the embodiments should be regarded as illustrative and non-restrictive from all points, and the scope of the present invention is limited by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and range of equivalent elements of the application documents are included in the present invention.
[0087] The above description is only a specific embodiment of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but should conform to the widest scope consistent with the principles and novel features invented herein.
Claims
1. A method for optimizing an electric power consumption prediction model, characterized in that: The following steps are involved: Step S1: Obtain power consumption data of edge user nodes of the power system, perform anomaly detection and preliminary feature extraction on the power consumption data to obtain power feature data; store the power feature data in a distributed manner at the edge nodes to form a local data pool; aggregate the power feature data to the regional data center according to a preset period to obtain comprehensive power feature data; Step S2: Initialize the global model architecture according to the comprehensive data of power characteristics, and distribute the initial model to each edge node. The edge node trains the initial model according to the local data pool to obtain local model parameter data; aggregate the local model parameter data based on the federated average algorithm through the central server to obtain the global model parameter data; Iterative optimization is performed according to global model parameter data and local model parameter data to obtain distributed model parameter data; Step S3: The information of the participants is stored in the blockchain according to the distributed model parameter data to obtain the on-chain model hash data; the authenticity of the distributed model parameter data is verified by the on-chain model hash data, and the power consumption is predicted by the distributed model parameter data to obtain the power consumption prediction data; Step S4: performing semantic enhancement processing on the power consumption prediction data to obtain semantic annotation prediction data; A digital twin model of the power grid operating environment is constructed based on semantically annotated prediction data; the parameters and prediction indicators in the digital twin model are defined as the state space of reinforcement learning, the adjustable power grid parameters are obtained as the action space, and a reward function based on power grid stability is designed to obtain reward function data; Step S5: Perform PPO-based optimal strategy learning based on the reward function data, and continuously optimize the strategy based on real-time feedback to obtain strategy value function data; convert the strategy value function data into explainable decisions to support human-machine collaborative power grid management.
2. The method for optimizing the power consumption prediction model according to claim 1, characterized in that: Step S1 includes the following steps: Step S11: Collecting power consumption information of edge user nodes through smart meters to obtain original power consumption data, wherein the original power consumption data includes power consumption data, power data and voltage data; Step S12: normalizing the format of the original power consumption data, removing obvious outliers, and interpolating missing values to obtain cleaned power data; Step S13: performing standardization processing on the cleaning power data to unify the dimension and distribution range, thereby obtaining power consumption data; Step S14: performing an abnormal situation analysis on the power consumption data based on the deep learning-based abnormality detection algorithm, and identifying potential abnormal patterns, thereby obtaining abnormality detection result data; Step S15: extracting time characteristics, load characteristics and environmental characteristics of the power consumption data according to the abnormality detection result data, thereby obtaining power characteristic data; Step S16: Distribute and store the power characteristic data in the edge nodes to form a local data pool; aggregate the power characteristic data to the regional data center according to a preset period to obtain comprehensive power characteristic data.
3. The method for optimizing the power consumption prediction model according to claim 2, characterized in that: Step S16 includes the following steps: Step S161: compressing the power feature data using a lossless compression algorithm to obtain compressed power feature data; and performing local short-term load analysis on the compressed power feature data on the edge device to obtain local short-term load data; Step S162: allocating data storage locations for power feature compressed data according to local short-term load data, and storing the data on a local edge node according to the allocation result, thereby forming a local data pool; Step S163: setting a data aggregation trigger based on time or event to obtain aggregation trigger configuration data; and performing preliminary data aggregation on the local data pool according to the aggregation trigger configuration data to obtain pre-aggregated power data; Step S164: Encrypt and sign the pre-aggregated power data, and transmit it to the regional data center to obtain comprehensive power feature data.
4. The method for optimizing the power consumption prediction model according to claim 3, characterized in that: Step S2 includes the following steps: Step S21: Selecting a deep neural network architecture to initialize network weight parameters of a global model according to the dimension and distribution of the comprehensive power characteristic data, thereby obtaining an initial global model; Step S22: compressing and quantizing the initial global model, and distributing the compressed and quantized initial global model to each edge node to obtain an edge node local model; Step S23: training the local model of the edge node according to the local data pool to obtain local model parameter data; Step S24: aggregating local model parameter data by using secure multi-party computing technology through the central server to obtain global model parameter data; Step S25: performing an initial global model update according to the global model parameter data by using a federated averaging algorithm, thereby obtaining a global updated model; Step S26: performing consistency verification processing on each node of the global update model, and dynamically adjusting the learning rate, thereby obtaining adaptive learning rate data; Step S27: Repeat steps S22 to S26 according to the adaptive learning rate data and the global update model until convergence or reaching a predetermined round, thereby obtaining distributed model parameter data.
5. The method for optimizing the power consumption prediction model according to claim 4, characterized in that: Step S3 includes the following steps: Step S31: Identify all edge node devices and regional data participating in federated learning modeling according to the distributed model parameter data, and record their identity information to obtain participant information data; Step S32: construct a private alliance blockchain network based on the information data of the participants, and set an access permission mechanism to obtain a power blockchain network; Step S33: performing a hash algorithm operation on the distributed model parameter data to obtain model hash value data; Step S34: Packing the model hash value data, participant information data and timestamp, and storing them through the power blockchain network, thereby forming an on-chain model hash data that cannot be tampered with; Step S35: Perform integrity check on the distributed model parameter data according to the hash value in the on-chain model hash data, thereby obtaining tamper verification data; Step S36: When the tampering verification data shows that the distributed model parameter data has not been tampered with, power consumption prediction is performed using the distributed model parameter data to obtain power consumption prediction data.
6. The method for optimizing the power consumption prediction model according to claim 5, characterized in that: Step S36 includes the following steps: Step S361: Load the distributed model parameter data that has not been tampered with by displaying the tampering verification data into the prediction environment, thereby obtaining an initial prediction model; Step S362: collecting the latest real-time data on power consumption from the power system; using the initial prediction model to perform short-term prediction on the real-time data on power consumption to obtain short-term power energy consumption prediction data; Step S363: acquiring historical power consumption data and external factor data according to preset time range parameters; aligning and merging the historical power consumption data and external factor data, and performing time series decomposition to identify trends, seasonality, and residuals, thereby obtaining time series component data; Step S364: adjusting the model parameters of the initial prediction model based on the medium- and long-term prediction characteristics according to the preset prediction time range, thereby obtaining a medium- and long-term prediction model; Step S365: using the medium- and long-term prediction model to perform medium- and long-term prediction on the time series component data, thereby obtaining medium- and long-term power consumption prediction data; Step S366: Perform weighted fusion on the medium- and long-term power consumption forecast data and the short-term power consumption forecast data to obtain the power consumption forecast data.
7. The method for optimizing the power consumption prediction model according to claim 6, characterized in that: Step S4 includes the following steps: Step S41: Performing preliminary semantic annotation on the power consumption prediction data by using natural language technology to obtain preliminary semantic annotation data; Step S42: collecting and integrating power grid operation context information based on historical power consumption data and preliminary semantic annotation data, and generating semantic annotations to obtain semantic annotation prediction data; Step S43: constructing a digital twin model of the power grid operation environment according to the semantic annotation prediction data; Step S44: Mapping the power grid equipment parameters and predicted power indicators in the digital twin model to the state space in the reinforcement learning environment to obtain state space definition data; Step S45: determining adjustable grid relay switches and transformer coil control quantities according to the digital twin model as the action space of the reinforcement learning environment, and obtaining action space definition data; Step S46: constructing a grid operation stability index, including frequency deviation, voltage deviation and line loss rate; and designing a reward function according to the grid operation stability index, thereby obtaining initial reward function data; Step S47: Determine the environmental constraints on the initial reward function data according to the action space definition data and the state space definition data, thereby obtaining the reward function data.
8. The method for optimizing the power consumption prediction model according to claim 7, characterized in that: Step S47 includes the following steps: Step S471: hard constraint screening is performed on the action space definition data according to the safe operation restrictions of the power grid equipment, and unsafe action combinations are eliminated, so as to obtain action space data with safety constraints; Step S472: constructing a reinforcement learning environment simulator in the digital twin model according to the action space data and the state space definition data, thereby obtaining an RL environment simulator; Step S473: Integrate the initial reward function data into the RL environment simulator, and perform safety constraint rule integration to obtain RL training environment data with safety constraints; Step S474: Perform test scenario simulation according to the RL training environment data to generate reward function data.
9. The method for optimizing the power consumption prediction model according to claim 8, characterized in that: Step S5 includes the following steps: Step S51: Initialize the policy network and value network model of the PPO algorithm to obtain the PPO model; collect state-action-reward data for the PPO model to be trained according to the reward function data, so as to obtain the policy experience data; Step S52: Calculate the strategy loss and value loss based on the strategy experience data to obtain PPO loss data; Step S53: performing gradient descent optimization on the PPO model based on the PPO loss data, thereby obtaining a PPO optimization model; Step S54: Integrate the outputs of the strategy network and the value network in the PPO optimization model to obtain strategy value function data; Step S55: Use SHAP technology to perform interpretable decision analysis on the strategy value function data to obtain interpretable decision data to support human-machine collaborative power grid management.
10. A power energy consumption prediction model optimization system, characterized in that: Used to execute the power energy consumption prediction model optimization method according to claim 1, the power energy consumption prediction model optimization system comprises: The distributed data acquisition module is used to obtain the power consumption data of the edge user nodes of the power system, and perform anomaly detection and preliminary feature extraction on the power consumption data to obtain power feature data; the power feature data is distributed and stored in the edge nodes to form a local data pool; the power feature data is aggregated to the regional data center according to the preset period to obtain comprehensive power feature data; The federated learning optimization module is used to initialize the global model architecture based on the comprehensive data of power characteristics and distribute the initial model to each edge node. The edge node trains the initial model based on the local data pool to obtain local model parameter data; the local model parameter data is aggregated through the central server based on the federated averaging algorithm to obtain the global model parameter data; iterative optimization is performed based on the global model parameter data and the local model parameter data to obtain the distributed model parameter data; The blockchain verification prediction module is used to store the participant information on the blockchain according to the distributed model parameter data to obtain the on-chain model hash data; the authenticity of the distributed model parameter data is verified through the on-chain model hash data, and the power consumption is predicted through the distributed model parameter data to obtain the power consumption prediction data; The digital twin environment construction module is used to perform semantic enhancement processing on the power consumption prediction data to obtain semantically annotated prediction data; construct a digital twin model of the power grid operation environment based on the semantically annotated prediction data; define the parameters and prediction indicators in the digital twin model as the state space of reinforcement learning, obtain the adjustable power grid parameters as the action space, and design a reward function based on power grid stability to obtain reward function data; The intelligent decision-making optimization module is used to learn the optimal strategy based on PPO according to the reward function data, and continuously optimize the strategy according to real-time feedback to obtain the strategy value function data; the strategy value function data is converted into explainable decisions to support human-machine collaborative power grid management.
Citation Information
Patent Citations
Federal learning method and device, equipment and storage medium
CN116910524A
Photovoltaic power generation capacity prediction method adopting environmental perception under federated learning architecture
CN117540422A
Method and system for determining optimal plant density of slope surface of ecological slope protection
CN118153458A
Thermal station load prediction and optimization control method and system based on distributed machine learning
CN118153779A
Internet of vehicles decentralized federated learning method based on block chain
CN118195023A
Cited By
Secure transmission method and system for integrated energy big data platform
CN118972176A
Data management method and system of industrial energy storage system
CN119341706A
Energy consumption analysis method and system based on microgrid resource physical digital space model
CN119809299A
Building digital twin data processing method based on artificial intelligence
CN119809467A
Federal data valuation method based on influence pruning sampling
CN119886388A
