Blockchain-based federated learning method and system for coordinated frequency regulation of thermal power units

By constructing a decentralized network topology through blockchain federated learning, combining deep learning and secret sharing mechanisms, and employing differential privacy and homomorphic encryption technologies, the problems of data privacy protection and data heterogeneity in the coordinated frequency regulation of thermal power units are solved, and efficient and secure multi-unit coordinated frequency regulation control is achieved.

CN121192754BActive Publication Date: 2026-04-07STATE GRID JIANGXI ELECTRIC POWER CO LTD RES INST
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-25
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing collaborative frequency regulation methods face challenges in thermal power unit scenarios, including data privacy protection, difficulties in adapting to data heterogeneity, and challenges in decentralized collaborative training. Centralized control is prone to single-point failures, while distributed control is difficult to adapt to large-scale unit collaboration. Traditional federated learning faces communication bottlenecks and privacy leakage risks.

Method used

A blockchain-based federated learning approach is adopted to construct a decentralized peer-to-peer network topology. It combines deep learning and secret sharing mechanisms to generate globally consistent initial model parameters, performs local training through an adaptive federated near-end optimization algorithm, uses differential privacy and homomorphic encryption techniques for data protection, and selects representative nodes through a blockchain consensus mechanism for weighted aggregation calculation to achieve synchronization and optimization of the global frequency margin evaluation model.

Benefits of technology

It eliminates the risk of single point of failure in centralized control, improves system robustness and traceability, effectively prevents privacy leakage during parameter transmission, improves model accuracy and convergence speed in heterogeneous data scenarios, and realizes safe and efficient control of multi-unit coordinated frequency regulation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121192754B_ABST
    Figure CN121192754B_ABST
Patent Text Reader

Abstract

This invention relates to the field of power system frequency regulation control technology, specifically to a method and system for coordinated frequency regulation of thermal power units based on blockchain federated learning. This invention constructs a decentralized P2P network using blockchain technology, initializes model parameters based on a secret sharing mechanism, employs an adaptive federated near-end optimization algorithm for local training, measures data heterogeneity using KL divergence and dynamically adjusts regularization coefficients, adds noise to samples using differential privacy, and achieves dense parameter transmission through homomorphic encryption, selects representative nodes based on a blockchain consensus mechanism to perform parameter aggregation within the encrypted domain, and achieves coordinated frequency regulation of multiple units through model predictive control. This invention solves the problems of data privacy protection, heterogeneous data adaptation, and decentralized collaborative training, thereby improving the stability of power grid frequency regulation.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of power system frequency modulation control, in particular to a thermal power unit cooperative frequency modulation method and system based on blockchain federated learning. BACKGROUND

[0002] With large-scale renewable energy grid-connected, the frequency stability of the power system is facing severe challenges, and the cooperative frequency modulation capability of thermal power units is crucial to maintaining the safety of the power grid.

[0003] The existing cooperative frequency modulation method has significant shortcomings: centralized control relies on the central node to collect unit data and issue instructions, which has the risk of single point failure and is difficult to protect data privacy; distributed control can avoid central bottlenecks, but is based on pre-set rules and is difficult to adapt to large-scale unit cooperation scenarios. The existing federated learning method can achieve cooperative training under privacy protection, but still faces challenges in the thermal power unit scenario: first, the traditional centralized aggregation architecture has communication bottlenecks and single point failure risks; second, the non-independent and identically distributed characteristics of unit data lead to model divergence, seriously affecting convergence; third, the parameter transmission link still faces the risk of privacy leakage. SUMMARY

[0004] The present application provides a thermal power unit cooperative frequency modulation method and system based on blockchain federated learning, aiming to solve the technical problems of data privacy protection, data heterogeneity adaptation and decentralized cooperative training in thermal power unit cooperative frequency modulation.

[0005] To achieve the above purpose, the present application provides the following technical solutions:

[0006] The present application provides a thermal power unit cooperative frequency modulation method based on blockchain federated learning, comprising:

[0007] S100: Taking each thermal power unit in a certain region that accesses the same power grid dispatching partition and can perform primary frequency modulation as a node, a decentralized point-to-point network topology structure is constructed based on blockchain technology, and the interaction state between nodes is recorded through a blockchain distributed ledger;

[0008] S200: A thermal power unit frequency modulation margin evaluation model is constructed based on deep learning, and globally consistent initial model parameters are generated based on a secret sharing mechanism and synchronized to each node through a blockchain ledger;

[0009] S300: A decentralized parallel stochastic gradient descent algorithm with adaptive federated proximal optimization is used to train the margin evaluation model of each node locally, the data heterogeneity between nodes is measured by KL divergence, and the proximal regularization coefficient is dynamically adjusted to obtain the local optimization parameters of each node;

[0010] S400: Add noise to each node's local sample set using differential privacy technology, and encrypt each node's local optimization parameter using homomorphic encryption technology;

[0011] S500: Based on the blockchain consensus mechanism, select the representative node group based on the data volume, model accuracy and historical contribution of each node, and the representative node performs weighted aggregation calculation on the encrypted parameters of its neighbor nodes in the encrypted domain, obtains the global aggregation parameter, and synchronously updates the margin evaluation model of each node, and iteratively trains to convergence to obtain the global frequency modulation margin evaluation model;

[0012] S600: Each node outputs real-time frequency modulation margin based on the global frequency modulation margin evaluation model, combines the power grid frequency deviation signal, and performs collaborative frequency modulation optimization control on multiple units through model predictive control.

[0013] As a preferred technical solution of the present application, the point-to-point network topology structure based on the blockchain technology comprises:

[0014] Each thermal power unit in a certain region connected to the same power grid dispatching partition and capable of primary frequency modulation is taken as an independent blockchain node, and the node meets the technical requirements of minimum regulation power≥5% rated capacity and response delay≤500ms;

[0015] Each node is configured with an edge computing unit, a local data storage unit, a blockchain client module and an industrial communication module;

[0016] The network topology is constructed according to the physical location distribution, communication link delay and communication quality of the unit nodes, and the neighbor node relationship of each node is determined;

[0017] The blockchain distributed ledger records the identity information, neighbor node relationship, online state and parameter interaction hash value of each node;

[0018] The encrypted communication link between nodes is built based on the encrypted communication protocol.

[0019] As a preferred technical solution of the present application, the generation of globally consistent initial model parameters based on the secret sharing mechanism comprises:

[0020] The frequency modulation margin evaluation model of the thermal power unit constructed based on deep learning adopts a convolutional gated recurrent unit neural network architecture, a CNN layer extracts local instantaneous features of the unit, and a bidirectional GRU layer captures the time sequence dependence relationship of the unit frequency modulation response;

[0021] Each node initiates an initialization request through a blockchain smart contract, splits the randomly generated initial model parameters into multiple shards based on the secret sharing mechanism, and distributes them to each node, and each node holds a parameter shard;

[0022] The nodes interact with each other through encrypted communication to exchange parameter fragments, perform local parameter aggregation calculation, and generate globally consistent initial model parameters.

