Energy industry intelligent algorithm optimization method based on federal learning

Through federated learning and multimodal data fusion technology, combined with inverse reinforcement learning and blockchain, the problems of data privacy and multimodal data processing in traditional energy management systems are solved, and efficient, secure and personalized energy management is achieved. Improves user experience and system adaptability.

CN119249363AInactive Publication Date: 2025-01-03SHENHUA HOLLYSYS INFORMATION TECH CO LTD

Patent Information

Application Number
CN202411768782.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-01-03
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The traditional centralized energy management method has data privacy risks, high latency, inflexibility of the system and lack of multimodal data processing capabilities, making it difficult to provide comprehensive energy system state analysis and optimization solutions, low user engagement, lack of transparency and security sex.

Method used

Using intelligent algorithms based on federated learning, combined with soft actor-critician algorithms, inverse reinforcement learning and multimodal data fusion technology, data privacy protection, intelligent decision-making and adaptive control are achieved through digital twins and blockchain technology, providing users with Friendly interface and natural language processing interface to improve user experience and system transparency.

Benefits of technology

It significantly improves the overall efficiency and security of intelligent algorithms in the energy industry, improves the accuracy and efficiency of model aggregation, enhances user trust and system adaptability, and realizes personalized energy management suggestions and data transparency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119249363A_ABST
    Figure CN119249363A_ABST
Patent Text Reader

Abstract

The invention discloses an energy industry intelligent algorithm optimization method based on federal learning. The method comprises the following steps: S1, collecting and preprocessing local energy data; s2, acquiring and preprocessing expert example data; s3, constructing a comprehensive data set by applying a multi-modal data fusion technology; s4, each participant performs local model training on the comprehensive data set by using a federal adaptive optimization algorithm to generate local model update; s5, the central server aggregates local model updating to generate a global model; s6, applying a soft actor-commentator algorithm in the global model, and combining an inverse reinforcement learning technology to optimize an energy distribution strategy; s7, creating a virtual simulation environment by using a digital twinning technology, and testing and optimizing the performance of the global model; and S8, providing a user-friendly interface and a natural language processing interface, and realizing personalized energy management suggestions. According to the method, federated learning, a soft actor-commentator algorithm and an inverse reinforcement learning technology are combined, and an energy distribution strategy is optimized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of energy optimization technology, and in particular to an energy industry intelligent algorithm optimization method based on federated learning. Background Art

[0002] In modern energy management systems, with the continuous growth of electricity demand and the increase in the proportion of renewable energy, the traditional centralized energy management method can no longer meet the increasingly complex energy system needs. The traditional centralized method usually relies on all data to be centralized to a central server for analysis and decision-making, which has multiple problems, including data privacy risks, high latency, and challenges to system resilience and security.

[0003] Centralized machine learning methods in the existing technology usually require all user data to be concentrated in a central location for training. This centralized approach brings serious privacy and security issues, especially in the energy field, where users' energy usage data may contain sensitive personal information. In addition, centralized data storage and processing methods make the system vulnerable to single point failures. Once the central server is attacked or fails, the operation of the entire system will be seriously affected.

[0004] With the popularity of IoT devices, the types of data involved in energy systems have become more diverse, including time series data, image data, text data, etc. However, existing energy management systems often lack the ability to effectively process and integrate multiple data types. Insufficient processing and analysis capabilities of multimodal data greatly reduce the accuracy of prediction and decision-making when faced with complex and changing energy demand and supply scenarios. In addition, since the interrelationships between different data types are not fully utilized, it is difficult for existing systems to provide comprehensive energy system status analysis and optimization solutions.

[0005] There is also the problem of insufficient utilization of expert knowledge and operational experience in existing technologies. Traditional energy management systems usually rely on predefined rules and strategies, lacking dynamic adjustment capabilities and adaptability. When the actual situation deviates from the preset conditions, these systems often cannot be adjusted in time, resulting in unreasonable allocation of energy resources. For example, in the case of large fluctuations in renewable energy supply, the system may not be able to effectively utilize renewable energy, resulting in energy waste or imbalance between supply and demand. In addition, traditional systems usually lack the ability to learn and extract knowledge from expert operations, and fail to make full use of expert experience to optimize energy management strategies.

[0006] In the existing energy management system, there is a lack of an effective mechanism to ensure the transparency and immutability of data and transactions. This defect can easily lead to users' distrust of the system, especially today when the transparency requirements for energy transactions and data use are increasing. The application of blockchain technology has great potential in this regard. However, in the current system, the application of blockchain technology is not mature and widespread enough to give full play to its advantages in improving system transparency and security.

[0007] In addition, the energy management system in the existing technology also has obvious deficiencies in user participation and experience. Most systems only provide one-way information transmission, and users are often in a passive receiving state, lacking interaction and participation. This situation not only reduces user satisfaction with the system, but also makes it difficult for users to obtain personalized energy management suggestions and make reasonable energy use and optimization according to their needs and preferences.

