Distributed negotiation method and apparatus

By introducing a timer mechanism and multi-round message interaction in the distributed system, combined with digital signatures and threshold signatures, the efficiency and complexity problems of multivariate Byzantine negotiation under the synchronous time assumption are solved, achieving efficient negotiation with O(1) time complexity and O(n^2) message complexity.

CN119814518BActive Publication Date: 2026-03-20BEIJING INST OF TECH
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

In distributed systems, existing technologies struggle to achieve efficient multi-way Byzantine negotiation under the assumption of synchronous time, and the complexity is also high.

Method used

By introducing a timer mechanism into the distributed system, and employing multiple rounds of interaction between proposal messages, distribution messages, pre-voting messages, and main voting messages, combined with digital signatures and threshold signatures, a cyclic iterative decision-making process for multi-variable negotiation values ​​is achieved, ensuring that negotiation is completed with an expected time complexity of O(1) and a message complexity of O(n^2).

Benefits of technology

It achieves efficient and low-complexity multi-party negotiation in distributed systems, enabling rapid consensus in the face of adaptive adversaries, reducing system complexity and improving negotiation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119814518B_ABST
    Figure CN119814518B_ABST
Patent Text Reader

Abstract

The application discloses a kind of distributed negotiation method and device, it is applied to any node in distributed system, this method includes: after entering current round, proposal message is broadcasted to all nodes, and first timer is started;After first timer expires, according to proposal message, distribution message is generated and broadcasted to all nodes, and second timer is started;After second timer expires, determine pre-vote value according to distribution message;Enter iteration point;Pre-vote message is generated and broadcasted to all nodes, and third timer is started;After third timer expires, according to pre-vote message, generate main vote message, and broadcast to all nodes, and fourth timer is started;After fourth timer expires, according to the main vote message received, decide the value of multiple negotiation by loop iteration, after updating pre-vote value in loop iteration, enter iteration point.The application can realize distributed negotiation, high efficiency, and low complexity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of distributed technology, and in particular to a distributed negotiation method and apparatus. Background Technology

[0002] This section is intended to provide background or context for the embodiments of the invention set forth in the claims. The description herein is not an admission that it is prior art simply because it is included in this section.

[0003] In distributed system theory, multi-Byzantine negotiation is an important primitive closely related to Byzantine consensus and Byzantine broadcasting, possessing significant theoretical value. Multi-Byzantine negotiation protocols can be directly used to construct Byzantine consensus protocols and blockchain consensus systems, and can also be applied to scenarios such as highly reliable distributed systems and secure multi-party computation, holding significant research and practical value in industry.

[0004] Error models in distributed systems primarily include crash failures and arbitrary failures. A crash failure refers to a situation where participants in the distributed system execute according to the protocol, but may crash at some point and not recover. An arbitrary failure refers to a situation where a faulty participant in the distributed system may not execute according to the protocol, capable of performing arbitrary actions uncontrolled by the protocol, including crashes, malicious attacks, and hardware / software errors. Arbitrary failures are also known as Byzantine failures. In distributed systems, a Byzantine failure is considered as a situation where a Byzantine adversary controls all faulty participants. Byzantine consensus aims to achieve a multi-party negotiation protocol in the presence of a Byzantine adversary.

[0005] In distributed systems, networks are mainly classified as synchronous, partially synchronous, and asynchronous. A synchronous network guarantees that all messages sent by all senders will reach the receiver within a time Δ, where Δ is known. A partially synchronous network guarantees that all messages sent by all senders will reach the receiver within a time Δ, but Δ is unknown. An asynchronous network does not have such a Δ that guarantees that all messages sent by all senders will reach the receiver within a time Δ; that is, after a message is sent by a sender, it is only guaranteed that it will eventually reach the receiver, but the delay can be arbitrarily large.

[0006] Multi-Byzantine negotiation, under the assumption of synchronous time, achieves distributed negotiation, where Δ is a fixed time, ensuring that all messages can be transmitted within Δ time. Improving efficiency and reducing complexity has always been a pressing issue for distributed negotiation. Summary of the Invention

