A federated learning method and system for power system edge devices

CN122654701BActive Publication Date: 2026-10-30STATE GRID JIANGSU ELECTRIC POWER CO LTD NANTONG POWER SUPPLY BRANCH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611154891.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-07-31
Publication Date
2026-10-30
Estimated Expiration
2046-07-31

AI Technical Summary

Technical Problem

[0004]上述现有技术中存在的问题是电力系统边侧设备分布广、数据由各设备本地生成,存在明显的非独立同分布(non-IID)和数据倾斜问题,直接集中训练会侵犯隐私且通信成本高

Benefits of technology

(1)本发明通过设计基于预测向量的离散度指标评估客户端原型质量并进行加权聚合,能够优先放大高质量(类别区分好)设备的贡献,从而得到更准确、更具判别性的全局原型与最终模型。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122654701B_ABST
    Figure CN122654701B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of power system intelligentization and edge computing, and relates to a federated learning method and system for power system edge-side devices, wherein the method comprises the following steps: a master station distributes a global model comprising a feature extractor and a classifier; edge-side devices extract prototype cluster centers and prediction vector cluster centers of each type of sample based on local power data and return them to the master station; the master station calculates a dispersion based on a prediction vector set of each device and determines an aggregation weight based on the dispersion; the master station aggregates the prototypes uploaded by each device to generate a global prototype by weighting, and then distributes the global prototype to the edge-side devices for constraining local training; and the process is iterated until a preset number of rounds is completed. The present application replaces model parameter transmission with prototypes, significantly reduces communication overhead, and adapts to the power edge-side communication environment; the dispersion weighting mechanism improves the aggregation quality, effectively deals with the power data heterogeneity problem, and improves the accuracy and robustness of the global model in tasks such as load prediction, device state identification, and fault detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power system intelligence and edge computing technology, specifically to a discrete weighted prototype federated learning method and system for edge devices in power systems. Background Technology

[0002] With the intelligent development of power systems, edge devices are acquiring and processing data locally with increasing capabilities. Federated learning can collaboratively train AI models using edge data without centralized data uploads, making it suitable for scenarios such as load forecasting, equipment condition assessment, and fault identification.

[0003] For example, the Chinese invention patent with authorization number CN116756518B, entitled "A Cloud-Edge Collaborative Power Fault Identification Method and Related Device Based on Federated Learning," adopts the concept of federated learning to train and update cloud-side and edge-side models. The training process ensures that the sample data of each participant does not leave the local area, and the models are trained together with other parties. This allows the data of each party to be used safely and reliably, and indirectly overcomes the problem of insufficient training samples from a single party. Thus, it achieves the joint optimization effect of cloud-side and edge-side models by multiple parties, and finally trains the ideal cloud-side and edge-side models.

[0004] The existing technologies described above suffer from several problems. Firstly, the power system's edge devices are widely distributed, and data is generated locally by each device, resulting in significant non-independent identically distributed (non-IID) and data skew issues. Direct centralized training incurs privacy violations and incurs high communication costs. Secondly, traditional federated learning (such as FedAvg) suffers from decreased consistency and generalization in non-IID scenarios, making it susceptible to the influence of clients with poor data quality or weak class discrimination. Finally, the heterogeneity (computing power, response latency) and straggler issues of edge devices reduce the aggregation efficiency of federated learning and may introduce noisy model updates. While prototype aggregation can reduce communication, without a reasonable quality assessment mechanism, low-quality prototypes can severely impact the overall model performance. Summary of the Invention

[0005] Purpose of the Invention: To overcome the shortcomings of existing technologies, this invention provides a federated learning method for power system edge devices. It evaluates the quality of client prototypes based on the dispersion of predicted vectors and performs weighted aggregation, prioritizing the contribution of high-quality (well-differentiated) devices to obtain a more accurate and discriminative global prototype and final model. By using dispersion and response latency as screening conditions and combining them with threshold-triggered aggregation initiation rules, it reduces long waiting times or low-quality aggregation caused by some slow / unavailable devices, thereby improving aggregation efficiency and system availability. Furthermore, this invention also provides a federated learning system for power system edge devices.

