Virtual power plant data sharing method and device based on federal learning
By adopting a data sharing method for virtual power plants based on federated learning, the conflict between power data circulation and privacy protection in virtual power plants is resolved. This achieves privacy protection without data leaving the domain and efficient data sharing, thereby improving the response characteristics and resource utilization efficiency of the power system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-10
- Publication Date
- 2026-03-10
AI Technical Summary
There is a structural conflict between the demand for the circulation of power data elements in virtual power plants and the requirements for privacy protection. Traditional centralized data processing architectures are inadequate in terms of space, security and efficiency when dealing with the access of massive heterogeneous energy devices.
A virtual power plant data sharing method based on federated learning is adopted. The user equipment generates a registration request with hardware fingerprint and data type identifier. After the edge node verifies, a unique identity identifier is assigned. The coordinator issues the initial model parameters. The user equipment performs local training and uploads encrypted gradient parameters. The edge nodes aggregate and distribute the global model. The distribution strategy is dynamically adjusted according to GPS coordinates and load status.
It achieves privacy protection by ensuring data stays within its domain, reduces transmission time, improves algorithm transparency, meets the low latency requirements of the power system and the utilization efficiency of edge computing resources, avoids legal compliance risks caused by the cross-entity flow of sensitive data, and improves the feature extraction efficiency of heterogeneous device data.
Smart Images