[0007] This invention provides a distributed negotiation method for achieving node negotiation in a distributed system. It is highly efficient and low-complexity, and can be applied to any node in a distributed system. The method includes:

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

[0009] After the first timer expires, a distribution message is generated based on the proposal value in the received proposal message and broadcast to all nodes, and a second timer is started. The distribution message includes a distribution value, which 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 messages and broadcast to all nodes, thus starting the fourth timer;

[0012] After the fourth timer expires, based on the received main voting message, the multi-party negotiation value is determined through iterative looping. During iterative looping, the pre-voting value is updated before entering the iteration point, and the determined multi-party negotiation value is used as the output result of the distributed system negotiation.

[0013] This invention also provides a distributed negotiation device for realizing node negotiation in a distributed system. It is highly efficient and low-complexity, and can be applied to any node in a distributed system. The device includes:

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

[0015] The message distribution broadcast module is used to generate a distribution message based on the proposal value in the received proposal message after the first timer expires, and broadcast it to all nodes, and start the second timer. The distribution message includes a distribution value, which 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 based on the received distribution message after the second timer expires, set the current iteration number to 1, enter the iteration point, generate a pre-voting message based on the pre-voting value and the iteration number, broadcast it to all nodes, and start the third timer.

[0017] The main voting message broadcast module is used to generate the main voting message based on the received pre-voting messages after the third timer expires, and broadcast it to all nodes, thus starting the fourth timer;

[0018] The multi-party negotiation value determination module is used to determine the multi-party negotiation value through loop iteration based on the received master voting message after the fourth timer expires. During loop iteration, the pre-voting value is updated and then the iteration point is entered. The determined multi-party negotiation value is used as the output result of the distributed system negotiation.

[0019] This invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described distributed negotiation method.

[0020] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described distributed negotiation method.

[0021] This invention also provides a computer program product, which includes a computer program that, when executed by a processor, implements the above-described distributed negotiation method.

[0022] In this embodiment of the invention, upon entering the current round, the input value is used as the proposal value, and the proposal value and the corresponding signature are broadcast as a proposal message to all nodes, and a first timer is started. After the first timer expires, a distribution message is generated based on the proposal value in the received proposal message and broadcast to all nodes, and a second timer is started. The distribution message includes a distribution value, which is the proposal value in the first multi-value set. After the second timer expires, a pre-voting value is determined based on the received distribution message, and the current iteration number is set to 1. An iteration point is entered. A pre-voting message is generated based on the pre-voting value and the iteration number and broadcast to all nodes, and a 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 a fourth timer is started. After the fourth timer expires, a multi-value negotiation value is determined through iterative iteration based on the received main voting message. The pre-voting value is updated during iterative iteration, and an iteration point is entered. The determined multi-value negotiation value is used as the output result of the distributed system negotiation. Through the above proposal message, distribution message, pre-voting message, and main voting message, the multi-party negotiation value is finally determined through iterative loop. The pre-voting value is updated during the iteration and then the iteration point is entered, so that the pre-voting value is continuously updated to ensure the completion of the multi-party negotiation value determination. This achieves an expected time complexity of O(1) and a message complexity of O(n^2), which is low in complexity and high in efficiency. Attached Figure Description

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

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

[0025] Figure 2 This is a flowchart illustrating the generation of distribution messages in an embodiment of the present invention;

[0026] Figure 3 This is a flowchart illustrating the generation of pre-voting messages in an embodiment of the present invention;

[0027] Figure 4 This is a flowchart illustrating the generation of the main voting message in an embodiment of the present invention;

[0028] Figure 5 This is a flowchart illustrating how a multivariate negotiation value is determined through iterative iteration in an embodiment of the present invention.

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

[0030] Figure 7 This is a schematic diagram of a computer device in an embodiment of the present invention. Detailed Implementation

