Federal modeling method and device based on node behavior analysis, equipment and medium

CN117829272BActive Publication Date: 2026-08-21SHANDONG INSPUR SCI RES INST CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410021228.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-04
Publication Date
2026-08-21
Estimated Expiration
2044-01-04

AI Technical Summary

Technical Problem

[0003]然而,在实际应用中,随着网络攻击不断演进,联邦建模过程中无法保证参与节点的可信性

Benefits of technology

[0040] As can be seen, in this application, task initialization is performed according to preset federated modeling task initialization rules to obtain the corresponding current global model, current malicious node identification model, target participating nodes, and target base models corresponding to each target participating node. Each target participating node trains based on its local target base model and current global model, and after the current round of federated modeling training is completed, the corresponding local aggregation gradient is uploaded to the target aggregation node. The target aggregation node identifies malicious nodes based on its local current malicious node identification model and the received local aggregation gradients, and uses the current aggregation strategy obtained based on the identification results to update and distribute the current global model until the preset task termination condition is met. In other words, in this application, task initialization is performed first, then each target participating node, obtained through initialization, trains based on its local target base model and current global model. Then, the target aggregation node identifies malicious nodes based on its local current malicious node identification model and the received local aggregation gradients from each target participating node, and determines the current aggregation strategy based on the identification results. This effectively enables the proactive identification and processing of malicious nodes, ensuring the security and reliability of federated modeling, and effectively improving the training speed of federated modeling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117829272B_ABST
    Figure CN117829272B_ABST
Patent Text Reader

Abstract

The application discloses a federal modeling method and device based on node behavior analysis, equipment and medium, relates to the technical field of federal learning and deep learning, including: performing task initialization according to a preset federal modeling task initialization rule, obtaining a current global model, a current malicious node identification model, target participating nodes and target base models of each target participating node; each target participating node trains based on the local target base model and the current global model, and uploads the corresponding local aggregation gradient obtained after the completion of the current round of federal modeling training to the target aggregation node; the target aggregation node identifies malicious nodes based on the local current malicious node identification model and the received local aggregation gradient, so as to update and distribute the current global model by using the current aggregation strategy obtained based on the identification result until the preset task termination condition is met. In this way, the safety and reliability of federal modeling can be effectively guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of federated modeling and deep learning technology, and in particular to federated modeling methods, apparatus, devices and media based on node behavior analysis. Background Technology

[0002] In today's digital age, the widespread application of data brings with it a series of significant challenges, including data privacy, model security, and data compliance. Especially in scenarios involving multi-party data collaboration, data privacy and security have become increasingly crucial. Against this backdrop, federated learning, as an emerging collaborative machine learning approach, has garnered significant attention. Federated learning allows multiple data owners or nodes to collaboratively build machine learning models without sharing the original data, providing strong support for protecting data privacy and security.

[0003] However, in practical applications, with the continuous evolution of cyberattacks, the trustworthiness of participating nodes cannot be guaranteed during federated modeling. Malicious nodes may attempt to disrupt the entire federated learning process by uploading false data, interfering with model updates, or engaging in other malicious behaviors. Especially when malicious nodes form a large-scale botnet, the security and reliability of federated learning are severely threatened. Therefore, how to effectively combine the actual needs of federated modeling scenarios to achieve secure federated modeling in untrusted environments has become an urgent problem to be solved. Summary of the Invention

[0004] In view of this, the purpose of this invention is to provide a federated modeling method, apparatus, device, and medium based on node behavior analysis, which can effectively achieve proactive identification and processing of malicious nodes, ensure the security and reliability of federated modeling, and effectively improve the training speed of federated modeling. The specific solution is as follows:

[0005] Firstly, this application provides a secure federated modeling method based on node behavior analysis, including:

[0006] Task initialization is performed according to the preset federated modeling task initialization rules to obtain the corresponding current global model, current malicious node identification model, target participating nodes, and target basic model corresponding to each target participating node;