[0006] Technical solution: In a first aspect, the present invention provides a federated learning method for power system side-side devices, the method comprising the following steps: The S1 power system's master station system sends a global model to each side-side device. The global model includes a feature extractor and a classifier. Each side device of S2 uses the local power dataset to train the received model locally, obtains the trained categories, and calculates the prototype cluster center and the predicted vector cluster center for each category respectively. The main station system described in S3 calculates the dispersion of each side device based on the cluster center set of the predicted vectors received from each side device, calculates its aggregation weight based on the dispersion of each device, and performs weighted aggregation on the prototype cluster centers uploaded by each device to obtain a new global prototype. The S4 master station system distributes the aggregated global prototype to each side device, and the side devices use this prototype to constrain the training process of their local models. S5 repeats steps S2 to S4 until the preset number of global aggregation rounds is completed, at which point the federated learning process ends.

[0007] Furthermore, including: In step S2, the prototype cluster center and the predicted vector cluster center for each category are calculated, including: The prototype cluster center is represented as: ; in, Category , For category The center retains category semantic information for the corresponding number of samples, therefore label information must be uploaded. Indicates category Perform feature extraction; Predicted vector cluster centers are represented as: ; in, The data after feature extraction is classified.

[0008] Furthermore, including: In step S3, the main station system calculates the discreteness of each side device based on the cluster center set of the predicted vectors of each side device received, including: Calculate the pairwise Euclidean distance between the cluster centers of the predicted vectors for each category. ; Euclidean distance between each pair of cluster centers of the predicted vectors for each category Remove the maximum distance and the minimum distance, then calculate the average distance, which is expressed as: , in, The number of categories; Calculate the pairwise Euclidean distance between the cluster centers of the predicted vectors for each category. Annotation difference: ,in, The Euclidean distance between each pair of cluster centers of the predicted vectors for each category. The average distance is expressed as: ; Calculate the dispersion , represented as: ; in, These are the weighting coefficients; To adjust the constant and ensure that the dispersion is always positive, the larger the dispersion, the better the model can distinguish between different categories, and the better the quality of the corresponding prototype.

[0009] Furthermore, including: In step S3, the aggregation weight of each device is calculated based on its dispersion, and the cluster centers of the prototypes uploaded by each device are weighted and aggregated to obtain a new global prototype, including: Calculate the aggregation weight based on the dispersion of each device. This represents the maximum dispersion in this round of aggregation; Normalizing the dispersion is expressed as: ,in, This refers to the number of side devices participating in this round of federated learning; The prototype cluster centers uploaded by each device are weighted and aggregated to obtain a new global prototype. : ; in, Indicates side equipment The collection consisting of all uploaded prototype cluster centers.

[0010] Furthermore, including: Step S4 includes: The training process of the constrained local model is represented by the loss function used when training the local model: , in, For the task loss function, For the number of samples, For the true label vector of the sample, This represents the probability that a sample is predicted to be the true label. For prototype loss; For hyperparameters, For side equipment Previous Category The prototype, This represents the number of categories.

[0011] Secondly, the present invention also provides a federated learning system for power system side-side devices, the system comprising: The global model building module is used to enable the power system's master station system to send a global model to each side device. The global model includes a feature extractor and a classifier. The cluster center calculation module is used to enable each side device to use the local power dataset to train the received model locally, obtain the trained categories, and calculate the prototype cluster center and the predicted vector cluster center for each category respectively. The global prototype construction module is used to enable the main station system to calculate the dispersion of each side device based on the cluster center set of the predicted vectors received from each side device, calculate the aggregation weight of each device according to the dispersion of each device, and perform weighted aggregation of the prototype cluster centers uploaded by each device to obtain a new global prototype. The training module is used to enable the main station system to distribute the aggregated global prototype to each side device, and the side devices use this to constrain the training process of their local models; the federated learning process ends when the preset number of global aggregation rounds is completed.

[0012] Thirdly, the present invention also provides a computer device, comprising: one or more processors; The processor is used to store one or more programs; When the one or more programs are executed by the one or more processors, the federated learning method for power system side-side devices as described in the first aspect is implemented.

[0013] Fourthly, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed, it implements the federated learning method for power system side-side devices as described in the first aspect.

[0014] Beneficial effects: Compared with the prior art, the present invention has the following advantages: (1) This invention evaluates the quality of client prototypes by designing a dispersion index based on prediction vectors and performs weighted aggregation, which can prioritize the amplification of the contribution of high-quality (good category differentiation) devices, thereby obtaining a more accurate and discriminative global prototype and final model.

[0015] (2) By using dispersion as a filtering condition and combining it with threshold-triggered aggregation start rules, the problem of long waiting or low-quality aggregation caused by some slow / unavailable devices is reduced, thereby improving aggregation efficiency and system availability.