[0008] Therefore, how to provide an intelligent algorithm optimization method for the energy industry based on federated learning is an urgent problem that technicians in this field need to solve. Summary of the invention

[0009] One purpose of the present invention is to propose an intelligent algorithm optimization method for the energy industry based on federated learning. The present invention combines federated learning, soft actor-critic algorithm, inverse reinforcement learning and multimodal data fusion technology to optimize energy allocation strategy, ensure the transparency and data security of the system through digital twin and blockchain technology, and provide an integrated, efficient, intelligent and personalized energy management system. The system has the advantages of data privacy protection, intelligent decision-making, adaptive control, etc. At the same time, through a user-friendly interface and natural language processing interface, it improves the user experience and enhances user participation. It is suitable for complex and changeable energy management scenarios and has significant technical advantages and market application value.

[0010] According to an embodiment of the present invention, an energy industry intelligent algorithm optimization method based on federated learning includes the following steps: S1. Deploy edge computing nodes on the local devices of each participant to collect and pre-process local energy data; S2. Obtain and preprocess expert sample data from the historical operation records of each participant and the expert operations; S3, apply multimodal data fusion technology to integrate local energy data and expert sample data and build a comprehensive dataset; S4. Each participant uses the federated adaptive optimization algorithm on the local device to train the local model on the comprehensive data set and generate a local model update; S5. Upload the local model updates to the central server, which aggregates the local model updates from each participant to generate a global model; S6. Apply the soft actor-critic algorithm in the global model and combine it with inverse reinforcement learning technology to infer the implicit reward function from the expert example dataset, optimize the energy allocation strategy, achieve adaptive control and dynamically adjust the energy supply; S7. Use digital twin technology to create a virtual simulation environment and integrate blockchain technology to test and optimize the performance of the global model; S8. Provide a user-friendly interface and natural language processing interface to achieve personalized energy management suggestions.

[0011] Furthermore, the S3 specifically includes: S31. Extract features from local energy data and expert sample data to obtain a local energy data feature vector and the expert example data feature vector ; S32, apply multimodal data fusion technology, and use dynamic attention mechanism to assign attention weights to each modal data, and transform the local energy data feature vector and the expert example data feature vector Perform weighted merging to form a comprehensive feature vector set: ; in, represents the comprehensive feature vector, and represents the weight matrix; S33. Define the loss function Loss learning weight matrix of multi-task learning, combining the weighted sum of regression error and classification error; S34. Arrange the fused comprehensive feature vector set in chronological order to construct a comprehensive data set for training and testing.

[0012] Furthermore, the S33 specifically includes: ; Among them, m represents the number of samples of the regression task, represents the true value, represents the model prediction value of the regression task, n represents the number of samples of the classification task, represents the true label of the classification task, represents the model prediction label for the classification task, , and Represents the loss weight coefficient, and CrossEntropy represents the cross entropy function.

[0013] Furthermore, the S4 specifically includes: S41, initializing the local model parameters, using a random number generator or a pre-trained model to initialize the parameters, and the result of the parameter initialization will be used as the initial state of the local model; S42. Use the federated adaptive optimization algorithm to train the local model on the comprehensive data set. An improved dynamic weighted aggregation strategy is adopted to dynamically adjust the weighting coefficient according to the importance and contribution of each participant's data. The objective function is defined as: ; in, represents the total loss function, represents the model parameters, represents the predicted output of the model, represents the input sample, L represents the prediction error loss function, represents the regularization parameter, represents the regularization term, N represents the number of participants, Represents the weight of the i-th participant: ; in, represents the contribution of the ith participant, represents the average contribution of all participants, Represents the adjustment parameter, which is used to control the dynamic range of weight; S43. During the training process, an improved adaptive optimizer is used to update the parameters, and the optimizer combines the momentum gradient descent method and the natural gradient descent method; S44. Generate local model updates for each participant ,in Represents the local model update of the i-th participant.

[0014] Furthermore, the S43 specifically includes: The update rules are: ; in, represents the learning rate, represents the model parameters at the current moment, represents the model parameters at the next moment, represents the momentum term after natural gradient adjustment, represents a non-zero number close to zero, Represents the second-order momentum term after natural gradient adjustment: ; ; Where F represents the Fisher information matrix, represents the attenuation coefficient of the first-order momentum term, represents the attenuation coefficient of the second-order momentum term, represents the weight of the natural gradient term, represents the current gradient, represents the traditional momentum term at time t, represents the traditional momentum term at time t-1, represents the second-order momentum term at time t-1.