[0007] Each target participating node trains its local target base model and the current global model, and after the current round of federated modeling training is completed, the corresponding local aggregated gradient is uploaded to the target aggregation node.

[0008] The target aggregation node identifies malicious nodes based on its local current malicious node identification model and the received local aggregation gradients. The current global model is then updated and distributed using the current aggregation strategy obtained based on the identification results, until the preset task termination condition is met.

[0009] Optionally, the step of performing task initialization according to preset federated modeling task initialization rules includes:

[0010] Obtain the corresponding task description information and task requirements from the preset task initiator to obtain the corresponding federated modeling task information;

[0011] The federated modeling task information is published to each participating node that needs to be confirmed based on a preset task publishing platform or preset task publishing channel.

[0012] After receiving the federated modeling task information through each of the nodes to be confirmed as participants, it is determined whether to participate in the task based on the corresponding node information, so as to identify the corresponding target participating node;

[0013] Obtain the corresponding initial basic model architecture from the preset task initiator;

[0014] By using the target participating nodes and their corresponding local dataset information and local model information, and based on the initial basic model architecture, a model design is performed to obtain the corresponding basic model and extended model.

[0015] Each of the target participating nodes trains the base model based on local data to obtain a target base model corresponding to each of the target participating nodes;

[0016] The network architecture of the expansion model and the historical malicious node behavior data of the target are used for training to obtain the corresponding current malicious node identification model.

[0017] The corresponding current global model is obtained by initializing the expansion model, and the global model and the corresponding hyperparameter information are sent to each of the target participating nodes.

[0018] Optionally, the step of training each target participating node based on its local target base model and the current global model, and uploading the corresponding local aggregated gradient to the target aggregation node after the completion of this round of federated modeling training, includes:

[0019] Each target participating node performs a local gradient aggregation operation based on its local target base model, the current global model, and the corresponding target training data to complete the corresponding training.

[0020] After this round of federated modeling training is completed, the corresponding local aggregated gradients obtained by each target participating node are uploaded to the target aggregated node.

[0021] Optionally, updating and distributing the current global model using the current aggregation strategy obtained based on the recognition results includes:

[0022] If the identification result indicates that a corresponding malicious target node exists, then the reverse gradient is calculated by calculating the existing contribution gradient of the malicious target node to obtain the reverse gradient information.

[0023] Based on the inverse gradient information and each of the local aggregation gradients, the corresponding current aggregation strategy is obtained.

[0024] By aggregating parameters using the current aggregation strategy, the parameters of the current global model are updated to obtain a new current global model.

[0025] The new current global model is distributed to each of the target participating nodes so that each target participating node can update its model and perform the next round of federated modeling training based on the new current global model.

[0026] Optional, also includes:

[0027] During the process of distributing the current global model to each of the target participating nodes, the current malicious node identification model is sent to the target malicious node in order to collect data based on the current malicious node identification model.

[0028] Optional, also includes:

[0029] When the preset task termination conditions are met, a target global model is determined so that each target participating node can fuse the target global model with its own local model.

[0030] Optional, also includes:

[0031] In the process of performing the current federated modeling task, feedback data is collected to perform corresponding target participation node addition operations in order to achieve model optimization.

[0032] Secondly, this application provides a secure federated modeling apparatus based on node behavior analysis, comprising:

[0033] The task initialization module is used to perform task initialization according to the preset federated modeling task initialization rules to obtain the corresponding current global model, current malicious node identification model, target participating nodes, and target basic models corresponding to each target participating node;

[0034] The first task execution module is used to train each of the target participating nodes based on the local target base model and the current global model, and upload the corresponding local aggregated gradient to the target aggregation node after the completion of this round of federated modeling training.

[0035] The second task execution module is used to identify malicious nodes based on the local current malicious node identification model and the received local aggregation gradients through the target aggregation node, so as to update and distribute the current global model using the current aggregation strategy obtained based on the identification results, until the preset task termination condition is met.