[0023] The aggregated initial model parameters are jointly digitally signed by all nodes and written into a blockchain ledger.

[0024] Each node obtains the initial model parameters from the blockchain ledger, loads the model structure in the local edge computing unit, and completes model deployment.

[0025] As a preferred technical solution of the application, the data heterogeneity between nodes is measured by KL divergence, and the proximal regularization coefficient is dynamically adjusted.

[0026] The operating characteristic data related to the frequency modulation margin is selected to calculate the probability distribution, and the operating characteristic data includes speed deviation, main steam pressure, reheat steam temperature, throttle opening, fuel flow, active load, frequency modulation response delay, and load change rate.

[0027] In local training, the node obtains the encrypted feature distribution statistical information of the neighbor nodes through the blockchain, and calculates the data feature distribution difference between the local node and the neighbor nodes based on the KL divergence.

[0028] In local training, a condition layer sampling strategy is used, and training samples are extracted in load rate intervals of 30%-50%, 50%-70%, and 70%-100%. The proportion of each layer sample matches the proportion of the historical operation time of the unit, and a dynamic weight of the frequency modulation margin prediction error is introduced.

[0029] The norm deviation of the local training parameters and the last round of global aggregation parameters is calculated.

[0030] The proximal regularization coefficient is adjusted based on the data feature distribution difference and the norm deviation, a regularization term is introduced based on the mean square error loss to construct a loss function, and the parameter update is performed to obtain the local optimization parameters.

[0031] As a preferred technical solution of the application, the S400 specifically includes:

[0032] Laplacian noise is added to each sample feature in the local sample set of each node.

[0033] A homomorphic encryption public key and multiple private key fragments are jointly generated through a blockchain distributed key generation protocol, the public key is written into the blockchain ledger, and the private key fragments are stored locally by each node.

[0034] The local optimization parameters are homomorphically encrypted using the public key to generate ciphertext, the hash value of the encrypted data is calculated and signed with the private key, and the receiving node information, transmission timestamp, encrypted data hash, and signature are written into the blockchain.

[0035] As a preferred embodiment of the present invention, the weighted aggregation calculation of the encryption parameters of the representative node and its neighboring nodes within the encryption domain includes:

[0036] Each node extracts data volume, model accuracy, and historical contribution indicators from the blockchain ledger to calculate a comprehensive score, and selects a predetermined proportion of nodes as a representative node group based on the comprehensive score ranking.

[0037] The representative node obtains the comprehensive score information of its neighboring nodes from the blockchain and calculates the aggregate weight with each neighboring node;

[0038] The representative node utilizes the additive and scalar multiplication homomorphisms of homomorphic encryption to perform weighted aggregation calculations on the encryption parameters of neighboring nodes within the encryption domain, thereby obtaining the encrypted global aggregation parameters;

[0039] The encrypted global aggregation parameters are decrypted, jointly signed by the representative node group, and written into the blockchain ledger. Each node downloads the global aggregation parameters from the ledger and updates the margin assessment model, and the synchronization consistency is verified by hash value.

[0040] As a preferred embodiment of the present invention, the method of performing coordinated frequency regulation optimization control of multiple units through model predictive control includes:

[0041] Each node inputs its local unit operating status parameters into the global frequency margin assessment model to obtain the frequency margin and encrypts and uploads it to the blockchain;

[0042] Receives grid frequency deviation signal, and triggers coordinated frequency modulation control when the absolute value of the frequency deviation exceeds a preset threshold;

[0043] Calculate the total frequency regulation requirement based on the power grid frequency deviation signal and the system frequency regulation coefficient;

[0044] Based on the model predictive control framework, with the weighted sum of frequency deviation and regulation increment as the objective function, the optimal frequency regulation power sequence of each unit is solved by rolling optimization under power constraints, regulation rate constraints, and power balance constraints.

[0045] The optimal frequency regulation power is converted into valve opening and fuel flow increment commands, which are then executed through PID closed-loop feedback.

[0046] This invention also proposes a collaborative frequency regulation system for thermal power units based on blockchain federated learning, comprising:

[0047] The network construction module is used to build a decentralized peer-to-peer network topology based on blockchain technology, using thermal power units in a certain region that are connected to the same power grid dispatching zone and are capable of one-time frequency regulation as nodes. The interaction status between nodes is recorded through the blockchain distributed ledger.

[0048] The model initialization module is used to build a frequency regulation margin assessment model for thermal power units based on deep learning, generate globally consistent initial model parameters based on a secret sharing mechanism, and deploy them to each node synchronously through the blockchain ledger.

[0049] The local training module is used to train the margin evaluation model of each node locally using a decentralized parallel stochastic gradient descent algorithm with adaptive federated proximal optimization. It measures the data heterogeneity between nodes through KL divergence, dynamically adjusts the proximal regularization coefficient, and obtains the local optimization parameters of each node.

[0050] The privacy protection module is used to add noise to the local sample set of each node using differential privacy technology and to encrypt the local optimization parameters of each node using homomorphic encryption technology.

[0051] The parameter aggregation module is used to select a representative node group based on the blockchain consensus mechanism, combining the data volume, model accuracy and historical contribution of each node. The representative node performs weighted aggregation calculation of the encrypted parameters of its neighboring nodes in the encrypted domain to obtain the global aggregated parameters and update the margin evaluation model of each node in sync. The model is iteratively trained until convergence to obtain the global frequency modulation margin evaluation model.

[0052] The frequency control module is used by each node to output real-time frequency margin based on the global frequency margin assessment model. Combined with the grid frequency deviation signal, it performs coordinated frequency regulation optimization control of multiple units through model predictive control.

[0053] The present invention also proposes a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described method for coordinated frequency regulation of thermal power units based on blockchain federated learning.

[0054] The present invention also proposes a readable storage medium storing a computer program, which is executed by a processor to perform the above-described method for coordinated frequency regulation of thermal power units based on blockchain federated learning.

[0055] The beneficial effects of this invention are:

[0056] 1. This invention constructs a decentralized P2P network topology using blockchain, combining representative node election and encrypted domain aggregation mechanisms to completely eliminate the reliance on a central node in traditional centralized control, thus eliminating the risk of single points of failure. Simultaneously, the blockchain's distributed ledger records all interaction states and supports anomaly tracing, significantly improving system robustness and traceability.

[0057] 2. This invention employs a dual protection mechanism of differential privacy and homomorphic encryption. At the sample level, Laplace noise is added to prevent the leakage of original data. At the parameter level, encrypted transmission and encrypted domain aggregation computation are implemented, achieving "data not leaving the domain, parameter encrypted aggregation." This hybrid privacy protection mechanism effectively avoids the privacy leakage risk in the parameter transmission stage of traditional federated learning.

[0058] 3. This invention introduces an adaptive federated proximal optimization algorithm, which measures the data heterogeneity between nodes using KL divergence and dynamically adjusts the proximal regularization coefficient based on parameter bias, allowing the regularization strength to adaptively change with the differences in data distribution. This mechanism ensures global model convergence while allowing for appropriate personalization of the model at each node, significantly improving model accuracy and convergence speed in heterogeneous data scenarios. Attached Figure Description