[0015] Furthermore, the S5 specifically includes: S51. Each participant updates the local model Upload to the central server via secure and encrypted communication protocol; S52: The central server receives local model updates from each participant. , and verify the effectiveness of local model updates. The verification criteria include consistency of model parameters and data integrity; S53. After verification, the central server updates the local models from each participant. Perform aggregation, new global model parameters ; This formula not only takes into account the amount of data of each participant, but also introduces the influencing factors of the model parameter update amplitude, and dynamically adjusts the weight of each participant through an exponential decay function. This adaptive weight update mechanism can better control the effect of model aggregation, prevent the influence of outliers, and more accurately reflect the contribution of each participant to the global model. This design can improve the convergence speed and final performance of the global model in the federated learning process, making the model more robust and accurate.

[0016] S54, the central server generates new global model parameters according to the aggregation rules , and use an adaptive weight update mechanism to dynamically adjust the weights of each participant to ensure that the contributions of each participant are balanced during the aggregation process; S55, the calculated new global model parameters Distribute to all participants, and each participant uses the new global model parameters Update the local model and perform local model training again to further optimize the performance of the local model; S56. During a new round of training and updating, the central server continuously monitors the convergence of the global model; S57. Repeat steps S51 to S56 until the global model reaches a preset convergence condition or reaches a maximum number of training rounds.

[0017] Furthermore, the S53 specifically includes: ; in, represents the new global model parameters, n represents the total number of participants, Indicates the adjustment item. ; represents the dataset weight of the ith participant, represents the data set size of the i-th participant, represents the data set size of the jth participant, Indicates the update amplitude of the model parameters of the i-th participant.

[0018] Furthermore, the S6 specifically includes: S61, extracting state and action pairs of expert operations from the expert example data set; S62. Use inverse reinforcement learning techniques to infer implicit reward functions from expert example datasets. S63. Building a learning framework for the soft actor-critic algorithm based on the global model, including a policy network and Q-value network , where the policy network Used to generate action selection strategies, Q value networks Used to evaluate the value of state-action pairs; S64. Define the objective function , which is used to maximize the entropy of the policy: ; in, Represents the entropy term coefficient; this objective function consists of two parts: the Q-value function part represents the expected return, and the entropy term is used to encourage the exploratory nature of the strategy and prevent premature convergence to a suboptimal solution.

[0019] S65, by updating the Q value function Reflects the immediate reward R(s,a) and the expected value of the future state: ; in, represents the discount factor, represents the discount of future returns, s' represents the next state, P represents the state transition probability, Represents the target value function: ; Among them, a' represents the next operation; S66. Update the policy network using a gradient descent-based optimization method and Q-value network Parameters and , maximize the objective function in the optimization process , ensuring that the actions generated by the strategy have the highest expected value in different states; S67. During the training process of the global model, steps S62-S66 are repeatedly executed to achieve adaptive control and dynamic adjustment of energy supply, gradually improve the effectiveness of the energy allocation strategy, and achieve adaptive control and dynamic adjustment of energy supply.

[0020] Combining implicit reward inference from expert example data with SAC-based policy optimization provides a diversified data source and a powerful decision-making mechanism for complex energy allocation scenarios.

[0021] Furthermore, the S62 specifically includes: ; in, represents the characteristic function, which represents the specific attribute of taking action a under state s, and n represents the number of characteristic functions. Representation and characteristic functions The corresponding weight parameters, s, represent the state of the environment when the expert operates, and a represents the action taken by the expert under a specific state.

[0022] Furthermore, the S7 specifically includes: S71. Use digital twin technology to establish a virtual simulation environment to simulate the operating status and dynamic changes of the real energy system. The model parameters in the virtual simulation environment are calibrated based on historical data and real-time data; S72. In the virtual simulation environment, a distributed ledger system based on blockchain technology is applied to record all data operations and decision paths in the simulation process to ensure data transparency and non-tamperability; S73. During the simulation process, various performance indicators of the global model are tested and optimized; S74. Use blockchain smart contract technology to automatically execute the strategies and rules set in the simulation process. The execution logic of the smart contract is based on the best practices in the expert example data set and the reward function inferred by inverse reinforcement learning; S75. Iteratively optimize the global model by implementing multiple simulation tests in a virtual simulation environment to reduce potential risks and uncertainties in practical applications; S76. The key parameters and results in the simulation environment are recorded in the blockchain network, and the data consistency and integrity are verified between nodes through the Merkle tree; S77. After the simulation is completed, a simulation report including optimization suggestions and risk assessment is generated. The report content includes the performance of the global model in different scenarios and improvement suggestions for the energy allocation strategy; S78, simulation reports and all data are encrypted and stored in the blockchain network to ensure their security and privacy. At the same time, access control and permission management mechanisms are provided so that only authorized users can access and view the report content.