[0036] Thirdly, this application provides an electronic device, comprising:

[0037] Memory, used to store computer programs;

[0038] A processor is used to execute the computer program to implement the steps of the aforementioned secure federated modeling method based on node behavior analysis.

[0039] Fourthly, this application provides a computer-readable storage medium for storing a computer program that, when executed by a processor, implements the steps of the aforementioned secure federated modeling method based on node behavior analysis.

[0040] As can be seen, in this application, task initialization is performed according to preset federated modeling task initialization rules to obtain the corresponding current global model, current malicious node identification model, target participating nodes, and target base models corresponding to each target participating node. Each target participating node trains based on its local target base model and current global model, and after the current round of federated modeling training is completed, the corresponding local aggregation gradient is uploaded to the target aggregation node. The target aggregation node identifies malicious nodes based on its local current malicious node identification model and the received local aggregation gradients, and uses the current aggregation strategy obtained based on the identification results to update and distribute the current global model until the preset task termination condition is met. In other words, in this application, task initialization is performed first, then each target participating node, obtained through initialization, trains based on its local target base model and current global model. Then, the target aggregation node identifies malicious nodes based on its local current malicious node identification model and the received local aggregation gradients from each target participating node, and determines the current aggregation strategy based on the identification results. This effectively enables the proactive identification and processing of malicious nodes, ensuring the security and reliability of federated modeling, and effectively improving the training speed of federated modeling. Attached Figure Description

[0041] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0042] Figure 1 A flowchart of a federated modeling method based on node behavior analysis provided for this application;

[0043] Figure 2 A schematic diagram of the composition of a federated modeling node is provided for this application;

[0044] Figure 3 A flowchart illustrating a specific federated modeling method based on node behavior analysis provided in this application;

[0045] Figure 4 A schematic diagram of the device structure for a federated modeling method based on node behavior analysis provided in this application;

[0046] Figure 5 This application provides a structural diagram of an electronic device. Detailed Implementation

[0047] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0048] However, in practical applications, with the continuous evolution of cyberattacks, the trustworthiness of participating nodes cannot be guaranteed during federated modeling. Malicious nodes may attempt to disrupt the entire federated learning process by uploading false data, interfering with model updates, or engaging in other malicious behaviors. Especially when malicious nodes form a large-scale botnet, the security and reliability of federated learning are severely threatened. Therefore, how to effectively combine the actual needs of federated modeling scenarios to achieve secure federated modeling in untrusted environments has become an urgent problem to be solved.

[0049] To this end, this application provides a federated modeling scheme based on node behavior analysis, which can effectively realize the proactive identification and processing of malicious nodes, ensure the security and reliability of federated modeling, and effectively improve the training speed of federated modeling.

[0050] See Figure 1 As shown in the figure, this invention discloses a federated modeling method based on node behavior analysis, including:

[0051] Step S11: Perform task initialization according to the preset federated modeling task initialization rules to obtain the corresponding current global model, current malicious node identification model, target participating nodes, and target basic models corresponding to each target participating node.