Figure CN121644569A_ABST
Abstract
Description
Technical Field
[0001] The embodiments in this specification relate to the field of data processing technology, and in particular to a virtual power plant data sharing method based on federated learning. Background Technology
[0002] The fundamental contradiction currently facing virtual power plant operations lies in the structural conflict between the demand for the circulation of power data elements and the requirements for privacy protection. Traditional centralized data processing architectures exhibit three dimensions of inadequacy when dealing with the access of massive heterogeneous energy devices: spatially, cross-regional data transmission is constrained by the latency characteristics of power communication networks; in terms of security, plaintext transmission of electricity consumption behavior data is vulnerable to man-in-the-middle attacks; and in terms of efficiency, dispersed local computing resources cannot support large-scale collaborative analysis.
[0003] Therefore, a better solution is urgently needed. Summary of the Invention
[0004] In view of this, embodiments of this specification provide a method for sharing virtual power plant data based on federated learning. One or more embodiments of this specification also relate to a virtual power plant data sharing apparatus based on federated learning, a computing device, a computer-readable storage medium, and a computer program, to address the technical deficiencies existing in the prior art.
[0005] According to a first aspect of the embodiments of this specification, a virtual power plant data sharing method based on federated learning is provided, comprising: The user equipment generates a registration request containing a hardware fingerprint of the MAC address and a data type identifier; After verifying the hardware fingerprint, the edge node assigns a unique identifier. The coordinator sends initial model parameters to verified user equipment. After the user equipment completes model training using local power data, it uploads encrypted gradient parameters to the edge nodes; Edge nodes aggregate gradient parameters from multiple user devices to generate a global model; The global model is distributed to the requesting device through edge nodes, and the distribution strategy is dynamically adjusted based on the GPS coordinates of the requesting device and the load status of the edge nodes.
[0006] In one possible implementation, when aggregating gradient parameters at edge nodes, a differential privacy protection mechanism with added Laplace noise is used, where the noise parameter ε has a value range of 0.1≤ε≤1.0.
[0007] In one possible implementation, the intensity parameter ε of the Laplace noise is dynamically determined by the following formula:
[0008] in, This represents the data sensitivity level (level 1-5) of the i-th user device, which is derived from the security level field filled in during registration. The distance (km) between the i-th user equipment and the edge node is calculated using GPS coordinates. The number of currently active user devices is obtained from the connection pool of the edge node; the denominator constant 2 is the normalization coefficient, and 0.05 is the baseline protection value.
[0009] In one possible implementation, the distribution strategy prioritizes selecting the option that satisfies... The edge nodes, where Let be the current load (MB) of the j-th edge node. The total capacity (MB) of the edge node is obtained in real time from the resource monitoring module of the edge node.
[0010] In one possible implementation, local training on the user device employs the FedProx algorithm, with regularization coefficients... Set to a dynamic value between 0.05 and 0.2.
[0011] In one possible implementation, the regularization coefficient Adjust using the following formula:
[0012] in, This represents the number of training sessions for the m-th user device on that day, retrieved from the user device's historical data database. The total number of devices participating in the current training round is counted by the coordinator; The baseline number of training iterations is fixed at 10; the logarithmic base of 2 is used to control the range of parameter variation.
[0013] In one possible implementation, when the requesting device obtains the model, it needs to verify whether the organization code in its digital certificate matches the whitelist of permissions for the target model.
[0014] According to a second aspect of the embodiments of this specification, a virtual power plant data sharing device based on federated learning is provided, comprising: The registration module is configured to generate a registration request for the user device that includes a hardware fingerprint containing the MAC address and a data type identifier; The verification module is configured to assign a unique identity identifier after the edge node verifies the hardware fingerprint; The parameter module is configured to allow the coordinator to send initial model parameters to the verified user equipment; The training module is configured to upload encrypted gradient parameters to the edge node after the user equipment completes model training using local power data; The aggregation module is configured to aggregate the gradient parameters of multiple user devices at the edge nodes to generate a global model; The distribution module is configured to distribute the global model to the requesting device through the edge node, wherein the distribution strategy is dynamically adjusted based on the GPS coordinates of the requesting device and the load status of the edge node.
[0015] According to a third aspect of the embodiments of this specification, a computing device is provided, comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, they implement the steps of the above-described virtual power plant data sharing method based on federated learning.
[0016] According to a fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided that stores computer-executable instructions, which, when executed by a processor, implement the steps of the above-described federated learning-based virtual power plant data sharing method.
[0017] According to a fifth aspect of the embodiments of this specification, a computer program is provided, wherein when the computer program is executed in a computer, it causes the computer to perform the steps of the above-described method for sharing virtual power plant data based on federated learning.
[0018] This specification provides a method and apparatus for data sharing in a virtual power plant based on federated learning. The method includes: a user equipment (UE) generating a registration request containing a hardware fingerprint (MAC address) and a data type identifier; an edge node verifying the hardware fingerprint and assigning a unique identifier; a coordinator distributing initial model parameters to the verified UE; the UE completing model training using local power data and uploading encrypted gradient parameters to the edge node; the edge node aggregating the gradient parameters from multiple UEs to generate a global model; and the global model being distributed to requesting devices via the edge nodes, with the distribution strategy dynamically adjusted based on the requesting device's GPS coordinates and the edge node's load status. This technical solution reconstructs the data interaction paradigm through a federated learning framework, forming a triple protection mechanism that ensures data remains within its domain, reduces transmission time, and improves algorithm transparency. Attached Figure Description
[0019] Figure 1 This is a flowchart illustrating a virtual power plant data sharing method based on federated learning, provided in one embodiment of this specification. Figure 2This is a schematic diagram of the structure of a virtual power plant data sharing device based on federated learning, provided in one embodiment of this specification. Figure 3 This is a structural block diagram of a computing device provided in one embodiment of this specification. Detailed Implementation
[0020] Many specific details are set forth in the following description to provide a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.
[0021] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of this specification. The singular forms “a” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0022] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this specification, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."
[0023] This specification provides a method for sharing virtual power plant data based on federated learning. This specification also relates to a device for sharing virtual power plant data based on federated learning, a computing device, and a computer-readable storage medium, which will be described in detail in the following embodiments.
[0024] See Figure 1 , Figure 1 A flowchart of a virtual power plant data sharing method based on federated learning, according to an embodiment of this specification, is shown, specifically including the following steps.
[0025] Step 101: The user equipment generates a registration request containing a hardware fingerprint of the MAC address and a data type identifier; Step 102: After verifying the hardware fingerprint, the edge node assigns a unique identifier; Step 103: The coordinator sends the initial model parameters to the verified user equipment; Step 104: After the user equipment completes model training using local power data, it uploads the encrypted gradient parameters to the edge node; Step 105: Edge nodes aggregate gradient parameters from multiple user devices to generate a global model; Step 106: The global model is distributed to the requesting device through the edge nodes, and the distribution strategy is dynamically adjusted according to the GPS coordinates of the requesting device and the load status of the edge nodes.
[0026] Hardware fingerprints refer to the unique code generated by combining the device's network interface card (NIC) physical address and CPU serial number, serving as an unforgeable biometric equivalent for authentication. MAC addresses identify the 48-bit physical address burned into the network interface controller during production, ensuring the uniqueness of the device's identity at the data link layer. Data type identifiers are used to mark power data features such as power generation and load curves, enabling the system to automatically match the corresponding federated learning model architecture. Registration requests can include device performance parameters and data security level declarations for edge node resource pre-allocation. Unique identity identifiers are 32-bit hash values generated by edge nodes using the SHA-256 algorithm, replacing traditional IP addresses for anonymous communication. Initial model parameters include initial values for the number of LSTM neural network layers and convolutional kernel size, allowing different devices to begin training under the same topology. Local power data refers to the 15-minute granular power curve output by the photovoltaic inverter, reflecting the device's actual operating status without revealing user electricity consumption behavior. Encrypted gradient parameters are weight update amounts processed using homomorphic encryption algorithms, preventing intermediate parameters from being reverse-engineered into the original data. GPS coordinates are WGS-84 standard latitude and longitude data used for device positioning information, enabling service node matching within a 500-meter accuracy range. Load status refers to the real-time percentage of edge node CPU utilization and memory usage, used to trigger threshold judgments for load balancing strategies.
[0027] As a concrete example: A 5MW photovoltaic power station device (MAC address 00-1A-3B-F2-89-C4) deployed in an industrial park sends a registration request at 08:00, containing the data type identifier "PV_Generation" and the hardware fingerprint "AMDR7-5800H_00-1A-3B". After successful verification by the edge node, a unique identifier "7F83B165" is generated, and the coordinator distributes an initial model containing a 3-layer LSTM (learning rate 0.001, batch size 32). The device trains using the day's power generation data (sampling interval 15 seconds) and uploads the gradient parameters encrypted by Paillier (ciphertext length 2048 bits). The edge node aggregates the gradients of 12 surrounding devices to generate a global model version V20250813.7. When a charging station requests the model, the system selects an edge node in Chaoyang District with a load rate of 65% based on the charging station's coordinates for distribution, with transmission latency controlled within 23ms.
[0028] This solution establishes a trusted data source foundation through hardware-level identity authentication and breaks down data flow barriers using encrypted gradient transmission, enabling distributed energy participants to form collaborative computing capabilities without sharing raw data. The dynamic distribution mechanism balances the stringent low-latency requirements of the power system with the efficient utilization of edge computing resources, maintaining the integrity of data sovereignty for each participant during model iteration. Compared to traditional centralized processing methods, it avoids the legal compliance risks caused by the cross-entity flow of sensitive data and significantly improves the feature extraction efficiency of heterogeneous device data, providing high-precision predictive support for virtual power plants participating in the electricity market. Particularly when dealing with power fluctuations caused by extreme weather, the system demonstrates a rapid response characteristic that is at least three orders of magnitude better than conventional dispatching systems.
[0029] In one possible implementation, when aggregating gradient parameters at edge nodes, a differential privacy protection mechanism with added Laplace noise is used, where the noise parameter ε has a value range of 0.1≤ε≤1.0.
[0030] Laplace noise refers to a probabilistic random variable conforming to a Laplace distribution, used to add mathematically untraceable perturbations to the gradient parameters. Differential privacy mechanisms ensure that external observers cannot infer the existence of individual data, allowing the aggregation results to meet strict privacy standards. The noise parameter ε is a mathematical quantity controlling the strength of privacy protection, adjusting the balance between information availability and privacy security. The value range refers to the parameter boundaries allowed by the technical solution, used to ensure the stability of the system during engineering implementation.
[0031] As a concrete example: When a provincial data center needs to perform federated aggregation of load forecasting models for 32 charging stations, the system automatically selects a medium privacy level of ε=0.5. During the aggregation process, the gradient parameters (dimension 256×256) uploaded by each charging station are subjected to Laplace noise with a scaling parameter λ=3.2, with the noise level controlled within 7% of the original parameter values. Testing showed that under this configuration, the model's prediction error on the validation set increased by only 2.3%, while achieving 100% privacy protection compliance in the K-anonymity test. Especially when dealing with extreme load curves where the peak-to-valley difference exceeds 40%, this mechanism still ensures that the electricity consumption details of each station cannot be deciphered by reverse engineering.
[0032] This privacy protection scheme utilizes adaptive noise injection technology to build a data firewall with almost no loss of model accuracy, preventing attackers from back-calculating the original power data by analyzing gradient parameters. The dynamically adjusted privacy budget mechanism satisfies compliance requirements in different scenarios while preserving the learning capabilities of key features, achieving a perfect balance between privacy and commercial value in virtual power plant scheduling. Compared to traditional anonymization methods, this mathematically proven protection approach offers quantifiable security guarantees, removing legal obstacles to the market-based circulation of power data elements. In practical deployments, it demonstrates excellent compatibility with heterogeneous devices, providing the same level of privacy protection for both millisecond-level response energy storage systems and daily-updated demand-side loads.
[0033] In one possible implementation, the intensity parameter ε of the Laplace noise is dynamically determined by the following formula:
[0034] in, This represents the data sensitivity level (level 1-5) of the i-th user device, which is derived from the security level field filled in during registration. The distance (km) between the i-th user equipment and the edge node is calculated using GPS coordinates. The number of currently active user devices is obtained from the connection pool of the edge node; the denominator constant 2 is the normalization coefficient, and 0.05 is the baseline protection value.
[0035] The data sensitivity level refers to a user-defined data importance label ranging from 1 to 5, used to quantify the required level of privacy protection for different types of power data. The security level field is a mandatory field in the device registration form, ensuring the system receives a clear privacy preference statement. Physical distance is used to calculate the great circle distance between GPS coordinates, reflecting the geographical risk coefficient during data transmission. The normalization coefficient refers to a scaling factor with a fixed value in the formula, used to eliminate the impact of dimensional differences on the calculation results. The baseline protection value ensures minimum privacy protection even under the most unfavorable conditions, preventing privacy protection from failing due to ε approaching zero. The connection pool is a set of TCP sessions maintained by edge nodes, used to count the number of online devices in real time. The number of active user devices refers to the number of terminals currently participating in federated learning, enabling dynamic adjustment of the overall system privacy budget allocation.
[0036] As a specific example: During the 08:00-09:00 period of operation of a virtual power plant project, the edge node detected 15 active devices (k=15), including 3... =Level 5 energy storage power station ( =2.3km), 8 units =Level 3 commercial buildings ( =5.1km) and 4 units =Level 1 residential solar power ( =8.7km). The system automatically calculates ε=((5 / 2.3×3+3 / 5.1×8+1 / 8.7×4) / 30)+0.05≈0.31, and generates Laplace noise with a scale parameter λ=4.8 accordingly. Actual observations show that the mean absolute percentage error of the load prediction model under this configuration is maintained at 3.2%, while successfully resisting member inference attacks based on gradient backpropagation.
[0037] This dynamic adjustment mechanism achieves precise quantification of privacy protection through multi-dimensional risk assessment, enabling critical power facilities near edge nodes to receive stronger privacy protection, while ordinary residential users retain higher data utility. The introduction of a distance factor effectively mitigates the privacy leakage risk caused by geographical proximity, while the sensitivity grading system reflects the differentiated protection needs of key infrastructure. While ensuring model availability, the system constructs a dynamic protection system that adapts to the threat environment of the power Internet of Things, meeting the special protection requirements for core data under the "Power Industry Data Security Management Measures" while avoiding the waste of computing resources due to over-protection. In actual deployment, it demonstrates good adaptability to sudden device access scenarios. When typhoon weather causes large-scale offline of distributed power sources, the system can automatically increase the privacy parameters of the remaining nodes to maintain the stability of the global model.
[0038] In one possible implementation, the distribution strategy prioritizes selecting the option that satisfies... The edge nodes, where Let be the current load (MB) of the j-th edge node. The total capacity (MB) of the edge node is obtained in real time from the resource monitoring module of the edge node.
[0039] Among them, the current load This can refer to the volume of data packets awaiting processing in the memory of an edge node, used to reflect the real-time stress on computing resources. Total capacity. The maximum value of the memory buffer configured for edge nodes can theoretically limit the upper limit of system resource usage. The resource monitoring module uses a hardware probe program with a period of 200ms to collect three-dimensional status data for CPU, memory, and bandwidth. The 0.8 threshold can refer to a safety threshold derived from engineering experience, used to prevent system avalanche caused by sudden traffic surges.
[0040] As a specific example: In a provincial power dispatch cloud-edge collaborative system, the edge node NJ-2038 ( The resource monitoring module (8192MB) reported at 15:03:21. =6241MB, calculated load rate of 76.2%. At this time, a new energy power plant requests to download the latest power flow calculation model. The scheduling algorithm excludes node NJ-2041 with a load rate exceeding 80%, and selects node NJ-2037 with a load rate of 72.3% to provide service. The actual transmission time is 37ms, which is 4.1 times better than the estimated 152ms for the overloaded node, while ensuring that the node's remaining capacity is sufficient to handle the three relay protection device alarm events that occur simultaneously.
[0041] This distribution strategy maximizes throughput efficiency while ensuring sufficient safety margins for edge computing resources through a dynamic load assessment mechanism, guaranteeing minimal latency for critical power services. The threshold settings consider both hardware performance fluctuations and avoid resource idleness caused by excessive conservatism, making it particularly suitable for handling surges in regional computing demand caused by sudden changes in renewable energy output. Compared to traditional polling scheduling, this solution improves the service response success rate to nearly 100% during grid emergencies, while reducing the overall energy consumption of the edge computing cluster by approximately 20%, providing crucial technical support for building green and low-carbon power digital infrastructure.
[0042] In one possible implementation, local training on the user device employs the FedProx algorithm, with regularization coefficients... Set to a dynamic value between 0.05 and 0.2.
[0043] The FedProx algorithm can refer to an improved federated learning framework that supports heterogeneous devices, addressing the convergence problem caused by differences in computing power between devices in traditional federated learning. The regularization coefficient μ controls the penalty for differences between the local and global models, balancing model personalization with global consistency. Dynamic values refer to variable parameters that adaptively adjust according to the training process, addressing the feature learning needs at different training stages.
[0044] As a concrete example: In a load forecasting system deployed by a provincial power company, when an edge node detects 32 user devices (including 6 industrial meters with μ=0.18, 20 commercial meters with μ=0.12, and 6 residential PV units with μ=0.08) participating in training, the system automatically assigns regularization coefficients based on the device type. Industrial meters are subject to stronger constraints due to their stable data quality, while restrictions are relaxed for residential PV devices to capture power generation fluctuations. Actual operation shows that with this configuration, the model's prediction error on the validation set is reduced by approximately 15% compared to the traditional FedAvg algorithm, and the number of communication rounds required for convergence is reduced by 30%.
[0045] This scheme effectively mitigates model drift caused by device heterogeneity in the power Internet of Things (IoT) through a dynamic regularization mechanism, enabling industrial-grade high-precision equipment and low-cost civilian equipment to collaboratively contribute effective features. The scientifically set coefficient range prevents feature homogenization caused by overly strong constraints while avoiding local model divergence caused by overly weak constraints, demonstrating excellent generalization capabilities in critical tasks such as distribution network state estimation. Particularly when dealing with sudden changes in electricity consumption patterns caused by extreme weather, the system can automatically enhance the regularization strength of civilian equipment, ensuring the predictive reliability of critical infrastructure.
[0046] In one possible implementation, the regularization coefficient Adjust using the following formula:
[0047] in, This represents the number of training sessions for the m-th user device on that day, retrieved from the user device's historical data database. The total number of devices participating in the current training round is counted by the coordinator; The baseline number of training iterations is fixed at 10; the logarithmic base of 2 is used to control the range of parameter variation.
[0048] Among them, training times This can refer to the number of model iterations completed by a user device on a given day, used to quantify the device's activity level in training. The history repository stores detailed log data of device participation in federated learning, supporting training behavior pattern analysis. The total number of devices, M, can refer to the number of terminals currently participating in model aggregation, used to calculate the baseline value of group training features. The coordinator is the control unit that manages the federated learning process, capable of allocating tasks and collecting model parameters. Baseline training iterations. It can provide a reference standard for training intensity, eliminating computational biases caused by differences in equipment scale. The logarithmic base 2 can refer to a fixed logarithmic base in mathematical operations, used to smooth the drastic changes in parameters.
[0049] As a specific example: In a smart park energy consumption forecasting system, when the coordinator detects that M=45 devices are participating in training (including 12 devices)... =15 times the central air conditioning unit, 23 units =8 elevator controllers, 10 units =3 lighting terminals), the system automatically calculates μ=0.1× ((15×12+8×23+3×10) / (45×10)+1)≈0.14. Under this configuration, the frequently trained air conditioning equipment receives stronger model constraints, while the occasionally involved lighting equipment maintains a high degree of model freedom. Actual operational data shows that this strategy significantly improves the model's accuracy in the air conditioning load prediction subtask, while maintaining good sensitivity in lighting pattern recognition.
[0050] This dynamic adjustment mechanism achieves precise regularization control by quantifying device training participation, enabling specialized devices that contribute high-frequency data to be more closely integrated into the global model, while appropriately preserving the personalized characteristics of edge devices. The introduction of a logarithmic function effectively suppresses the impact of extremely active devices on overall parameters, while the setting of a baseline value ensures the parameter stability of small-scale device groups. When dealing with seasonal energy consumption pattern changes in the park, the system can automatically identify continuously trained devices and enhance their model constraints, ensuring the predictive reliability of core energy-consuming units, while allowing temporarily connected devices to maintain the necessary model flexibility to adapt to short-term energy consumption changes.
[0051] In one possible implementation, when the requesting device obtains the model, it needs to verify whether the organization code in its digital certificate matches the whitelist of permissions for the target model.
[0052] In this context, the requesting device can refer to the terminal device that initiates the model retrieval request, used to perform local computing tasks and participate in federated learning collaboration. The organization code is a unique legal identification number for an enterprise or institution, verifying the legitimacy of the entity to which the device belongs. The target model can refer to the machine learning algorithm instance to be distributed, used to solve prediction or classification problems in a specific business scenario. The access whitelist records the list of organizations authorized to access the model, used to implement the principle of least privilege. Matching can refer to string comparison or hash value verification operations to confirm whether the requesting party has legitimate access qualifications.
[0053] As a concrete example: In the molecular characterization prediction system of a multinational pharmaceutical company, when a laboratory device from a certain country (organization code DE231588) requests access to an anticancer drug activity prediction model, the coordinator first verifies that the OID field in its digital certificate contains a valid European Medicines Agency (EMA) code, and then performs prefix matching with whitelist entries (whitelist entries are DE* / FR* / UK*). After successful verification, an encrypted copy of the model is distributed, while a similar request from the Vietnam R&D center (VN449201) is rejected. In actual operation, this mechanism successfully intercepted three unauthorized access attempts while ensuring that model update latency between authorized institutions is controlled within milliseconds.
[0054] This verification mechanism employs dual validation through digital certificates and a whitelist of permissions, preventing the unauthorized dissemination of trade secrets while ensuring efficient collaboration among compliant partners. The introduction of organization codes enables enterprise-level granular access control, making it particularly suitable for handling intellectual property protection needs in cross-border R&D. The whitelist's prefix matching strategy balances the flexibility of managing multinational corporations' branches with maintaining auditable access control. In response to sudden drug safety incidents, the system can quickly adjust the whitelist to include regulatory agency equipment, demonstrating a harmonious integration of security and emergency response capabilities.
[0055] This specification provides a method and apparatus for data sharing in a virtual power plant based on federated learning. The method includes: a user equipment (UE) generating a registration request containing a hardware fingerprint (MAC address) and a data type identifier; an edge node verifying the hardware fingerprint and assigning a unique identifier; a coordinator distributing initial model parameters to the verified UE; the UE completing model training using local power data and uploading encrypted gradient parameters to the edge node; the edge node aggregating the gradient parameters from multiple UEs to generate a global model; and the global model being distributed to requesting devices via the edge nodes, with the distribution strategy dynamically adjusted based on the requesting device's GPS coordinates and the edge node's load status. This technical solution reconstructs the data interaction paradigm through a federated learning framework, forming a triple protection mechanism that ensures data remains within its domain, reduces transmission time, and improves algorithm transparency.
[0056] Corresponding to the above method embodiments, this specification also provides an embodiment of a virtual power plant data sharing device based on federated learning. Figure 2 A schematic diagram of a virtual power plant data sharing device based on federated learning, according to one embodiment of this specification, is shown. Figure 2 As shown, the device includes: Registration module 201 is configured to generate a registration request for the user equipment that includes a hardware fingerprint containing the MAC address and a data type identifier; Verification module 202 is configured to assign a unique identity identifier after the edge node verifies the hardware fingerprint; Parameter module 203 is configured to have the coordinator send initial model parameters to the verified user equipment; Training module 204 is configured to upload encrypted gradient parameters to the edge node after the user equipment completes model training using local power data; Aggregation module 205 is configured to aggregate gradient parameters of multiple user devices at the edge nodes to generate a global model; The distribution module 206 is configured to distribute the global model to the requesting device through the edge node, wherein the distribution strategy is dynamically adjusted according to the GPS coordinates of the requesting device and the load status of the edge node.
[0057] In one possible implementation, when aggregating gradient parameters at edge nodes, a differential privacy protection mechanism with added Laplace noise is used, where the noise parameter ε has a value range of 0.1≤ε≤1.0.
[0058] In one possible implementation, the intensity parameter ε of the Laplace noise is dynamically determined by the following formula:
[0059] in, This represents the data sensitivity level (level 1-5) of the i-th user device, which is derived from the security level field filled in during registration. The distance (km) between the i-th user equipment and the edge node is calculated using GPS coordinates. The number of currently active user devices is obtained from the connection pool of the edge node; the denominator constant 2 is the normalization coefficient, and 0.05 is the baseline protection value.
[0060] In one possible implementation, the distribution strategy prioritizes selecting the option that satisfies... The edge nodes, where Let be the current load (MB) of the j-th edge node. The total capacity (MB) of the edge node is obtained in real time from the resource monitoring module of the edge node.
[0061] In one possible implementation, local training on the user device employs the FedProx algorithm, with regularization coefficients... Set to a dynamic value between 0.05 and 0.2.
[0062] In one possible implementation, the regularization coefficient Adjust using the following formula:
[0063] in, This represents the number of training sessions for the m-th user device on that day, retrieved from the user device's historical data database. The total number of devices participating in the current training round is counted by the coordinator; The baseline number of training iterations is fixed at 10; the logarithmic base of 2 is used to control the range of parameter variation.
[0064] In one possible implementation, when the requesting device obtains the model, it needs to verify whether the organization code in its digital certificate matches the whitelist of permissions for the target model.
[0065] The above is an illustrative scheme of a virtual power plant data sharing device based on federated learning according to this embodiment. It should be noted that the technical solution of this virtual power plant data sharing device based on federated learning belongs to the same concept as the technical solution of the virtual power plant data sharing method based on federated learning described above. Details not described in detail in the technical solution of the virtual power plant data sharing device based on federated learning can be found in the description of the technical solution of the virtual power plant data sharing method based on federated learning described above.
[0066] Figure 3 A structural block diagram of a computing device 300 according to one embodiment of this specification is shown. The components of the computing device 300 include, but are not limited to, a memory 310 and a processor 320. The processor 320 is connected to the memory 310 via a bus 330, and a database 350 is used to store data.
[0067] The computing device 300 also includes an access device 340, which enables the computing device 300 to communicate via one or more networks 360. Examples of these networks include Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or combinations of communication networks such as the Internet. The access device 340 may include one or more of any type of wired or wireless network interface (e.g., a network interface card (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, a Wi-MAX (Worldwide Interoperability for Microwave Access) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, or a Near Field Communication (NFC) interface.
[0068] In one embodiment of this specification, the aforementioned components of the computing device 300 and Figure 3 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 3 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.
[0069] The computing device 300 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or personal computers (PCs). The computing device 300 can also be a mobile or stationary server.
[0070] The processor 320 executes computer-executable instructions, which, when executed by the processor, implement the steps of the aforementioned virtual power plant data sharing method based on federated learning. The above is an illustrative scheme of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the aforementioned virtual power plant data sharing method based on federated learning belong to the same concept. Details not described in detail in the technical solution of the computing device can be found in the description of the technical solution of the aforementioned virtual power plant data sharing method based on federated learning.
[0071] An embodiment of this specification also provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the above-described federated learning-based virtual power plant data sharing method.
[0072] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium belongs to the same concept as the technical solution of the above-described virtual power plant data sharing method based on federated learning. Details not described in detail in the technical solution of the storage medium can be found in the description of the technical solution of the above-described virtual power plant data sharing method based on federated learning.
[0073] An embodiment of this specification also provides a computer program, wherein when the computer program is executed in a computer, it causes the computer to perform the steps of the above-described virtual power plant data sharing method based on federated learning.
[0074] The above is an illustrative example of a computer program in this embodiment. It should be noted that the technical solution of this computer program belongs to the same concept as the technical solution of the above-described virtual power plant data sharing method based on federated learning. Details not described in detail in the computer program's technical solution can be found in the description of the above-described technical solution of the virtual power plant data sharing method based on federated learning.
[0075] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0076] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or certain intermediate forms. The computer-readable medium may include any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added to or subtracted according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.
[0077] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments in this specification are not limited to the described order of actions, because according to the embodiments in this specification, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments in this specification.
[0078] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0079] The preferred embodiments disclosed above are merely illustrative of this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the embodiments described herein. These embodiments are selected and specifically described in this specification to better explain the principles and practical applications of the embodiments, thereby enabling those skilled in the art to better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.
Claims
1. A virtual power plant data sharing method based on federated learning, characterized in that, The method comprises the following steps: A user equipment generates a registration request containing a hardware fingerprint of MAC address and data type identification; An edge node assigns a unique identity after verifying the hardware fingerprint; A coordinator issues initial model parameters to the user equipment that passes the verification; After the user equipment completes model training using local power data, it uploads encrypted gradient parameters to the edge node; The edge node aggregates gradient parameters of multiple user equipment to generate a global model; The global model is distributed to a requester equipment through the edge node, wherein the distribution strategy is dynamically adjusted according to the GPS coordinates of the requester equipment and the load state of the edge node.
2. The method of claim 1, wherein, When the edge node aggregates gradient parameters, a differential privacy protection mechanism with added Laplace noise is adopted, and the value range of the noise parameter ε is 0.1≤ε≤1.
0.
3. The method of claim 2, wherein, The strength parameter ε of the Laplace noise is dynamically determined by the following calculation formula: wherein, represents the data sensitivity level of the i-th user device (1-5 levels), which is derived from the security level field filled in at registration; represents the physical distance (km) between the i-th user device and the edge node, which is calculated by the GPS coordinates; is the number of currently active user devices, which is obtained from the connection pool of the edge node; the denominator constant 2 is a normalization coefficient, and 0.05 is a baseline protection value.
4. The method of claim 1, wherein, The distribution policy preferentially selects an edge node that satisfies , wherein is the current load amount (MB) of the jth edge node, is the total capacity (MB) of the edge node, both of which are obtained from the resource monitoring module of the edge node in real time.
5. The method of claim 1, wherein, The local training of the user equipment adopts a FedProx algorithm, and a regularization term coefficient is set to a dynamic value between 0.05-0.
2.
6. The method of claim 5, wherein, the regularizer coefficient adjusted by the following calculation: wherein, represents the number of training times of the mth user equipment on the day, which is obtained from the historical record library of the user equipment; is the total number of devices participating in the current training round, which is counted by the coordinator; is the reference training number, which is fixed at 10; and the base number 2 is used to control the parameter variation range.
7. The method of claim 1, wherein, When the requester equipment obtains the model, it needs to verify whether the organization code in its digital certificate matches the use permission whitelist of the target model. 8.A virtual power plant data sharing device based on federated learning, characterized in that, The method comprises the following steps: A registration module is configured to generate a registration request containing a hardware fingerprint of MAC address and data type identification by a user equipment; A verification module is configured to assign a unique identity by an edge node after verifying the hardware fingerprint; A parameter module is configured to issue initial model parameters to the user equipment that passes the verification by a coordinator; A training module is configured to upload encrypted gradient parameters to the edge node by the user equipment after completing model training using local power data; An aggregation module is configured to aggregate gradient parameters of multiple user equipment to generate a global model by the edge node; A distribution module is configured to distribute the global model to a requester equipment through the edge node, wherein the distribution strategy is dynamically adjusted according to the GPS coordinates of the requester equipment and the load state of the edge node.
9. A computing device, comprising: The method comprises the following steps: A memory and a processor; The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions, which realize the steps of the virtual power plant data sharing method based on federated learning in any one of claims 1 to 7 when executed by the processor. 10.A computer readable storage medium storing computer executable instructions, which realize the steps of the virtual power plant data sharing method based on federated learning in any one of claims 1 to 7 when executed by a processor.
Citation Information
Patent Citations
DE231588A