Model training method and apparatus based on federated learning, and device and storage medium

By monitoring and eliminating anomalies in local model parameters within the federated learning system, the problem of malicious poisoning was solved, ensuring the reliability of model training and the accuracy of fault analysis, and enabling effective fault analysis of power equipment.

WO2025256098A1PCT designated stage Publication Date: 2025-12-18GUANGDONG POWER GRID CO LTD +1

Patent Information

Application Number
PCT/CN2024/141351
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-06-14
Filing Date
2024-12-23
Publication Date
2025-12-18

AI Technical Summary

Technical Problem

In federated learning systems, there is a problem of malicious actors poisoning models without a target, which leads to a decrease in the performance of fault analysis models trained locally.

Method used

A federated learning-based model training method is designed. It uses a cloud server to monitor local model parameters for anomalies, marks suspected abnormal nodes, and monitors and removes them. Combined with an anomaly elimination and detection mechanism, it ensures the reliability and security of model parameters.

Benefits of technology

It effectively reduces the impact of malicious actors poisoning cloud server security during the aggregation process, ensures that the performance of the fault analysis model trained locally is not weakened, and improves the accuracy of fault analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024141351_18122025_PF_FP_ABST
    Figure CN2024141351_18122025_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present invention are a model training method and apparatus based on federated learning, and a device and a storage medium. The method comprises: training a local model on the basis of power data, so as to generate a fault analysis model used for fault analysis of a power device; and uploading local model parameters to a cloud server, such that the cloud server aggregates the local model parameters, then updates a corresponding global model, and issues updated global model parameters to edge nodes, wherein when aggregating the local model parameters, the cloud server marks the edge node corresponding to an abnormal local model parameter as a suspected abnormal node, monitors the marked suspected abnormal node, and removes, when it is detected that the suspected abnormal node is abnormal, the local model parameters uploaded by the suspected abnormal node. By means of the present invention, it can be ensured that the performance of a fault analysis model obtained by training a local model is not degraded.
Need to check novelty before this filing date? Find Prior Art

Description

A model training method and device based on federated learning, equipment and storage medium TECHNICAL FIELD

[0001] The present application relates to the technical field of Internet of Things, and in particular to a model training method and device based on federated learning, equipment and storage medium. BACKGROUND

[0002] The power Internet of Things is an industrial-grade Internet of Things that applies a large number of advanced technologies including cloud computing, edge computing, artificial intelligence, etc. to the power field, is responsible for realizing the interconnection and sharing of data, and is an important component of building an intelligent power grid. Under the power Internet of Things environment, a federated learning system can be formed based on local models and global models of power data, which can effectively utilize dispersed data resources for power equipment fault prediction and analysis while protecting data privacy. The local model is responsible for preliminary data analysis and model training at the power equipment end, each participant can use its local power Internet of Things data to train a local model to generate a fault analysis model for power equipment fault analysis, and the global model shares knowledge among all participants to improve the overall fault analysis capability. This distributed learning method not only improves the efficiency of model training, but also enhances the adaptability and accuracy of the model when facing complex and variable power systems.

[0003] However, the federated learning system may have the problem of malicious participants poisoning the model without a target. This model poisoning without a target may weaken the performance of the local model and lead to a decrease in the performance of the fault analysis model trained by the local model and a decrease in model accuracy. The existing method mainly solves this problem by using a Byzantine robust aggregation algorithm, which usually uses median aggregation, pruning average aggregation, etc. These aggregation methods are more susceptible to model poisoning attacks. SUMMARY

[0004] The present application provides a model training method and device based on federated learning, equipment and storage medium to solve the technical problem of malicious poisoning of participants in the federated learning system, which leads to a decrease in the performance of the fault analysis model trained by the local model.

[0005] To solve the above technical problems, the present application provides a model training method based on federated learning, comprising:

[0006] Obtaining and storing the power data collected by the corresponding power equipment terminal;