[0052] Specifically, in this embodiment, considering that nodes participating in federated modeling often have local personalized models, it is also necessary to fully protect the security of their local data and models to prevent data leakage or model attacks. Therefore, during the task initialization process according to the preset federated modeling task initialization rules, the corresponding task description information and task requirements are first obtained from the preset task initiator to obtain the corresponding federated modeling task information, including model objectives and input / output descriptions, model architecture, framework used, training data, hyperparameters, etc., and sample data is provided. Then, the federated modeling task information is published to each node awaiting confirmation of participation based on the preset task publishing platform or preset task publishing channel. After receiving the federated modeling task information, each node awaiting confirmation of participation determines whether to participate in the task based on the corresponding node information to determine the corresponding target participating node. That is, each node awaiting confirmation of participation will decide whether to participate in the task based on the task description and requirements, and comprehensively consider the data, computing resources, participation rewards, or other factors possessed by the node to determine that the participating node will become the executor of the task. Then, the corresponding initial basic model architecture is obtained from the preset task initiator. Based on the initial basic model architecture, model design is performed using the information of each target participating node and its corresponding local dataset and local model, to obtain the final basic model confirmed by the preset task initiator. Once the basic model is negotiated and determined, an expansion model is designed. This expansion model typically includes the capabilities of the basic model, possessing higher capacity and expressive power to ensure stronger versatility across different local data. Each target participating node then prepares training data and corresponding computing and storage resources according to the task requirements. Subsequently, each target participating node trains the basic model based on its local data to form a personalized local model, thus obtaining the target basic model corresponding to each target participating node. Then, training is performed based on the network architecture of the expansion model and the target's historical malicious node behavior data to obtain the corresponding current malicious node identification model. Finally, the corresponding current global model is obtained by initializing the expansion model, and the global model and its corresponding hyperparameter information are sent to each target participating node. The federated modeling task obtained after initialization involves multiple parties jointly training and generating the model in a trustless environment, typically with participating nodes and aggregation nodes jointly performing the modeling.

[0053] In this way, combined Figure 2As shown, this embodiment, based on the actual needs of multi-party federated modeling tasks in a trustless environment, actively draws on the concept of honeypot technology. By designing a base model and an extended model, the function of a honeypot is simulated, enticing malicious nodes to exhibit their attack behavior. This helps in the subsequent discovery of unreasonable model parameter changes, monitoring and identifying potential malicious nodes, thereby significantly mitigating the threat to federated learning. Furthermore, by applying the base model as a local model, each participating node trains its own personalized model locally or directly utilizes the user's existing model to obtain the corresponding target base model. On the one hand, this can be used to evaluate the quality or credibility of the data possessed by the nodes, determine the value of the participating node's data, and help to better select nodes when building collaborative models. On the other hand, it helps to better utilize existing local models and accelerate the training speed of federated modeling. In addition, to better combine the contributions of each target participating node and identify malicious nodes, this embodiment introduces an extended model as a common model for the aggregation of federated modeling parameters. The extended model includes the capabilities of the base model, has higher capacity and expressive power, ensuring stronger universality on different local data, while achieving isolation between the local model and the common model, reducing the risk of data leakage, and improving the capabilities of the local model.

[0054] Step S12: Each target participating node trains its local target base model and the current global model, and after the completion of this round of federated modeling training, uploads the corresponding local aggregated gradient to the target aggregated node.

[0055] Specifically, in this embodiment, combined with Figure 2 As shown, the step of training each target participating node based on its local target base model and the current global model, and then uploading the corresponding local aggregated gradient to the target aggregation node after the completion of this round of federated modeling training, includes: each target participating node performing a corresponding local gradient aggregation operation based on its local target base model, the current global model, and the corresponding target training data to complete the training; and after the completion of this round of federated modeling training, each target participating node uploading the corresponding local aggregated gradient to the target aggregation node. It can be understood that each target participating node calculates the gradients of the target base model and the current global model based on the local training data, merges the gradients, and generates the local aggregated gradient for this round of federated modeling training using the parameters of the current global model as the standard. Then, each target participating node uploads the local aggregated gradient to the target aggregation node to update the parameters of the current global model.

[0056] Step S13: The target aggregation node identifies malicious nodes based on the local current malicious node identification model and the received local aggregation gradients, and uses the current aggregation strategy obtained based on the identification results to update and distribute the current global model until the preset task termination condition is met.

[0057] Specifically, in this embodiment, combined with Figure 2 As shown, the target aggregation node receives the local aggregation gradients from each of the target participating nodes. During this process, the target aggregation node uses its current malicious behavior identification model to monitor the gradient data uploaded by each participating node and identify potential malicious behaviors in real time. Furthermore, when a new malicious node is identified, for that new malicious node, its existing contribution gradients are calculated to obtain the corresponding reverse gradient, and combined with the uploaded gradient data, the current aggregation strategy is confirmed, including the selected aggregation node, weight parameters, etc.

