Distributed negotiation method and device

By adopting multiple rounds of message interaction and timer mechanisms in a distributed system, the multi-variable negotiation value is determined, which solves the problems of low efficiency and high complexity of multi-variable Byzantine negotiation in an asynchronous network environment, and realizes an efficient and low-complexity negotiation process.

CN119814518AActive Publication Date: 2025-04-11BEIJING INST OF TECH
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411674945.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-04-11
Estimated Expiration
2044-11-21

AI Technical Summary

Technical Problem

In distributed systems, it is difficult for the prior art to efficiently implement multivariate Byzantine negotiation in an asynchronous network environment, resulting in high complexity and low efficiency.

Method used

Through multiple rounds of interactions between proposal messages, distribution messages, pre-voting messages and main voting messages, combined with timer and loop iteration, the multi-negotiation value is determined, and the expected time complexity of O(1) and the message complexity of O(n^2) are achieved.

Benefits of technology

It realizes the efficiency and low complexity of node negotiation in distributed systems, is suitable for asynchronous network environments, and improves the efficiency and security of multivariate Byzantine negotiation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119814518A_ABST
    Figure CN119814518A_ABST
Patent Text Reader

Abstract

The invention discloses a distributed negotiation method and device, which are applied to any node in a distributed system, and the method comprises the following steps: after entering a current round, broadcasting a proposal message to all nodes, and starting a first timer; after the time of the first timer is up, generating a distribution message according to the proposal message, broadcasting the distribution message to all nodes, and starting a second timer; after the time of the second timer is up, determining a pre-voting value according to the distribution message; entering an iteration point; a pre-voting message is generated and broadcasted to all nodes, and a third timer is started; after the time of the third timer is up, generating a main voting message according to the pre-voting message, broadcasting the main voting message to all nodes, and starting a fourth timer; and after the fourth timer is up, deciding a multivariate negotiation value through loop iteration according to the received main voting message, and entering an iteration point after updating a pre-voting value during loop iteration. According to the invention, distributed negotiation can be realized, the efficiency is high, and the complexity is low.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of distributed technology, and in particular to a distributed negotiation method and device. Background Art

[0002] This section is intended to provide a background or context to the embodiments of the invention recited in the claims. No admission is made that the description herein is prior art by inclusion in this section.

[0003] In distributed theory, multi-Byzantine negotiation is an important primitive, closely related to Byzantine consensus and Byzantine broadcast, and has important theoretical value. The multi-Byzantine negotiation protocol can be directly used to build the Byzantine consensus protocol and blockchain consensus system, and can also be applied to scenarios such as high-reliability distributed systems and secure multi-party computing. It has important research significance and practical value in the industry.

[0004] The error models in distributed systems mainly include crash failure and arbitrary failure. Crash failure means that the participants in the distributed system will execute according to the protocol requirements, but may crash at a certain moment and will not resume work after the crash; arbitrary failure means that the erroneous participants in the distributed system may not execute according to the protocol and can perform arbitrary behaviors, which are not controlled by the protocol, including crashes, malicious attacks, software and hardware errors, etc. Arbitrary errors are also called Byzantine failures. In distributed systems, Byzantine errors are regarded as a Byzantine adversary controlling all erroneous participants. Byzantine consensus is to implement a multi-party negotiation protocol in the presence of a Byzantine adversary.

[0005] In distributed systems, networks are mainly divided into synchronous, semi-synchronous and asynchronous. A synchronous network means that all information sent by the sender can be guaranteed to reach the receiver within Δ time, and Δ is known; a semi-synchronous network means that all information sent by the sender can be guaranteed to reach the receiver within Δ time, but Δ is unknown; an asynchronous network means that there is no such Δ, so that the information sent by all senders can be guaranteed to reach the receiver within Δ time, that is, after the information is sent from the sender, it is only guaranteed to reach the receiver in the end, but the delay may be arbitrarily large.

[0006] Multi-Byzantine negotiation is to achieve distributed negotiation under the assumption of synchronous time, where Δ is a certain time, ensuring that all messages can be transmitted within Δ time. For distributed negotiation, improving efficiency and reducing complexity has always been an urgent problem to be solved. Summary of the invention

[0007] The embodiment of the present invention provides a distributed negotiation method for implementing node negotiation in a distributed system, which has high efficiency and low complexity and is applied to any node in the distributed system. The method includes:

[0008] After entering the current round, the input value is used as the proposal value, the proposal value and the corresponding signature are broadcast to all nodes as a proposal message, and the first timer is started;

[0009] After the first timer expires, a distribution message is generated according to the proposal value in the received proposal message, and is broadcast to all nodes, and a second timer is started, wherein the distribution message includes the distribution value, and the distribution value is the proposal value in the first multi-value set;