[0007] Preprocessing the power data, and training the corresponding local model according to the preprocessed power data; wherein the preprocessing includes data cleaning, feature extraction and data standardization;

[0008] uploading the local model parameters obtained by training the local model to the cloud server, so that the cloud server aggregates the local model parameters, and then updates a corresponding global model according to the aggregated local model parameters, and broadcasts the global model parameters obtained by updating to each edge node;

[0009] The cloud server performs anomaly monitoring on the local model parameters of each edge node when aggregating the local model parameters, marks an edge node corresponding to an abnormal local model parameter as a suspected abnormal node, and monitors the marked suspected abnormal node.

[0010] As a preferred solution, the uploading of the local model parameters obtained by training the local model to the cloud server comprises:

[0011] establishing a secure connection with the data center of the cloud server;

[0012] After establishing a secure connection and passing the identity security verification of the cloud server, uploading the local model parameters obtained by training the local model to the cloud server; wherein the local model parameters include weight parameters and bias parameters of the local model.

[0013] As a preferred solution, the aggregation of the local model parameters and the updating of the corresponding global model according to the aggregated local model parameters comprise:

[0014] Discard two groups of local model parameters with the largest and smallest values in the received local model parameters, and mark the edge nodes corresponding to the discarded two groups of local model parameters as suspected abnormal nodes;

[0015] aggregate the local model parameters that have not been discarded, and then update the corresponding global model according to the aggregated local model parameters.

[0016] As a preferred solution, the broadcasting of the global model parameters obtained by updating to each edge node comprises:

[0017] establishing a secure connection with each edge node, and performing security verification on the identity of the connected edge node after establishing the secure connection;

[0018] broadcasting the global model parameters obtained by updating to the edge nodes whose identities pass the security verification, and monitoring the marked suspected abnormal nodes.

[0019] As a preferred solution, the monitoring of the marked suspected abnormal nodes comprises:

[0020] randomly generating a monitoring period for monitoring the suspected abnormal node;

[0021] In each of the monitoring periods, the abnormal behavior of the suspected abnormal node in the local model training process and the current state of the power equipment terminal corresponding to the suspected abnormal node are detected, wherein the current state includes the running state, performance index, log file, data quality and data integrity of the power equipment terminal.

[0022] When any of the following conditions is detected, it is determined that the suspected abnormal node is abnormal: slow local model training progress, network interruption, sudden performance decline, log analysis anomaly, data anomaly or data loss.

[0023] The suspected abnormal node that has occurred is repaired, and if it cannot be repaired, an alarm notification is generated, and the local model parameters uploaded by the suspected abnormal node that has occurred are refused to be aggregated.

[0024] As a preferred solution, it further comprises:

[0025] For the suspected abnormal node that has not occurred, the model convergence state of the suspected abnormal node in the local model training process is monitored.

[0026] If it is monitored that the model convergence state of the suspected abnormal node in the local model training process meets the preset model convergence condition, it is determined that the model convergence of the suspected abnormal node is abnormal, and then the aggregation weight of the suspected abnormal node is increased when the local model parameters of each edge node are aggregated.

[0027] As a preferred solution, it further comprises:

[0028] The model convergence state of the edge node that has not been marked as a suspected abnormal node in the local model training process is monitored, and if it is monitored that the model convergence state of the edge node in the local model training process meets the preset model convergence condition, it is determined that the model convergence of the edge node is abnormal, and then the aggregation weight of the edge node is increased when the local model parameters of each edge node are aggregated.

[0029] On the basis of the above embodiment, another embodiment of the application provides a model training device based on federated learning, comprising a data acquisition and storage module, a local model training module and a global model updating module.

[0030] The data acquisition and storage module is configured to acquire and store the power data collected by the corresponding power equipment terminal.

[0031] The local model training module is configured to preprocess the power data and train a corresponding local model according to the preprocessed power data; wherein the preprocessing includes data cleaning, feature extraction, and data standardization.