[0031] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. Here, the illustrative 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 this application all comply with the relevant provisions of national laws and regulations.

[0033] In this embodiment of the invention, distributed negotiation is achieved through multi-Byzantine negotiation, and the multi-Byzantine negotiation process is defined as follows:

[0034] The multivariate Byzantine negotiation process involves n nodes, each with a multivariate input value. Through multiple rounds of interaction among the nodes, a consensus is ultimately reached on a given multivariate input value. The nature of Byzantine negotiation is as follows:

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

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

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

[0038] (4) Integrity: An honest node will not make a decision twice.

[0039] Adversary models in distributed systems include static adversaries and adaptive adversaries. A static adversary refers to an adversary that can select a group of participants as malicious parties before the protocol runs. An adaptive adversary refers to an adversary that can dynamically select participants as incorrect parties during protocol execution based on the information it obtains, simulating a scenario where an adversary gradually compromises the distributed system. In this embodiment of the invention, the adversary model is an adaptive adversary, resulting in a more secure solution.

[0040] The embodiments of the present invention utilize digital signatures, hash functions, threshold signatures, and threshold random number generation protocols as cryptographic components. These cryptographic components can be instantiated using any appropriate security scheme.

[0041] Figure 1 This is a flowchart of a distributed negotiation method in an embodiment of the present invention. The method is applied to any node in a distributed system and 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 broadcast as a proposal message to all nodes, and the first timer is started;

[0043] Step 102: After the first timer expires, a distribution message is generated based on the proposal value in the received proposal message and broadcast to all nodes, and a second timer is started. The distribution message includes a distribution value, which is the proposal value in the first multi-value set.

[0044] Step 103: After the second timer expires, determine the pre-voting value based on the received distribution message, set the current iteration number to 1; enter the iteration point; generate a pre-voting message based on 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, generate the main voting message based on the received pre-voting message, broadcast it to all nodes, and start the fourth timer;

[0046] Step 105: After the fourth timer expires, the multi-party negotiation value is determined through iterative looping based on the received master voting message. The pre-voting value is updated during iterative looping before entering the iteration point, and the determined multi-party negotiation value is used as the output result of the distributed system negotiation.

[0047] In this embodiment of the invention, through the above-mentioned proposal message, distribution message, pre-voting message, and main voting message, the multi-party negotiation value is finally determined through iterative loop. During the iterative loop, the pre-voting value is updated before entering the iteration point, so that the pre-voting value is continuously updated to ensure the completion of the determination of the multi-party negotiation value. This achieves the expected time complexity of O(1) and the message complexity of O(n^2), which is low in complexity and high in efficiency.

[0048] Each step is described in detail below. In this embodiment of the invention, the method applies to any node, meaning all nodes execute steps 101-106. The scheme proposed in this embodiment is executed round-by-round, with each round containing several iteration steps. After each iteration step is completed, the next round begins, with iterations starting from the iteration point.

[0049] The event that leads to step 101 is when the previous round is completed (or when the system starts if it is the first round).

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

[0051] The event that leads to 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 based on the proposal value in the received proposal message and broadcast to all nodes, and a second timer is started. The distribution message includes a distribution value, which is the proposal value in the first multi-value set. The second timer waits for Δ time.

[0053] See Figure 2 The flowchart for generating a distribution message in this embodiment of the 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. The threshold signature algorithm is used to perform a threshold signature on the distribution value to obtain the first threshold signature share. The distribution value, the threshold signature and the first threshold signature share are used as the distribution message.

[0056] Step 203: When the first set of multi-values ​​of the master node is empty, use the empty symbol as the dispatch message.

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

[0058] Together with all other nodes, invoke the threshold random number generation protocol (f+1,n) to jointly select a random number as the common random number, and determine the node corresponding to the common random number as the master node.

[0059] The event that leads to step 103 is when the second step is completed, or when the process jumps to this step.

[0060] In step 103, 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; a pre-voting message is generated based on the pre-voting value and the iteration number, and broadcast to all nodes; the third timer is started; and the process waits for Δ time.