[0016] Therefore, this invention replaces model parameter transmission with prototypes, significantly reducing communication overhead and adapting to the power edge communication environment. It improves aggregation quality through a discrete weighting mechanism, effectively addressing the heterogeneity of power data and enhancing the accuracy and robustness of the global model in tasks such as load forecasting, equipment status identification, and fault detection. Specifically: it quantifies the class discrimination capability of each edge device's local model by using unlabeled prediction vector cluster centers as discrete metrics, dynamically adjusting its aggregation weights to improve the accuracy and robustness of the global model while reducing communication overhead; it introduces progressively enhanced prototype loss during local training, gradually calibrating the representation space of each client during iteration, reducing class drift, and enabling the model to have more consistent discrimination boundaries and better generalization performance across edge devices; this invention only uploads prototypes and unlabeled prediction vector cluster centers, avoiding the uploading of original data or model gradient parameters, thus mitigating privacy risks; simultaneously, it can still evaluate model expression quality through prediction vectors, balancing privacy and usability. Attached Figure Description

[0017] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 The flowchart provided in the application is for a discrete weighted prototype federated learning method for edge devices in a power system. Detailed Implementation

[0019] The technical solutions of the embodiments of this application will now be described with reference to the accompanying drawings. It should be noted that similar reference numerals and letters in the following drawings indicate similar items; therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.

[0020] The terms “comprising,” “including,” or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase “comprising one…” does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0021] The terms “first,” “second,” etc., are used only to distinguish one entity or operation from another, and should not be construed as indicating or implying relative importance, nor as requiring or implying any such actual relationship or order between these entities or operations.

[0022] The basic idea of ​​this invention is as follows: the master station system sends a global model to each edge device, which includes a feature extractor and a classifier; each edge device trains the received model locally using its local power dataset, and calculates its prototype cluster center and predicted vector cluster center for each category; each edge device uploads the locally calculated prototype cluster centers and predicted vector cluster centers for each category to the master station system; the master station system calculates the dispersion of each device based on the received set of predicted vector cluster centers from each device, calculates its aggregation weight based on the dispersion of each device, and performs weighted aggregation on the prototype cluster centers uploaded by each device to obtain a new global prototype; the master station system distributes the aggregated global prototype to each edge device, and the edge devices constrain the training process of their local models accordingly; steps S2 to S5 are repeated until the preset number of global aggregation rounds are completed, and the federated learning process ends. By using adaptive weighted aggregation based on dispersion evaluation, prototype-constrained local training, and a threshold screening mechanism, the model performance, robustness, and system efficiency of federated learning in non-IID scenarios on the power edge are significantly improved while ensuring privacy and engineering feasibility.

[0023] like Figure 1 As shown, this invention provides a discrete-weighted prototype federated learning method for edge devices in power systems, comprising the following steps: S1. The main station system sends a global model to each side device. This model includes a feature extractor and a classifier. In this embodiment, the master station system and the side-side devices are the two main components of the power system. The master station system is the core of the power system, responsible for global monitoring, analysis, optimization, and command of the entire power grid. The side-side devices refer to computing units deployed near power equipment sites such as substations, distribution rooms, and renewable energy plants. Therefore, in this embodiment, a global model is first built in the master station system and then sent to each side-side device.

[0024] Feature extractor For example, CNN convolutional neural networks or Transformer encoders are used to map input power time series data into high-dimensional feature vectors; Classifier For example, a fully connected layer combined with a Softmax layer is used to map feature vectors to a specific class probability space.

[0025] S2. Each side device uses the local power dataset to train the received model locally, and calculates the prototype cluster center and the predicted vector cluster center for each category after training. First, the side devices, such as substation inspection robots and smart meters, use local power datasets, such as historical load curves, equipment vibration waveforms, and infrared temperature measurement images, to train the received models.

[0026] In this embodiment, the feature extractor and classifier are first trained using the local power dataset. The feature extractor maps the local power data into a high-dimensional feature vector, and the classifier maps the high-dimensional feature vector to a specific category space. In this embodiment, the category definition examples are as follows: in the equipment fault diagnosis scenario, the category may include "normal", "bearing wear", "stator overheating", etc.; in the load forecasting scenario, the category may be a pattern label such as "weekday peak" or "weekend off-peak".

[0027] Secondly, the corresponding calculation process includes: for each classifier, the categories obtained... Since the training of the feature extractor and classifier in this embodiment is supervised learning; the classifier is trained using a labeled dataset, and then the trained classifier is used to detect the category of the real-time data. Since the local power dataset used is labeled data, the label in the category is the category label in supervised learning.