[0032] The global model updating module is configured to upload the local model parameters obtained by training the local model to a cloud server, so that the cloud server aggregates the local model parameters, then updates a corresponding global model according to the aggregated local model parameters, and broadcasts the global model parameters obtained by the updating to each edge node; wherein, when aggregating the local model parameters, the cloud server performs abnormality monitoring on the local model parameters of each edge node, marks an edge node corresponding to an abnormal local model parameter as a suspected abnormal node, and monitors the marked suspected abnormal node; when an abnormality of the suspected abnormal node is monitored, the local model parameters uploaded by the suspected abnormal node are excluded.

[0033] On the basis of the above-mentioned embodiments, a further embodiment of the application provides an electronic device, the device comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the model training method based on federated learning described in the above-mentioned embodiments of the application when executing the computer program.

[0034] On the basis of the above-mentioned embodiments, a further embodiment of the application provides a storage medium, the storage medium comprising a stored computer program, wherein the storage medium performs the model training method based on federated learning described in the above-mentioned embodiments of the application when the computer program runs.

[0035] Compared with the prior art, the embodiments of the application have the following beneficial effects:

[0036] The application provides a model training method based on federated learning, an edge node acquires power data collected by a corresponding power equipment terminal and stores the power data; the power data is preprocessed, and a local model corresponding to the preprocessed power data is trained to generate a fault analysis model for power equipment fault analysis; then, local model parameters of the local model are uploaded to a cloud server, so that the cloud server aggregates the local model parameters, then updates a global model according to the aggregated local model parameters, and broadcasts global model parameters obtained by updating to each edge node. Wherein, when the cloud server aggregates the local model parameters, the cloud server performs abnormal monitoring on the local model parameters of each edge node, marks an edge node corresponding to an abnormal local model parameter as a suspected abnormal node, and monitors the marked suspected abnormal node, and when the suspected abnormal node is found to be abnormal, the local model parameters uploaded by the suspected abnormal node are excluded.

[0037] In view of the problem that the federated learning system has malicious poisoning of participants, the application designs an abnormality exclusion detection mechanism, the cloud server marks an edge node corresponding to an abnormal local model parameter as a suspected abnormal node during aggregation of the local model parameters, and monitors the marked suspected abnormal node, thereby reducing the influence of malicious poisoning of participants in the cloud server security aggregation process, ensuring that the performance of the fault analysis model obtained by training the local model will not be weakened, and improving the accuracy of fault analysis of the power equipment by using the fault analysis model. BRIEF DESCRIPTION OF DRAWINGS

[0038] Fig. 1 is a flowchart of a model training method based on federated learning according to an embodiment of the application;

[0039] Fig. 2 is an architecture diagram of a power internet of things based on federated learning;

[0040] Fig. 3 is a diagram showing each link of data security transmission;

[0041] Fig. 4 is a structural diagram of a model training device based on federated learning according to an embodiment of the application. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical scheme and advantages of the application clearer, the technical scheme in the application will be described clearly and completely in the following with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are only part of the embodiments of the application, not all the embodiments. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the application.

[0043] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of this application; the use of the terms "including," "comprising," or "having" and variations thereof herein is intended to be broad and encompass the terms "consisting of" and "consisting essentially of" and variations thereof. Unless otherwise required by context, singular terms shall include pluralities and vice versa. Unless otherwise required by context, the use herein of the singular is also to be construed as a use of the plural and vice versa.

[0044] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "multiple" is more than two, unless otherwise explicitly and specifically limited.

[0045] Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearance of the phrase in various places in the specification is not necessarily all referring to the same embodiment, or to a particular embodiment, or to a particular set of embodiments. It will be explicitly understood by those of ordinary skill in the art that the embodiments described herein can be combined with other embodiments.