[0061] See Figure 3 The flowchart for generating pre-voting messages in this embodiment of the invention includes:

[0062] Step 301: Perform a second verification on the threshold signature of the received distribution message and the first threshold signature share. If the second verification passes, add the distribution value in the distribution message to the second multi-value set.

[0063] Step 302: If the received distribution message satisfies the first condition, the first threshold signature shares of the distribution messages that satisfy the first condition are combined into a first threshold signature using the threshold signature share combination algorithm. The distribution value is used as the multi-value negotiation 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 (nf in this embodiment) of matching distribution messages are received, and the distribution value and threshold signature of the distribution message are in the second multi-value set, and the second multi-value set contains only this one element.

[0064] Step 303: If the received distribution message does not meet the first condition, use the empty symbol as the multi-party negotiation value and determine 0 as the pre-voting value.

[0065] In one embodiment, a pre-voting message is generated based on the pre-voting value and the iteration number, including:

[0066] Using a threshold signature algorithm, threshold signatures are performed on the pre-vote value and the number of iterations to obtain the second threshold signature share;

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

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

[0069] The event that leads to 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 based on the received pre-voting message and broadcast to all nodes. The fourth timer is then started to wait for Δ time.

[0071] Figure 4 This is a flowchart illustrating the generation of a main voting message in an embodiment of the present invention. In one embodiment, the generation of a main voting message based on the received pre-voting message includes:

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

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

[0074] Step 403: When the third verification is passed, 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. The second threshold signature share in the second number of matching pre-voting messages is combined into a second threshold signature through the threshold signature combination algorithm. The main voting value and the second threshold signature are used as the main voting message. 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 meet the second condition, use an empty symbol as the main voting message.

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

[0077] In step 105, after the fourth timer expires, the multi-party negotiation value is determined through iterative looping based on the received master voting message. The pre-voting value is updated during iterative looping before entering the iteration point, and the determined multi-party negotiation value is used as the output result of the distributed system negotiation.

[0078] In one embodiment, based on the received master voting message, a multi-party negotiation value is determined through iterative iteration. During iterative iteration, the pre-voting value is updated before entering an iteration point, including:

[0079] Based on the received main voting message, a set of binary values ​​is obtained, which includes multiple binary values, wherein each main voting value in the main voting message and its corresponding second threshold signature form a binary value;

[0080] If the iteration number is 1, set the common coin toss value to 1;

[0081] If the iteration number is not 1, call the threshold random number generation protocol with all other nodes to jointly select a binary random number as the common coin toss value;

[0082] Based on the public coin-throwing value and the binary value set, the multi-party negotiation value is determined through iterative iteration. The pre-voting value is updated during iterative iteration before entering the iteration point.

[0083] In one embodiment, a set of binary values ​​is obtained based on the received master voting message, including:

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

[0085] If the fourth verification fails, the received main vote 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 This is a flowchart illustrating the process of determining a multi-party negotiation value through iterative iteration in an embodiment of the present invention. In one embodiment, based on the public toss value and the binary value set, the multi-party negotiation value is determined through iterative iteration. During iterative iteration, the pre-voted value is updated before entering an iteration point, including:

[0088] Step 501: If the binary value set satisfies the third condition, the unique main voting value in the binary value set is taken as the binary negotiation value. The third condition is that the binary value set contains only a binary tuple consisting of the unique main voting value and the second threshold signature.

[0089] Step 502: If the binary negotiation value is equal to the common coin toss value, determine the binary negotiation value;

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

[0091] Step 504: If the determined multivariate negotiation value is an empty symbol, start the next round. At the same time, in the current round, increment the current iteration number by 1, use the binary negotiation value as the pre-vote value of the current iteration, jump to the iteration point, and broadcast the binary negotiation value as a binary termination message to all nodes.

[0092] Step 505: If the binary negotiation value is not equal to the public coin toss value, increment the current iteration number by 1, use only the binary negotiation value as the pre-vote value for the current iteration, and jump to the iteration point;