[0010] After the second timer expires, the pre-voting value is determined based on the received distribution message, and the current iteration number is set to 1; the iteration point is entered; based on the pre-voting value and the iteration number, a pre-voting message is generated and broadcast to all nodes, and the third timer is started;

[0011] After the third timer expires, a main voting message is generated based on the received pre-voting message, and broadcast to all nodes, and the fourth timer is started;

[0012] After the fourth timer expires, the multi-negotiation value is determined through loop iteration based on the received main voting message. After the pre-voting value is updated during the loop iteration, the iteration point is entered and the determined multi-negotiation value is used as the output result of the distributed system negotiation.

[0013] The embodiment of the present invention further provides a distributed negotiation device for implementing node negotiation in a distributed system, which has high efficiency and low complexity and is applied to any node in the distributed system. The device includes:

[0014] A proposal message broadcast module, used to, after entering the current round, use the input value as the proposal value, broadcast the proposal value and the corresponding signature as a proposal message to all nodes, and start the first timer;

[0015] A distribution message broadcast module is used to generate a distribution message according to the proposal value in the received proposal message after the first timer expires, broadcast it to all nodes, and start a second timer, wherein the distribution message includes the distribution value, and the distribution value is the proposal value in the first multi-value set;

[0016] The pre-voting message broadcasting module is used to determine the pre-voting value according to the received distribution message after the second timer expires, set the current iteration number to 1, enter the iteration point, generate the pre-voting message according to the pre-voting value and the iteration number, broadcast it to all nodes, and start the third timer;

[0017] A main voting message broadcasting module is used to generate a main voting message according to the received pre-voting message after the third timer expires, broadcast it to all nodes, and start the fourth timer;

[0018] The multi-negotiation value determination module is used to determine the multi-negotiation value through loop iteration according to the received main voting message after the fourth timer expires, enter the iteration point after updating the pre-voting value during the loop iteration, and use the determined multi-negotiation value as the output result of the distributed system negotiation.

[0019] An embodiment of the present invention further provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned distributed negotiation method when executing the computer program.

[0020] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the distributed negotiation method is implemented.

[0021] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the distributed negotiation method is implemented.

[0022] In an embodiment of the present invention, after entering the current round, the input value is used as the proposal value, the proposal value and the corresponding signature are broadcast to all nodes as a proposal message, and the first timer is started; after the first timer expires, a distribution message is generated according to the proposal value in the received proposal message, and is broadcast to all nodes, and the second timer is started, the distribution message includes a distribution value, and the distribution value is a proposal value in the first multi-value set; after the second timer expires, the pre-voting value is determined according to the received distribution message, and the current iteration number is set to 1; the iteration point is entered; according to the pre-voting value and the iteration number, a pre-voting message is generated, and is broadcast to all nodes, and the third timer is started; after the third timer expires, according to the received pre-voting message, a main voting message is generated, and is broadcast to all nodes, and the fourth timer is started; after the fourth timer expires, according to the received main voting message, the multi-negotiation value is determined through loop iteration, the pre-voting value is updated during the loop iteration, and then the iteration point is entered, and the determined multi-negotiation value is used as the output result of the distributed system negotiation. Through the above-mentioned proposal messages, distribution messages, pre-voting messages, and main voting messages, the multiple negotiation values ​​are finally determined through loop iteration. After the pre-voting value is updated during the loop iteration, the iteration point is entered, so that the pre-voting value is continuously updated to ensure that the multiple negotiation values ​​are determined. The expected time complexity of O(1) and the message complexity of O(n^2) are achieved, with low complexity and high efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0024] Figure 1 is a flow chart of a distributed negotiation method in an embodiment of the present invention;

[0025] Figure 2 A flow chart of generating a distribution message in an embodiment of the present invention;

[0026] Figure 3 A flowchart of generating a pre-voting message in an embodiment of the present invention;

[0027] Figure 4 A flowchart of generating a main voting message in an embodiment of the present invention;

[0028] Figure 5 A flowchart of determining a multi-negotiation value through loop iteration in an embodiment of the present invention;

[0029] Figure 6 is a schematic diagram of a distributed negotiation device in an embodiment of the present invention;

[0030] Figure 7 Schematic diagram of a computer device in an embodiment of the present invention. DETAILED DESCRIPTION

[0031] To make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings. Here, the exemplary embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.

[0032] The acquisition, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.

[0033] In the embodiment of the present invention, the distributed negotiation is implemented by multi-Byzantine negotiation, and the multi-Byzantine negotiation process is defined as follows:

[0034] The multi-Byzantine negotiation process includes n nodes, each of which has a multi-input value. Through multiple rounds of interaction among the nodes, a consensus is finally reached on a multi-input value. Nature of Byzantine negotiation:

[0035] (1) Validity: If all nodes propose a value, all honest nodes will decide on this value.

[0036] (2) Consistency: If an honest node decides on a value, all honest nodes will decide on this value.

[0037] (3) Termination: All honest nodes will eventually decide on a value.

[0038] (4) Integrity: Honest nodes will not make the same decision twice.

[0039] The adversary model of the distributed system includes a static adversary and an adaptive adversary. A static adversary refers to an adversary that can select a group of participants as malicious participants before the protocol runs; an adaptive adversary refers to an adversary that can dynamically select participants as erroneous participants based on the information it obtains during the protocol run, which simulates the scenario where the adversary gradually captures the distributed system. In the embodiment of the present invention, the adversary model is an adaptive adversary, and the solution has higher security.

[0040] The embodiment of the present invention utilizes digital signatures, hash functions, threshold signatures, and threshold random number generation protocols as cryptographic components. The above cryptographic components can be instantiated through any corresponding security scheme.

[0041] Figure 1 Flowchart of a distributed negotiation method in an embodiment of the present invention. The method is applied to any node in a distributed system. The method includes:

[0042] Step 101, after entering the current round, the input value is used as the proposal value, the proposal value and the corresponding signature are broadcasted to all nodes as a proposal message, and the first timer is started;

[0043] Step 102, after the first timer expires, a distribution message is generated according to the proposal value in the received proposal message, and is broadcast to all nodes, and a second timer is started, wherein the distribution message includes the distribution value, and the distribution value is the proposal value in the first multi-value set;

[0044] Step 103, after the second timer expires, determine the pre-voting value according to the received distribution message, set the current iteration number to 1; enter the iteration point; generate a pre-voting message according to the pre-voting value and the iteration number, broadcast it to all nodes, and start the third timer;

[0045] Step 104: after the third timer expires, a main voting message is generated according to the received pre-voting message, and broadcasted to all nodes, and a fourth timer is started;

[0046] Step 105, after the fourth timer expires, the multi-negotiation value is determined through loop iteration according to the received main voting message, and the iteration point is entered after the pre-voting value is updated during the loop iteration, and the determined multi-negotiation value is used as the output result of the distributed system negotiation.

[0047] In the embodiment of the present invention, the proposal message, distribution message, pre-voting message and main voting message are used, and finally the multi-negotiation value is determined through loop iteration. After the pre-voting value is updated during the loop iteration, the iteration point is entered, so that the pre-voting value is continuously updated to ensure that the multi-negotiation value is determined, achieving the expected time complexity of O(1) and the message complexity of O(n^2), with low complexity and high efficiency.

[0048] Each step is described in detail below. The method of the embodiment of the present invention is for any node, that is, all nodes execute steps 101 to 106. The solution proposed in the embodiment of the present invention is executed in rounds, each round includes a number of iteration steps, and the next round begins after the iteration step is completed. The iteration step starts from the iteration point.

[0049] The event for entering step 101 is when the previous round is completed (if it is the first round, when the system is started).

[0050] In step 101, after entering the current round, the input value is used as the proposal value, the proposal value and the corresponding signature are broadcasted to all nodes as a proposal message, and the first timer is started; the first timer waits for Δ time;

[0051] The event for entering step 102 is when step 101 is completed and the first timer expires.

[0052] In step 102, after the first timer expires, a distribution message is generated according to the proposal value in the received proposal message, and is broadcast to all nodes, and a second timer is started, wherein the distribution message includes a distribution value, and the distribution value is a proposal value in the first multi-value set; the second timer waits for a Δ time;

[0053] See also Figure 2 The flowchart of generating a distribution message in an embodiment of the present invention includes:

[0054] Step 201, perform a first verification on the signature of the received proposal message. If the first verification passes, add the proposal value and signature in the proposal message to the first multi-value set corresponding to the message source;

[0055] Step 202: When the first multi-value set of the master node is not empty, the proposal value in the first multi-value set of the master node is used as the distribution value, and the threshold signature algorithm is used to perform a threshold signature on the distribution value to obtain a first threshold signature share, and the distribution value, the threshold signature and the first threshold signature share are used as the distribution message;

[0056] Step 203: When the first multi-value set of the master node is empty, a null symbol is used as a distribution message.

[0057] In one embodiment, the method further comprises:

[0058] Call the threshold random number generation protocol (f+1,n)- together with all other nodes, publicly select a random number as the public random number, and determine the node corresponding to the public random number as the master node.

[0059] The event for entering step 103 is when the second step is completed, or the process execution jumps to this step.