[0023] The beneficial effects of the present invention are: The present invention significantly improves the overall efficiency and security of intelligent algorithm optimization in the energy industry by introducing federated learning, inverse reinforcement learning, multimodal data fusion technology, digital twin and blockchain technology. In terms of data privacy protection, federated learning allows all participants to collaboratively train models without sharing original data, effectively preventing data leakage and privacy infringement, and meeting users' high standards for data security. In addition, the use of the federated adaptive optimization algorithm enables the system to better adapt to the heterogeneous data distribution of each participant, significantly improving the accuracy and efficiency of model aggregation.

[0024] The application of multimodal data fusion technology solves the bottleneck problem of the existing system that is difficult to handle multiple data types. By integrating local energy data and expert example data to build a comprehensive data set, the system can more comprehensively analyze and understand the operating status of the energy system. This diverse data source and fusion method greatly improves the model's predictive ability and decision-making accuracy, especially when dealing with complex and changing energy demand scenarios. At the same time, the introduction of inverse reinforcement learning technology enables the system to learn from expert operations and infer implicit reward functions, thereby optimizing energy allocation strategies and achieving adaptive control and dynamic adjustment. This learning mechanism based on expert experience not only improves the intelligence level of the system, but also enhances its flexibility and adaptability in responding to changes in actual scenarios.

[0025] The application of digital twin technology provides a virtual simulation environment for the system, so that the performance of the global model can be tested and optimized under safe and controllable conditions. Through this virtual simulation, the system can predict and avoid potential risks in advance, optimize energy allocation strategies, and ensure efficient and stable operation in actual applications. In addition, the integration of blockchain technology ensures the transparency and immutability of the system in terms of data and transaction records. The application of smart contracts enables the automatic execution of strategies and rules set during the simulation process, further improving the automation and reliability of the system. This not only increases users' trust in the system, but also provides guarantees for the fairness and security of energy transactions.

[0026] In terms of user experience, the present invention greatly improves user participation and experience by providing a user-friendly interface and natural language processing interface. Users can easily obtain personalized energy management suggestions through an intuitive interface and natural voice interaction. This efficient user interaction mechanism enables users to actively participate in the energy management process instead of being passive recipients, and make reasonable energy use decisions based on their own needs. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings: Figure 1 A flowchart of an energy industry intelligent algorithm optimization method based on federated learning proposed by the present invention; Figure 2 This is a schematic diagram of a model training method for an intelligent algorithm optimization method for the energy industry based on federated learning proposed in the present invention. DETAILED DESCRIPTION

[0028] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.

[0029] refer to Figure 1 and Figure 2 , an intelligent algorithm optimization method for the energy industry based on federated learning, comprising the following steps: S1. Deploy edge computing nodes on the local devices of each participant to collect and pre-process local energy data; S2. Obtain and preprocess expert sample data from the historical operation records of each participant and the expert operations; S3, apply multimodal data fusion technology to integrate local energy data and expert sample data and build a comprehensive dataset; S4. Each participant uses the federated adaptive optimization algorithm on the local device to train the local model on the comprehensive data set and generate a local model update; S5. Upload the local model updates to the central server, which aggregates the local model updates from each participant to generate a global model; S6. Apply the soft actor-critic algorithm in the global model and combine it with inverse reinforcement learning technology to infer the implicit reward function from the expert example dataset, optimize the energy allocation strategy, achieve adaptive control and dynamically adjust the energy supply; S7. Use digital twin technology to create a virtual simulation environment and integrate blockchain technology to test and optimize the performance of the global model; S8. Provide a user-friendly interface and natural language processing interface to achieve personalized energy management suggestions.

[0030] In this implementation, S3 specifically includes: S31. Extract features from local energy data and expert sample data to obtain a local energy data feature vector and the expert example data feature vector ; S32, apply multimodal data fusion technology, and use dynamic attention mechanism to assign attention weights to each modal data, and transform the local energy data feature vector and the expert example data feature vector Perform weighted merging to form a comprehensive feature vector set: ; in, represents the comprehensive feature vector, and represents the weight matrix; S33. Define the loss function Loss learning weight matrix of multi-task learning, combining the weighted sum of regression error and classification error; S34. Arrange the fused comprehensive feature vector set in chronological order to construct a comprehensive data set for training and testing.

[0031] In this implementation manner, the S33 specifically includes: ; Among them, m represents the number of samples of the regression task, represents the true value, represents the model prediction value of the regression task, n represents the number of samples of the classification task, represents the true label of the classification task, represents the model prediction label for the classification task, , and Represents the loss weight coefficient, and CrossEntropy represents the cross entropy function.