[0058] Understandably, during parameter aggregation, gradient information from each participating target node is integrated, and parameter gradient aggregation is performed according to the current aggregation strategy to update the parameters of the global model. Afterward, the updated global model is distributed to each participating target node. If a malicious node has been identified, the aggregation node will send the current malicious behavior recognition model to proactively collect the malicious node's behavior data, thereby improving the malicious behavior recognition capability in real time. The entire process typically involves multiple iterations to ensure continuous optimization and updating of the current global model. Each iteration is executed during local model training, gradient uploading, parameter aggregation, and global model updates. Once the current federated modeling task reaches the set termination conditions, the task ends, and the current global model retains its final parameter state as the final application model.

[0059] Furthermore, this embodiment also includes: during the execution of the current federated modeling task, performing corresponding target participant node addition operations by collecting feedback data to achieve model optimization. It also includes: when a preset task termination condition is met, determining a target global model so that each target participant node can fuse it with its own local model based on the target global model.

[0060] In this way, this embodiment provides a safe and efficient solution for federated modeling in untrusted environments, which has high practical value and broad application prospects.

[0061] Therefore, in this embodiment, task initialization is performed according to preset federated modeling task initialization rules to obtain the corresponding current global model, current malicious node identification model, target participating nodes, and target base models corresponding to each target participating node. Each target participating node trains based on its local target base model and current global model, and after the current round of federated modeling training is completed, the corresponding local aggregation gradient is uploaded to the target aggregation node. The target aggregation node identifies malicious nodes based on its local current malicious node identification model and the received local aggregation gradients, and updates and distributes the current global model using the current aggregation strategy obtained based on the identification results, until the preset task termination condition is met. In other words, in this application, task initialization is performed first, then each target participating node is trained based on its local target base model and current global model, and then the target aggregation node identifies malicious nodes based on its local current malicious node identification model and the received local aggregation gradients sent by each target participating node, and determines the current aggregation strategy based on the identification results. This effectively enables the proactive identification and processing of malicious nodes, ensuring the security and reliability of federated modeling, and effectively improving the training speed of federated modeling.

[0062] See Figure 3 As shown in the figure, this invention discloses a federated modeling method based on node behavior analysis, including:

[0063] Step S21: If the identification result indicates that there is a corresponding malicious target node, then the back gradient is calculated by calculating the existing contribution gradient of the malicious target node to obtain the back gradient information.

[0064] Step S22: Obtain the corresponding current aggregation strategy based on the back gradient information and each local aggregation gradient.

[0065] Step S23: By using the current aggregation strategy to aggregate parameters, the parameters of the current global model are updated to obtain a new current global model.

[0066] Step S24: Distribute the new current global model to each target participating node so that each target participating node can update the model and perform the next round of federated modeling training based on the new current global model.

[0067] The specific processes of steps S21 to S24 can be found in the relevant content disclosed in the foregoing embodiments, and will not be repeated here.

[0068] Therefore, in this embodiment, a malicious behavior recognition network model is employed on the target aggregation node to identify potential malicious nodes. Once a malicious node is identified, the induction model, i.e., the current malicious node behavior recognition model, is sent in a targeted manner to actively collect a large amount of malicious node behavior data in real time. This enhances the identification and modeling of malicious nodes and helps to better protect the security of the entire modeling process. Furthermore, regarding the handling of malicious nodes, the backpropagation gradient of the malicious node is calculated and added to the parameter aggregation process, thereby mitigating the impact of malicious nodes on the global model and ensuring the security and reliability of federated modeling.

[0069] See Figure 4 As shown in the embodiments, this application also discloses a federated modeling apparatus based on node behavior analysis, including:

[0070] The task initialization module 11 is used to perform task initialization according to the preset federated modeling task initialization rules to obtain the corresponding current global model, current malicious node identification model, target participating nodes, and target basic models corresponding to each target participating node.