[0060] In step 103, after the second timer expires, the pre-voting value is determined according to the received distribution message, and the current iteration number is set to 1; the iteration point is entered; a pre-voting message is generated according to the pre-voting value and the iteration number, and is broadcast to all nodes, and the third timer is started; and a Δ time is waited;

[0061] See also Figure 3 The flowchart of generating a pre-voting message in an embodiment of the present invention includes:

[0062] Step 301, performing a second verification on the threshold signature of the received distribution message and the first threshold signature share, and if the second verification passes, adding the distribution value in the distribution message to the second multivariate value set;

[0063] Step 302: If the received distribution message meets the first condition, the first threshold signature share of the distribution message meeting the first condition is combined into a first threshold signature through the threshold signature share combination algorithm, the distribution value is used as the multi-consensus value, 1 is determined as the pre-voting value, the hash value of the distribution value is used as the auxiliary value, and the threshold signature of the distribution value is used as the auxiliary signature; the first condition is that a first number (nf in the embodiment of the present invention) of matching distribution messages are received, and the distribution value and the threshold signature of the distribution message are in the second multi-value set, and the second multi-value set has only this one element;

[0064] Step 303: If the received distribution message does not satisfy the first condition, the empty symbol is used as the multi-negotiation value, and 0 is determined as the pre-voting value.

[0065] In one embodiment, generating a pre-voting message according to the pre-voting value and the iteration number includes:

[0066] Using the threshold signature algorithm, the pre-voting value and the iteration number are threshold signed to obtain the second threshold signature share;

[0067] If the iteration number is 1 and the pre-voting value is 1, the pre-voting value, auxiliary value, auxiliary signature and second threshold signature share are used as the pre-voting message;

[0068] If the iteration number is not 1 or the pre-voting value is not 1, the pre-voting value and the second threshold signature share are used as the pre-voting message.

[0069] The event of entering step 104 is when step 103 is completed and the third timer expires;

[0070] In step 104, after the third timer expires, a main voting message is generated according to the received pre-voting message and broadcast to all nodes, and a fourth timer is started to wait for Δ time;

[0071] Figure 4 This is a flow chart of generating a main voting message in an embodiment of the present invention. In one embodiment, generating a main voting message according to a received pre-voting message includes:

[0072] Step 401, performing a third verification on the auxiliary signature and the second threshold signature share of the received pre-voting message;

[0073] Step 402: When the third verification fails, discard the received pre-voting message;

[0074] Step 403: when the third verification passes, if the received pre-voting message satisfies the second condition, the pre-voting value in the pre-voting message that satisfies the second condition is used as the main voting value, and the second threshold signature shares in the second number of matching pre-voting messages are combined into a second threshold signature through the threshold signature combination algorithm, and the main voting value and the second threshold signature are used as the main voting message, and the second condition is that the second number of matching pre-voting messages are received;

[0075] Step 404: If the received pre-voting message does not satisfy the second condition, a null symbol is used as the main voting message.

[0076] The condition for entering step 105 is that step 104 is completed and the fourth timer expires;

[0077] In step 105, after the fourth timer expires, the multiple negotiation values ​​are determined through loop iteration according to the received main voting message, and the iteration point is entered after the pre-voting value is updated during the loop iteration, and the determined multiple negotiation values ​​are used as the output result of the distributed system negotiation;

[0078] In one embodiment, according to the received main voting message, the multiple negotiation values ​​are determined through loop iteration, and the iteration point is entered after the pre-voting value is updated during the loop iteration, including:

[0079] Obtaining a binary value set according to the received primary voting message, the binary value set comprising a plurality of binary values, wherein each primary voting value in the primary voting message and the corresponding second threshold signature form a binary value;

[0080] If the number of iterations is 1, set the public coin toss value to 1;

[0081] If the number of iterations is not 1, the threshold random number generation protocol is called with all other nodes to publicly select a binary random number as the public coin toss value;

[0082] According to the public coin toss value and the binary value set, the multi-negotiation value is determined through loop iteration, and the iteration point is entered after the pre-voting value is updated during the loop iteration.

[0083] In one embodiment, a binary value set is obtained according to the received primary voting message, including:

[0084] Verify the second threshold signature of the received primary voting message;

[0085] When the fourth verification fails, the received main voting message is discarded;

[0086] When the fourth verification passes, the main voting value and the second threshold signature in the main voting message are added to the binary value set, and the binary value counter corresponding to the main voting value is incremented by one.

[0087] Figure 5 The flowchart of determining a multi-negotiation value through loop iteration in an embodiment of the present invention is as follows. In one embodiment, the multi-negotiation value is determined through loop iteration according to a public coin tossing value and a binary value set, and an iteration point is entered after the pre-voting value is updated during the loop iteration, including:

[0088] Step 501: If the binary value set satisfies the third condition, the only primary voting value in the binary value set is used as the binary negotiation value, and the third condition is that the binary value set only contains a binary group consisting of the only primary voting value and the second threshold signature;

[0089] Step 502, if the binary negotiation value is equal to the public coin tossing value, determine the binary negotiation value;

[0090] Step 503, if the determined binary negotiation value is 1, determine the multi-negotiation value;

[0091] Step 504: If the determined multi-negotiation value is a null symbol, the next round is started. At the same time, in the current round, the current iteration number is increased by 1, the binary negotiation value is used as the pre-voting value of the current iteration, and the node is jumped to the iteration point; and the binary negotiation value is used as a binary termination message and broadcasted to all nodes;

[0092] Step 505: if the binary negotiation value is not equal to the public coin tossing value, add 1 to the current iteration number, use only the binary negotiation value as the pre-voting value of the current iteration, and jump to the iteration point;

[0093] Step 506: If the binary value set does not satisfy the third condition, add 1 to the current iteration number, use the public coin toss value as the pre-voting value of the current iteration, and jump to the iteration point.

[0094] In one embodiment, the method further comprises:

[0095] determining in real time whether a second number of matching binary termination messages are received;

[0096] If yes, broadcast the binary negotiation value as a binary termination message to all nodes, and determine the binary negotiation value corresponding to the binary termination message;

[0097] If the determined binary negotiation value is 1, the plural negotiation value is determined.

[0098] The embodiment of the present invention further proposes a distributed negotiation device, the principle of which is similar to that of the distributed negotiation and will not be described in detail here.

[0099] Figure 6 This is a schematic diagram of the structure of a distributed negotiation device in an embodiment of the present invention, which is applied to any node in a distributed system. The device includes:

[0100] The proposal message broadcast module 601 is used to, after entering the current round, use the input value as the proposal value, broadcast the proposal value and the corresponding signature as a proposal message to all nodes, and start the first timer;

[0101] A distribution message broadcast module 602 is used to generate a distribution message according to the proposal value in the received proposal message after the first timer expires, broadcast it to all nodes, and start a second timer, wherein the distribution message includes the distribution value, and the distribution value is the proposal value in the first multi-value set;

[0102] The pre-voting message broadcasting module 603 is used to determine the pre-voting value according to the received distribution message after the second timer expires, set the current iteration number to 1, enter the iteration point, generate the pre-voting message according to the pre-voting value and the iteration number, broadcast it to all nodes, and start the third timer;

[0103] The main voting message broadcast module 604 is used to generate a main voting message according to the received pre-voting message after the third timer expires, broadcast it to all nodes, and start the fourth timer;

[0104] The multi-negotiation value determination module 605 is used to determine the multi-negotiation value through loop iteration according to the received main voting message after the fourth timer expires, enter the iteration point after updating the pre-voting value during the loop iteration, and use the determined multi-negotiation value as the output result of the distributed system negotiation.

[0105] In one embodiment, the distribution message broadcast module is used to:

[0106] Perform a first verification on the signature of the received proposal message. If the first verification passes, add the proposal value and signature in the proposal message to the first multi-value set corresponding to the message source;

[0107] When the first multi-value set of the master node is not empty, the proposal value in the first multi-value set of the master node is used as the distribution value, and the threshold signature algorithm is used to perform the threshold signature on the distribution value to obtain the first threshold signature share, and the distribution value, the threshold signature and the first threshold signature share are used as the distribution message;

[0108] When the first multi-value set of the master node is empty, an empty symbol is used as the distribution message.

[0109] In one embodiment, the distribution message broadcast module is further used to:

[0110] The threshold random number generation protocol is called together with all other nodes to publicly select a random number as the public random number, and the node corresponding to the public random number is determined as the master node.

[0111] In one embodiment, the pre-voting message broadcast module is used to:

[0112] Performing a second verification on the threshold signature of the received distribution message and the first threshold signature share, and if the second verification passes, adding the distribution value in the distribution message to the second multivariate value set;

[0113] If the received distribution message meets the first condition, the first threshold signature share of the distribution message that meets the first condition is combined into a first threshold signature through the threshold signature share combination algorithm, the distribution value is used as the multi-consensus value, and 1 is determined as the pre-voting value, the hash value of the distribution value is used as the auxiliary value, and the threshold signature of the distribution value is used as the auxiliary signature; the first condition is that a first number of matching distribution messages are received, and the distribution value and the threshold signature of the distribution message are in the second multi-value set, and the second multi-value set has only this one element;

[0114] If the received distribution message does not meet the first condition, the null symbol is used as the multi-negotiation value and 0 is determined as the pre-voting value;

[0115] In one embodiment, the pre-voting message broadcast module is used to:

[0116] Using the threshold signature algorithm, the pre-voting value and the iteration number are threshold signed to obtain the second threshold signature share;