[0032] In this implementation, S4 specifically includes: S41, initializing the local model parameters, using a random number generator or a pre-trained model to initialize the parameters, and the result of the parameter initialization will be used as the initial state of the local model; S42. Use the federated adaptive optimization algorithm to train the local model on the comprehensive data set. An improved dynamic weighted aggregation strategy is adopted to dynamically adjust the weighting coefficient according to the importance and contribution of each participant's data. The objective function is defined as: ; in, represents the total loss function, represents the model parameters, represents the predicted output of the model, represents the input sample, L represents the prediction error loss function, represents the regularization parameter, represents the regularization term, N represents the number of participants, Represents the weight of the i-th participant: ; in, represents the contribution of the ith participant, represents the average contribution of all participants, represents the adjustment parameter; S43. During the training process, an improved adaptive optimizer is used to update the parameters, and the optimizer combines the momentum gradient descent method and the natural gradient descent method; S44. Generate local model updates for each participant ,in Represents the local model update of the i-th participant.

[0033] In this implementation manner, the S43 specifically includes: The update rules are: ; in, represents the learning rate, represents the model parameters at the current moment, represents the model parameters at the next moment, represents the momentum term after natural gradient adjustment, represents a non-zero number close to zero, Represents the second-order momentum term after natural gradient adjustment: ; ; Where F represents the Fisher information matrix, represents the attenuation coefficient of the first-order momentum term, represents the attenuation coefficient of the second-order momentum term, represents the weight of the natural gradient term, represents the current gradient, represents the traditional momentum term at time t, represents the traditional momentum term at time t-1, represents the second-order momentum term at time t-1.

[0034] In this implementation manner, S5 specifically includes: S51. Each participant updates the local model Upload to the central server via secure and encrypted communication protocol; S52: The central server receives local model updates from each participant. , and verify the effectiveness of local model updates. The verification criteria include consistency of model parameters and data integrity; S53. After verification, the central server updates the local models from each participant. Perform aggregation, new global model parameters ; This formula not only takes into account the amount of data of each participant, but also introduces the influencing factors of the model parameter update amplitude, and dynamically adjusts the weight of each participant through an exponential decay function. This adaptive weight update mechanism can better control the effect of model aggregation, prevent the influence of outliers, and more accurately reflect the contribution of each participant to the global model. This design can improve the convergence speed and final performance of the global model in the federated learning process, making the model more robust and accurate.

[0035] S54, the central server generates new global model parameters according to the aggregation rules , and use an adaptive weight update mechanism to dynamically adjust the weights of each participant, and use an adaptive weight update mechanism to dynamically adjust the weights of each participant to ensure that the contributions of each participant are balanced during the aggregation process; S55, the calculated new global model parameters Distribute to all participants, and each participant uses the new global model parameters Update the local model and perform local model training again to further optimize the performance of the local model; S56. During a new round of training and updating, the central server continuously monitors the convergence of the global model; S57. Repeat steps S51 to S56 until the global model reaches a preset convergence condition or reaches a maximum number of training rounds.

[0036] In this implementation manner, the S53 specifically includes: ; in, represents the new global model parameters, n represents the total number of participants, Indicates the adjustment item. ; represents the dataset weight of the ith participant, represents the data set size of the i-th participant, represents the data set size of the jth participant, Indicates the update amplitude of the model parameters of the i-th participant.

[0037] In this implementation manner, S6 specifically includes: S61, extracting state and action pairs of expert operations from the expert example data set; S62. Use inverse reinforcement learning techniques to infer implicit reward functions from expert example datasets. S63. Building a learning framework for the soft actor-critic algorithm based on the global model, including a policy network and Q-value network , where the policy network Used to generate action selection strategies, Q value networks Used to evaluate the value of state-action pairs; S64. Define the objective function , which is used to maximize the entropy of the policy: ; in, Represents the entropy term coefficient; this objective function consists of two parts: the Q-value function part represents the expected return, and the entropy term is used to encourage the exploratory nature of the strategy and prevent premature convergence to a suboptimal solution.

[0038] S65, by updating the Q value function Reflects the immediate reward R(s,a) and the expected value of the future state: ; in, represents the discount factor, represents the discount of future returns, s' represents the next state, P represents the state transition probability, Represents the target value function: ; Among them, a' represents the next operation; S66. Update the policy network using a gradient descent-based optimization method and Q-value network Parameters and , maximize the objective function in the optimization process , ensuring that the actions generated by the strategy have the highest expected value in different states; S67. During the training of the global model, steps S62-S66 are repeatedly executed to gradually improve the effectiveness of the energy allocation strategy, and to achieve adaptive control and dynamic adjustment of energy supply.

[0039] Combining implicit reward inference from expert example data with SAC-based policy optimization provides a diversified data source and a powerful decision-making mechanism for complex energy allocation scenarios.

[0040] In this implementation manner, the S62 specifically includes: ; in, represents the characteristic function, which represents the specific attribute of taking action a under state s, and n represents the number of characteristic functions. Representation and characteristic functions The corresponding weight parameters, s, represent the state of the environment when the expert operates, and a represents the action taken by the expert under a specific state.