[0046] In the description of the embodiments of the present application, the term "and / or" is only a description of the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent the three cases of A alone, A and B together, and B alone. In addition, the character " / " in this paper generally represents that the front and rear associated objects are a "or" relationship.

[0047] In the description of the embodiments of the present application, the term "multiple" refers to more than two (including two), and similarly, "multiple groups" refers to more than two groups (including two groups), and "multiple pieces" refers to more than two pieces (including two pieces).

[0048] In the description of the embodiments of the present application, unless otherwise explicitly specified and limited, the technical terms "mounting", "connecting", "connecting", "fixing" and the like should be understood in a broad sense, for example, it can be fixedly connected, or it can be detachably connected, or it can be integrated; it can be mechanical connection, or it can be electrical connection; it can be directly connected, or it can be indirectly connected through an intermediate medium; it can be the internal communication of two elements or the interaction relationship between two elements. For those of ordinary skill in the art, the specific meaning of the above terms in the embodiments of the present application can be understood according to the specific circumstances.

[0049] Embodiment one

[0050] Please refer to Figure 1, a flowchart of a model training method based on federated learning is provided, including the following specific steps:

[0051] S1, the power data collected by the corresponding power equipment terminal is obtained and stored;

[0052] Specifically, please refer to Figures 2 and 3, which are respectively a power Internet of Things architecture based on federated learning and a display diagram of each link of data security transmission. The intelligent power equipment terminal transmits the collected power data to the edge node adjacent thereto, and the edge node receives and stores the power data uploaded by the power equipment terminal; wherein the edge node here refers to a device located at the edge of the network and participating in model training.

[0053] S2, the power data is preprocessed, and a fault analysis model for power equipment fault analysis is generated according to the preprocessed power data; wherein the preprocessing includes data cleaning, feature extraction and data standardization;

[0054] Specifically, the received power data is preprocessed by each edge node, including data cleaning, feature extraction, data standardization, and the preprocessed data is used for local model training to generate a fault analysis model for power equipment fault analysis.

[0055] S3, the local model parameters obtained by local model training are uploaded to the cloud server, so that the cloud server aggregates the local model parameters, and then updates the corresponding global model according to the aggregated local model parameters, and broadcasts the updated global model parameters to each edge node;

[0056] Wherein, when the cloud server aggregates the local model parameters, it monitors the local model parameters of each edge node, marks the edge node corresponding to the abnormal local model parameters as a suspected abnormal node, and monitors the marked suspected abnormal node. When the suspected abnormal node is found to be abnormal, the local model parameters uploaded by the suspected abnormal node are excluded.

[0057] Preferably, the local model parameters obtained by local model training are uploaded to the cloud server, including: establishing a secure connection with the data center of the cloud server; after establishing a secure connection and passing the identity security authentication of the cloud server, uploading the local model parameters obtained by local model training to the cloud server; wherein the local model parameters include: the weight parameters and bias parameters of the local model.

[0058] Specifically, each edge node uploads the local model parameters obtained by local model training to the cloud server, and the specific process is as follows:

[0059] (1) The data center of the cloud server establishes a secure connection with the corresponding edge node;

[0060] (2) After the connection is established, the identity of the connected edge node is verified;

[0061] (3) The local model training obtains the weight parameters and bias parameters of the model, both of which are numerical data, which are transmitted to the cloud server by the edge node, and the cloud server is responsible for receiving.

[0062] The application verifies the identity of the edge node, i.e. the participant, to ensure the reliability of the local model parameters from the source. At the same time, only the model parameters are uploaded to the cloud server instead of the local data, effectively preventing data leakage during the uploading process.

[0063] Preferably, the local model parameters are aggregated, and then the corresponding global model is updated according to the aggregated local model parameters, including: removing the two groups of local model parameters with the maximum and minimum values from the received local model parameters, and marking the edge nodes corresponding to the two groups of removed local model parameters as suspected abnormal nodes; the unremoved local model parameters are aggregated, and then the corresponding global model is updated according to the aggregated local model parameters.