[0117] If the iteration number is 1 and the pre-voting value is 1, the pre-voting value, auxiliary value, auxiliary signature and second threshold signature share are used as the pre-voting message;

[0118] If the iteration number is not 1 or the pre-voting value is not 1, the pre-voting value and the second threshold signature share are used as the pre-voting message.

[0119] In one embodiment, the main voting message broadcast module is used to:

[0120] Perform a third verification on the auxiliary signature and the second threshold signature share of the received pre-voting message;

[0121] When the third verification fails, the received pre-voting message is discarded;

[0122] When the third verification passes, if the received pre-voting message meets the second condition, the pre-voting value in the pre-voting message that meets the second condition is used as the main voting value, and the second threshold signature shares in the second number of matching pre-voting messages are combined into a second threshold signature through the threshold signature combination algorithm, and the main voting value and the second threshold signature are used as the main voting message, and the second condition is that the second number of matching pre-voting messages are received;

[0123] If the received pre-voting message does not meet the second condition, the empty symbol is used as the main voting message.

[0124] In one embodiment, the multi-negotiated value determination module is used to:

[0125] Obtaining a binary value set according to the received primary voting message, the binary value set comprising a plurality of binary values, wherein each primary voting value in the primary voting message and the corresponding second threshold signature form a binary value;

[0126] If the number of iterations is 1, set the public coin toss value to 1;

[0127] If the number of iterations is not 1, the threshold random number generation protocol is called with all other nodes to publicly select a binary random number as the public coin toss value;

[0128] According to the public coin toss value and the binary value set, the multi-negotiation value is determined through loop iteration, and the iteration point is entered after the pre-voting value is updated during the loop iteration.

[0129] In one embodiment, the multi-negotiated value determination module is used to:

[0130] Verify the second threshold signature of the received primary voting message;

[0131] When the fourth verification fails, the received main voting message is discarded;

[0132] When the fourth verification passes, the main voting value and the second threshold signature in the main voting message are added to the binary value set, and the binary value counter corresponding to the main voting value is incremented by one.

[0133] In one embodiment, the multi-negotiated value determination module is used to:

[0134] If the binary value set satisfies the third condition, the unique primary voting value in the binary value set is used as the binary negotiation value, wherein the third condition is that the binary value set only contains a binary group consisting of the unique primary voting value and the second threshold signature;

[0135] If the binary negotiation value is equal to the public coin toss value, determining the binary negotiation value;

[0136] If the determined binary negotiation value is 1, the plural negotiation value is determined;

[0137] If the determined multi-negotiation value is a null symbol, the next round is started. At the same time, in the current round, the current iteration number is increased by 1, the binary negotiation value is used as the pre-voting value of the current iteration, and the node is jumped to the iteration point; and the binary negotiation value is used as the binary termination message and broadcasted to all nodes;

[0138] If the binary negotiation value is not equal to the public coin toss value, add 1 to the current iteration number, use only the binary negotiation value as the pre-voting value of the current iteration, and jump to the iteration point;

[0139] If the binary value set does not satisfy the third condition, add 1 to the current iteration number, use the public coin toss value as the pre-voting value of the current iteration, and jump to the iteration point.

[0140] In one embodiment, the multi-negotiation value determination module is further configured to:

[0141] determining in real time whether a second number of matching binary termination messages are received;

[0142] If yes, broadcast the binary negotiation value as a binary termination message to all nodes, and determine the binary negotiation value corresponding to the binary termination message;

[0143] If the determined binary negotiation value is 1, the plural negotiation value is determined.

[0144] To summarize, in the method and device proposed in the embodiment of the present invention, after entering the current round, the input value is used as the proposal value, the proposal value and the corresponding signature are broadcast to all nodes as a proposal message, and the first timer is started; after the first timer expires, a distribution message is generated according to the proposal value in the received proposal message, and is broadcast to all nodes, and the second timer is started, the distribution message includes a distribution value, and the distribution value is the proposal value in the first multi-value set; after the second timer expires, the pre-voting value is determined according to the received distribution message, and the current iteration number is set to 1; enter the iteration point; according to the pre-voting value and the iteration number, a pre-voting message is generated, and is broadcast to all nodes, and the third timer is started; after the third timer expires, a main voting message is generated according to the received pre-voting message, and is broadcast to all nodes, and the fourth timer is started; after the fourth timer expires, a binary value set is obtained according to the received main voting message; according to the public coin value and the binary value set, the multi-negotiation value is determined through a loop iteration, and the iteration point is entered after the pre-voting value is updated during the loop iteration. Through the above-mentioned proposal messages, distribution messages, pre-voting messages, and main voting messages, the multi-negotiation value is finally determined through loop iteration. After the pre-voting value is updated during the loop iteration, the iteration point is entered, so that the pre-voting value is continuously updated to ensure that the multi-negotiation value is determined. The expected time complexity of O(1) and the message complexity of O(n^2) are achieved, with low complexity and high efficiency. For static adversaries, the scheme of the present invention is expected to terminate in 11 steps, and in the best case, it terminates in 4 steps. For adaptive adversaries, the scheme of the present invention is expected to terminate in 12 steps, and in the best case, it terminates in 5 steps. The most efficient synchronous multi-Byzantine negotiation method currently is expected to terminate in 10 steps for static adversaries, and in the best case, it terminates in 6 steps. For adaptive adversaries, it is expected to terminate in 16 steps, and in the best case, it terminates in 9 steps.

