A method, apparatus, storage medium, and electronic device for model aggregation processing
By selecting and aggregating the quantized vectors of participants from the list of messages to be confirmed in federated learning, the problems of high communication costs and active state limitations when multiple participants are synchronized training models are solved, and more efficient model aggregation processing is achieved.
Patent Information
- Application Number
- CN202210165012.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-22
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2042-02-22
AI Technical Summary
In federated learning, when multiple participants train models simultaneously, model updates require a large amount of messaging, resulting in high communication costs and limited by the active state of each participant.
The global model is obtained by selecting the quantized vectors updated by multiple participants in the previous cycle from the list of messages to be confirmed, and aggregating these vectors. This method reduces network communication overhead and avoids active communication with inactive parties.
Reduces network communication overhead, reduces communication costs, and avoids synchronization problems caused by the activity status limitation of participants.
Smart Images

Figure CN114529016B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and in particular, to a method, apparatus, storage medium, and electronic device for model aggregation processing. Background Art
[0002] Federated learning allows multiple participants to jointly train a model, protecting privacy while maximizing the value of data. However, since federated modeling tasks require synchronization, in order to utilize all available data samples of federated learning participants, their models are synchronized through the blockchain in each training iteration. Therefore, a large amount of message passing is required on the chain, resulting in communication contention on the network. Due to the limitation of network bandwidth, communication between blockchain nodes is slow. Model aggregation requires each participant to synchronize the training results of each round, which is restricted by the active status of each participant.
[0003] Regarding the problem in the related art that when multiple participants synchronously train a model, a large amount of message passing is required for model update, the communication cost is high and it is restricted by the active status of each participant, no solution has been proposed yet. Summary of the Invention
[0004] Embodiments of the present invention provide a method, apparatus, storage medium, and electronic device for model aggregation processing, so as to at least solve the problem in the related art that when multiple participants synchronously train a model, a large amount of message passing is required for model update, the communication cost is high and it is restricted by the active status of each participant.
[0005] According to an embodiment of the present invention, there is provided a method for model aggregation processing, which is applied to a blockchain node and includes:
[0006] Selecting quantized vectors updated by multiple participants in the previous cycle from a list of messages to be confirmed, wherein the list of messages to be confirmed stores quantized vectors obtained by quantizing on-chain transactions received, and the on-chain transactions are obtained by packing local models;
[0007] Performing aggregation processing on the quantized vectors of the multiple participants to obtain a global model.
[0008] Optionally, before selecting the quantized vectors updated by multiple participants in the previous cycle from the list of messages to be confirmed, the method further includes:
[0009] Receiving the on-chain transaction;
[0010] Performing quantization processing on the on-chain transaction to obtain the quantized vector;
[0011] Caching the quantized vector into the list of messages to be confirmed.
[0012] Optionally, performing quantization processing on the on-chain transaction to obtain the quantized vector includes:
[0013] Using a quantization operator, calculating the model difference between the latest local model and the global model obtained by the previous on-chain aggregation to obtain the quantized vector.
[0014] Optionally, after performing quantization processing on the on-chain transaction to obtain the quantized vector, the method further includes:
[0015] Broadcasting the quantized vector on the blockchain so that each node caches the quantized vector in the list of messages to be confirmed.
[0016] Optionally, performing aggregation processing on the quantized vectors of the multiple parties to obtain the global model includes:
[0017] Performing aggregation processing on the quantized vectors of the multiple parties to obtain a first aggregation result;
[0018] Broadcasting the first aggregation result on the blockchain;
[0019] Receiving a second aggregation result from other nodes, where the other nodes are nodes other than the blockchain nodes;
[0020] Determining the global model according to the first aggregation result and the second aggregation result.
[0021] Optionally, determining the global model according to the first aggregation result and the second aggregation result includes:
[0022] Comparing the first aggregation result with the second aggregation result;
[0023] If the evaluation result of the first aggregation result is better than the evaluation result of the second aggregation result, returning a rejection message to the other nodes;
[0024] If the evaluation result of the second aggregation result is better than the evaluation result of the first aggregation result, returning an acknowledgement message to the other nodes;
[0025] Determining that the local model corresponding to the target node for which the number of received acknowledgement messages is greater than a preset value is the global model.
[0026] Optionally, the method further includes:
[0027] Performing aggregation processing on the quantized vectors of the multiple parties in the following manner to obtain a first aggregation result:
[0028]
[0029] Among them, X k+1,i is the first aggregation result obtained by node i in the (k + 1)-th period, and X k is the global model obtained in period k, and Q(X k - X k,i ) is the quantized vector, k is the period, and n is the number of participants.
[0030] According to another embodiment of the present invention, there is also provided a model aggregation processing device, which is applied to a blockchain node and includes:
[0031] A selection module, configured to select quantized vectors updated by multiple participants in the previous period from a list of messages to be confirmed, where the list of messages to be confirmed stores quantized vectors obtained by quantizing on-chain transactions received, and the on-chain transactions are obtained by packing local models;
[0032] An aggregation processing module, configured to perform aggregation processing on the quantized vectors of the multiple participants to obtain a global model.
[0033] Optionally, the device further includes:
[0034] A receiving module, configured to receive the on-chain transactions;
[0035] A quantization processing module, configured to perform quantization processing on the on-chain transactions to obtain the quantized vectors;
[0036] A caching module, configured to cache the quantized vectors into the list of messages to be confirmed.
[0037] Optionally, the quantization processing module is further configured to use a quantization operator to calculate the model difference between the latest local model and the global model obtained by the previous on-chain aggregation to obtain the quantized vectors.
[0038] Optionally, the device further includes:
[0039] A broadcasting module, configured to broadcast the quantized vectors on the blockchain so that each node caches the quantized vectors into the list of messages to be confirmed.
[0040] Optionally, the aggregation processing module includes:
[0041] An aggregation sub-module, configured to perform aggregation processing on the quantized vectors of the multiple participants to obtain a first aggregation result;
[0042] A broadcasting sub-module, configured to broadcast the first aggregation result on the blockchain;
[0043] A receiving sub-module, configured to receive a second aggregation result of other nodes, where the other nodes are nodes other than the blockchain node;
[0044] A determining sub-module, configured to determine the global model according to the first aggregation result and the second aggregation result.
[0045] Optionally, the determining sub-module is further configured to compare the first aggregation result with the second aggregation result; if the evaluation result of the first aggregation result is better than the evaluation result of the second aggregation result, return a rejection message to the other nodes; if the evaluation result of the second aggregation result is better than the evaluation result of the first aggregation result, return an acknowledgement message to the other nodes; determine that the local model corresponding to the target node for which the number of received acknowledgement messages is greater than a preset value is the global model.
[0046] Optionally, the aggregation module is further configured to perform an aggregation process on the quantized vectors of the multiple parties in the following manner to obtain a first aggregation result:
[0047]
[0048] where, X k+1,i is the first aggregation result obtained by node i in the (k + 1)th period, X k is the global model obtained in the kth period, Q(X k - X k,i ) is the quantized vector, k is the period, and n is the number of parties.
[0049] According to another embodiment of the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, and the computer program is configured to execute the steps in any one of the above method embodiments when running.
[0050] According to another embodiment of the present invention, there is also provided an electronic device, including a memory and a processor, a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0051] According to the present invention, multiple quantized vectors updated by multiple participating parties in the previous cycle are selected from the list of messages to be confirmed, where the list of messages to be confirmed stores the quantized vectors obtained by quantizing the on-chain transactions received, and the on-chain transactions are packed by the local model; the quantized vectors of the multiple participating parties are aggregated to obtain a global model, which can solve the problem in the related art that multiple participating parties synchronously train a model, and a large amount of message passing is required for model update, the communication cost is relatively high and it is restricted by the active states of the participating parties. Let the participating parties perform local model updates, exchange the quantized vectors of the local models through the list of messages to be confirmed, and reduce the network communication overhead; when aggregating the models, aggregate the quantized vectors of the participating parties that updated the model in the previous stage, without actively communicating with the inactive participating parties, reducing the communication cost and not being restricted by the active states of the participating parties. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] The drawings described herein are used to provide a further understanding of the present invention, form a part of this application, and the illustrative embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation to the present invention. In the drawings:
[0053] Figure 1 is a block diagram of the hardware structure of a mobile terminal for the model aggregation processing method according to an embodiment of the present invention;
[0054] Figure 2 is a flowchart of the model aggregation processing method according to an embodiment of the present invention;
[0055] Figure 3 is a block diagram of the model aggregation processing device according to an embodiment of the present invention;
[0056] Figure 4 is a block diagram of the model aggregation processing device according to an optional embodiment of the present invention Figure 1 ;
[0057] Figure 5 is a block diagram of the model aggregation processing device according to an optional embodiment of the present invention Figure 2 . DETAILED DESCRIPTION OF THE EMBODIMENTS
[0058] The present invention will be described in detail below with reference to the drawings and in conjunction with the embodiments. It should be noted that, without conflict, the embodiments in this application and the features in the embodiments can be combined with each other.
[0059] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above drawings are used to distinguish similar objects and do not necessarily need to be used to describe a specific order or sequence.
[0060] The method embodiment provided in Embodiment 1 of this application can be executed on a mobile terminal, a computer terminal, or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 is a hardware structure block diagram of a mobile terminal for the model aggregation processing method according to an embodiment of the present invention. As Figure 1 shown, the mobile terminal may include one or more ( Figure 1 only one is shown in the figure) processors 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Optionally, the above-mentioned mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those of ordinary skill in the art can understand that Figure 1 the structure shown is only schematic and does not limit the structure of the above-mentioned mobile terminal. For example, the mobile terminal may further include more or fewer components than Figure 1 shown in the figure, or have a different configuration from Figure 1 shown in the figure.
[0061] The memory 104 can be used to store computer programs. For example, software programs and modules of application software, such as the computer program corresponding to the model aggregation processing method in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implements the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely disposed relative to the processor 102, and these remote memories may be connected to the mobile terminal through a network. Examples of the above network include, but are not limited to, the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0062] The transmission device 106 is used to receive or send data via a network. Specific examples of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one instance, the transmission device 106 includes a network adapter (Network Interface Controller, abbreviated as NIC), which can be connected to other network devices through a base station and thus communicate with the Internet. In one instance, the transmission device 106 may be a radio frequency (Radio Frequency, abbreviated as RF) module, which is used to communicate with the Internet wirelessly.
[0063] In this embodiment, a model aggregation processing method running on the above-mentioned mobile terminal or network architecture is provided, which is applied to a blockchain node. Figure 2 is a flowchart of the model aggregation processing method according to an embodiment of the present invention. AsFigure 2 As shown, the process includes the following steps:
[0064] Step S202: Select the quantized vectors updated by multiple participants in the previous cycle from the list of messages to be confirmed. Among them, the list of messages to be confirmed stores the quantized vectors obtained by quantizing the received on-chain transactions, and the on-chain transactions are packaged by the local model.
[0065] Step S204: Aggregate the quantized vectors of the multiple participants to obtain a global model.
[0066] In an embodiment of the present invention, on the one hand, step S204 may specifically include: aggregating the quantized vectors of the multiple participants to obtain a first aggregation result; broadcasting the first aggregation result on the blockchain; receiving a second aggregation result from other nodes, where the other nodes are nodes other than the blockchain nodes; determining the global model according to the first aggregation result and the second aggregation result. Specifically, comparing the first aggregation result with the second aggregation result; if the evaluation result of the first aggregation result is better than the evaluation result of the second aggregation result, returning a rejection message to the other nodes; if the evaluation result of the second aggregation result is better than the evaluation result of the first aggregation result, returning a confirmation message to the other nodes; determining that the local model corresponding to the target node with the number of received confirmation messages greater than the preset value is the global model.
[0067] On the other hand, the quantized vectors of the multiple participants may also be aggregated in the following manner to obtain a first aggregation result:
[0068]
[0069] Where X k+1,i is the first aggregation result obtained by node i in the k + 1 cycle, X k is the global model obtained in cycle k, Q(X k -X k,i ) is the quantized vector, k is the cycle, and n is the number of participants.
[0070] By the above steps S202 to S204, it is possible to solve the problems in the related art that multiple participants synchronously train a model, and a large amount of message passing is required for model update, resulting in high communication costs and being restricted by the active states of each participant. Let the participants perform local model updates, exchange the quantized vectors of the local models through the list of messages to be confirmed, and reduce the network communication overhead; when aggregating the models, aggregate the quantized vectors of the participants who updated the model in the previous stage, without actively communicating with inactive participants, reducing the communication cost and being unrestricted by the active states of the participants.
[0071] In an optional embodiment, before the above step S202, receive the on-chain transaction; perform quantization processing on the on-chain transaction to obtain the quantized vector. Specifically, a quantization operator can be used to calculate the model difference between the latest local model and the global model aggregated on the chain last time to obtain the quantized vector; cache the quantized vector into the to-be-confirmed message list.
[0072] Further, after performing quantization processing on the on-chain transaction to obtain the quantized vector, broadcast the quantized vector on the blockchain so that each node caches the quantized vector into the to-be-confirmed message list.
[0073] The federated learning of the blockchain aggregation method based on high-efficiency communication in the embodiments of the present invention is divided into three stages: local model training, blockchain node quantization message passing, and periodic model aggregation. The following describes each stage.
[0074] Local model training: The group, as the Guest party of federated learning, initiates a model training task, and each subsidiary participates in the federated learning model training task as the Host party. S i Load the user's personal financial data into the federated learning framework. The local loss expectation of each subsidiary is f i (x). Each subsidiary uses the gradient descent method to train the model based on the current global model X k , where k is the number of cycles (the initial model X 0 is randomly generated on the chain before the start of the first training). Package the local model X k,t,i obtained in each round of iteration (k is the number of cycles, t is the number of iterations within the cycle, and i is the node identifier) into an on-chain transaction TX k,i and upload it to the blockchain node of the subsidiary where it is located.
[0075] On-chain message quantization: When a new TX k,i is received by an on-chain node, quantization processing will be performed on the latest transaction. The specific steps are as follows:
[0076] 1) Use the quantization operator Q to calculate the model difference Q(X k -X k,t,i ) between the latest model and the model aggregated on the chain last time;
[0077] 2) Broadcast the quantized vector Q(X k -X k,t,i ) on the chain;
[0078] 3) Each node receives the quantized vector Q(X k -X k,t,i) After that, it is temporarily stored in the message list to be confirmed.
[0079] Periodic model aggregation: After a certain period of time, when each participant has completed multiple local iterations, model aggregation starts on the chain. The specific steps are as follows:
[0080] 1) Each node on the chain simultaneously selects a local model of a random participant from its own message queue to be confirmed, and calculates the aggregation result in the following way: Each node can repeat multiple times and select a better result.
[0081] 2) Broadcast the aggregation result X k+1,i .
[0082] 3) After receiving X from other nodes k+1,i , compare it with its own result. If there is no result on its own side or the received aggregation result is better than its own, return a confirmation message; otherwise, return a rejection message.
[0083] 4) If a rejection message is received, recalculate. The node that first receives 2 / 3 confirmations generates the final global model X k+1 of the current period, and broadcasts this result.
[0084] The above steps are repeated for K periods until the expected optimization goal is reached, and then the training ends.
[0085] In the embodiment of the present invention, in combination with the blockchain consensus mechanism, the results of multiple rounds of local model iterations are temporarily stored in the set of transactions to be confirmed, and the model is aggregated while generating a block, realizing periodic model aggregation, which can reduce the number of communication rounds; in combination with the blockchain message verification mechanism, a quantization operation on the information uploaded to the chain is added during the independent verification of transactions, reducing the cost of single communication. By using the set of transactions to be confirmed, the local model information uploaded by each participant is processed asynchronously to solve the scalability problem.
[0086] According to another embodiment of the present invention, there is also provided a model aggregation processing device, which is applied to a blockchain node, Figure 3 is a block diagram of the model aggregation processing device according to the embodiment of the present invention, as Figure 3 shown, including:
[0087] A selection module 32, configured to select quantized vectors updated by multiple participants in the previous period from the message list to be confirmed, where the message list to be confirmed stores quantized vectors obtained by quantizing the on-chain transactions received, and the on-chain transactions are obtained by packing local models;
[0088] An aggregation processing module 34, configured to perform aggregation processing on the quantized vectors of the multiple participants to obtain a global model.
[0089] Figure 4 is a block diagram of a model aggregation processing device according to an alternative embodiment of the present invention Figure 1 , as Figure 4 shown, the device further includes:
[0090] A receiving module 42, configured to receive the on-chain transaction;
[0091] A quantization processing module 44, configured to perform quantization processing on the on-chain transaction to obtain the quantized vector;
[0092] A caching module 46, configured to cache the quantized vector into the to-be-confirmed message list.
[0093] Optionally, the quantization processing module 44 is further configured to use a quantization operator to calculate the model difference between the latest local model and the global model obtained by the previous on-chain aggregation, so as to obtain the quantized vector.
[0094] Optionally, the device further includes:
[0095] A broadcasting module, configured to broadcast the quantized vector on the blockchain, so that each node caches the quantized vector into the to-be-confirmed message list.
[0096] Figure 5 is a block diagram of a model aggregation processing device according to an alternative embodiment of the present invention Figure 2 , as Figure 5 shown, the aggregation processing module 34 includes:
[0097] An aggregation sub-module 52, configured to perform aggregation processing on the quantized vectors of the multiple participants to obtain a first aggregation result;
[0098] A broadcasting sub-module 54, configured to broadcast the first aggregation result on the blockchain;
[0099] A receiving sub-module 56, configured to receive a second aggregation result of other nodes, where the other nodes are nodes other than the blockchain nodes;
[0100] A determining sub-module 58, configured to determine the global model according to the first aggregation result and the second aggregation result.
[0101] Optionally, the determining sub-module 58 is further configured to compare the first aggregation result with the second aggregation result; if the evaluation result of the first aggregation result is better than the evaluation result of the second aggregation result, return a rejection message to the other nodes; if the evaluation result of the second aggregation result is better than the evaluation result of the first aggregation result, return an acknowledgment message to the other nodes; determine that the local model corresponding to the target node with the number of received acknowledgment messages greater than a preset value is the global model.
[0102] Optionally, the aggregation module 34 is further configured to aggregate the quantized vectors of the multiple parties in the following manner to obtain a first aggregation result:
[0103]
[0104] where X k+1,i is the first aggregation result obtained by node i in the k + 1 period, X k is the global model obtained in period k, Q(X k - X k,i ) is the quantized vector, k is the period, and n is the number of parties.
[0105] It should be noted that the above-mentioned various modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited thereto: the above-mentioned modules are all located in the same processor; or, the above-mentioned various modules are separately located in different processors in any combination form.
[0106] An embodiment of the present invention also provides a computer-readable storage medium, in which a computer program is stored, and the computer program is configured to execute the steps in any one of the above method embodiments when running.
[0107] Optionally, in this embodiment, the above storage medium can be configured to store a computer program for executing the following steps:
[0108] S1. Select the quantized vectors updated by multiple parties in the previous period from the list of messages to be confirmed, where the list of messages to be confirmed stores the quantized vectors obtained by quantizing the on-chain transactions received, and the on-chain transactions are packaged by the local model;
[0109] S2. Aggregate the quantized vectors of the multiple parties to obtain a global model.
[0110] Optionally, in this embodiment, the above storage medium may include but is not limited to: various media such as USB flash drives, read-only memories (ROM), random access memories (RAM), mobile hard disks, magnetic disks, or optical discs that can store computer programs.
[0111] An embodiment of the present invention also provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0112] Optionally, the above electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the above processor, and the input / output device is connected to the above processor.
[0113] Optionally, in this embodiment, the above processor may be configured to perform the following steps by a computer program:
[0114] S1. Select the quantized vectors updated by multiple parties in the previous cycle from the list of messages to be confirmed, wherein the list of messages to be confirmed stores the quantized vectors obtained by quantizing the on-chain transactions received, and the on-chain transactions are packed by the local model;
[0115] S2. Aggregate the quantized vectors of the multiple parties to obtain a global model.
[0116] Optionally, for specific examples in this embodiment, reference may be made to the examples described in the above embodiments and optional implementation manners, and details are not described herein again.
[0117] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general-purpose computing device. They can be centralized on a single computing device or distributed on a network composed of multiple computing devices. Optionally, they can be implemented by program codes executable by the computing device, so that they can be stored in a storage device and executed by the computing device. And in some cases, the steps shown or described can be executed in a different order from here, or they can be separately made into individual integrated circuit modules, or multiple modules or steps among them can be made into a single integrated circuit module to implement. In this way, the present invention is not limited to any specific combination of hardware and software.
[0118] The above are only the preferred embodiments of the present invention and are not used to limit the present invention. For those skilled in the art, the present invention can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A model aggregation processing method, applied to a blockchain node, Characterized in that, Comprising: Selecting, from a list of messages to be confirmed, the quantized vectors updated by multiple participants in the previous cycle, wherein the list of messages to be confirmed stores the quantized vectors obtained by quantizing the on-chain transactions received, and the on-chain transactions are packaged by a local model; Performing an aggregation process on the quantized vectors of the multiple participants to obtain a global model, including: performing an aggregation process on the quantized vectors of the multiple participants to obtain a first aggregation result; broadcasting the first aggregation result on the blockchain; receiving a second aggregation result from other nodes, where the other nodes are nodes other than the blockchain node; determining the global model according to the first aggregation result and the second aggregation result; Wherein, determining the global model according to the first aggregation result and the second aggregation result includes: comparing the first aggregation result with the second aggregation result; if the evaluation result of the first aggregation result is better than the evaluation result of the second aggregation result, returning a rejection message to the other nodes; if the evaluation result of the second aggregation result is better than the evaluation result of the first aggregation result, returning a confirmation message to the other nodes; determining that the local model corresponding to the target node with the number of received confirmation messages greater than a preset value is the global model.
2. The method according to claim 1, Characterized in that, Before selecting, from the list of messages to be confirmed, the quantized vectors updated by multiple participants in the previous cycle, the method further includes: Receiving the on-chain transaction; Performing a quantization process on the on-chain transaction to obtain the quantized vector; Caching the quantized vector into the list of messages to be confirmed.
3. The method according to claim 2, Characterized in that, Performing a quantization process on the on-chain transaction to obtain the quantized vector includes: Using a quantization operator to calculate the model difference between the latest local model and the global model obtained by the previous on-chain aggregation to obtain the quantized vector.
4. The method according to claim 2, Characterized in that, After performing a quantization process on the on-chain transaction to obtain the quantized vector, the method further includes: Broadcasting the quantized vector on the blockchain so that each node caches the quantized vector into the list of messages to be confirmed.
5. The method according to claim 1, Characterized in that, The method further includes: Performing an aggregation process on the quantized vectors of the multiple participants in the following manner to obtain a first aggregation result: Among them, X k+1,i is the first aggregation result obtained by node i in the (k + 1)-th period, and X k is the global model obtained in period k. Q(X k - X k,i ) is the quantized vector, k is the period, and n is the number of participants.
6. A model aggregation processing apparatus, applied to a blockchain node, Characterized in that, Comprising: A selection module, configured to select, from a list of messages to be confirmed, the quantized vectors updated by multiple participants in the previous cycle, wherein the list of messages to be confirmed stores the quantized vectors obtained by quantizing the on-chain transactions received, and the on-chain transactions are packaged by a local model; An aggregation processing module is used to perform aggregation processing on the quantized vectors of the multiple participating parties to obtain a global model, including: performing aggregation processing on the quantized vectors of the multiple participating parties to obtain a first aggregation result; broadcasting the first aggregation result on the blockchain; receiving a second aggregation result from other nodes, where the other nodes are nodes other than the blockchain nodes; determining the global model according to the first aggregation result and the second aggregation result, including: comparing the first aggregation result with the second aggregation result; if the evaluation result of the first aggregation result is better than the evaluation result of the second aggregation result, returning a rejection message to the other nodes; if the evaluation result of the second aggregation result is better than the evaluation result of the first aggregation result, returning an acknowledgement message to the other nodes; determining that the local model corresponding to the target node for which the number of received acknowledgement messages is greater than a preset value is the global model.
7. A computer-readable storage medium, characterized in that, the storage medium stores a computer program, wherein the computer program is configured to execute the method described in any one of claims 1 to 5 when running.
8. An electronic device, comprising a memory and a processor, characterized in that, the memory stores a computer program, and the processor is configured to run the computer program to execute the method described in any one of claims 1 to 5.
Citation Information
Patent Citations
Information transmission method, device and equipment, and computer readable storage medium
CN111553486A
Method and system for detecting Byzantine nodes in horizontal federated learning system
CN113554182A
Power quality disturbance detection method and device, electronic equipment and storage medium
CN113901412A