[0028] In this embodiment, the device calculates two types of centers: Prototype Cluster Center (Mean of feature space): ,in, Category , For category The corresponding number of samples. This center retains category semantic information, therefore label information must be uploaded.

[0029] Predicting vector cluster centers (Classifier output mean): This center is used to evaluate the model's discriminative ability; it only includes feature distribution characteristics and does not include label information, which helps protect privacy.

[0030] In this embodiment, prototype aggregation reduces the transmission overhead of federated learning, enhances privacy protection, and achieves knowledge sharing among federated participants. This addresses the issues of widely distributed edge devices in power systems, data generated locally by each device, significant non-independent identically distributed (non-IID) problems and data skew, and the privacy-infringing and high communication costs associated with direct centralized training.

[0031] S3. Each side device uploads the prototype cluster centers and predicted vector cluster centers of each category obtained locally to the main station system; In this embodiment, the prototype cluster center contains the corresponding label information, while the predicted vector cluster center does not contain the corresponding label information.

[0032] S4. The main station system calculates the dispersion of each side device based on the cluster center set of the predicted vectors received from each side device, calculates its aggregation weight based on the dispersion of each device, and performs weighted aggregation on the prototype cluster centers uploaded by each device to obtain a new global prototype. Calculate the discreteness of each device Specifically, it includes the following steps: S41. Calculate the pairwise Euclidean distance between the cluster centers of the predicted vectors for each category. ; S42. Euclidean distance between the cluster centers of each category's predicted vectors Remove the maximum distance, remove the minimum distance, and then calculate the average distance: ; in, The number of categories; in this embodiment, the maximum and minimum distances are obtained by calculating the pairwise Euclidean distance between the cluster centers of the prediction vectors of each category.

[0033] S43. Calculate the pairwise Euclidean distance between the cluster centers of the predicted vectors for each category. Annotation difference: ; in, It is the pairwise Euclidean distance between the cluster centers of the predicted vectors of each category. The average distance.

[0034] S44. Calculate the degree of dispersion : ; in, These are the weighting coefficients; To adjust the constant and ensure that the dispersion is always positive, The value range is 1.0-1.5. The value ranges from 0.5 to 1.0, and the specific value can be adjusted through cross-validation to balance discrimination and stability. In this embodiment, the adjustment constant is... The value is 0.08, based on the following: according to cross-validation experiments, this value range just covers the negative cases without excessively masking them. The real differences. The greater the dispersion obtained by this method, the better the model can distinguish between different categories, and the better the quality of the corresponding prototype.

[0035] Calculate the aggregation weight based on the dispersion of each device. , This represents the maximum dispersion in this round of aggregation; in this embodiment, This is the maximum value of the discreteness of all devices received by the server in this round of federated learning, used for weight normalization to ensure that high-quality prototypes make a higher contribution.

[0036] Then the dispersion is normalized. ,in, This represents the number of edge devices participating in this round of federated learning. The prototype cluster centers uploaded by each device are weighted and aggregated to obtain a new global prototype. : ; in, Indicates equipment The collection consisting of all uploaded prototype cluster centers.

[0037] This embodiment innovatively proposes a dispersion calculation method based on dual considerations of inter-category discrimination and discrimination stability. In the prior art, simply using the mean distance between each category as the dispersion index has significant drawbacks: if a device causes some category prototypes to be "artificially high" due to local data noise, even if other categories overlap significantly, their mean distance may still be very high, thus incorrectly obtaining high weights in aggregation and polluting the global model.

[0038] This application has been approved. This specific design enables a more accurate assessment of prototype quality, achieving comprehensive evaluation of distinguishability and stability; enhanced robustness to non-independent and identically distributed noise; and computational efficiency while protecting privacy.

[0039] Furthermore, the main station comprehensively considers the dispersion and upload response time of each side device. For the first round of aggregation, it waits for all devices to upload before starting the global prototype aggregation. For subsequent rounds, a dispersion threshold is set to the 1 / 3 quantile of the dispersion of all devices in the previous round of global aggregation, and the upload time of devices is monitored to see if it exceeds a preset time window (e.g., twice the average time). Aggregation is only triggered when the number of devices with dispersion higher than the threshold and timely responses reaches half of the total number of devices, thus avoiding the impact of lagging and low-quality nodes on global training.