[0145] An embodiment of the present invention further provides a computer device, Figure 7 This is a schematic diagram of a computer device in an embodiment of the present invention. The computer device 700 includes a memory 710, a processor 720, and a computer program 730 stored in the memory 710 and executable on the processor 720. When the processor 720 executes the computer program 730, the above-mentioned distributed negotiation method is implemented.

[0146] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the distributed negotiation method is implemented.

[0147] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the distributed negotiation method is implemented.

[0148] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0149] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0150] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0151] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0152] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A distributed negotiation method, characterized in that: Applied to any node in a distributed system, the method comprises: After entering the current round, the input value is used as the proposal value, the proposal value and the corresponding signature are broadcast to all nodes as a proposal message, and the first timer is started; After the first timer expires, a distribution message is generated according to the proposal value in the received proposal message, and is broadcast to all nodes, and a second timer is started, wherein the distribution message includes the distribution value, and the distribution value is the proposal value in the first multi-value set; After the second timer expires, the pre-voting value is determined based on the received distribution message, and the current iteration number is set to 1; the iteration point is entered; based on the pre-voting value and the iteration number, a pre-voting message is generated and broadcast to all nodes, and the third timer is started; After the third timer expires, a main voting message is generated based on the received pre-voting message, and broadcast to all nodes, and the fourth timer is started; After the fourth timer expires, the multi-negotiation value is determined through loop iteration based on the received main voting message. After the pre-voting value is updated during the loop iteration, the iteration point is entered and the determined multi-negotiation value is used as the output result of the distributed system negotiation.

2. The method according to claim 1, characterized in that Generate a distribution message based on the proposal value in the received proposal message, including: Perform a first verification on the signature of the received proposal message. If the first verification passes, add the proposal value and signature in the proposal message to the first multi-value set corresponding to the message source; When the first multi-value set of the master node is not empty, the proposal value in the first multi-value set of the master node is used as the distribution value, and the threshold signature algorithm is used to perform the threshold signature on the distribution value to obtain the first threshold signature share, and the distribution value, the threshold signature and the first threshold signature share are used as the distribution message; When the first multi-value set of the master node is empty, an empty symbol is used as the distribution message.

3. The method according to claim 1, characterized in that Also includes: The threshold random number generation protocol is called together with all other nodes to publicly select a random number as the public random number, and the node corresponding to the public random number is determined as the master node.

4. The method according to claim 1, characterized in that Based on the received distribution message, determine the pre-voting value, including: Performing a second verification on the threshold signature of the received distribution message and the first threshold signature share, and if the second verification passes, adding the distribution value in the distribution message to the second multivariate value set; If the received distribution message meets the first condition, the first threshold signature share of the distribution message that meets the first condition is combined into a first threshold signature through the threshold signature share combination algorithm, the distribution value is used as the multi-consensus value, and 1 is determined as the pre-voting value, the hash value of the distribution value is used as the auxiliary value, and the threshold signature of the distribution value is used as the auxiliary signature; the first condition is that a first number of matching distribution messages are received, and the distribution value and the threshold signature of the distribution message are in the second multi-value set, and the second multi-value set has only this one element; If the received distribution message does not satisfy the first condition, the empty symbol is used as the multi-negotiation value, and 0 is determined as the pre-voting value.

5. The method according to claim 4, characterized in that Generate a pre-voting message based on the pre-voting value and the number of iterations, including: Using the threshold signature algorithm, the pre-voting value and the iteration number are threshold signed to obtain the second threshold signature share; If the iteration number is 1 and the pre-voting value is 1, the pre-voting value, auxiliary value, auxiliary signature and second threshold signature share are used as the pre-voting message; If the iteration number is not 1 or the pre-voting value is not 1, the pre-voting value and the second threshold signature share are used as the pre-voting message.