[0093] Step 506: If the set of binary values ​​does not satisfy the third condition, increment the current iteration number by 1, use the common toss value as the pre-vote value for the current iteration, and jump to the iteration point.

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

[0095] Real-time determination of whether a second number of matching binary termination messages have been received;

[0096] If so, the binary negotiation value is broadcast to all nodes as a binary termination message, and the binary negotiation value corresponding to the binary termination message is determined.

[0097] If the determined binary negotiation value is 1, then the determined multi-party negotiation value is determined.

[0098] This invention also proposes a distributed negotiation device, the principle of which is similar to that of 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, applied to any node in a distributed system. The device includes:

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

[0101] The message distribution broadcast module 602 is used to generate a distribution message based on the proposal value in the received proposal message after the first timer expires, and broadcast it to all nodes, and start the second timer. The distribution message includes a distribution value, which 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 based on the received distribution message after the second timer expires, set the current iteration number to 1, enter the iteration point, generate a pre-voting message based on 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 based on the received pre-voting messages after the third timer expires, and broadcast it to all nodes, and start the fourth timer;

[0104] The multi-party negotiation value determination module 605 is used to determine the multi-party negotiation value through loop iteration based on the received master voting message after the fourth timer expires. During loop iteration, the pre-voting value is updated and then the iteration point is entered. The determined multi-party negotiation value is used as the output result of the distributed system negotiation.

[0105] In one embodiment, the message distribution 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. The threshold signature algorithm is used to perform a threshold signature on the distribution value to obtain the first threshold signature share. The distribution value, the threshold signature and the first threshold signature share are used as the distribution message.

[0108] When the first set of multi-values ​​of the master node is empty, the empty symbol is used as the dispatch message.

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

[0110] Together with all other nodes, the threshold random number generation protocol is invoked to jointly select a random number as the common random number, and the node corresponding to the common random number is determined as the master node.

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

[0112] A second verification is performed on the threshold signature of the received distribution message and the share of the first threshold signature. If the second verification passes, the distribution value in the distribution message is added to the second multi-value set.

[0113] If the received distribution message meets the first condition, the first threshold signature shares of the distribution messages that meet the first condition are combined into a first threshold signature using the threshold signature share combination algorithm. The distribution value is used as the multi-value negotiation 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 threshold signature of the distribution message are in the second multi-value set, and the second multi-value set contains only this one element.

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

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

[0116] Using a threshold signature algorithm, threshold signatures are performed on the pre-vote value and the number of iterations to obtain the second threshold signature share;

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

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

[0119] In one embodiment, the main voting message broadcasting module is used for:

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

[0121] If the third verification fails, discard the received pre-vote message;

[0122] When the third verification is passed, 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. The second threshold signature share in the second number of matching pre-voting messages is combined into a second threshold signature through the threshold signature combination algorithm. The main voting value and the second threshold signature are used as the main voting message. The second condition is that the second number of matching pre-voting messages are received.

[0123] If the received pre-vote message does not meet the second condition, an empty symbol will be used as the main vote message.

[0124] In one embodiment, the multi-variable negotiation value determination module is used for:

[0125] Based on the received main voting message, a set of binary values ​​is obtained, which includes multiple binary values, wherein each main voting value in the main voting message and its corresponding second threshold signature form a binary value;

[0126] If the iteration number is 1, set the common coin toss value to 1;

[0127] If the iteration number is not 1, call the threshold random number generation protocol with all other nodes to jointly select a binary random number as the common coin toss value;

[0128] Based on the public coin-throwing value and the binary value set, the multi-party negotiation value is determined through iterative iteration. The pre-voting value is updated during iterative iteration before entering the iteration point.

[0129] In one embodiment, the multi-variable negotiation value determination module is used for:

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

[0131] If the fourth verification fails, the received main vote 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-variable negotiation value determination module is used for:

[0134] If the binary value set satisfies the third condition, the unique main voting value in the binary value set is taken as the binary negotiation value. The third condition is that the binary value set contains only a binary tuple consisting of a unique main voting value and a second threshold signature.

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

[0136] If the determined binary negotiation value is 1, then the determined multi-party negotiation value is determined.

[0137] If the determined binary negotiation value is an empty symbol, the next round begins. At the same time, in the current round, the current iteration number is incremented by 1, the binary negotiation value is used as the pre-vote value for the current iteration, and the process jumps to the iteration point. The binary negotiation value is also broadcast to all nodes as a binary termination message.

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

[0139] If the set of binary values ​​does not satisfy the third condition, increment the current iteration number by 1, use the common toss value as the pre-vote value for the current iteration, and jump to the iteration point.

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

[0141] Real-time determination of whether a second number of matching binary termination messages have been received;

[0142] If so, the binary negotiation value is broadcast to all nodes as a binary termination message, and the binary negotiation value corresponding to the binary termination message is determined.

[0143] If the determined binary negotiation value is 1, then the determined multi-party negotiation value is determined.

[0144] In summary, in the method and apparatus proposed in this embodiment of the invention, after entering the current round, the input value is used as the proposal value, and the proposal value and the corresponding signature are broadcast as a proposal message to all nodes, and a first timer is started; after the first timer expires, a distribution message is generated based on the proposal value in the received proposal message and broadcast to all nodes, and a second timer is started, the distribution message including a distribution value, the distribution value being the proposal value in the first multi-value set; after the second timer expires, a pre-voting value is determined based on the received distribution message, and the current iteration number is set to 1; an iteration point is entered; a pre-voting message is generated based on the pre-voting value and the iteration number and broadcast to all nodes, and a 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 a fourth timer is started; after the fourth timer expires, a binary value set is obtained based on the received main voting message; based on the public toss value and the binary value set, a multi-value negotiation value is determined through iterative iteration, and the pre-voting value is updated during iterative iteration before entering an iteration point. Through the aforementioned proposal message, distribution message, pre-voting message, and main voting message, the multi-party negotiation value is finally determined through iterative iteration. During iterative iteration, the pre-voting value is updated before entering the iteration point, ensuring continuous updating of the pre-voting value to guarantee the completion of the multi-party negotiation value determination. This achieves an expected time complexity of O(1) and a message complexity of O(n^2), demonstrating low complexity and high efficiency. For static adversaries, the proposed solution expects to terminate in 11 steps, with an optimal termination in 4 steps. For adaptive adversaries, the proposed solution expects to terminate in 12 steps, with an optimal termination in 5 steps. Currently, the most efficient synchronous multi-party Byzantine negotiation method expects to terminate in 10 steps for static adversaries, with an optimal termination in 6 steps, and for adaptive adversaries, expects to terminate in 16 steps, with an optimal termination in 9 steps.

[0145] This invention also 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, it implements the above-mentioned distributed negotiation method.

[0146] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described distributed negotiation method.

[0147] This invention also provides a computer program product, which includes a computer program that, when executed by a processor, implements the above-described distributed negotiation method.

[0148] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied 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] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0150] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0151] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0152] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are 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 within the scope of protection of the present invention.

Claims