[0040] S5. The main station system distributes the aggregated global prototype to each side device, and the side devices use this to constrain the training process of their local models. The training process of the constrained local model is represented by the loss function used when training the local model: ; In this embodiment, the training of the constrained local model uses the local dataset of the edge device, and: For mission losses, For the number of samples, For the true label vector of the sample, This represents the probability that a sample is predicted to be the true label. For prototype loss; For hyperparameters, For side equipment Previous Category The prototype, The number of categories, and in the first round of training During the subsequent training process To be Adjust to Multiply by 0.5 after an order of magnitude, for example: if , ,So Adjust to One order of magnitude, that is *0.01, which is 1.06. This adjustment allows for a balance between the two losses, thus taking into account both task constraints and global constraints.

[0041] S6. Repeat steps S2 to S5 until the preset number of global aggregation rounds is completed, at which point the federated learning process ends.

[0042] This embodiment also provides a federated learning system for power system side-side devices, the system comprising: The global model building module is used to enable the power system's master station system to send a global model to each side device. The global model includes a feature extractor and a classifier. The cluster center calculation module is used to enable each side device to use the local power dataset to train the received model locally, obtain the trained categories, and calculate the prototype cluster center and the predicted vector cluster center for each category respectively. The global prototype construction module is used to enable the main station system to calculate the dispersion of each side device based on the cluster center set of the predicted vectors received from each side device, calculate the aggregation weight of each device according to the dispersion of each device, and perform weighted aggregation of the prototype cluster centers uploaded by each device to obtain a new global prototype. The training module is used to enable the main station system to distribute the aggregated global prototype to each side device, and the side devices use this to constrain the training process of their local models; the federated learning process ends when the preset number of global aggregation rounds is completed.

[0043] To further verify the effectiveness of the discrete weighted prototype federated learning method proposed in this invention on power side-side equipment, this embodiment takes the transformer fault diagnosis of a power distribution network in a certain region as an example and constructs a federated learning simulation system containing 10 substation side-side equipment.

[0044] Other specific details of the federated learning system for power system edge devices described in this embodiment are similar to the corresponding federated learning method for power system edge devices, and will not be repeated here.

[0045] To verify the effectiveness of the method described in this embodiment, the following experiments are conducted, including: 1. Experimental Environment and Dataset The IEEE Transformer Fault Diagnosis Public Dataset was selected, which includes five categories: "Normal," "Low-Energy Discharge," "High-Energy Discharge," "Medium-Low Temperature Overheating," and "High-Temperature Overheating." A non-independent and identically distributed (Non-IID) data environment was simulated for 10 side-side devices (clients), with each device containing only 2-3 categories of data, and the sample size exhibiting a long-tailed distribution.

[0046] 2. Comparison Methods and Evaluation Indicators The method of this invention (denoted as DW-ProtoFL, i.e., Discrete-Weighted Prototype FL) is compared with the following two benchmark methods: FedAvg: The classic federated average algorithm, which transmits model parameters.

[0047] FedProto: An existing prototype federated learning algorithm that performs a simple average aggregation of all client prototypes.

[0048] Evaluation indicators include: Global Accuracy: Classification accuracy on the validation set.

[0049] Communication Cost: The amount of data (MB) transmitted in each round of global aggregation.

[0050] Convergence Speed: The number of communication rounds required to achieve the target accuracy.

[0051] 3. Experimental Results and Analysis The experimental results of this invention are the average of three independent experiments. As shown in Table 1, this invention introduces a discreteness weighting mechanism and prototype constraint loss, and the model exhibits faster convergence speed and higher steady-state accuracy in the Non-IID scenario. Since this invention uses a prototype to replace the complete model parameters for transmission, it significantly reduces the uplink load and greatly alleviates the pressure of limited bandwidth in the power grid.

[0052] Table 1: Comparison of communication overhead per round for different methods

[0053] In summary, this embodiment can significantly reduce the communication overhead of side devices while effectively improving the convergence speed and model performance of federated learning in non-independent and identically distributed power data scenarios, and has good engineering practical value.

[0054] Therefore, this embodiment discloses a computer device.

[0055] The computer device includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps in the above-described embodiments of the discrete-weighted prototype federated learning method for power system side-side devices. Alternatively, when the processor executes the computer program, it implements the functions of each module / unit in the above-described system embodiments.

[0056] For example, the computer program can be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units can be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program in the discrete weighted prototype federated learning method for power system side-side devices.

[0057] The computer device may be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device may include, but is not limited to, a processor and memory.

[0058] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.

[0059] 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.