[0071] The first task execution module 12 is used to train each of the target participating nodes based on the local target base model and the current global model, and upload the corresponding local aggregated gradient obtained after the current round of federated modeling training to the target aggregated node.

[0072] The second task execution module 13 is used to identify malicious nodes based on the local current malicious node identification model and the received local aggregation gradients through the target aggregation node, so as to update and distribute the current global model using the current aggregation strategy obtained based on the identification results, until the preset task termination condition is met.

[0073] For more detailed information on the working process of each of the above modules, please refer to the relevant content disclosed in the foregoing embodiments, which will not be repeated here.

[0074] Therefore, in this application, task initialization is performed according to preset federated modeling task initialization rules to obtain the corresponding current global model, current malicious node identification model, target participating nodes, and target base models corresponding to each target participating node. Each target participating node trains based on its local target base model and current global model, and after the current round of federated modeling training is completed, the corresponding local aggregation gradient is uploaded to the target aggregation node. The target aggregation node identifies malicious nodes based on its local current malicious node identification model and the received local aggregation gradients, and uses the current aggregation strategy obtained based on the identification results to update and distribute the current global model until the preset task termination condition is met. In other words, in this application, task initialization is performed first, then each target participating node obtained after initialization trains based on its local target base model and current global model. Then, the target aggregation node identifies malicious nodes based on its local current malicious node identification model and the received local aggregation gradients sent by each target participating node, and determines the current aggregation strategy based on the identification results. This effectively enables the proactive identification and processing of malicious nodes, ensuring the security and reliability of federated modeling, and effectively improving the training speed of federated modeling.

[0075] In some specific embodiments, the task initialization module 11 may specifically include:

[0076] The information acquisition unit is used to obtain relevant task description information and task requirements from the preset task initiator in order to obtain the corresponding federated modeling task information.

[0077] The information publishing unit is used to publish the federated modeling task information to each participating node to be confirmed based on a preset task publishing platform or preset task publishing channel.

[0078] The participating node determination unit is used to determine whether to participate in the task based on the corresponding node information after receiving the federated modeling task information through each of the participating nodes to be confirmed, so as to determine the corresponding target participating node.

[0079] An initial basic model architecture acquisition unit is used to acquire the corresponding initial basic model architecture from the preset task initiator.

[0080] The model design unit is used to design a model based on the initial basic model architecture by using the target participating nodes and their corresponding local dataset information and local model information, so as to obtain the corresponding basic model and extended model.

[0081] The target basic model acquisition unit is used to train the basic model based on local data by each of the target participating nodes to obtain the target basic model corresponding to each of the target participating nodes.

[0082] The malicious node identification unit is used to train the model based on the network architecture of the expansion model and the target historical malicious node behavior data to obtain the corresponding current malicious node identification model.

[0083] The model sending unit is used to obtain the corresponding current global model by initializing the extended model, and to send the global model and the corresponding hyperparameter information to each of the target participating nodes.

[0084] In some specific embodiments, the first task execution module 12 may specifically include:

[0085] The federated training unit is used to perform corresponding local gradient aggregation operations by each of the target participating nodes based on the local target base model, the current global model and the corresponding target training data to complete the corresponding training.

[0086] The aggregated gradient upload unit is used to upload the corresponding local aggregated gradients obtained by each target participating node to the target aggregate node after the current round of federated modeling training is completed.

[0087] In some specific embodiments, the second task execution module 13 may specifically include:

[0088] The reverse gradient information acquisition unit is used to calculate the reverse gradient by calculating the existing contribution gradient of the target malicious node if the identification result shows that there is a corresponding target malicious node.

[0089] An aggregation strategy acquisition unit is used to obtain the corresponding current aggregation strategy based on the back gradient information and each of the local aggregation gradients.

[0090] The global model update unit is used to update the parameters of the current global model by aggregating parameters using the current aggregation strategy, so as to obtain a new current global model.