[0059] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0060] Figure 1 This is a flowchart illustrating the collaborative frequency regulation method for thermal power units based on blockchain federated learning, as described in this invention.

[0061] Figure 2 This is a schematic diagram of the structure of the thermal power unit collaborative frequency regulation system based on blockchain federated learning according to the present invention. Detailed Implementation

[0062] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

[0063] Example 1: As Figure 1 As shown, the present invention provides a method for coordinated frequency regulation of thermal power units based on blockchain federated learning, comprising:

[0064] S100: Taking thermal power units in a certain region that are connected to the same power grid dispatching zone and can perform one frequency regulation as nodes, a decentralized peer-to-peer network topology is constructed based on blockchain technology, and the interaction status between nodes is recorded through the blockchain distributed ledger.

[0065] Furthermore, the decentralized peer-to-peer network topology constructed based on blockchain technology includes:

[0066] Each thermal power unit in a certain region that is connected to the same power grid dispatching zone and is capable of one frequency regulation is regarded as an independent blockchain node. The node selection meets the technical requirements of minimum regulation power ≥ 5% of rated capacity and response delay ≤ 500ms.

[0067] Each node is configured with an edge computing unit, a local data storage unit, a blockchain client module, and an industrial communication module;

[0068] The network topology is constructed based on the physical location distribution of the unit nodes, communication link delay and communication quality, and the neighbor node relationships of each node are determined.

[0069] The blockchain distributed ledger records the identity information of each node, its relationships with neighboring nodes, its online status, and the hash values ​​of parameter interactions.

[0070] Establish encrypted communication links between nodes based on encrypted communication protocols.

[0071] Specifically, in this step, each thermal power unit in a certain region that is connected to the same power grid dispatching zone and can perform one frequency regulation is regarded as an independent blockchain node. The traditional centralized control architecture is abandoned, and a completely decentralized collaborative frequency regulation network is constructed. The thermal power units include, but are not limited to, at least two types of ultra-supercritical units, supercritical units, subcritical units, and circulating fluidized bed units, and each unit belongs to a different power generation company or power plant.

[0072] Each node is configured with an edge computing unit, a local data storage unit, a blockchain client module, and an industrial communication module. The edge computing unit is responsible for training and inference computation of the local frequency modulation margin assessment model; the local data storage unit stores unit operating data and training samples; the blockchain client module supports distributed ledger synchronization and smart contract calls; and the industrial communication module enables data transmission between nodes based on industrial Ethernet or a 5G private network.

[0073] An undirected graph P2P network topology is constructed based on the physical location distribution of generator nodes, communication link latency, and communication quality. Specifically, each node is pre-selected with 2 to 4 neighbor nodes, prioritizing generators within the same region with similar operating conditions (similar type of generator, similar load rate), good communication quality (latency less than 50ms, packet loss rate less than 0.1%), and similar physical location (geographical distance less than 50km). This topology design avoids the communication overhead of a fully connected network while ensuring the effectiveness of parameter propagation.

[0074] When constructing the topology, the differences in data acquisition capabilities and data processing specificities of the units are taken into account. High-bandwidth communication links are configured for units using distributed control systems (DCS), and data compression and transmission protocols are optimized for units using traditional monitoring systems.

[0075] The blockchain distributed ledger records the identity information (node ​​ID), neighbor node relationships, online status, and parameter interaction hash values ​​of each node in real time. Ledger data is uploaded to the blockchain after being digitally signed by each node, ensuring the immutability and traceability of the topological relationships and interaction records. This example uses a consortium blockchain architecture, with each thermal power unit node acting as a consensus participant, and employing consensus algorithms such as Practical Byzantine Fault Tolerance (PBFT) to ensure ledger consistency.

[0076] An encrypted communication link between nodes is established based on the TLS 1.3 protocol. During the handshake phase, both parties complete identity authentication and session key negotiation. Subsequent data transmission is encrypted using the AES-256-GCM algorithm. Combined with the blockchain node ID authentication mechanism, the initiator of the communication must present a digital certificate registered in the blockchain ledger. After the receiver verifies the certificate's validity, a connection is established, enabling traceable identity verification and data integrity checks for the interaction of parameters in the frequency modulation margin assessment model.

[0077] When a node is detected to be offline or experiencing a communication interruption, its neighboring nodes broadcast a status update message to the entire network. The blockchain automatically triggers topology reconfiguration logic through smart contracts: first, offline nodes are marked as unavailable; then, neighbor relationships are recalculated based on the geographical location and communication quality of the remaining online nodes, and the topology information in the ledger is updated. This mechanism ensures the system's robustness in the event of node failures, avoiding the single point of failure risk of a centralized architecture.

[0078] Through the aforementioned decentralized P2P network construction, each thermal power unit node can safely and efficiently conduct collaborative training and interaction of frequency margin assessment model parameters without a central coordinator.

[0079] S200: A frequency regulation margin assessment model for thermal power units is built based on deep learning. Globally consistent initial model parameters are generated based on a secret sharing mechanism and deployed to each node synchronously through a blockchain ledger.

[0080] Furthermore, the generation of globally consistent initial model parameters based on the secret sharing mechanism includes:

[0081] A deep learning-based evaluation model for the frequency control margin of thermal power units is constructed. The model adopts a convolutional gated recurrent unit neural network architecture. The CNN layer extracts the local instantaneous features of the unit, and the GRU layer captures the temporal dependency of the unit's frequency control response.

[0082] Each node initiates an initialization request through a blockchain smart contract. Based on a secret sharing mechanism, the randomly generated initial model parameters are split into multiple shards and distributed to each node. Each node holds one parameter shard.

[0083] Nodes exchange parameter shards through encrypted communication, perform parameter aggregation calculations locally, and generate globally consistent initial model parameters.

[0084] The aggregated initial model parameters are written into the blockchain ledger after being jointly digitally signed by all nodes.

[0085] Each node obtains initial model parameters from the blockchain ledger, loads the model structure in its local edge computing unit, and completes model deployment.

[0086] Specifically, in this step, a frequency regulation margin assessment model for thermal power units is constructed based on deep learning, and the model parameters are securely initialized and deployed through a secret sharing mechanism.

[0087] In this embodiment, a Convolutional Gated Recurrent Unit Neural Network (CNN-GRU) is used to build a frequency control margin assessment model for thermal power units. This hybrid architecture can simultaneously capture the local features and temporal dependencies of unit operating data. Specifically, a one-dimensional convolutional layer (1D-CNN) of the CNN is used to extract local features from the input multi-dimensional temporal data. After dimensionality reduction by a pooling layer, a local feature sequence is output. This local feature sequence is then input into the GRU network. Through the synergistic effect of the GRU's update and reset gates, short-term response features of the unit's operating status (such as transient fluctuations in valve opening during sudden increases in frequency deviation, dynamic response of speed deviation after frequency disturbance, etc.) and long-term trend features (such as adjustments to continuous fuel flow supply, gradual changes in reheat steam temperature, etc.) are dynamically filtered and retained to complete the temporal dependency modeling of the frequency control margin.