[0064] Specifically, the cloud server securely aggregates the local model parameters uploaded by each edge node, and updates the corresponding global model according to the aggregated local model parameters, and the specific process is as follows:

[0065] (1) The cloud server judges all the local model parameters transmitted by the edge nodes received by the "scoring mechanism", and retains the effective parameters;

[0066] The execution process of the "scoring mechanism" is: in all the received node parameters, the two groups of parameters with the maximum and minimum values are removed, and the other groups of parameters are retained; the edge nodes to which the removed parameter data belong are marked with identity, and are marked as suspected abnormal.

[0067] (2) The cloud server securely aggregates the remaining effective parameters to calculate new global model parameters.

[0068] The application filters the local model parameters before the safe aggregation by performing a "scoring mechanism", which avoids the possible malicious participants to a greater extent, reduces the influence of the malicious data uploaded by the participants on the global model parameter update, and improves the security of the cloud server in the aggregation process. Moreover, on the basis of removing the suspected malicious data in the safe aggregation, the source of the excluded parameter data is marked, the real identity of the source can be effectively confirmed, and appropriate measures can be taken.

[0069] Preferably, the updated global model parameters are broadcasted and distributed to each edge node, including: establishing a secure connection with each edge node, and after establishing the secure connection, the identity of the connected edge node is securely verified; the updated global model parameters are broadcasted and distributed to the edge nodes whose identity is securely verified, and the marked suspected abnormal nodes are monitored.

[0070] Preferably, the monitoring of the marked suspected abnormal nodes includes: randomly generating a monitoring period for monitoring the suspected abnormal nodes; in each monitoring period, the abnormal behavior of the suspected abnormal nodes in the local model training process and the current state of the power equipment terminal corresponding to the suspected abnormal nodes are detected; wherein the current state includes: the running state, performance index, log file, data quality and data integrity of the power equipment terminal; when any of the following conditions is detected, it is determined that the suspected abnormal node is abnormal: slow local model training progress, network interruption, sudden performance decline, log analysis anomaly, data anomaly or data loss; the suspected abnormal node that occurs abnormality is repaired, if it cannot be repaired, the corresponding alarm notification is generated, and the local model parameters uploaded by the suspected abnormal node that occurs abnormality are refused to be aggregated.

[0071] Preferably, it further includes: for the suspected abnormal nodes that do not occur abnormality, the model convergence state of the suspected abnormal nodes in the local model training process is monitored; if it is monitored that the model convergence state of the suspected abnormal nodes in the local model training process meets the preset model convergence condition, it is determined that the model convergence of the suspected abnormal node is abnormal, and then when the local model parameters of each edge node are aggregated, the aggregation weight of the suspected abnormal node is increased.

[0072] Specifically, the cloud server broadcasts the updated global model parameters to each edge node, and the specific process is as follows:

[0073] (1) the data center of the cloud server establishes a secure connection with the corresponding edge node;

[0074] (2) after establishing the secure connection, the identity of the connected edge node is securely verified;

[0075] (3), the cloud server transmits the updated global model parameters to all edge nodes, and simultaneously performs local monitoring on the nodes with suspected abnormal identities.

[0076] The application realizes the identification of malicious participants by performing local model training monitoring on participants with suspected abnormal identities.

[0077] When the cloud server performs local monitoring on the nodes with suspected abnormal identities, the specific process is as follows:

[0078] (1), the cloud server randomly generates a monitoring period for local monitoring of suspected abnormal edge nodes;

[0079] (2), during the monitoring period, the cloud server detects the abnormal behavior of the nodes in the local model training process by setting a monitoring program to regularly check the running state, performance index, log file and data quality and integrity of the local device, and if there are phenomena such as slow training progress, network interruption, sudden performance decline, log analysis abnormality, data abnormality or loss, the node is subjected to abnormal processing, i.e. the cloud server attempts to solve the problem through remote diagnosis and repair tools, if the cloud server cannot solve the problem, the cloud server sends an alarm notification to the relevant personnel, if it is still temporarily unable to solve, the node is temporarily refused to upload the model parameters to the cloud server for security aggregation;