1. A distributed negotiation method, characterized in that, The method, applicable to any node in a distributed system, includes: Upon entering the current round, the input value is used as the proposal value, and the proposal value and the corresponding signature are broadcast as a proposal message to all nodes, and the first timer is started; After the first timer expires, a distribution message is generated based on the proposal value in the received proposal message and broadcast to all nodes, and a second timer is started. The distribution message includes a distribution value, which 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 messages and broadcast to all nodes, thus starting the fourth timer; After the fourth timer expires, based on the received main voting message, the multi-party negotiation value is determined through iterative looping. During iterative looping, the next pre-voting value is updated before entering the iteration point, and the determined multi-party negotiation value is used as the output result of the distributed system negotiation. Based on the received main voting message, a multi-party negotiation value is determined through iterative iteration. During iterative iteration, the pre-voting value is updated before entering an iteration point. This process includes: obtaining a set of binary values ​​based on the received main voting message, where each main voting value in the main voting message and its corresponding second threshold signature form a binary value; if the iteration number is 1, setting the public toss value to 1; if the iteration number is not 1, calling the threshold random number generation protocol with all other nodes to jointly select a binary random number as the public toss value; and determining the multi-party negotiation value through iterative iteration based on the public toss value and the set of binary values, updating the pre-voting value during iterative iteration before entering an iteration point. Based on the public coin-throwing value and the binary value set, a multi-party negotiation value is determined through iterative iteration. During each iteration, the pre-voted value is updated before entering the iteration point, including: If the binary value set satisfies the third condition, the unique main voting value in the binary value set is taken as the binary negotiation value. The third condition is that the binary value set contains only a binary tuple consisting of a unique main voting value and a second threshold signature. If the binary negotiation value is equal to the public coin toss value, then the binary negotiation value is determined; If the determined binary negotiation value is 1, then the determined multi-party negotiation value is determined. If the determined binary negotiation value is an empty symbol, the next round begins. At the same time, in the current round, the current iteration number is incremented by 1, the determined binary negotiation value is used as the pre-vote value for the next iteration, and the process jumps to the iteration point. The determined binary negotiation value is also broadcast to all nodes as a binary termination message. If the binary negotiation value is not equal to the public coin toss value, increment the current iteration number by 1, use only the binary negotiation value as the pre-vote value for the next iteration, and jump to the iteration point; If the set of binary values ​​does not satisfy the third condition, increment the current iteration number by 1, use the common toss value as the pre-vote value for the next iteration, and jump to the iteration point.

2. The method as described in claim 1, characterized in that, Based on the proposal value in the received proposal message, a distribution message is generated, 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. The threshold signature algorithm is used to perform a threshold signature on the distribution value to obtain the first threshold signature share. The distribution value, the threshold signature and the first threshold signature share are used as the distribution message. When the first set of multi-values ​​of the master node is empty, the empty symbol is used as the dispatch message.

3. The method as described in claim 1, characterized in that, Also includes: Together with all other nodes, the threshold random number generation protocol is invoked to jointly select a random number as the common random number, and the node corresponding to the common random number is determined as the master node.

4. The method as described in claim 1, characterized in that, Based on the received distribution message, determine the pre-vote values, including: A second verification is performed on the threshold signature of the received distribution message and the share of the first threshold signature. If the second verification passes, the distribution value in the distribution message is added to the second multi-value set. If the received distribution message meets the first condition, the first threshold signature shares of the distribution messages that meet the first condition are combined into a first threshold signature using the threshold signature share combination algorithm. The distribution value is used as the multi-value negotiation 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 threshold signature of the distribution message are in the second multi-value set, and the second multi-value set contains only this one element. If the received distribution message does not meet the first condition, an empty symbol is used as the multi-party negotiation value, and 0 is determined as the pre-vote value.

5. The method as described in claim 4, characterized in that, Based on the pre-vote value and the iteration number, generate a pre-vote message, including: Using a threshold signature algorithm, threshold signatures are performed on the pre-vote value and the number of iterations to obtain the second threshold signature share; If the iteration number is 1 and the pre-vote value is 1, the pre-vote value, auxiliary value, auxiliary signature, and second threshold signature share are used as the pre-vote message; If the iteration number is not 1 or the pre-vote value is not 1, the pre-vote value and the second threshold signature share will be used as the pre-vote message.

6. The method as described in claim 1, characterized in that, Based on the received pre-voting messages, a main voting message is generated, including: A third verification is performed on the auxiliary signature and the second threshold signature share of the received pre-voting message; If the third verification fails, discard the received pre-vote message; When the third verification is passed, 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. The second threshold signature share in the second number of matching pre-voting messages is combined into a second threshold signature through the threshold signature combination algorithm. The main voting value and the second threshold signature are used as the main voting message. The second condition is that the second number of matching pre-voting messages are received. If the received pre-vote message does not meet the second condition, an empty symbol will be used as the main vote message.