[0060] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

[0061] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0062] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.

Claims

1. A federated learning method for power system side-side devices, characterized in that, The method includes the following steps: The S1 power system's master station system sends a global model to each side device, and the global model includes a feature extractor and a classifier. Each side device of S2 uses the local power dataset to train the received model locally, obtains the trained categories, and calculates the prototype cluster center and the predicted vector cluster center for each category respectively. The prototype cluster center is represented as: ; in, Category , For category The center retains category semantic information for the corresponding number of samples, therefore label information must be uploaded. Indicates category Perform feature extraction; Predicted vector cluster centers are represented as: ; in, Classify the data after feature extraction; The main station system described in S3 calculates the dispersion of each side device based on the cluster center set of the predicted vectors received from each side device, calculates its aggregation weight based on the dispersion of each device, and performs weighted aggregation on the prototype cluster centers uploaded by each device to obtain a new global prototype. The S4 master station system distributes the aggregated global prototype to each side device, and the side devices use this prototype to constrain the training process of their local models. S5 repeats steps S2 to S4 until the preset number of global aggregation rounds is completed, at which point the federated learning process ends. In step S3, the main station system calculates the discreteness of each side device based on the cluster center set of the predicted vectors of each side device received, including: Calculate the pairwise Euclidean distance between the cluster centers of the predicted vectors for each category. ; Euclidean distance between each pair of cluster centers of the predicted vectors for each category Remove the maximum distance and the minimum distance, then calculate the average distance, which is expressed as: , in, The number of categories; Calculate the pairwise Euclidean distance between the cluster centers of the predicted vectors for each category. Annotation difference: ,in, The Euclidean distance between each pair of cluster centers of the predicted vectors for each category. The average distance is expressed as: ; Calculate the dispersion , represented as: ; in, These are the weighting coefficients; To adjust the constant and ensure that the dispersion is always positive, the larger the dispersion, the better the model can distinguish between different categories, and the better the quality of the corresponding prototype.

2. The federated learning method for power system side-side devices according to claim 1, characterized in that, In step S3, the aggregation weight of each device is calculated based on its dispersion, and the cluster centers of the prototypes uploaded by each device are weighted and aggregated to obtain a new global prototype, including: Calculate the aggregation weight based on the dispersion of each device. This represents the maximum dispersion in this round of aggregation; Normalizing the dispersion is expressed as: ,in, This refers to the number of side devices participating in this round of federated learning; The prototype cluster centers uploaded by each device are weighted and aggregated to obtain a new global prototype. : ; in, Indicates side equipment The collection consisting of all uploaded prototype cluster centers.

3. The federated learning method for power system side-side devices according to claim 2, characterized in that, Step S4 includes: The training process of the constrained local model is represented by the loss function used when training the local model: , in, For the task loss function, For the number of samples, For the true label vector of the sample, This represents the probability that a sample is predicted to be the true label. For prototype loss; For hyperparameters, For side equipment Previous category The prototype, This represents the number of categories.

4. A system based on the federated learning method for power system side-side devices as described in claim 1, characterized in that, The system includes: The global model building module is used to enable the power system's master station system to send a global model to each side device. The global model includes a feature extractor and a classifier. The cluster center calculation module is used to enable each side device to use the local power dataset to train the received model locally, obtain the trained categories, and calculate the prototype cluster center and the predicted vector cluster center for each category respectively. The global prototype construction module is used to enable the main station system to calculate the dispersion of each side device based on the cluster center set of the predicted vectors received from each side device, calculate the aggregation weight of each device according to the dispersion of each device, and perform weighted aggregation of the prototype cluster centers uploaded by each device to obtain a new global prototype. The training module is used to enable the main station system to distribute the aggregated global prototype to each side device, and the side devices use this to constrain the training process of their local models; the federated learning process ends when the preset number of global aggregation rounds is completed.

5. A computer device, characterized in that, include: One or more processors; The processor is used to store one or more programs; When the one or more programs are executed by the one or more processors, the federated learning method for power system side-side devices as described in any one of claims 1 to 3 is implemented.

6. A computer-readable storage medium, characterized in that, It contains a computer program that, when executed, implements the federated learning method for power system side-side devices as described in any one of claims 1 to 3.

Citation Information

Patent Citations

  • Transformer fault classification method and model training method based on heterogeneous federated learning

    CN117992873A

  • Federal learning-based distribution network unmanned aerial vehicle distributed fault identification model cooperative training and security updating method and system

    CN122114084A