[0080] (3), if there is no abnormal behavior, the node is subjected to a "compensation mechanism" in the iteration after the monitoring ends.

[0081] The execution process of the "compensation mechanism" is: if the model convergence of the node in the local training process is not good, the weight of the node in the parameter data security aggregation is increased by the cloud server to improve the convergence effect of the node; if the model convergence is good, the "compensation mechanism" does not need to be executed.

[0082] The application generates a random period as a monitoring period, which to some extent avoids the temporary deception of malicious participants caused by fixed monitoring periods, improves the detection accuracy of malicious participants, and reduces the model poisoning risk of malicious participants. The participants with no abnormality but poor convergence effect after local monitoring are compensated, which effectively reduces the influence of excessive response to model poisoning of malicious participants on the model training of normal participants.

[0083] Preferably, the method further comprises: monitoring the model convergence state of the edge node in the local model training process, if the model convergence state of the edge node in the local model training process meets the preset model convergence condition, it is determined that the model convergence of the edge node is abnormal, and when the local model parameters of each edge node are aggregated, the aggregation weight of the edge node is increased.

[0084] Specifically, the application further comprises:

[0085] S4, iteratively performing the above process, and the cloud server dynamically adjusts to ensure the convergence effect of the loss function according to the global model training, until the model completely converges, and the specific process is as follows:

[0086] (1) if the convergence effect of the edge node without abnormal state is poor for consecutive times, the weight of the model parameters of the node in the secure aggregation is increased by the cloud server;

[0087] (2) if the model convergence effect of the node cannot be improved after the weight adjustment, the local model architecture is adjusted by adjusting the activation function, the hyperparameter, and using a more complex network to realize self-adjustment.

[0088] The application effectively reduces the influence of the poor convergence effect of the local model on the update of the global model parameters, and improves the convergence speed of the global model by dynamically adjusting in multiple iterations.

[0089] Therefore, the application provides a model training method based on federated learning, which is designed to solve the problem of malicious poisoning of participants in the federated learning system. The cloud server marks the edge node corresponding to the abnormal local model parameters as a suspected abnormal node during the aggregation of the local model parameters, and monitors the marked suspected abnormal node, thereby reducing the influence of the malicious participants on the cloud server during the secure aggregation process, ensuring that the performance of the fault analysis model obtained by the local model training is not weakened, and ensuring the accuracy of the fault analysis of the power equipment by the fault analysis model.

[0090] Embodiment two

[0091] Please refer to Fig. 4, which is a structural schematic diagram of a model training device based on federated learning provided by an embodiment of the application. The device comprises a data acquisition and storage module, a local model training module, and a global model updating module.

[0092] The data acquisition and storage module is used for acquiring and storing the power data collected by the corresponding power equipment terminal.

[0093] The local model training module is configured to preprocess the power data and train a corresponding local model according to the preprocessed power data; wherein the preprocessing comprises data cleaning, feature extraction, and data standardization.

[0094] The global model updating module is configured to upload the local model parameters obtained by training the local model to a cloud server, so that the cloud server aggregates the local model parameters, then updates a corresponding global model according to the aggregated local model parameters, and broadcasts the global model parameters obtained by the updating to each edge node; wherein, when aggregating the local model parameters, the cloud server performs abnormal monitoring on the local model parameters of each edge node, marks an edge node corresponding to an abnormal local model parameter as a suspected abnormal node, and monitors the marked suspected abnormal node; when an abnormality of the suspected abnormal node is monitored, the local model parameters uploaded by the suspected abnormal node are excluded.