[0091] A global model distribution unit is used to distribute the new current global model to each of the target participating nodes, so that each target participating node can update its model and perform the next round of federated modeling training based on the new current global model.

[0092] In some specific embodiments, the federated modeling apparatus based on node behavior analysis may further include:

[0093] The malicious node identification model targeted transmission unit is used to, during the process of distributing the current global model to each of the target participating nodes, target the malicious node identification model by sending the current malicious node identification model to the target malicious node, so as to collect data based on the current malicious node identification model.

[0094] In some specific embodiments, the federated modeling apparatus based on node behavior analysis may further include:

[0095] The model fusion unit is used to determine the target global model when the preset task termination condition is met, so that each target participating node can fuse the target global model with its own local model.

[0096] In some specific embodiments, the federated modeling apparatus based on node behavior analysis may further include:

[0097] The model optimization unit is used to perform corresponding target participation node addition operations by collecting feedback data during the execution of the current federated modeling task, so as to achieve model optimization.

[0098] Furthermore, embodiments of this application also disclose an electronic device, Figure 5 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.

[0099] Figure 5 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the federated modeling method based on node behavior analysis disclosed in any of the foregoing embodiments. Alternatively, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0100] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0101] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0102] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including computer programs capable of performing the node behavior analysis-based federated modeling method disclosed in any of the foregoing embodiments, the computer program 222 may further include computer programs capable of performing other specific tasks.

[0103] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned federated modeling method based on node behavior analysis. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.

[0104] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0105] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0106] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0107] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover 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 limitations, 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.

[0108] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A secure federated modeling method based on node behavior analysis, characterized in that, include: Task initialization is performed according to the preset federated modeling task initialization rules to obtain the corresponding current global model, current malicious node identification model, target participating nodes, and target basic model corresponding to each target participating node; Each target participating node trains its local target base model and the current global model, and after the current round of federated modeling training is completed, the corresponding local aggregated gradient is uploaded to the target aggregation node. The target aggregation node identifies malicious nodes based on its local current malicious node identification model and the received local aggregation gradients. The current global model is then updated and distributed using the current aggregation strategy obtained based on the identification results, until the preset task termination condition is met. The step of performing task initialization according to preset federated modeling task initialization rules includes: Obtain the corresponding task description information and task requirements from the preset task initiator to obtain the corresponding federated modeling task information; The federated modeling task information is published to each participating node that needs to be confirmed based on a preset task publishing platform or preset task publishing channel. After receiving the federated modeling task information through each of the nodes to be confirmed as participants, it is determined whether to participate in the task based on the corresponding node information, so as to identify the corresponding target participating node; Obtain the corresponding initial basic model architecture from the preset task initiator; By using the target participating nodes and their corresponding local dataset information and local model information, and based on the initial basic model architecture, a model design is performed to obtain the corresponding basic model and extended model. Each of the target participating nodes trains the base model based on local data to obtain a target base model corresponding to each of the target participating nodes; The network architecture of the expansion model and the historical malicious node behavior data of the target are used for training to obtain the corresponding current malicious node identification model. The corresponding current global model is obtained by initializing the expansion model, and the global model and the corresponding hyperparameter information are sent to each of the target participating nodes; The step of updating and distributing the current global model using the current aggregation strategy obtained based on the recognition results includes: If the identification result indicates that a corresponding malicious target node exists, then the reverse gradient is calculated by calculating the existing contribution gradient of the malicious target node to obtain the reverse gradient information. Based on the inverse gradient information and each of the local aggregation gradients, the corresponding current aggregation strategy is obtained. By aggregating parameters using the current aggregation strategy, the parameters of the current global model are updated to obtain a new current global model. The new current global model is distributed to each of the target participating nodes so that each target participating node can update its model and perform the next round of federated modeling training based on the new current global model.