[0041] In this implementation manner, the S7 specifically includes: S71. Use digital twin technology to establish a virtual simulation environment to simulate the operating status and dynamic changes of the real energy system. The model parameters in the virtual simulation environment are calibrated based on historical data and real-time data; S72. In the virtual simulation environment, a distributed ledger system based on blockchain technology is applied to record all data operations and decision paths in the simulation process to ensure data transparency and non-tamperability; S73. During the simulation process, various performance indicators of the global model are tested and optimized; S74. Use blockchain smart contract technology to automatically execute the strategies and rules set in the simulation process. The execution logic of the smart contract is based on the best practices in the expert example data set and the reward function inferred by inverse reinforcement learning; S75. Iteratively optimize the global model by implementing multiple simulation tests in a virtual simulation environment to reduce potential risks and uncertainties in practical applications; S76. The key parameters and results in the simulation environment are recorded in the blockchain network, and the data consistency and integrity are verified between nodes through the Merkle tree; S77. After the simulation is completed, a simulation report including optimization suggestions and risk assessment is generated. The report content includes the performance of the global model in different scenarios and improvement suggestions for the energy allocation strategy; S78, simulation reports and all data are encrypted and stored in the blockchain network to ensure their security and privacy. At the same time, access control and permission management mechanisms are provided so that only authorized users can access and view the report content.

[0042] Embodiment 1: In order to verify the feasibility of the present invention in implementation, the present invention is applied to the smart grid system of a large city. The city's electricity supply is provided by multiple renewable energy power plants and traditional power plants. Since the supply of renewable energy (such as wind energy and solar energy) is volatile, and the user's electricity demand also changes with factors such as time and weather, how to efficiently allocate and manage energy resources has become a very challenging task. When dealing with such a complex and changing environment, traditional centralized energy management systems have problems such as data privacy leakage, system response delays, and difficulty in integrating multiple data types, and cannot meet the growing energy demand and security requirements.

[0043] First, edge computing nodes are deployed on each power supplier and user side. These nodes are responsible for the collection and preprocessing of local data, including user power consumption data, historical operation records, expert operation data, etc. After the data collection is completed, the edge nodes extract features from these data and generate feature vectors. Next, through multimodal data fusion technology, the edge nodes fuse local energy data with expert sample data to construct a comprehensive data set.

[0044] Each edge node uses a federated adaptive optimization algorithm to train a model on a comprehensive dataset on a local device and generate a local model update. To protect data privacy, all participants do not share the original data, but only upload encrypted model updates to the central server. After receiving the local model updates uploaded by each participant, the central server verifies and aggregates them to generate a new global model. The new global model parameters are then distributed back to each edge node to further optimize the performance of the local model.

[0045] In the optimization process, the present invention introduces inverse reinforcement learning technology to infer the implicit reward function from the expert example data set, and combines the soft actor-critic algorithm to optimize the energy allocation strategy. Through digital twin technology, the system creates a virtual simulation environment to test and optimize the performance of the global model, and uses blockchain technology to ensure the transparency and immutability of data operations. At the same time, users can obtain personalized energy management suggestions through a friendly interface and natural language processing interface to improve user participation and experience.

[0046] Table 1 Comparison of pilot data between traditional method and the method of the present invention in smart grid ; This table shows the comparative data of the system of the present invention and the traditional system in the smart grid pilot, covering the improvement effects of multiple key performance indicators and user experience. The pilot experiment period is from June 2023 to December 2023, covering 500 household users and 10 large commercial users. The data includes the performance of the system in terms of peak and valley load differences, energy utilization efficiency, data privacy protection satisfaction, and the improvement of key indicators such as user satisfaction and system stability.

[0047] First, the table data shows that the system of the present invention successfully reduced the peak-to-valley load difference by 20% during the pilot period. This reduction in difference means that the power demand between peak and valley power consumption is more balanced, which helps to improve the stability and efficiency of the power grid and reduce the load pressure on power supply equipment. Compared with traditional systems, the energy utilization efficiency of the system of the present invention has increased by 15% to 98%. Through intelligent optimization strategies and adaptive control, the system of the present invention can allocate and use energy more efficiently, reduce waste, and improve the efficiency of the overall energy system.

[0048] In addition, the system of the present invention pays special attention to the protection of user data privacy. During the pilot period, the user satisfaction rate reached 90%, which is 25% higher than that of the traditional system. This data shows that federated learning technology and differential privacy protection measures effectively ensure the security of user data and are highly recognized by users. In contrast, the traditional system has obvious deficiencies in data privacy protection. This significant improvement makes users trust the new system more.