[0095] It should be noted that the apparatus embodiments described above are only schematic and that the units described as separate components can or can not be physically separate and can or can not be physical units, that is, can be located in one place or distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the present embodiment. In addition, the connection relationship between the modules in the apparatus embodiments provided by the present application indicates that there is a communication connection between them, which can be implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement it without creative labor.

[0096] The skilled in the art can clearly understand that, for the convenience and brevity, the specific working process of the apparatus described above can refer to the corresponding process in the foregoing method embodiments, which will not be described here.

[0097] Embodiment three

[0098] Correspondingly, the embodiment of the present application provides an electronic device, the device includes a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, when the processor executes the computer program, the method for training a model based on federated learning described in the above embodiment of the application is realized.

[0099] The electronic device can be a desktop computer, a notebook computer, a palm computer, a cloud server and other computing devices. The device can include but is not limited to a processor, a memory.

[0100] The processor can be a central processing unit (CPU), and can also be other general-purpose processors, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The processor is a control center of the device, and connects various parts of the device through various interfaces and lines.

[0101] Embodiment four

[0102] Correspondingly, an embodiment of the present application provides a storage medium including a stored computer program, wherein the computer program controls a device where the storage medium is located to perform the model training method based on federated learning described in the above-mentioned embodiments of the present application when the computer program is running.

[0103] The memory can be used to store the computer program, and the processor realizes various functions of the device by running or executing the computer program stored in the memory and calling data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required by a function, etc.; and the data storage area can store data created according to the use of the mobile phone, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, for example, a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one disk storage device, a flash memory device, or other volatile solid-state memory device.

[0104] The storage medium is a computer readable storage medium, and the computer program is stored in the computer readable storage medium. When the computer program is executed by a processor, steps of each method embodiment described above can be implemented. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or some intermediate forms, etc. The computer readable medium can include any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content included in the computer readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.

[0105] The above is the preferred embodiment of the present application. It should be noted that for those skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, which are also considered within the scope of protection of the present application.

Claims

1. A model training method based on federated learning, characterized in that, The method comprises: acquiring and storing power data collected by power equipment terminals; preprocessing the power data, and training a local model according to the preprocessed power data to generate a fault analysis model for power equipment fault analysis; wherein the preprocessing comprises data cleaning, feature extraction and data standardization; uploading local model parameters obtained by training the local model to a cloud server, so that the cloud server aggregates the local model parameters, then updates a corresponding global model according to the aggregated local model parameters, and broadcasts global model parameters obtained by the update to each edge node; wherein, when aggregating the local model parameters, the cloud server monitors the local model parameters of each edge node for abnormalities, marks an edge node corresponding to an abnormal local model parameter as a suspected abnormal node, and monitors the marked suspected abnormal node; when an abnormality of the suspected abnormal node is monitored, the local model parameters uploaded by the suspected abnormal node are excluded. 2.The federated learning based model training method of claim 1, wherein, The uploading of the local model parameters obtained by training the local model to the cloud server comprises: establishing a secure connection with a data center of the cloud server; after establishing the secure connection and passing the identity security verification of the cloud server, uploading the local model parameters obtained by training the local model to the cloud server; wherein the local model parameters include weight parameters and bias parameters of the local model. 3.The federated learning based model training method of claim 1, wherein, The aggregation of the local model parameters and the update of the corresponding global model according to the aggregated local model parameters comprise: excluding two groups of local model parameters with the maximum and minimum values from the received local model parameters, and marking the edge nodes corresponding to the two groups of excluded local model parameters as suspected abnormal nodes; aggregating the local model parameters that are not excluded, and then updating the corresponding global model according to the aggregated local model parameters. 4.The federated learning based model training method of claim 3, wherein, The broadcasting of the global model parameters obtained by the update to each edge node comprises: establishing a secure connection with each edge node, and after establishing the secure connection, performing security verification on the identity of the connected edge node; broadcasting the global model parameters obtained by the update to the edge nodes whose identities pass the security verification, and monitoring the marked suspected abnormal nodes. 5.The federated learning based model training method of claim 4, wherein, The monitoring of the marked suspected abnormal nodes comprises: randomly generating a monitoring period for monitoring the suspected abnormal nodes; in each monitoring period, detecting the abnormal behavior of the suspected abnormal nodes in the local model training process and the current state of the power equipment terminal corresponding to the suspected abnormal nodes; wherein the current state includes the running state, performance indicators, log files, data quality and data integrity of the power equipment terminal; when any of the following conditions is detected, it is determined that the suspected abnormal node is abnormal: slow local model training progress, network interruption, sudden performance degradation, log analysis anomaly, data anomaly or data loss; An abnormality repair is performed on the suspected abnormal node that has an abnormality, and if the abnormality cannot be repaired, a corresponding alarm notification is generated, and the local model parameters uploaded by the suspected abnormal node that has an abnormality are rejected from being aggregated.