2. The secure federated modeling method based on node behavior analysis according to claim 1, characterized in that, The step of training each target participating node based on its local target base model and the current global model, and then uploading the corresponding local aggregated gradient to the target aggregation node after the completion of this round of federated modeling training, includes: Each target participating node performs a local gradient aggregation operation based on its local target base model, the current global model, and the corresponding target training data to complete the corresponding training. After this round of federated modeling training is completed, the corresponding local aggregated gradients obtained by each target participating node are uploaded to the target aggregated node.

3. The secure federated modeling method based on node behavior analysis according to claim 1, characterized in that, Also includes: During the process of distributing the current global model to each of the target participating nodes, the current malicious node identification model is sent to the target malicious node in order to collect data based on the current malicious node identification model.

4. The secure federated modeling method based on node behavior analysis according to claim 1, characterized in that, Also includes: When the preset task termination conditions are met, a target global model is determined so that each target participating node can fuse the target global model with its own local model.

5. The secure federated modeling method based on node behavior analysis according to any one of claims 1 to 4, characterized in that, Also includes: In the process of performing the current federated modeling task, feedback data is collected to perform corresponding target participation node addition operations in order to achieve model optimization.

6. A secure federated modeling device based on node behavior analysis, characterized in that, include: The task initialization module is used to perform task initialization according to the preset federated modeling task initialization rules to obtain the corresponding current global model, current malicious node identification model, target participating nodes, and target basic models corresponding to each target participating node; The first task execution module is used to train each of the target participating nodes based on the local target base model and the current global model, and upload the corresponding local aggregated gradient to the target aggregation node after the completion of this round of federated modeling training. The second task execution module is used to identify malicious nodes based on the local current malicious node identification model and the received local aggregation gradients through the target aggregation node, so as to update and distribute the current global model using the current aggregation strategy obtained based on the identification results until the preset task termination condition is met. The task initialization module includes: The information acquisition unit is used to obtain the corresponding task description information and task requirements from the preset task initiator in order to obtain the corresponding federated modeling task information. The information publishing unit is used to publish the federated modeling task information to each participating node to be confirmed based on a preset task publishing platform or preset task publishing channel. The participating node determination unit is used to determine whether to participate in the task based on the corresponding node information after receiving the federated modeling task information through each of the participating nodes to be confirmed, so as to determine the corresponding target participating node. An initial basic model architecture acquisition unit is used to acquire the corresponding initial basic model architecture from the preset task initiator. The model design unit is used to design a model based on the initial basic model architecture by using the target participating nodes and their corresponding local dataset information and local model information, in order to obtain the corresponding basic model and extended model. The target basic model acquisition unit is used to train the basic model based on local data by each of the target participating nodes to obtain the target basic model corresponding to each of the target participating nodes. The malicious node identification unit is used to train the model based on the network architecture of the extended model and the target historical malicious node behavior data to obtain the corresponding current malicious node identification model. The model sending unit is used to obtain the corresponding current global model by initializing the extended model, and to send the global model and the corresponding hyperparameter information to each of the target participating nodes. The second task execution module includes: The reverse gradient information acquisition unit is used to calculate the reverse gradient by calculating the existing contribution gradient of the target malicious node if the identification result shows that there is a corresponding target malicious node. An aggregation strategy acquisition unit is used to obtain the corresponding current aggregation strategy based on the back gradient information and each of the local aggregation gradients. The global model update unit is used to update the parameters of the current global model by aggregating parameters using the current aggregation strategy, so as to obtain a new current global model. A global model distribution unit is used to distribute the new current global model to each of the target participating nodes, so that each target participating node can update its model and perform the next round of federated modeling training based on the new current global model.

7. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the secure federated modeling method based on node behavior analysis as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, Used to store computer programs, which, when executed by a processor, implement the secure federated modeling method based on node behavior analysis as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Robust federated learning method and system based on dual trust mechanism

    CN115099423A

  • Federal learning model poisoning reconstruction method and device, medium and equipment

    CN117114146A