[0049] In terms of system stability and number of user interactions, the system of the present invention showed extremely high stability during the pilot period, and the failure rate was significantly reduced. At the same time, the number of user interactions with the system increased significantly, reaching an average of 4 times per month, an increase of 300% compared to 1 time in the traditional system. This result shows that the system's user-friendly interface and natural language processing interface have greatly improved user participation and usage experience, and users can more conveniently obtain personalized energy management suggestions.

[0050] Finally, by optimizing the energy allocation strategy, the system of the present invention reduced carbon dioxide emissions by about 120 tons during the pilot period. This not only shows the high efficiency of the system in energy management, but also reflects its contribution to environmental protection. Compared with traditional systems, the system of the present invention has demonstrated excellent performance and broad application prospects in many aspects, including energy utilization efficiency, data privacy protection, user experience and environmental sustainability. The above data verify the practical application value and potential market prospects of the system of the present invention in smart grids.

[0051] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. An intelligent algorithm optimization method for the energy industry based on federated learning, characterized in that: The steps include: S1. Deploy edge computing nodes on the local devices of each participant to collect and pre-process local energy data; S2. Obtain and preprocess expert sample data from the historical operation records of each participant and the expert operations; S3, apply multimodal data fusion technology to integrate local energy data and expert sample data and build a comprehensive dataset; S4. Each participant uses the federated adaptive optimization algorithm on the local device to train the local model on the comprehensive data set and generate a local model update; S5. Upload the local model updates to the central server, which aggregates the local model updates from each participant to generate a global model; S6. Apply the soft actor-critic algorithm in the global model and combine it with inverse reinforcement learning technology to infer the implicit reward function from the expert example dataset, optimize the energy allocation strategy, achieve adaptive control and dynamically adjust the energy supply; S7. Use digital twin technology to create a virtual simulation environment and integrate blockchain technology to test and optimize the performance of the global model; S8. Provide a user-friendly interface and natural language processing interface to achieve personalized energy management suggestions.

2. According to claim 1, a method for optimizing intelligent algorithms in the energy industry based on federated learning is characterized in that: The S3 specifically includes: S31. Extract features from local energy data and expert sample data to obtain a local energy data feature vector and the expert example data feature vector ; S32, apply multimodal data fusion technology, and use dynamic attention mechanism to assign attention weights to each modal data, and transform the local energy data feature vector and the expert example data feature vector Perform weighted merging to form a comprehensive feature vector set: ; in, represents the comprehensive feature vector, and represents the weight matrix; S33. Define the loss function Loss learning weight matrix of multi-task learning, combining the weighted sum of regression error and classification error; S34. Arrange the fused comprehensive feature vector set in chronological order to construct a comprehensive data set for training and testing.

3. According to claim 2, a method for optimizing intelligent algorithms in the energy industry based on federated learning is characterized in that: The S33 specifically includes: ; Among them, m represents the number of samples of the regression task, represents the true value, represents the model prediction value of the regression task, n represents the number of samples of the classification task, represents the true label of the classification task, represents the model prediction label for the classification task, , and Represents the loss weight coefficient, and CrossEntropy represents the cross entropy function.

4. According to claim 1, a method for optimizing intelligent algorithms in the energy industry based on federated learning is characterized in that: The S4 specifically includes: S41, initializing the local model parameters, using a random number generator or a pre-trained model to initialize the parameters, and the result of the parameter initialization will be used as the initial state of the local model; S42. Use the federated adaptive optimization algorithm to train the local model on the comprehensive data set. An improved dynamic weighted aggregation strategy is adopted to dynamically adjust the weighting coefficient according to the importance and contribution of each participant's data. The objective function is defined as: ; in, represents the total loss function, represents the model parameters, represents the predicted output of the model, represents the input sample, L represents the prediction error loss function, represents the regularization parameter, represents the regularization term, N represents the number of participants, Represents the weight of the i-th participant: ; in, represents the contribution of the ith participant, represents the average contribution of all participants, represents the adjustment parameter; S43. During the training process, an improved adaptive optimizer is used to update the parameters, and the optimizer combines the momentum gradient descent method and the natural gradient descent method; S44. Generate local model updates for each participant ,in Represents the local model update of the i-th participant.

5. According to claim 4, a method for optimizing intelligent algorithms in the energy industry based on federated learning is characterized in that: The S43 specifically includes: The update rules are: ; in, represents the learning rate, represents the model parameters at the current moment, represents the model parameters at the next moment, represents the momentum term after natural gradient adjustment, represents a non-zero number close to zero, Represents the second-order momentum term after natural gradient adjustment: ; ; Where F represents the Fisher information matrix, represents the attenuation coefficient of the first-order momentum term, represents the attenuation coefficient of the second-order momentum term, represents the weight of the natural gradient term, represents the current gradient, represents the traditional momentum term at time t, represents the traditional momentum term at time t-1, represents the second-order momentum term at time t-1.