6. The method according to claim 1, characterized in that Generate a main voting message based on the received pre-voting message, including: Perform a third verification on the auxiliary signature and the second threshold signature share of the received pre-voting message; When the third verification fails, the received pre-voting message is discarded; When the third verification passes, if the received pre-voting message meets the second condition, the pre-voting value in the pre-voting message that meets the second condition is used as the main voting value, and the second threshold signature shares in the second number of matching pre-voting messages are combined into a second threshold signature through the threshold signature combination algorithm, and the main voting value and the second threshold signature are used as the main voting message, and the second condition is that the second number of matching pre-voting messages are received; If the received pre-voting message does not meet the second condition, the empty symbol is used as the main voting message.

7. The method according to claim 1, characterized in that According to the received main voting message, the multi-negotiation value is determined through loop iteration, and the pre-voting value is updated during the loop iteration to enter the iteration point, including: Obtaining a binary value set according to the received primary voting message, the binary value set comprising a plurality of binary values, wherein each primary voting value in the primary voting message and the corresponding second threshold signature form a binary value; If the number of iterations is 1, set the public coin toss value to 1; If the number of iterations is not 1, the threshold random number generation protocol is called with all other nodes to publicly select a binary random number as the public coin toss value; According to the public coin value and the binary value set, the multi-negotiation value is determined through loop iteration, and the iteration point is entered after the pre-voting value is updated during the loop iteration.

8. The method according to claim 7, characterized in that According to the received main voting message, a binary value set is obtained, including: Verify the second threshold signature of the received primary voting message; When the fourth verification fails, the received main voting message is discarded; When the fourth verification passes, the main voting value and the second threshold signature in the main voting message are added to the binary value set, and the binary value counter corresponding to the main voting value is incremented by one.

9. The method according to claim 7, characterized in that According to the public coin value and the binary value set, the multi-negotiation value is determined through loop iteration, and the pre-voting value is updated during the loop iteration to enter the iteration point, including: If the binary value set satisfies the third condition, the unique primary voting value in the binary value set is used as the binary negotiation value, wherein the third condition is that the binary value set only contains a binary group consisting of the unique primary voting value and the second threshold signature; If the binary negotiation value is equal to the public coin toss value, determining the binary negotiation value; If the determined binary negotiation value is 1, the plural negotiation value is determined; If the determined multi-negotiation value is a null symbol, the next round is started. At the same time, in the current round, the current iteration number is increased by 1, the binary negotiation value is used as the pre-voting value of the current iteration, and the node is jumped to the iteration point; and the binary negotiation value is used as the binary termination message and broadcasted to all nodes; If the binary negotiation value is not equal to the public coin tossing value, add 1 to the current iteration number, use only the binary negotiation value as the pre-voting value of the current iteration, and jump to the iteration point; If the binary value set does not satisfy the third condition, add 1 to the current iteration number, use the public coin toss value as the pre-voting value of the current iteration, and jump to the iteration point.

10. The method according to claim 9, characterized in that Also includes: determining in real time whether a second number of matching binary termination messages are received; If yes, broadcast the binary negotiation value as a binary termination message to all nodes, and determine the binary negotiation value corresponding to the binary termination message; If the determined binary negotiation value is 1, the plural negotiation value is determined.

11. A distributed negotiation device, characterized in that: Applied to any node in a distributed system, the device comprises: A proposal message broadcast module, used to, after entering the current round, use the input value as the proposal value, broadcast the proposal value and the corresponding signature as a proposal message to all nodes, and start the first timer; A distribution message broadcast module is used to generate a distribution message according to the proposal value in the received proposal message after the first timer expires, broadcast it to all nodes, and start a second timer, wherein the distribution message includes the distribution value, and the distribution value is the proposal value in the first multi-value set; The pre-voting message broadcasting module is used to determine the pre-voting value according to the received distribution message after the second timer expires, set the current iteration number to 1, enter the iteration point, generate the pre-voting message according to the pre-voting value and the iteration number, broadcast it to all nodes, and start the third timer; A main voting message broadcasting module is used to generate a main voting message according to the received pre-voting message after the third timer expires, broadcast it to all nodes, and start the fourth timer; The multi-negotiation value determination module is used to determine the multi-negotiation value through loop iteration according to the received main voting message after the fourth timer expires, enter the iteration point after updating the pre-voting value during the loop iteration, and use the determined multi-negotiation value as the output result of the distributed system negotiation.

12. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 10 is implemented.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.

14. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.

Citation Information

Patent Citations

  • Binary negotiation method and device, electronic equipment and storage medium

    CN115396432A

  • Asynchronous constant time multivariate verifiable consensus method and device

    CN116318842A

  • Synchronous consensus method and device

    CN118677617A

  • Consensus processing method and device of block chain network, equipment and storage medium

    CN118714139A

  • Block confirmation method, device and storage medium

    WO2020108419A1