6. The federated learning based model training method of claim 5, wherein, Further comprising: For the suspected abnormal node that does not have an abnormality, the model convergence state of the suspected abnormal node in the local model training process is monitored; If it is monitored that the model convergence state of the suspected abnormal node in the local model training process meets the preset model convergence condition, it is determined that the model convergence of the suspected abnormal node is abnormal, and then when the local model parameters of each edge node are aggregated, the aggregation weight of the suspected abnormal node is increased.

7. The federated learning based model training method of claim 4, wherein, Further comprising: The model convergence state of the edge node that is not marked as a suspected abnormal node in the local model training process is monitored, and if it is monitored that the model convergence state of the edge node in the local model training process meets the preset model convergence condition, it is determined that the model convergence of the edge node is abnormal, and then when the local model parameters of each edge node are aggregated, the aggregation weight of the edge node is increased.

8. A model training apparatus based on federated learning, characterized by, Comprising: a data acquisition and storage module, a local model training module, and a global model updating module; The data acquisition and storage module is configured to acquire and store power data collected by corresponding power equipment terminals; The local model training module is configured to preprocess the power data, and train a corresponding local model according to the preprocessed power data; wherein the preprocessing includes data cleaning, feature extraction, and data standardization; The global model updating module is configured to upload local model parameters obtained by training a local model to a cloud server, so that the cloud server aggregates the local model parameters, and then updates a corresponding global model according to the aggregated local model parameters, and broadcasts the updated global model parameters to each edge node; wherein the cloud server performs abnormal monitoring on the local model parameters of each edge node when aggregating the local model parameters, marks the edge node corresponding to the abnormal local model parameters as a suspected abnormal node, and monitors the marked suspected abnormal node, and when it is monitored that the suspected abnormal node has an abnormality, the local model parameters uploaded by the suspected abnormal node are rejected.

9. An electronic device, comprising: The storage medium comprises a stored computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to perform the federated learning-based model training method according to any one of claims 1 to 7.

10. A storage medium, characterized by The storage medium comprises a stored computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to perform the federated learning-based model training method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Federated learning poisoning detection method based on neuron distribution characteristics

    CN112365005A

  • Manufacturing industry equipment fault monitoring model training method based on federated learning

    CN114330741A

  • Federal learning defense method and device, computer equipment and storage medium

    CN116432781A

  • Federal learning-based model training method, apparatus and device, and storage medium

    CN118551831A

  • Federated learning method and system, electronic device, and storage medium

    US20230083116A1

Cited By

  • Fire-fighting internet-of-things secure transmission method, device, equipment and medium

    CN121509506A

  • A fire-fighting Internet of Things safety transmission method, device, equipment and medium

    CN121509506B

  • Foundation pit prediction model training method and foundation pit monitoring method and system

    CN121615722A

  • Distributed intrusion detection method and system based on flexible, secure and trusted federal learning

    CN122293441A