6. According to claim 1, a method for optimizing intelligent algorithms in the energy industry based on federated learning is characterized in that: The S5 specifically includes: S51. Each participant updates the local model Upload to the central server via secure and encrypted communication protocol; S52: The central server receives local model updates from each participant. , and verify the effectiveness of local model updates. The verification criteria include consistency of model parameters and data integrity; S53. After verification, the central server updates the local models from each participant. Perform aggregation, new global model parameters ; S54, the central server generates new global model parameters according to the aggregation rules , and use the adaptive weight update mechanism to dynamically adjust the weight of each participant; S55, the calculated new global model parameters Distribute to all participants, and each participant uses the new global model parameters Update the local model and perform local model training again to further optimize the performance of the local model; S56. During a new round of training and updating, the central server continuously monitors the convergence of the global model; S57. Repeat steps S51 to S56 until the global model reaches a preset convergence condition or reaches a maximum number of training rounds.

7. The energy industry intelligent algorithm optimization method based on federated learning according to claim 6 is characterized in that: The S53 specifically includes: ; in, represents the new global model parameters, n represents the total number of participants, Indicates the adjustment item. ; represents the dataset weight of the ith participant, represents the data set size of the i-th participant, represents the data set size of the jth participant, Indicates the update amplitude of the model parameters of the i-th participant.

8. The energy industry intelligent algorithm optimization method based on federated learning according to claim 1 is characterized in that: The S6 specifically includes: S61, extracting state and action pairs of expert operations from the expert example data set; S62. Use inverse reinforcement learning techniques to infer implicit reward functions from expert example datasets. S63. Building a learning framework for the soft actor-critic algorithm based on the global model, including a policy network and Q-value network , where the policy network Used to generate action selection strategies, Q value networks Used to evaluate the value of state-action pairs; S64. Define the objective function , which is used to maximize the entropy of the policy: ; in, represents the entropy term coefficient; S65, by updating the Q value function Reflects the immediate reward R(s,a) and the expected value of the future state: ; in, represents the discount factor, represents the discount of future returns, s' represents the next state, P represents the state transition probability, Represents the target value function: ; Among them, a' represents the next step operation; S66. Update the policy network using a gradient descent-based optimization method and Q-value network Parameters and , maximize the objective function in the optimization process ; S67. During the training of the global model, steps S62-S66 are repeatedly executed to achieve adaptive control and dynamic adjustment of energy supply.

9. The energy industry intelligent algorithm optimization method based on federated learning according to claim 8 is characterized in that: The S62 specifically includes: ; in, represents the characteristic function, which represents the specific attribute of taking action a under state s, and n represents the number of characteristic functions. Representation and characteristic functions The corresponding weight parameters, s, represent the state of the environment when the expert operates, and a represents the action taken by the expert under a specific state.

10. The energy industry intelligent algorithm optimization method based on federated learning according to claim 1 is characterized in that: The S7 specifically includes: S71. Use digital twin technology to establish a virtual simulation environment to simulate the operating status and dynamic changes of the real energy system. The model parameters in the virtual simulation environment are calibrated based on historical data and real-time data; S72. In a virtual simulation environment, a distributed ledger system based on blockchain technology is applied to record data operations and decision paths in all simulation processes; S73. During the simulation process, various performance indicators of the global model are tested and optimized; S74. Use blockchain smart contract technology to automatically execute the strategies and rules set in the simulation process. The execution logic of the smart contract is based on the best practices in the expert example data set and the reward function inferred by inverse reinforcement learning; S75, iteratively optimizing the global model by performing multiple simulation tests in a virtual simulation environment; S76. The key parameters and results in the simulation environment are recorded in the blockchain network, and the data consistency and integrity are verified between nodes through the Merkle tree; S77. After the simulation is completed, a simulation report including optimization suggestions and risk assessment is generated. The report content includes the performance of the global model in different scenarios and improvement suggestions for the energy allocation strategy; S78, simulation reports and all data are encrypted and stored in the blockchain network, while providing access control and permission management mechanisms.

Citation Information

Patent Citations

  • Electric power communication equipment test resource scheduling method based on reverse deep reinforcement learning

    CN111026548A

  • Self-adaptive federated learning method for intelligent power grid oriented to digital twinning driving

    CN118747540A

  • Architecture for explainable reinforcement learning

    US20220147876A1

Cited By

  • Smart home energy management method and system based on personalized federal reinforcement learning

    CN119903767A

  • Federal learning model training method and system based on distributed system

    CN120106178A

  • A federated learning model training method and system based on distributed system

    CN120106178B

  • Energy prediction method and system based on large language model

    CN120218354A

  • Wireless communication resource allocation method and system based on artificial intelligence

    CN121397753A