Interaction protocol consistency review methods, nodes, systems, equipment and media
By introducing review nodes in federated learning, calculating and comparing interactive protocol messages, the interactive protocol security problem in federated learning is solved, and the consistency and security of interactive protocols are achieved.
Patent Information
- Application Number
- CN202110749445.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-02
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2041-07-02
AI Technical Summary
The security issues of interactive protocols in federated learning have not been effectively resolved, resulting in challenges in data security, model security and interactive protocol security.
Through an evaluation method of interaction protocol consistency, the evaluation node calculates the expected protocol message based on the protocol registration information and training parameter information of the interaction node, and compares it with the actual transmitted protocol message to verify the consistency of the federated learning interactive protocol.
The security review of interactive protocols in federated learning is achieved to ensure the consistency and security of interactive protocols, thereby improving the overall security of federated learning.
Smart Images

Figure CN115567427B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of secure multi-party computing technology, and in particular to an interactive protocol consistency review method, node, system, device and medium. Background Art
[0002] In the era of big data, data has huge economic value and is likened to an emerging oil resource. By deeply exploring cross-domain data resources and discovering the economic laws behind the data, we can effectively promote industrial upgrading and leapfrog development. The breakthrough progress of machine learning algorithms and the large-scale application of artificial intelligence technology are also inseparable from the supply of massive high-quality data. However, the current data sharing and circulation rules and technologies cannot meet the strong demand for data resources from various applications, forming a large number of isolated data islands, causing a huge waste of data resources. Therefore, it is urgent to support open platforms and related technologies for data sharing to break down data barriers and promote the circulation of data on the Internet, so as to explore the economic value of big data and release the application potential of various types of data.
[0003] In this context, federated learning technology came into being. Federated learning technology is still in a state of rapid development and is still in the early stage of pilot technology verification. To achieve truly large-scale application, many technical problems need to be solved. One of the most important problems is how to solve the security problem of federated learning. The security issues of federated learning include three levels: data security, model security, and interactive protocol security. There is currently no solution to the interactive protocol security problem. Summary of the invention
[0004] The purpose of the present invention is to provide a method, node, system, device and medium for reviewing the consistency of an interactive protocol, and to provide a solution to the security problem of the interactive protocol in federated learning.
[0005] To achieve the above object, an embodiment of the present invention provides a method for evaluating consistency of an interactive protocol, comprising:
[0006] Determine the expected protocol message of the federated learning interaction protocol according to the protocol registration information of the interactive nodes participating in the federated learning and the training parameter information of the interactive nodes when performing the federated learning interaction;
[0007] Obtaining real protocol messages transmitted by the interactive nodes during the federated learning interaction process;
[0008] The consistency of the federated learning interaction protocol is verified according to the expected protocol message and the real protocol message.
[0009] Optionally, the protocol registration information includes:
[0010] The interactive protocols supported by the interactive nodes participating in federated learning at each stage of federated learning;
[0011] The protocol message assembly rules of the interaction protocol.
[0012] Optionally, the protocol message assembly rule is used to indicate: a calculation rule for obtaining the protocol message according to training sample data and training parameters required for protocol message assembly.
[0013] Optionally, determining the expected protocol message of the federated learning interaction protocol according to the protocol registration information of the interactive nodes participating in the federated learning and the training parameter information of the interactive nodes when performing the federated learning interaction includes:
[0014] According to the protocol message assembly rule and using the training sample data and the training parameters, the expected protocol message of the federated learning interaction protocol is calculated.
[0015] Optionally, before determining the expected protocol message of the federated learning interaction protocol according to the protocol registration information of the interactive nodes participating in the federated learning and the training parameter information of the interactive nodes when performing the federated learning interaction, the method further includes:
[0016] According to the stored data samples, training sample data is allocated to each interactive node participating in federated learning.
[0017] Optionally, before respectively allocating training sample data to each interactive node participating in the federated learning, the method further includes:
[0018] Receiving a verification request sent by a first node among interactive nodes participating in federated learning, the verification request indicating: performing consistency verification on a federated interaction protocol between the first node and a second node;
[0019] Performing authority authentication on the first node and the second node according to the verification request;
[0020] The training sample data is respectively allocated to each interactive node participating in the federated learning, including:
[0021] When the authority requirements are met, training sample data are allocated to the first node and the second node respectively.
[0022] Optionally, before determining the expected protocol message of the federated learning interaction protocol according to the protocol registration information of the interactive nodes participating in the federated learning and the training parameter information of the interactive nodes when performing the federated learning interaction, the method further includes:
[0023] Receiving protocol registration information of the interactive node;
[0024] During the process of the interactive node performing federated learning interaction, training parameter information sent by the interactive node is received.
[0025] Optionally, verifying the consistency of the federated learning interaction protocol according to the expected protocol message and the real protocol message includes:
[0026] comparing the expected protocol message with the real protocol message;
[0027] In a case where the expected protocol message is identical to the actual protocol message, it is determined that the federated learning interaction protocol is consistent.
[0028] To achieve the above object, an embodiment of the present invention provides a review node for performing consistency review of an interactive protocol, comprising:
[0029] A parameter interaction module, used to determine the expected protocol message of the federated learning interaction protocol according to the protocol registration information of the interaction nodes participating in the federated learning and the training parameter information of the interaction nodes when performing the federated learning interaction;
[0030] A message acquisition module, used to acquire the real protocol message transmitted by the interaction node during the federated learning interaction process;
[0031] A message comparison module is used to verify the consistency of the federated learning interaction protocol according to the expected protocol message and the real protocol message.
[0032] Optionally, the protocol registration information includes:
[0033] The interactive protocols supported by the interactive nodes participating in federated learning at each stage of federated learning;
[0034] The protocol message assembly rules of the interaction protocol.
[0035] Optionally, the protocol message assembly rule is used to indicate: a calculation rule for obtaining the protocol message according to training sample data and training parameters required for protocol message assembly.
[0036] Optionally, the parameter interaction module is specifically used to:
[0037] According to the protocol message assembly rule and using the training sample data and the training parameters, the expected protocol message of the federated learning interaction protocol is calculated.
[0038] Optionally, the device further comprises:
[0039] The data interaction module is used to allocate training sample data to each interaction node participating in federated learning based on the stored data samples.
[0040] Optionally, the device further comprises:
[0041] The authority authentication module is used to receive a verification request sent by a first node among the interactive nodes participating in the federated learning, wherein the verification request indicates: performing consistency verification on the federated interaction protocol between the first node and the second node;
[0042] Performing authority authentication on the first node and the second node according to the verification request;
[0043] The data interaction module is specifically used to allocate training sample data to the first node and the second node respectively when the authority requirements are met.
[0044] Optionally, the device further comprises:
[0045] A protocol registration module, used for receiving the protocol registration information of the interactive node;
[0046] The parameter interaction module is specifically used to: receive training parameter information sent by the interactive node during the process of the interactive node performing federated learning interaction.
[0047] Optionally, the message comparison module is specifically used for:
[0048] comparing the expected protocol message with the real protocol message;
[0049] In a case where the expected protocol message is identical to the actual protocol message, it is determined that the federated learning interaction protocol is consistent.
[0050] To achieve the above-mentioned object, an embodiment of the present invention provides a federated learning system, including: a review node for performing consistency review of an interactive protocol;
[0051] At least two interacting nodes participating in federated learning;
[0052] The review node is used to determine the expected protocol message of the federated learning interaction protocol according to the protocol registration information of the interactive nodes participating in the federated learning and the training parameter information of the interactive nodes when performing the federated learning interaction; obtain the real protocol message transmitted by the interactive node during the federated learning interaction process; and verify the consistency of the federated learning interaction protocol according to the expected protocol message and the real protocol message;
[0053] The interactive node is used to send protocol registration information to the review node, and to send training parameter information to the review node during the process of the at least two interactive nodes performing federated learning interaction.
[0054] To achieve the above object, an embodiment of the present invention provides an electronic device, including a processor and a transceiver, wherein:
[0055] The processor is used to: determine the expected protocol message of the federated learning interaction protocol according to the protocol registration information of the interactive nodes participating in the federated learning and the training parameter information of the interactive nodes when performing the federated learning interaction;
[0056] The transceiver is used to: obtain the real protocol message transmitted by the interactive node during the federated learning interaction process;
[0057] The processor is used to verify the consistency of the federated learning interaction protocol according to the expected protocol message and the real protocol message.
[0058] Optionally, the protocol registration information includes:
[0059] The interactive protocols supported by the interactive nodes participating in federated learning at each stage of federated learning;
[0060] The protocol message assembly rules of the interaction protocol.
[0061] Optionally, the protocol message assembly rule is used to indicate: a calculation rule for obtaining the protocol message according to training sample data and training parameters required for protocol message assembly.
[0062] Optionally, the processor determines the expected protocol message of the federated learning interaction protocol according to the protocol registration information of the interactive nodes participating in the federated learning and the training parameter information of the interactive nodes when performing the federated learning interaction, including:
[0063] According to the protocol message assembly rule and using the training sample data and the training parameters, the expected protocol message of the federated learning interaction protocol is calculated.
[0064] Optionally, before determining the expected protocol message of the federated learning interaction protocol according to the protocol registration information of the interactive nodes participating in the federated learning and the training parameter information of the interactive nodes when performing the federated learning interaction, the processor is further configured to:
[0065] According to the stored data samples, training sample data is allocated to each interactive node participating in federated learning.
[0066] Optionally, before respectively allocating training sample data to each interactive node participating in the federated learning, the transceiver is further used to:
[0067] Receiving a verification request sent by a first node among interactive nodes participating in federated learning, the verification request indicating: performing consistency verification on a federated interaction protocol between the first node and a second node;
[0068] The processor is used to: perform authority authentication on the first node and the second node according to the verification request;
[0069] When the authority requirements are met, training sample data are allocated to the first node and the second node respectively.
[0070] Optionally, before determining the expected protocol message of the federated learning interaction protocol according to the protocol registration information of the interactive nodes participating in the federated learning and the training parameter information of the interactive nodes when performing the federated learning interaction, the transceiver is further used to:
[0071] Receiving protocol registration information of the interactive node;
[0072] During the process of the interactive node performing federated learning interaction, training parameter information sent by the interactive node is received.
[0073] Optionally, the processor verifies the consistency of the federated learning interaction protocol according to the expected protocol message and the real protocol message, including:
[0074] comparing the expected protocol message with the real protocol message;
[0075] In a case where the expected protocol message is identical to the actual protocol message, it is determined that the federated learning interaction protocol is consistent.
[0076] To achieve the above-mentioned purpose, an embodiment of the present invention provides an electronic device, including a transceiver, a processor, a memory, and a program or instruction stored in the memory and executable on the processor; when the processor executes the program or instruction, the method for reviewing the consistency of the interactive protocol as described above is implemented.
[0077] To achieve the above objective, an embodiment of the present invention provides a readable storage medium having a program or instruction stored thereon, wherein the program or instruction, when executed by a processor, implements the steps in the method for reviewing consistency of an interactive protocol as described above.
[0078] The beneficial effects of the above technical solution of the present invention are as follows:
[0079] In an embodiment of the present invention, a review node calculates an expected interaction protocol message based on protocol registration information of a federated learning interaction node and training parameter information generated during the interaction process; based on the expected protocol message and the protocol message actually transmitted by the interaction node during the federated learning process, a consistency security verification of the interaction protocol is implemented, thereby achieving a security review of the interaction protocol in federated learning. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] Figure 1 One of the flow charts of the method for reviewing consistency of an interactive protocol according to an embodiment of the present invention;
[0081] Figure 2 Schematic diagram of the structure of a federated learning system according to an embodiment of the present invention;
[0082] Figure 3 This is a second flowchart of the method for reviewing consistency of an interactive protocol according to an embodiment of the present invention;
[0083] Figure 4 A schematic diagram of the structure of a review node for performing consistency review of an interactive protocol according to an embodiment of the present invention;
[0084] Figure 5 This is one of the structural schematic diagrams of an electronic device according to an embodiment of the present invention;
[0085] Figure 6 This is a second structural schematic diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0086] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.
[0087] It should be understood that the references to "one embodiment" or "an embodiment" throughout the specification mean that the specific features, structures, or characteristics associated with the embodiment are included in at least one embodiment of the present invention. Therefore, the references to "in one embodiment" or "in an embodiment" appearing throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0088] In various embodiments of the present invention, it should be understood that the size of the serial numbers of the following processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0089] Additionally, the terms "system" and "network" are often used interchangeably herein.
[0090] In the embodiments provided in the present application, it should be understood that "B corresponding to A" means that B is associated with A, and B can be determined according to A. However, it should also be understood that determining B according to A does not mean determining B only according to A, and B can also be determined according to A and / or other information.
[0091] like Figure 1 As shown, an embodiment of the present invention provides a method for reviewing consistency of an interactive protocol, including:
[0092] Step 11: Determine the expected protocol message of the federated learning interaction protocol based on the protocol registration information of the interactive nodes participating in the federated learning and the training parameter information of the interactive nodes when performing the federated learning interaction.
[0093] The method of the embodiment of the present invention can be applied to the review node, that is, the review node for performing the consistency review of the interactive protocol is set in the framework of federated learning. There can be at least two interactive nodes participating in federated learning, for example: interactive node A and interactive node B realize federated learning interaction.
[0094] Each interactive node participating in federated learning needs to register the protocol with the review node, that is, send the protocol registration information to the review node. The protocol registration information may include the supported secure interaction protocol, the training sample data required for assembling each message in the protocol, and the training parameters. When the federated learning interaction is performed between the interactive nodes, the randomly generated or calculated training parameter information needs to be sent to the review node.
[0095] The review node calculates the expected protocol message according to the protocol registration information and the training parameter information of the interactive node during the federated learning interaction. That is, the expected protocol message is calculated by the review node according to the protocol registration information and the training parameter information.
[0096] Step 12: Obtain the real protocol message transmitted by the interactive node during the federated learning interaction process. The real protocol message is the protocol message actually sent by the interactive node during the federated learning interaction, which is captured in real time by the review node. The expected protocol message and the real protocol message are the same message in the federated learning interaction protocol, one of which is the expected message obtained by calculation, and the other is the actually transmitted message.
[0097] Step 13: Verify the consistency of the federated learning interaction protocol according to the expected protocol message and the real protocol message.
[0098] The review node verifies the consistency and security of the federated learning interaction protocol based on the expected protocol message and the real protocol message. For example, when the expected protocol message and the real protocol message are consistent, it indicates that the interaction protocol between the interaction nodes is consistent and secure; when the expected protocol message and the real protocol message are inconsistent, it indicates that the interaction protocol between the interaction nodes is inconsistent and secure.
[0099] Taking the interactive nodes participating in federated learning including interactive node A and interactive node B as an example, the federated learning system composed of the review node, interactive node A and interactive node B is as follows Figure 2As shown in the figure, a third-party review node is introduced into the existing federated learning framework. The specific message content of each expected security interaction protocol can be inferred through the interaction process between the review node and the interaction node. The expected protocol message content is compared one by one with the security interaction protocol message obtained in the actual network (that is, the protocol message transmitted during the actual interaction between interaction node A and interaction node B). If they are consistent, it means that the consistency of the interaction protocol is secure.
[0100] It should be noted that steps 11 to 13 can be repeated multiple times. Since the sample data verified by the review node each time is randomly divided and the expected results are different, repeating the verification steps can effectively enhance the reliability of consistency verification.
[0101] In an embodiment of the present invention, a review node calculates an expected interaction protocol message based on protocol registration information of a federated learning interaction node and training parameter information generated during the interaction process; based on the expected protocol message and the protocol message actually transmitted by the interaction node during the federated learning process, a consistency security verification of the interaction protocol is implemented, thereby achieving a security review of the interaction protocol in federated learning.
[0102] Optionally, before determining the expected protocol message of the federated learning interaction protocol according to the protocol registration information of the interactive nodes participating in the federated learning and the training parameter information of the interactive nodes when performing the federated learning interaction, the method may further include:
[0103] Receiving protocol registration information of the interactive node;
[0104] During the process of the interactive node performing federated learning interaction, training parameter information sent by the interactive node is received.
[0105] The interactive nodes participating in federated learning need to register with the third-party review node, that is, send protocol registration information to inform the algorithm supported by the node in federated learning and its detailed interaction process, such as the assembly rules of each message in the protocol (which may include training sample data and training parameters, etc.). In the process of federated learning, the interactive nodes participating in federated learning may generate new training parameters, such as random numbers used for calculation. The interactive nodes need to send the training parameters generated in the federated learning process to the review node, so that the review node can infer the expected protocol message based on the training sample data, training parameters and the assembly rules of the protocol message.
[0106] Optionally, the protocol registration information may include: the interactive protocols supported by the interactive nodes participating in the federated learning at various stages of the federated learning; and the protocol message assembly rules of the interactive protocols. The protocol message assembly rules may be used to indicate: the calculation rules for obtaining the protocol messages according to the training sample data and training parameters required for the protocol message assembly.
[0107] Determining the expected protocol message of the federated learning interaction protocol based on the protocol registration information of the interactive nodes participating in the federated learning and the training parameter information of the interactive nodes when performing the federated learning interaction may include: calculating the expected protocol message of the federated learning interaction protocol based on the protocol message assembly rule and using the training sample data and the training parameters.
[0108] Each federated learning interaction node needs to register the secure interaction protocol it supports with the review node, which may include the assembly rules for each message in the protocol. The assembly rules may include the training sample data and training parameters required for protocol message assembly. The review node can deduce the specific message content of each message in the interaction protocol based on the protocol message assembly rules and using the training sample data and training parameters.
[0109] Optionally, before determining the expected protocol message of the federated learning interaction protocol based on the protocol registration information of the interactive nodes participating in the federated learning and the training parameter information of the interactive nodes when performing the federated learning interaction, the method may also include: allocating training sample data to each interactive node participating in the federated learning based on the stored data samples.
[0110] In this embodiment, the review node can store data samples for protocol consistency security review. Before the review begins, the review node will randomly divide the sample data and send it to the interactive nodes participating in the federated learning interaction for security review. In this embodiment, the review node has built-in data samples for user security review. On the one hand, the built-in samples are randomly divided for security review of federated learning; on the other hand, the built-in samples are fixedly divided for performance review of federated learning. Each security review is randomly divided according to the number of interactive nodes participating in the federated learning interaction and the divided data is sent to the interactive nodes respectively, which ensures that the data samples are opaque to both parties involved in the review, thereby increasing the credibility of the security review.
[0111] Optionally, before respectively allocating training sample data to each interactive node participating in the federated learning, the method may further include:
[0112] Receiving a verification request sent by a first node among interactive nodes participating in federated learning, the verification request indicating: performing consistency verification on a federated interactive protocol between the first node and a second node; and performing authority authentication on the first node and the second node according to the verification request;
[0113] The respectively allocating training sample data to each interactive node participating in the federated learning may include: respectively allocating the training sample data to the first node and the second node when authority requirements are met.
[0114] In this embodiment, after the review node receives the verification request message sent by one of the interactive nodes, the target node to interact with the interactive node is determined according to the verification request message. For example, the first node needs to interact with the second node for federated learning, and the second node is the target node. The first node can send a verification request to the review node, instructing to perform consistency verification on the interaction protocol between the first node and the second node. The review node then authenticates the first node and the second node. If the verification conditions are met, local sample data can be selected and randomly divided into two parts according to the characteristics. After preprocessing each piece of data (for example, randomly adding or deleting several samples), the data is sent to the first node and the second node respectively.
[0115] Optionally, verifying the consistency of the federated learning interaction protocol based on the expected protocol message and the real protocol message may include: comparing the expected protocol message with the real protocol message; and determining that the federated learning interaction protocol is consistent when the expected protocol message is the same as the real protocol message.
[0116] In this embodiment, the review node knows the training sample data of each interactive node and the interactive protocol between the interactive nodes. Then, the review node can infer the expected protocol message according to the interactive protocol, the training sample data, and the interactive node training parameters according to the protocol message assembly rule. In the process of federated learning interaction between interactive nodes, the review node obtains the actual protocol message transmitted by the interactive node in real time, and can verify the consistency and security of the interactive protocol by comparing the expected protocol message with the real protocol message.
[0117] The implementation process of the interactive protocol consistency review method of the present invention is described below through specific embodiments.
[0118] like Figure 3 As shown, including:
[0119] Step 31: The interactive nodes participating in federated learning register the protocol with the review node;
[0120] Step 32: The review node has built-in data samples, which are randomly split and sent to each interactive node respectively;
[0121] Step 33: The review node and the interaction node interact to obtain protocol related parameters;
[0122] Step 34: The review node calculates and obtains the content of the expected protocol message based on the protocol, training sample data and training parameters;
[0123] Step 35: The review node obtains the real protocol message content actually transmitted by the interactive node by capturing packets on the network, and compares the expected protocol message with the real protocol message to see whether they are completely consistent;
[0124] If they are consistent, it means that the interaction protocol is consistently secure; if they are inconsistent, it means that the interaction protocol is inconsistently secure.
[0125] The following is a description of the implementation process of the method of the embodiment of the present invention using the specific process of the three-party security review in the privacy alignment stage of vertical federated learning, that is, the interactive nodes participating in the federated learning interaction include interactive node A and interactive node B; the same technical solution can be used for the interactive process, feature engineering, model training and model prediction methods of the RSA blind signature scheme in other stages such as the privacy alignment stage of both parties. The specific process is as follows:
[0126] Step 1: Interaction nodes A and B register with the review node and inform the node of the algorithms supported by the node in the privacy alignment phase of federated learning and their detailed interaction process, including the assembly rules (data and parameters) of each message in the protocol.
[0127] Step 2: Interaction node B queries the list of protocols supported by all nodes at the review node, selects the target node (i.e., interaction node A) and applies for the consistency verification process of the specified protocol;
[0128] Step 3: After receiving the application from the interactive node B, the review node authenticates both the interactive nodes A and B. If the verification conditions are met, the review node selects the local verification sample and randomly splits it into two parts according to the features. For each sample data, a number of samples are randomly added or deleted. Then, the expected result of sample alignment is calculated locally. Finally, the two sample data are sent to the A and B nodes respectively.
[0129] Step 4: Interaction node B first generates n (public key), e (encryption algorithm), and d (decryption algorithm) through RSA, notifies the review node of the information, and then sends the public key (n, e) to interaction node A through the network;
[0130] Step 5: The review node compares the public key (n, e) information sent by the interactive node B with the public key (n, e) message sent by the interactive node B captured in real time on the network. If there is any inconsistency, an alarm is issued and the node exits. If there is a complete consistency, the node continues to execute the following steps.
[0131] Step 6: After receiving the public key (n, e), the interactive node A first encrypts its own data through the hash function e, then adds noise r and encrypts it through the encryption algorithm (e) to generate Y(A), and then sends Y(A) back to the interactive node B; at the same time, the noise r is sent to the review node;
[0132] Step 7: The review node calculates the expected value of the data sent by the interactive node A based on the known sample data of the interactive node A, the encryption algorithm (e) and its noise r, that is, calculates the data that the interactive node A should send according to the calculation logic specified in the interactive protocol, and compares it with the real message sent by the interactive node A captured in real time on the network. If there is inconsistency, an alarm will be issued and the following steps will be executed if there is a complete consistency.
[0133] Step 8: After receiving the encrypted Y(A), the interactive node B uses the decryption algorithm (d) to decrypt it, and then obtains the hash value Z(A) containing noise. The interactive node B also hashes its own data and then decrypts it, performing a secondary hash to generate Z(B); then Z(A) and Z(B) are sent to the interactive node A;
[0134] Step 8a: The review node calculates the expected Z(A) and Z(B) using the same algorithm logic as the interactive node B according to the interactive protocol, and compares them with the real Z(A) and Z(B) messages sent by the interactive node B captured in real time on the network. If they are inconsistent, an alarm will be issued and the system will exit. If they are completely consistent, the following steps will be continued.
[0135] Step 9: After receiving the Z(A) and Z(B) messages, the interactive node A first eliminates the noise of Z(A), and then performs hashing to obtain D(A). In this way, D(A) and Z(B) are the values after the two parties' data are hashed and decrypted twice, that is, they are in the same dimension. At this time, the real intersection I of the two can be calculated, and the real intersection I is compared with D(A) to obtain the real intersection {u1, u2, u3}. Then the real intersection I is sent back to the interactive node B;
[0136] Step 9a: The review node calculates the expected intersection I using the same algorithm logic as the interactive node A according to the interactive protocol, and compares it with the real intersection I message sent by the interactive node A captured in real time on the network. If there is a mismatch, an alarm will be issued and the node will exit. If there is a complete consistency, the following steps will be executed.
[0137] Step 10: After receiving the real intersection I, the interactive node B obtains the actual intersection {u1, u2, u3} by comparing it with its own data Z(B). Then A and B inform the review node of their privacy results respectively. The review node verifies whether the actual result of the privacy is consistent with the expected result. If they are consistent, the verification is passed.
[0138] Step 11: The review node needs to verify that the messages sent between A and B captured in real time on the network correspond to the expected interaction messages of A and B designed by the protocol. If there are no other unexplained messages, it proves that the interaction process between the interaction nodes A and B is completely consistent with the interaction process designed by the protocol.
[0139] Step 12: The verification process step 3-step 11 may be required to be repeated multiple times. Since the sample data verified by the review node each time is randomly divided and the expected results are different, the reliability of consistency verification can be effectively enhanced.
[0140] In this embodiment, the review node is introduced to obtain the expected specific message of the security interaction protocol by setting the interaction process, and the consistency security verification of the interaction protocol is realized by comparing it with the protocol message captured in the actual network;
[0141] The review node has built-in data samples of user security reviews. During each security review, the data is randomly split and two copies of the data are sent to the two participating nodes respectively, ensuring that the data samples are not transparent to the two participating review parties, thereby increasing the credibility of the security review.
[0142] The review nodes have consistency in hardware platform, sample data and interaction protocol, which can not only be used for security review of federated learning interaction protocols, but also for performance evaluation of federated learning frameworks based on the same test environment.
[0143] It should be noted that the above-mentioned interaction protocol consistency review method can also be applied to other stages of federated learning, for example: the review of the bilateral privacy-aligned secure interaction protocol using RSA blind signature. The execution process is similar to the above-mentioned steps 1 to 12. The review node performs consistency verification on each protocol message interacted between A and B to determine the consistency between the expected protocol message content and the actually transmitted protocol message content, thereby verifying the consistency of the interaction protocol between A and B. It will not be elaborated here.
[0144] In an embodiment of the present invention, a review node calculates an expected interaction protocol message based on protocol registration information of a federated learning interaction node and training parameter information generated during the interaction process; based on the expected protocol message and the protocol message actually transmitted by the interaction node during the federated learning process, a consistency security verification of the interaction protocol is implemented, thereby achieving a security review of the interaction protocol in federated learning.
[0145] like Figure 4 As shown, the embodiment of the present invention further provides a review node 400 for performing consistency review of an interactive protocol, including:
[0146] The parameter interaction module 410 is used to determine the expected protocol message of the federated learning interaction protocol according to the protocol registration information of the interaction nodes participating in the federated learning and the training parameter information of the interaction nodes when performing the federated learning interaction;
[0147] A message acquisition module 420, used to acquire the real protocol message transmitted by the interaction node during the federated learning interaction process;
[0148] The message comparison module 430 is used to verify the consistency of the federated learning interaction protocol according to the expected protocol message and the real protocol message.
[0149] Optionally, the protocol registration information includes:
[0150] The interactive protocols supported by the interactive nodes participating in federated learning at each stage of federated learning;
[0151] The protocol message assembly rules of the interaction protocol.
[0152] Optionally, the protocol message assembly rule is used to indicate: a calculation rule for obtaining the protocol message according to training sample data and training parameters required for protocol message assembly.
[0153] Optionally, the parameter interaction module is specifically used to:
[0154] According to the protocol message assembly rule and using the training sample data and the training parameters, the expected protocol message of the federated learning interaction protocol is calculated.
[0155] Optionally, the device further comprises:
[0156] The data interaction module is used to allocate training sample data to each interaction node participating in federated learning based on the stored data samples.
[0157] Optionally, the device further comprises:
[0158] The authority authentication module is used to receive a verification request sent by a first node among the interactive nodes participating in the federated learning, wherein the verification request indicates: performing consistency verification on the federated interaction protocol between the first node and the second node;
[0159] Performing authority authentication on the first node and the second node according to the verification request;
[0160] The data interaction module is specifically used to allocate training sample data to the first node and the second node respectively when the authority requirements are met.
[0161] Optionally, the device further comprises:
[0162] A protocol registration module, used for receiving the protocol registration information of the interactive node;
[0163] The parameter interaction module is specifically used to: receive training parameter information sent by the interactive node during the process of the interactive node performing federated learning interaction.
[0164] Optionally, the message comparison module is specifically used for:
[0165] comparing the expected protocol message with the real protocol message;
[0166] In a case where the expected protocol message is identical to the actual protocol message, it is determined that the federated learning interaction protocol is consistent.
[0167] In this embodiment, the interactive nodes participating in federated learning perform the registration process of supporting protocols to the review node according to a unified format, including but not limited to: protocol name, application stage, protocol process and assembly rules, required training data and training parameters, etc.; the security review node has all the protocols supported by all registered users at each stage of federated learning and their required data and parameters.
[0168] The review node has built-in data samples for security review. Before the review begins, the review node will randomly divide the sample data according to the number of interactive nodes, and send it to the corresponding interactive nodes through the data interaction module for security review;
[0169] The review node interacts with the interactive nodes participating in the federated learning through the parameter interaction module 410, and after knowing the training sample data, training parameters and interactive protocol rules, it can reversely calculate the specific content of each message of the interactive protocol according to the protocol assembly rules;
[0170] The message comparison module 430 of the review node obtains the specific message content of the interaction protocol inferred from the parameter interaction module 410, and compares it one by one with the network messages captured by the network probe, so as to obtain a conclusion on whether the interaction protocol is consistent and safe.
[0171] It should be noted here that the above-mentioned review node provided in the embodiment of the present invention can implement all the method steps implemented in the above-mentioned interactive protocol consistency review method embodiment, and can achieve the same technical effect. The parts and beneficial effects that are the same as the method embodiment in this embodiment will not be specifically described here.
[0172] To achieve the above-mentioned object, an embodiment of the present invention provides a federated learning system, including: a review node for performing consistency review of an interactive protocol;
[0173] At least two interacting nodes participating in federated learning;
[0174] The review node is used to determine the expected protocol message of the federated learning interaction protocol according to the protocol registration information of the interactive nodes participating in the federated learning and the training parameter information of the interactive nodes when performing the federated learning interaction; obtain the real protocol message transmitted by the interactive node during the federated learning interaction process; and verify the consistency of the federated learning interaction protocol according to the expected protocol message and the real protocol message;
[0175] The interactive node is used to send protocol registration information to the review node, and to send training parameter information to the review node during the process of the at least two interactive nodes performing federated learning interaction.
[0176] Taking the interactive nodes participating in federated learning including interactive node A and interactive node B as an example, the federated learning system is as follows Figure 2 It should be noted that the embodiment of the present invention provides a review node in a federated learning system, which can implement all the method steps implemented in the above-mentioned review method embodiment for consistency of the interactive protocol, and can achieve the same technical effect. The parts and beneficial effects that are the same as those in the method embodiment in this embodiment will not be specifically described here.
[0177] like Figure 5 As shown, an electronic device 500 according to an embodiment of the present invention includes a processor 510 and a transceiver 520, wherein:
[0178] The processor 510 is used to: determine the expected protocol message of the federated learning interaction protocol according to the protocol registration information of the interactive nodes participating in the federated learning and the training parameter information of the interactive nodes when performing the federated learning interaction;
[0179] The transceiver 520 is used to: obtain the real protocol message transmitted by the interactive node during the federated learning interaction process;
[0180] The processor 510 is used to verify the consistency of the federated learning interaction protocol according to the expected protocol message and the real protocol message.
[0181] Optionally, the protocol registration information includes:
[0182] The interactive protocols supported by the interactive nodes participating in federated learning at each stage of federated learning;
[0183] The protocol message assembly rules of the interaction protocol.
[0184] Optionally, the protocol message assembly rule is used to indicate: a calculation rule for obtaining a protocol message according to training sample data and training parameters required for protocol message assembly.
[0185] Optionally, the processor 510 determines the expected protocol message of the federated learning interaction protocol according to the protocol registration information of the interactive nodes participating in the federated learning and the training parameter information of the interactive nodes when performing the federated learning interaction, including:
[0186] According to the protocol message assembly rule and using the training sample data and the training parameters, the expected protocol message of the federated learning interaction protocol is calculated.
[0187] Optionally, before determining the expected protocol message of the federated learning interaction protocol according to the protocol registration information of the interactive nodes participating in the federated learning and the training parameter information of the interactive nodes when performing the federated learning interaction, the processor 510 is further configured to:
[0188] According to the stored data samples, training sample data is allocated to each interactive node participating in federated learning.
[0189] Optionally, before respectively allocating training sample data to each interactive node participating in the federated learning, the transceiver 520 is further configured to:
[0190] Receiving a verification request sent by a first node among interactive nodes participating in federated learning, the verification request indicating: performing consistency verification on a federated interaction protocol between the first node and a second node;
[0191] The processor 510 is configured to: perform authority authentication on the first node and the second node according to the verification request;
[0192] When the authority requirements are met, training sample data are allocated to the first node and the second node respectively.
[0193] Optionally, before determining the expected protocol message of the federated learning interaction protocol according to the protocol registration information of the interactive nodes participating in the federated learning and the training parameter information of the interactive nodes when performing the federated learning interaction, the transceiver 520 is further used to:
[0194] Receiving protocol registration information of the interactive node;
[0195] During the process of the interactive node performing federated learning interaction, training parameter information sent by the interactive node is received.
[0196] Optionally, the processor 510 verifies the consistency of the federated learning interaction protocol according to the expected protocol message and the real protocol message, including:
[0197] comparing the expected protocol message with the real protocol message;
[0198] In a case where the expected protocol message is identical to the actual protocol message, it is determined that the federated learning interaction protocol is consistent.
[0199] It should be noted that the above-mentioned electronic device provided by the embodiment of the present invention can implement all the method steps implemented by the above-mentioned interactive protocol consistency review method embodiment, and can achieve the same technical effect. The parts and beneficial effects that are the same as the method embodiment in this embodiment will not be described in detail here.
[0200] An electronic device according to another embodiment of the present invention, Figure 6 As shown, it includes a transceiver 610, a processor 600, a memory 620, and a program or instruction stored in the memory 620 and executable on the processor 600; when the processor 600 executes the program or instruction, the above-mentioned interaction protocol consistency review method is implemented.
[0201] The transceiver 610 is used to receive and send data under the control of the processor 600 .
[0202] Among them, Figure 6 In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically linking together various circuits of one or more processors represented by processor 600 and memory represented by memory 620. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface. The transceiver 610 may be a plurality of components, i.e., including a transmitter and a receiver, providing a unit for communicating with various other devices on a transmission medium. The processor 600 is responsible for managing the bus architecture and general processing, and the memory 620 may store data used by the processor 600 when performing operations.
[0203] A readable storage medium according to an embodiment of the present invention stores a program or instruction thereon. When the program or instruction is executed by a processor, the steps in the interactive protocol consistency review method as described above are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0204] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0205] It should be further explained that the electronic devices described in this specification include but are not limited to smart phones, tablet computers, etc., and many of the functional components described are called modules in order to more particularly emphasize the independence of their implementation methods.
[0206] In the embodiment of the present invention, module can be implemented with software so that it can be executed by various types of processors. For example, an executable code module of an identification can include one or more physical or logical blocks of computer instructions, for example, it can be constructed as an object, process or function. Nevertheless, the executable code of the identified module does not need to be physically located together, but can include different instructions stored in different positions, and when these instructions are logically combined together, it constitutes a module and realizes the specified purpose of the module.
[0207] In fact, executable code module can be a single instruction or many instructions, and can even be distributed on a plurality of different code segments, distributed among different programs, and distributed across a plurality of memory devices. Similarly, operating data can be identified in the module, and can be implemented and organized in the data structure of any appropriate type according to any appropriate form. The operating data can be collected as a single data set, or can be distributed in different locations (including on different storage devices), and can only be present on a system or network as an electronic signal at least in part.
[0208] When a module can be implemented by software, considering the level of existing hardware technology, a person skilled in the art can build a corresponding hardware circuit to implement the corresponding function of the module that can be implemented by software without considering the cost. The hardware circuit includes a conventional very large scale integration (VLSI) circuit or gate array and existing semiconductors such as logic chips, transistors, or other discrete components. The module can also be implemented by a programmable hardware device, such as a field programmable gate array, a programmable array logic, a programmable logic device, etc.
[0209] The above exemplary embodiments are described with reference to the accompanying drawings, and many different forms and embodiments are feasible without departing from the spirit and teachings of the present invention. Therefore, the present invention should not be constructed as a limitation of the exemplary embodiments proposed herein. More specifically, these exemplary embodiments are provided so that the present invention will be perfect and complete, and the scope of the present invention will be conveyed to those who are familiar with the technology. In these figures, the component sizes and relative sizes may be exaggerated for clarity. The terms used here are only based on the purpose of describing specific exemplary embodiments and are not intended to be limiting. As used herein, unless the text clearly indicates otherwise, the singular forms "one", "an" and "the" are intended to include these multiple forms. It will be further understood that the terms "including" and / or "comprising" when used in this specification indicate the presence of the features, integers, steps, operations, components and / or components, but do not exclude the presence or increase of one or more other features, integers, steps, operations, components, components and / or their groups. Unless otherwise indicated, when stated, a range of values includes the upper and lower limits of that range and any subranges therebetween.
[0210] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for evaluating consistency of an interactive protocol, characterized in that: Applicable to review nodes, including: Determine the expected protocol message of the federated learning interaction protocol according to the protocol registration information of the interactive nodes participating in the federated learning and the training parameter information of the interactive nodes when performing the federated learning interaction; Acquire the real protocol message transmitted by the interactive node during the federated learning interaction process; the real protocol message is the protocol message actually sent by the interactive node during the federated learning interaction, and is captured in real time by the review node; the expected protocol message and the real protocol message are the same message in the federated learning interaction protocol, wherein the expected protocol message is the expected message obtained by calculation, and the real protocol message is the message actually transmitted; Verifying the consistency of the federated learning interaction protocol according to the expected protocol message and the real protocol message; The protocol registration information includes: the interactive protocol supported by the interactive nodes participating in the federated learning at each stage of the federated learning; and the protocol message assembly rule of the interactive protocol; the protocol message assembly rule is used to indicate: the calculation rule of obtaining the protocol message according to the training sample data and training parameter information required for the protocol message assembly; The method of determining the expected protocol message of the federated learning interaction protocol according to the protocol registration information of the interactive nodes participating in the federated learning and the training parameter information of the interactive nodes when performing the federated learning interaction includes: According to the protocol message assembly rule and the interaction protocol, and using the training sample data and the training parameter information, calculate the expected protocol message of the federated learning interaction protocol; Before determining the expected protocol message of the federated learning interaction protocol according to the protocol registration information of the interactive nodes participating in the federated learning and the training parameter information of the interactive nodes when performing the federated learning interaction, the method further includes: According to the stored data samples, training sample data is allocated to each interactive node participating in federated learning.
2. The method according to claim 1, characterized in that Before respectively allocating training sample data to each interactive node participating in the federated learning, the method further includes: Receiving a verification request sent by a first node among interactive nodes participating in federated learning, the verification request indicating: performing consistency verification on a federated interaction protocol between the first node and a second node; Performing authority authentication on the first node and the second node according to the verification request; The training sample data is respectively allocated to each interactive node participating in the federated learning, including: When the authority requirements are met, training sample data are allocated to the first node and the second node respectively.
3. The method according to claim 1, characterized in that Before determining the expected protocol message of the federated learning interaction protocol according to the protocol registration information of the interactive nodes participating in the federated learning and the training parameter information of the interactive nodes when performing the federated learning interaction, the method further includes: Receiving protocol registration information of the interactive node; During the process of the interactive node performing federated learning interaction, training parameter information sent by the interactive node is received.
4. The method according to claim 1, characterized in that The verifying the consistency of the federated learning interaction protocol according to the expected protocol message and the real protocol message includes: comparing the expected protocol message with the real protocol message; In a case where the expected protocol message is identical to the actual protocol message, it is determined that the federated learning interaction protocol is consistent.
5. A review node for performing consistency review of an interactive protocol, characterized in that: include: A parameter interaction module, used to determine the expected protocol message of the federated learning interaction protocol according to the protocol registration information of the interaction nodes participating in the federated learning and the training parameter information of the interaction nodes when performing the federated learning interaction; A message acquisition module, used to acquire the real protocol message transmitted by the interaction node during the federated learning interaction process; The real protocol message is the protocol message actually sent by the interactive node during the federated learning interaction, and is captured in real time by the review node; the expected protocol message and the real protocol message are the same message in the federated learning interaction protocol, wherein the expected protocol message is the expected message obtained by calculation, and the real protocol message is the message actually transmitted; A message comparison module, used to verify the consistency of the federated learning interaction protocol according to the expected protocol message and the real protocol message; The protocol registration information includes: the interactive protocol supported by the interactive nodes participating in the federated learning at each stage of the federated learning; and the protocol message assembly rule of the interactive protocol; the protocol message assembly rule is used to indicate: the calculation rule of obtaining the protocol message according to the training sample data and training parameter information required for the protocol message assembly; The parameter interaction module is specifically used for: According to the protocol message assembly rule and the interaction protocol, and using the training sample data and the training parameter information, calculate the expected protocol message of the federated learning interaction protocol; The review node also includes: The data interaction module is used to allocate training sample data to each interaction node participating in federated learning based on the stored data samples.
6. A federated learning system, characterized in that: include: Review nodes used for consistency review of interactive protocols; At least two interacting nodes participating in federated learning; Wherein, the review node is used to determine the expected protocol message of the federated learning interaction protocol according to the protocol registration information of the interactive nodes participating in the federated learning and the training parameter information of the interactive nodes when performing the federated learning interaction; obtain the real protocol message transmitted by the interactive node during the federated learning interaction process; the real protocol message is the protocol message actually sent by the interactive node during the federated learning interaction, which is captured in real time by the review node; the expected protocol message and the real protocol message are the same message in the federated learning interaction protocol, wherein the expected protocol message is the expected message obtained by calculation, and the real protocol message is the message actually transmitted; according to the expected protocol message and the real protocol message, verify the consistency of the federated learning interaction protocol; The interactive node is used to send protocol registration information to the review node, and send training parameter information to the review node during the process of the at least two interactive nodes performing federated learning interaction; The protocol registration information includes: the interactive protocols supported by the interactive nodes participating in the federated learning at various stages of the federated learning; and the protocol message assembly rules of the interactive protocols; the protocol message assembly rules are used to indicate: the calculation rules for obtaining the protocol messages according to the training sample data and training parameter information required for the protocol message assembly; The method of determining the expected protocol message of the federated learning interaction protocol according to the protocol registration information of the interactive nodes participating in the federated learning and the training parameter information of the interactive nodes when performing the federated learning interaction includes: According to the protocol message assembly rule and the interaction protocol, and using the training sample data and the training parameter information, calculate the expected protocol message of the federated learning interaction protocol; The review node is also used to allocate training sample data to each interactive node participating in the federated learning according to the stored data samples.
7. An electronic device, characterized in that: include: transceivers and processors; The processor is used to: determine the expected protocol message of the federated learning interaction protocol according to the protocol registration information of the interactive nodes participating in the federated learning and the training parameter information of the interactive nodes when performing the federated learning interaction; The transceiver is used to: obtain the real protocol message transmitted by the interactive node during the federated learning interaction process; the real protocol message is the protocol message actually sent by the interactive node during the federated learning interaction, which is captured in real time by the review node; the expected protocol message and the real protocol message are the same message in the federated learning interaction protocol, wherein the expected protocol message is the expected message obtained by calculation, and the real protocol message is the message actually transmitted; The processor is used to: verify the consistency of the federated learning interaction protocol according to the expected protocol message and the real protocol message; The protocol registration information includes: the interactive protocol supported by the interactive nodes participating in the federated learning at each stage of the federated learning; and the protocol message assembly rule of the interactive protocol; the protocol message assembly rule is used to indicate: the calculation rule of obtaining the protocol message according to the training sample data and training parameter information required for the protocol message assembly; The processor determines the expected protocol message of the federated learning interaction protocol according to the protocol registration information of the interactive nodes participating in the federated learning and the training parameter information of the interactive nodes when performing the federated learning interaction, including: According to the protocol message assembly rule and the interaction protocol, and using the training sample data and the training parameter information, calculate the expected protocol message of the federated learning interaction protocol; The processor is also used to: allocate training sample data to each interactive node participating in the federated learning according to the stored data samples.
8. An electronic device comprising: A transceiver, a processor, a memory, and a program or instruction stored in the memory and executable on the processor; characterized in that when the processor executes the program or instruction, the method for evaluating the consistency of the interactive protocol as described in any one of claims 1-4 is implemented.
9. A readable storage medium having a program or instruction stored thereon, characterized in that: When the program or instruction is executed by a processor, the steps of the method for reviewing the consistency of an interactive protocol as described in any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Decentralized federated machine learning method under privacy protection
CN111600707A
Federal calculation method, device and apparatus and storage medium
CN111914038A