[0088] Each node initiates a request to initialize the parameters of the frequency modulation margin assessment model via a blockchain smart contract. Based on the Shamir secret sharing mechanism, the randomly generated initial model parameters are... Split into Each parameter is divided into slices ( (Total number of nodes). Specifically, for each element in the parameter vector, construct... Polynomial of degree:

[0089] ;

[0090] in, For secret sharing of polynomials; constant term The parameter values ​​are to be shared; the remaining coefficients are randomly generated. For each node... Assign a unique identifier Calculate the fragment value Each node holds only one parameter shard, and at least requires Only by using multiple fragments can the complete parameters be restored through Lagrange interpolation; a single node cannot be restored.

[0091] Nodes exchange parameter fragments via the encrypted communication link established in step S100. Each node performs homomorphic addition locally, aggregating its locally held parameter fragments with those received from neighboring nodes. Because the Shamir secret sharing scheme satisfies linearity, nodes can directly perform addition within the fragment domain without needing to reconstruct the plaintext parameters. After multiple rounds of fragment interaction and aggregation, each node ultimately calculates globally consistent initial model parameters. .

[0092] Initial model parameters after aggregation After being jointly digitally signed by all nodes, the data is written into the blockchain distributed ledger. The joint signature uses a threshold signature scheme, requiring signatures from more than half of the nodes to generate a valid signature, preventing a single node from forging parameters. The ledger records metadata such as parameter hash values, signature information, and generation timestamps to ensure that the parameter source is traceable and tamper-proof.

[0093] During model deployment, each node obtains the initial model parameters after signature from the blockchain ledger. Load the model structure (including hyperparameters such as the number of CNN layers, convolutional kernel size, and GRU hidden layer dimensions) into the local edge computing unit, and use the parameters... Initialize the model weights and reproduce the complete initial model. Each node calculates the SHA-256 hash value of its local model parameters and uploads it to the blockchain for consistency verification. If the hash value matches the ledger record, the deployment is successful; otherwise, the node needs to download the parameters from the ledger again and verify them until the verification passes.

[0094] Through the aforementioned secret sharing mechanism, while protecting parameter privacy, it is ensured that the initial state of the frequency margin evaluation model deployed on each node is completely consistent, laying the foundation for subsequent federated learning training.

[0095] S300: The decentralized parallel stochastic gradient descent algorithm with adaptive federated proximal optimization is used to train the margin evaluation model of each node locally. The KL divergence is used to measure the data heterogeneity between nodes, and the proximal regularization coefficient is dynamically adjusted to obtain the local optimization parameters of each node.

[0096] Furthermore, the method of measuring data heterogeneity among nodes using KL divergence and dynamically adjusting the near-end regularization coefficient includes:

[0097] The probability distribution of thermal power unit operating characteristic data related to frequency regulation margin is calculated. The operating characteristic data includes speed deviation, main steam pressure, reheat steam temperature, valve opening, fuel flow, active load, frequency regulation response delay, and load change rate.

[0098] During local training, nodes obtain encrypted feature distribution statistics of neighboring nodes through the blockchain and calculate the data feature distribution differences between local nodes and neighboring nodes based on KL divergence.

[0099] During local training, a stratified sampling strategy based on operating conditions is adopted, and training samples are extracted in layers according to load rate ranges of 30%-50%, 50%-70%, and 70%-100%, with the proportion of samples in each layer matching the proportion of the unit's historical operating time.

[0100] Calculate the norm deviation between the local training parameters and the previous round of global aggregation parameters;

[0101] The near-end regularization coefficient is adjusted based on the differences in data feature distribution and norm deviation. A regularization term is introduced to construct a loss function based on the mean squared error loss, and the local optimized parameters are obtained by performing parameter updates.

[0102] Specifically, the operating characteristics of thermal power units that significantly affect frequency control margin assessment are selected as dimensions for KL divergence calculation. These include features strongly correlated with frequency control margin such as speed deviation, main steam pressure, reheat steam temperature, valve opening, fuel flow rate, active power load, frequency control response delay, and load change rate. Each node calculates the probability distribution of each feature dimension based on its local training sample set using kernel density estimation or histogram statistics. To protect data privacy, nodes encrypt the feature distribution statistics (such as the frequency percentage of each interval) before uploading them to the blockchain for neighboring nodes to access.

[0103] Node exist The first round of global aggregation In the local training round, the obtained frequency modulation margin evaluation model parameters are denoted as... Calculate parameters With global aggregation parameters of Norm bias:

[0104] ;

[0105] Where T is the round number of the global aggregation parameter. For local training rounds, These are the parameters of the previous round of global aggregation model; the parameters of the first round of global model are... , The larger the value, the more significant the deviation between the local and global parameters, requiring stronger regularization constraints to prevent model divergence.

[0106] node In the During local training in a round, neighboring nodes are obtained through the blockchain. The statistical information on the distribution of encryption features is used to measure the local node based on KL divergence. Its neighboring nodes The difference in data feature distribution between them is expressed by the formula:

[0107]

[0108] in, For nodes The total number of neighboring nodes, For feature dimension, For nodes The neighborhood group, For nodes No. dimensional feature distribution, For nodes No. dimensional feature distribution, Let KL divergence be the KL divergence. Larger values ​​indicate a larger node with neighboring nodes The stronger the data heterogeneity.

[0109] based on and Perform collaborative decision-making to adjust the adaptive proximal regularization coefficients ( The dynamic range [0.01, 0.08] indicates that the higher the data heterogeneity or parameter deviation, the stronger the constraint. and The larger the value, the better the adaptive proximal regularization coefficient. The higher:

[0110] ;

[0111] During local training, a stratified sampling strategy based on operating conditions was adopted. First, based on 12 months of historical operating data from the unit, the cumulative operating time percentages for three load ranges were statistically analyzed: 30%-50% (low load range), 50%-70% (medium load range), and 70%-100% (high load range). These percentages were denoted as follows: ( Samples are drawn stratified from the local training set according to this proportion, with the number of samples in each stratum satisfying the following requirements. , , This ensures that the sample distribution matches the actual operating conditions of the unit; at the same time, an operating condition feature balancing mechanism is introduced within each layer of samples, and secondary sampling is carried out according to the valve adjustment frequency, fuel type proportion, and equipment health level distribution to avoid training dominated by a single operating condition feature.

[0112] Based on the mean squared error (MSE) loss, an adaptive FedProx regularization term is introduced to construct the loss function:

[0113] ;

[0114] in, For local training Batch sample size for each load interval , It is a small batch of sample sets A single sample, As a load range adaptation factor, the loss values ​​of samples from different load ranges are dynamically weighted. For the sample The corresponding actual frequency modulation margin, For parameters The model predictions are as follows. For adaptive FedProx regularization terms;

[0115] right Find the gradient Then perform D-PSGD parameter update:

[0116] ;

[0117] in, This represents the learning rate for the current round (typical value range). ); The set gradient calibration coefficients are dynamically adjusted based on the parameter sensitivity of the current training sample's load interval (low load interval). Medium load range High load area To avoid imbalances in parameter update magnitudes across different load ranges, the local optimization parameters for the Tth round of global aggregation are obtained through repeated iterations. .

[0118] Through the aforementioned adaptive mechanism, the algorithm can dynamically adjust the regularization strength according to the heterogeneity of data and the degree of parameter deviation of each node. While ensuring global convergence, it allows for appropriate personalization of the model of each node, thereby improving the accuracy and robustness of frequency modulation margin assessment.

[0119] S400: Differential privacy technology is used to add noise to the local sample set of each node, and homomorphic encryption technology is used to encrypt the local optimization parameters of each node.

[0120] Furthermore, S400 specifically includes:

[0121] Add Laplace noise to each sample feature in the local sample set of each node;

[0122] Homomorphic encrypted public keys and multiple private key shards are jointly generated through a blockchain distributed key generation protocol. The public key is written into the blockchain ledger, and the private key shards are stored locally by each node.

[0123] The local optimization parameters are homomorphically encrypted using a public key to generate ciphertext. The hash value of the encrypted data is calculated and signed with a private key. The receiving node information, transmission timestamp, encrypted data hash, and signature are written into the blockchain.

[0124] Specifically, differential privacy technology is used to protect the local sample sets of each thermal power unit. Specifically, for each sample feature in the sample set... Add Laplace noise:

[0125] ;

[0126] in The feature sensitivity is the difference between the maximum and minimum values ​​in the sample set. For data layer privacy budget (typically ranging from 0.1 to 1.0, the smaller the value, the stronger the privacy protection but the greater the loss of model accuracy), It follows a Laplace distribution; the noise addition mechanism satisfies Differential privacy defines a system where, even if an attacker obtains the noisy data, they cannot infer the true information of a single sample. Each node uses the noisy sample set. Perform local model training in step S300.

[0127] Paillier homomorphic encryption key pairs are jointly generated using a blockchain distributed key generation protocol. Specifically, over 60% of the nodes jointly generate a Paillier homomorphic encryption public key PK and n private key shards SK. The public key PK is written to the blockchain ledger, and each node receives a private key shard SK for local storage. At least 50% of the private key shards are needed to reconstruct the complete private key, and a single node's private key shard cannot be decrypted independently. This mechanism ensures key security while avoiding the single point of failure inherent in centralized key management.

[0128] Use PK to optimize parameters locally. Encrypt and generate ciphertext. For encrypted data Calculate the SHA-256 hash value, then sign the hash value with your own private key, and write metadata such as "receiving node ID, transmission timestamp, encrypted data hash, and signature" into the blockchain. After being uploaded to the chain, an immutable transmission record is generated.

[0129] If anomalies are detected during subsequent parameter aggregation (such as excessive deviation in aggregation results or sudden drops in model performance), transmission records can be traced via the blockchain. First, all transmission records within the suspicious time period are extracted from the ledger to verify the consistency of the hash values ​​and signatures of the data uploaded by each node, thus locating the source node of the abnormal data. The blockchain smart contract automatically triggers a penalty mechanism, reducing the node's historical contribution score in step S500, decreasing its weight in subsequent aggregations, and even temporarily removing it from the representative node candidate set. This mechanism effectively suppresses the negative impact of malicious or faulty nodes on the global model.

[0130] Through the dual protection mechanism of differential privacy and homomorphic encryption, the leakage of original data is prevented at the sample level, and the encrypted transmission and calculation are realized at the parameter level, providing complete technical protection for the privacy of multi-unit coordinated frequency modulation.

[0131] S500: Based on the blockchain consensus mechanism, representative node groups are selected by combining the data volume, model accuracy and historical contribution of each node. The representative nodes perform weighted aggregation calculation of the encryption parameters of their neighboring nodes in the encryption domain to obtain global aggregation parameters and update the margin evaluation model of each node in sync. The global frequency modulation margin evaluation model is obtained by iterative training until convergence.

[0132] Furthermore, the weighted aggregation calculation of the encryption parameters of its neighboring nodes within the encryption domain by the representative node includes:

[0133] Each node extracts data volume, model accuracy, and historical contribution indicators from the blockchain ledger to calculate a comprehensive score, and selects a predetermined proportion of nodes as a representative node group based on the comprehensive score ranking.

[0134] The representative node obtains the comprehensive score information of its neighboring nodes from the blockchain and calculates the aggregate weight with each neighboring node;

[0135] The representative node utilizes the additive and scalar multiplication homomorphisms of homomorphic encryption to perform weighted aggregation calculations on the encryption parameters of neighboring nodes within the encryption domain, thereby obtaining the encrypted global aggregation parameters;

[0136] The encrypted global aggregation parameters are decrypted, jointly signed by the representative node group, and written into the blockchain ledger. Each node downloads the global aggregation parameters from the ledger and updates the margin assessment model, and the synchronization consistency is verified by hash value.

[0137] Specifically, each node extracts its own and its neighbors' core metrics from the blockchain ledger, including data volume metrics, model accuracy metrics, and historical contribution metrics. (Based on nodes...) For example, calculate the overall score:

[0138] ;

[0139] in, Weights based on data volume For nodes The size of the local training set sample. The total number of nodes. This represents the total number of training samples. For model accuracy weights, For nodes Mean squared error of the validation set. , These are the minimum and maximum mean squared errors of the validation set, respectively, among all nodes; Weighting based on historical contribution. In the latest three rounds of aggregation for blockchain ledger records, nodes The average contribution percentage of the parameters; and; This scoring mechanism comprehensively considers the data scale, model quality, and historical performance of nodes to ensure the representativeness and reliability of representative nodes.

[0140] Each node is ranked according to its comprehensive score. Each node is a representative node ( (15% of the total number of nodes) form a representative node group. .

[0141] Set nodes As a representative node, node Obtain the comprehensive score information of its neighboring nodes from the blockchain, and calculate the node's score. The aggregate weight of each of its neighboring nodes :

[0142] ;

[0143] in For nodes Neighbor node set, As representative node The set of its neighboring nodes, The above weighting calculation ensures that nodes with high overall scores have a larger proportion in the aggregation, thus improving the quality of the global model.

[0144] Representative node Based on the additive and scalar multiplication homomorphisms of Paillier homomorphic encryption, aggregation calculations are performed on the encryption parameters of its neighboring nodes within the encryption domain. Specifically, for any two encryption parameters... and (in , For plaintext parameters, (For encryption functions), utilizing additive homomorphism Homomorphism of sum multiplication ( (These are plaintext weighting coefficients), allowing for weighted summation operations to be performed within the ciphertext domain:

[0145] ;

[0146] in For the first The encrypted global model parameters of the round-global aggregation, For nodes No. Locally optimized encryption parameters for global aggregation. For nodes Received from its neighbor node Optimized encryption parameters for round-based global aggregation. As representative node Local parameter weights, For neighboring nodes The parameters in the representative node The weighting coefficients in the aggregate calculation are executed; the entire aggregation process is completed in the ciphertext space, without the need to decrypt intermediate results, thus ensuring parameter privacy.

[0147] Encrypted global aggregation parameters Decryption is performed to obtain the first... Global model parameters of the wheel ,parameter After being jointly signed by the representative node group, the data, along with the aggregated timestamp, weight allocation record, and verification result, is written into the blockchain distributed ledger. Each thermal power unit node then downloads the data from the ledger. Replace local model parameters;

[0148] The updated local model parameters are calculated using SHA-256 hash values ​​and uploaded to the blockchain for consistency verification. If at least 90% of the nodes have the same hash value, synchronization is considered successful; otherwise, nodes that failed to synchronize need to retrieve the parameters from their neighbors and re-verify the hash value until it matches the ledger record. This mechanism ensures strong consistency of model parameters across the entire network.

[0149] After updating the model parameters, each node uses its local validation set to evaluate the model performance and uploads the validation loss to the blockchain. When the average validation loss change over three consecutive rounds of global aggregation is less than a preset threshold (e.g., 0.01%), the model is considered to have converged, and a global frequency modulation margin evaluation model is obtained. If convergence has not occurred, the process returns to step S300 to continue local training and parameter aggregation iterations until the convergence condition is met.

[0150] Through the aforementioned encrypted domain aggregation mechanism based on representative nodes, the global model parameters are updated and synchronized efficiently while protecting parameter privacy, providing a high-precision margin assessment model for multi-unit coordinated frequency regulation.

[0151] S600: Each node outputs real-time frequency regulation margin based on the global frequency regulation margin assessment model, and combines it with the grid frequency deviation signal to carry out coordinated frequency regulation optimization control of multiple units through model predictive control.

[0152] Furthermore, the coordinated frequency regulation optimization control of multiple units through model predictive control includes:

[0153] Each node inputs its local unit operating status parameters into the global frequency margin assessment model to obtain the frequency margin and encrypts and uploads it to the blockchain;

[0154] Receives grid frequency deviation signal, and triggers coordinated frequency modulation control when the absolute value of the frequency deviation exceeds a preset threshold;

[0155] Calculate the total frequency regulation requirement based on the power grid frequency deviation signal and the system frequency regulation coefficient;

[0156] Based on the model predictive control framework, the following optimization problem is constructed: Objective function: minimize the weighted sum of frequency deviation and frequency regulation power adjustment increment in the prediction time domain; Power constraint: the frequency regulation power of each unit does not exceed the predicted frequency regulation margin range; Regulation rate constraint: the power change rate per unit time does not exceed the unit's ramp-up capability; Power balance constraint: the sum of the frequency regulation power of each unit satisfies the total frequency regulation requirement.

[0157] The optimal frequency regulation power sequence for each unit is obtained through rolling optimization.

[0158] The optimal frequency regulation power is converted into valve opening and fuel flow increment commands, which are then executed through PID closed-loop feedback.

[0159] Specifically, each node inputs the real-time operating status parameters of its local thermal power unit into the global frequency regulation margin evaluation model to obtain the current frequency regulation margin. This margin value includes the unit's maximum allowable load increase. With maximum load reduction The constraints are satisfied. Each node uses the public key PK from step S400 to predict the frequency modulation margin. After homomorphic encryption, it is uploaded to the blockchain for use in coordinated frequency modulation control.

[0160] Each generating unit node receives real-time grid frequency deviation signals from the grid dispatch system through the blockchain P2P network established in step S100. .when ( When the frequency regulation trigger threshold is reached, the coordinated frequency regulation control logic is triggered; otherwise, the unit maintains its current operating state and does not perform frequency regulation actions.

[0161] Based on the frequency deviation signal after triggering Calculate the total frequency regulation demand of the entire network. :

[0162] ;

[0163] in, The system frequency regulation coefficient is determined by the total inertia of the power grid and the load characteristics, and is shared with each node through the blockchain ledger.

[0164] Each unit node constructs a "multi-unit × multi-variable" prediction model based on a pre-defined MPC framework. Based on the grid frequency deviation signal, with the goal of minimizing frequency deviation and regulation increment, and under the constraints of no power margin and limited regulation rate, the MPC prediction model performs coordinated optimization scheduling of the thermal power units at each node, solves the optimal control sequence, and generates commands such as valve opening and fuel increment.

[0165] The generated control commands are executed through a PID closed-loop system. The PID controller uses the actual power output of the unit as feedback and the optimal frequency regulation power as the setpoint to drive the control valves and fuel system to achieve precise power point tracking and complete coordinated frequency regulation of multiple units.

[0166] Through the above-mentioned MPC-based collaborative frequency regulation optimization control, multiple thermal power units can respond collaboratively to grid frequency deviations while ensuring their own operational safety, achieving fast, accurate, and economical frequency regulation control, and effectively improving grid frequency stability and frequency regulation resource utilization efficiency.

[0167] Example 2: This example uses a regional power company as an example. This company is responsible for coordinating the frequency regulation of multiple thermal power units within the region. Due to the risk of single-point failures in traditional centralized control systems, and the increasingly stringent privacy protection requirements of power generation companies for unit operation data, coupled with significant data heterogeneity caused by the large differences in unit types and operating conditions within the region, traditional methods struggle to achieve high-precision frequency margin assessment and coordinated control. Therefore, this power company adopted the thermal power unit coordinated frequency regulation system based on blockchain federated learning, as described in this invention. Figure 2 As shown, it includes:

[0168] The network construction module is used to build a decentralized peer-to-peer network topology based on blockchain technology, using thermal power units in a certain region that are connected to the same power grid dispatching zone and are capable of one-time frequency regulation as nodes. The interaction status between nodes is recorded through the blockchain distributed ledger.

[0169] The model initialization module is used to build a frequency regulation margin assessment model for thermal power units based on deep learning, generate globally consistent initial model parameters based on a secret sharing mechanism, and deploy them to each node synchronously through the blockchain ledger.

[0170] The local training module is used to train the margin evaluation model of each node locally using a decentralized parallel stochastic gradient descent algorithm with adaptive federated proximal optimization. It measures the data heterogeneity between nodes through KL divergence, dynamically adjusts the proximal regularization coefficient, and obtains the local optimization parameters of each node.

[0171] The privacy protection module is used to add noise to the local sample set of each node using differential privacy technology and to encrypt the local optimization parameters of each node using homomorphic encryption technology.

[0172] The parameter aggregation module is used to select a representative node group based on the blockchain consensus mechanism, combining the data volume, model accuracy and historical contribution of each node. The representative node performs weighted aggregation calculation of the encrypted parameters of its neighboring nodes in the encrypted domain to obtain the global aggregated parameters and update the margin evaluation model of each node in sync. The model is iteratively trained until convergence to obtain the global frequency modulation margin evaluation model.

[0173] The frequency control module is used by each node to output real-time frequency margin based on the global frequency margin assessment model. Combined with the grid frequency deviation signal, it performs coordinated frequency regulation optimization control of multiple units through model predictive control.

[0174] Specifically, the area comprises three 1000MW ultra-supercritical units and two 600MW ultra-supercritical units, belonging to different power generation companies. A decentralized network construction module is used to establish a P2P network topology based on the physical location and communication quality of each unit. Communication latency between nodes is controlled within 30-45ms to meet real-time frequency regulation requirements. A blockchain distributed ledger records the identity information, neighbor relationships, and parameter interaction status of each node in real time, ensuring the traceability of the topology.

[0175] The model initialization and deployment module generates globally consistent initial model parameters based on a secret sharing mechanism and synchronously deploys them to five unit nodes via a blockchain ledger. Each unit node collects 5-8 months of historical operating data, with sample sizes ranging from 28,000 to 52,000 records, showing significant differences in data distribution.

[0176] During the model training phase, the adaptive local training module quantifies the data heterogeneity among nodes using KL divergence, with the metric showing that the feature distribution differences between different units range from 0.15 to 0.28. This module automatically adjusts the proximal regularization coefficient based on the degree of heterogeneity to ensure the stability of model training. The privacy-preserving encryption module adds differential privacy noise to the sample data of each node and performs homomorphic encryption on the model parameters transmitted in the interaction, achieving data transmission within the domain and parameter transmission in a secure state. After 12-18 iterations, the encrypted domain parameter aggregation module selects two representative nodes to perform parameter aggregation. After model convergence, the validation set error of each node drops below 2.8MW, and the prediction accuracy reaches over 94%. No data leakage events occurred during the entire training process.

[0177] In a grid frequency dip event, the frequency deviation reached -0.075Hz. The coordinated frequency regulation control module responded quickly, with each unit's predicted frequency margin range between 70-200MW based on the global frequency margin assessment model. This module optimized the allocation based on the MPC framework, with the five units each undertaking a different proportion of frequency regulation tasks, resulting in a total regulated power of 150MW. The entire response process was completed within 7-9 seconds, and the frequency recovered to a safe range within 13 seconds, representing an improvement in response speed of approximately 35% compared to the original system.

[0178] After three months of continuous operation, the frequency qualification rate of the regional power grid increased from 97.8% to 99.3%, and the standard deviation of frequency deviation decreased by approximately 48%. Due to its decentralized architecture, the system can still operate normally even when a single node fails, maintaining an availability of over 99.8%. Sensitive operational data from various power generation companies is effectively protected, meeting data security regulatory requirements.

[0179] This embodiment verifies the application value of the system of the present invention in a real power grid environment. The collaborative work of each module demonstrates the significant advantages brought about by the combination of decentralized architecture, heterogeneous data adaptive processing, and privacy protection mechanism.

[0180] Example 3: In the third embodiment of the present invention, based on the same inventive concept, the present invention proposes a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the steps of the above embodiment of the collaborative frequency regulation method for thermal power units based on blockchain federated learning.

[0181] Example 4: The fourth embodiment of the present invention, based on the same inventive concept, proposes a computer device comprising: a processor and a memory; the processor and the memory communicate with each other; the memory is used to store instructions; the processor is used to execute the instructions in the memory to execute the blockchain-based federated learning-based thermal power unit cooperative frequency regulation method of the above embodiment.

[0182] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0183] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for coordinated frequency regulation of thermal power units based on blockchain federated learning, characterized in that, include: S100: Taking thermal power units in a certain region that are connected to the same power grid dispatching zone and can perform one frequency regulation as nodes, a decentralized peer-to-peer network topology is constructed based on blockchain technology, and the interaction status between nodes is recorded through the blockchain distributed ledger. S200: A frequency regulation margin assessment model for thermal power units is built based on deep learning. Globally consistent initial model parameters are generated based on a secret sharing mechanism and deployed to each node synchronously through a blockchain ledger. S300: The decentralized parallel stochastic gradient descent algorithm with adaptive federated proximal optimization is used to train the margin evaluation model of each node locally. The KL divergence is used to measure the data heterogeneity between nodes, and the proximal regularization coefficient is dynamically adjusted to obtain the local optimization parameters of each node. S400: Differential privacy technology is used to add noise to the local sample set of each node, and homomorphic encryption technology is used to encrypt the local optimization parameters of each node. S500: Based on the blockchain consensus mechanism, representative node groups are selected by combining the data volume, model accuracy and historical contribution of each node. The representative nodes perform weighted aggregation calculation of the encryption parameters of their neighboring nodes in the encryption domain to obtain global aggregation parameters and update the margin evaluation model of each node in sync. The global frequency modulation margin evaluation model is obtained by iterative training until convergence. S600: Each node outputs real-time frequency regulation margin based on the global frequency regulation margin assessment model, and combines it with the grid frequency deviation signal to perform coordinated frequency regulation optimization control of multiple units through model predictive control. The generation of globally consistent initial model parameters based on the secret sharing mechanism includes: A deep learning-based evaluation model for the frequency control margin of thermal power units is constructed. The model adopts a convolutional gated recurrent unit neural network architecture, with the CNN layer extracting the local instantaneous features of the unit and the bidirectional GRU layer capturing the temporal dependency of the unit's frequency control response. Each node initiates an initialization request through a blockchain smart contract. Based on a secret sharing mechanism, the randomly generated initial model parameters are split into multiple shards and distributed to each node. Each node holds one parameter shard. Nodes exchange parameter shards through encrypted communication, perform parameter aggregation calculations locally, and generate globally consistent initial model parameters. The aggregated initial model parameters are written into the blockchain ledger after being jointly digitally signed by all nodes. Each node obtains initial model parameters from the blockchain ledger, loads the model structure in its local edge computing unit, and completes model deployment. The method of measuring data heterogeneity among nodes using KL divergence and dynamically adjusting the near-end regularization coefficient includes: The probability distribution of thermal power unit operating characteristic data related to frequency regulation margin is calculated. The operating characteristic data includes speed deviation, main steam pressure, reheat steam temperature, valve opening, fuel flow, active load, frequency regulation response delay, and load change rate. During local training, nodes obtain encrypted feature distribution statistics of neighboring nodes through the blockchain and calculate the data feature distribution differences between local nodes and neighboring nodes based on KL divergence. During local training, a stratified sampling strategy based on operating conditions is adopted, and training samples are extracted in layers according to load rate ranges of 30%-50%, 50%-70%, and 70%-100%. The proportion of samples in each layer is matched with the proportion of the unit's historical operating time. At the same time, dynamic weights for frequency regulation margin prediction errors are introduced. Calculate the norm deviation between the local training parameters and the previous round of global aggregation parameters; The near-end regularization coefficient is adjusted based on the differences in data feature distribution and norm deviation. A regularization term is introduced to construct a loss function based on the mean squared error loss, and the local optimized parameters are obtained by performing parameter updates.

2. The method for coordinated frequency regulation of thermal power units based on blockchain federated learning according to claim 1, characterized in that, The decentralized peer-to-peer network topology built based on blockchain technology includes: Thermal power units within a certain region that are connected to the same power grid dispatching zone and are capable of primary frequency regulation are designated as independent blockchain nodes. The nodes must meet the technical requirements of minimum regulation power ≥ 5% of rated capacity and response delay ≤ 500ms. Each node is configured with an edge computing unit, a local data storage unit, a blockchain client module, and an industrial communication module; The network topology is constructed based on the physical location distribution of the unit nodes, communication link delay and communication quality, and the neighbor node relationships of each node are determined. The blockchain distributed ledger records the identity information of each node, its relationships with neighboring nodes, its online status, and the hash values ​​of parameter interactions. Establish encrypted communication links between nodes based on encrypted communication protocols.

3. The method for coordinated frequency regulation of thermal power units based on blockchain federated learning according to claim 1, characterized in that, Specifically, S400 includes: Add Laplace noise to each sample feature in the local sample set of each node; Homomorphic encrypted public keys and multiple private key shards are jointly generated through a blockchain distributed key generation protocol. The public key is written into the blockchain ledger, and the private key shards are stored locally by each node. The local optimization parameters are homomorphically encrypted using a public key to generate ciphertext. The hash value of the encrypted data is calculated and signed with a private key. The receiving node information, transmission timestamp, encrypted data hash, and signature are written into the blockchain.

4. The method for coordinated frequency regulation of thermal power units based on blockchain federated learning according to claim 1, characterized in that, The representative node performs a weighted aggregation calculation of the encrypted parameters of its neighboring nodes within the encrypted domain, including: Each node extracts data volume, model accuracy, and historical contribution indicators from the blockchain ledger to calculate a comprehensive score, and selects a predetermined proportion of nodes as a representative node group based on the comprehensive score ranking. The representative node obtains the comprehensive score information of its neighboring nodes from the blockchain and calculates the aggregate weight with each neighboring node; The representative node utilizes the additive and scalar multiplication homomorphisms of homomorphic encryption to perform weighted aggregation calculations on the encryption parameters of neighboring nodes within the encryption domain, thereby obtaining the encrypted global aggregation parameters; The encrypted global aggregation parameters are decrypted, jointly signed by the representative node group, and written into the blockchain ledger. Each node downloads the global aggregation parameters from the ledger and updates the margin assessment model, and the synchronization consistency is verified by hash value.

5. The method for coordinated frequency regulation of thermal power units based on blockchain federated learning according to claim 1, characterized in that, The method of using model predictive control to perform coordinated frequency regulation optimization control of multiple units includes: Each node inputs its local unit operating status parameters into the global frequency margin assessment model to obtain the frequency margin and encrypts and uploads it to the blockchain; Receives grid frequency deviation signal, and triggers coordinated frequency modulation control when the absolute value of the frequency deviation exceeds a preset threshold; Calculate the total frequency regulation requirement based on the power grid frequency deviation signal and the system frequency regulation coefficient; Based on the model predictive control framework, with the weighted sum of frequency deviation and regulation increment as the objective function, the optimal frequency regulation power sequence of each unit is solved by rolling optimization under power constraints, regulation rate constraints, and power balance constraints. The optimal frequency regulation power is converted into valve opening and fuel flow increment commands, which are then executed through PID closed-loop feedback.

6. A collaborative frequency regulation system for thermal power units based on blockchain federated learning, characterized in that, include: The network construction module is used to build a decentralized peer-to-peer network topology based on blockchain technology, using thermal power units in a certain region that are connected to the same power grid dispatching zone and are capable of one-time frequency regulation as nodes. The interaction status between nodes is recorded through the blockchain distributed ledger. The model initialization module is used to build a frequency regulation margin assessment model for thermal power units based on deep learning, generate globally consistent initial model parameters based on a secret sharing mechanism, and deploy them to each node synchronously through the blockchain ledger. The local training module is used to train the margin evaluation model of each node locally using a decentralized parallel stochastic gradient descent algorithm with adaptive federated proximal optimization. It measures the data heterogeneity between nodes through KL divergence, dynamically adjusts the proximal regularization coefficient, and obtains the local optimization parameters of each node. The privacy protection module is used to add noise to the local sample set of each node using differential privacy technology and to encrypt the local optimization parameters of each node using homomorphic encryption technology. The parameter aggregation module is used to select a representative node group based on the blockchain consensus mechanism, combining the data volume, model accuracy and historical contribution of each node. The representative node performs weighted aggregation calculation of the encrypted parameters of its neighboring nodes in the encrypted domain to obtain the global aggregated parameters and update the margin evaluation model of each node in sync. The model is iteratively trained until convergence to obtain the global frequency modulation margin evaluation model. The frequency control module is used by each node to output real-time frequency margin based on the global frequency margin assessment model, and combined with the grid frequency deviation signal, to perform coordinated frequency regulation optimization control of multiple units through model predictive control. The generation of globally consistent initial model parameters based on the secret sharing mechanism includes: A deep learning-based evaluation model for the frequency control margin of thermal power units is constructed. The model adopts a convolutional gated recurrent unit neural network architecture, with the CNN layer extracting the local instantaneous features of the unit and the bidirectional GRU layer capturing the temporal dependency of the unit's frequency control response. Each node initiates an initialization request through a blockchain smart contract. Based on a secret sharing mechanism, the randomly generated initial model parameters are split into multiple shards and distributed to each node. Each node holds one parameter shard. Nodes exchange parameter shards through encrypted communication, perform parameter aggregation calculations locally, and generate globally consistent initial model parameters. The aggregated initial model parameters are written into the blockchain ledger after being jointly digitally signed by all nodes. Each node obtains initial model parameters from the blockchain ledger, loads the model structure in its local edge computing unit, and completes model deployment. The method of measuring data heterogeneity among nodes using KL divergence and dynamically adjusting the near-end regularization coefficient includes: The probability distribution of thermal power unit operating characteristic data related to frequency regulation margin is calculated. The operating characteristic data includes speed deviation, main steam pressure, reheat steam temperature, valve opening, fuel flow, active load, frequency regulation response delay, and load change rate. During local training, nodes obtain encrypted feature distribution statistics of neighboring nodes through the blockchain and calculate the data feature distribution differences between local nodes and neighboring nodes based on KL divergence. During local training, a stratified sampling strategy based on operating conditions is adopted, and training samples are extracted in layers according to load rate ranges of 30%-50%, 50%-70%, and 70%-100%. The proportion of samples in each layer is matched with the proportion of the unit's historical operating time. At the same time, dynamic weights for frequency regulation margin prediction errors are introduced. Calculate the norm deviation between the local training parameters and the previous round of global aggregation parameters; The near-end regularization coefficient is adjusted based on the differences in data feature distribution and norm deviation. A regularization term is introduced to construct a loss function based on the mean squared error loss, and the local optimized parameters are obtained by performing parameter updates.

7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the collaborative frequency regulation method for thermal power units based on blockchain federated learning as described in any one of claims 1 to 5.

8. A readable storage medium, characterized in that, The readable storage medium stores a computer program that, when executed by a processor, implements the blockchain-based federated learning-based collaborative frequency regulation method for thermal power units as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Decentralized federated learning method and system based on personalized local differential privacy

    CN118940857A

  • Layered optimization scheduling method for electric power system containing large-scale water electrolysis hydrogen production device

    CN120710031A