7. The method as described in claim 1, characterized in that, Based on the received master voting message, obtain the set of binary values, including: Perform a fourth verification on the second threshold signature of the received main voting message; If the fourth verification fails, the received main vote 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.

8. The method as described in claim 1, characterized in that, Also includes: Real-time determination of whether a second number of matching binary termination messages have been received; If so, the binary negotiation value is broadcast to all nodes as a binary termination message, and the binary negotiation value corresponding to the binary termination message is determined. If the determined binary negotiation value is 1, then the determined multi-party negotiation value is determined.

9. A distributed negotiation device, characterized in that, The device, applicable to any node in a distributed system, comprises: The proposal message broadcasting module is used to broadcast the input value as the proposal value and the corresponding signature as a proposal message to all nodes after entering the current round, and start the first timer; The message distribution broadcast module is used to generate a distribution message based on the proposal value in the received proposal message after the first timer expires, and broadcast it to all nodes, and start the second timer. The distribution message includes a distribution value, which is the proposal value in the first multi-value set. The pre-voting message broadcasting module is used to determine the pre-voting value based on the received distribution message after the second timer expires, set the current iteration number to 1, enter the iteration point, generate a pre-voting message based on the pre-voting value and the iteration number, broadcast it to all nodes, and start the third timer. The main voting message broadcast module is used to generate the main voting message based on the received pre-voting messages after the third timer expires, and broadcast it to all nodes, thus starting the fourth timer; The multi-party negotiation value determination module is used to determine the multi-party negotiation value through loop iteration based on the received master voting message after the fourth timer expires. During loop iteration, the pre-voting value is updated and then the iteration point is entered. The determined multi-party negotiation value is used as the output result of the distributed system negotiation. Based on the received main voting message, a multi-party negotiation value is determined through iterative iteration. During iterative iteration, the pre-voting value is updated before entering an iteration point. This process includes: obtaining a set of binary values ​​based on the received main voting message, where each main voting value in the main voting message and its corresponding second threshold signature form a binary value; if the iteration number is 1, setting the public toss value to 1; if the iteration number is not 1, calling the threshold random number generation protocol with all other nodes to jointly select a binary random number as the public toss value; and determining the multi-party negotiation value through iterative iteration based on the public toss value and the set of binary values, updating the pre-voting value during iterative iteration before entering an iteration point. Based on the public coin-throwing value and the binary value set, a multi-party negotiation value is determined through iterative iteration. During each iteration, the pre-voted value is updated before entering the iteration point, including: If the binary value set satisfies the third condition, the unique main voting value in the binary value set is taken as the binary negotiation value. The third condition is that the binary value set contains only a binary tuple consisting of a unique main voting value and a second threshold signature, and the value of the binary value counter corresponding to the unique main voting value is not less than the second quantity. If the binary negotiation value is equal to the public coin toss value, then the binary negotiation value is determined; If the determined binary negotiation value is 1, then the determined multi-party negotiation value is determined. If the determined binary negotiation value is an empty symbol, the next round begins. At the same time, in the current round, the current iteration number is incremented by 1, the determined binary negotiation value is used as the pre-vote value for the next iteration, and the process jumps to the iteration point. The determined binary negotiation value is also broadcast to all nodes as a binary termination message. If the binary negotiation value is not equal to the public coin toss value, increment the current iteration number by 1, use only the binary negotiation value as the pre-vote value for the next iteration, and jump to the iteration point; If the set of binary values ​​does not satisfy the third condition, increment the current iteration number by 1, use the common toss value as the pre-vote value for the next iteration, and jump to the iteration point.

10. 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, it implements the method of any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method of any one of claims 1 to 8.

12. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 8.

Citation Information

Patent Citations

  • 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