Asynchronous consensus method based on fuzzy clustering analysis of transaction signatures in relay chain

By using a fuzzy clustering analysis method based on transaction signatures in the relay chain, high-priority consensus proposals are broadcast first for asynchronous binary consensus, which solves the problem of low asynchronous consensus efficiency in the relay chain and achieves more efficient cross-border consensus. Chain transaction processing and malicious node defense.

CN118300773BActive Publication Date: 2024-10-01NANJING UNIV OF INFORMATION SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410706406.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-03
Publication Date
2024-10-01
Estimated Expiration
2044-06-03

AI Technical Summary

Technical Problem

The efficiency of asynchronous consensus in the relay chain is low, the performance of the existing consensus mechanism is low in unstable network environments, and the dynamic adjustment of nodes is insufficient, resulting in low consensus efficiency.

Method used

Using the fuzzy clustering analysis method based on transaction signatures, through the division of labor among the consensus nodes and clustering nodes of the relay chain committee, high-priority consensus proposals are broadcast first for asynchronous binary consensus, reducing the number and selection of asynchronous binary consensus instances. Consensus proposal time to improve consensus efficiency.

Benefits of technology

It improves the asynchronous consensus efficiency of the relay chain, enhances the resistance to malicious nodes, dynamically adjusts the consensus nodes to deal with potential threats, and improves the processing capabilities of cross-chain transactions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118300773B_ABST
    Figure CN118300773B_ABST
Patent Text Reader

Abstract

The present application relates to an asynchronous consensus method based on fuzzy clustering analysis of transaction signatures in a relay chain. The method comprises: sending the first-stage signature package of the cross-chain transaction package of the source chain that has passed the verification through each verification group in the relay chain to the consensus node; the consensus node extracts the signature package of the cross-chain transaction package. m After the first-stage signature packages have reached consensus on the proposal, the clustering node determines the priority. The consensus node performs asynchronous binary consensus based on the priority of the first-stage consensus proposal to obtain the first-stage asynchronous consensus result. If the first-stage asynchronous consensus result is a consensus success, the target chain verifies the cross-chain transaction package and sends the cross-chain transaction package and the verification result to each verification group for verification again to perform the second-stage consensus proposal, determine the priority of the second-stage consensus proposal, and obtain the second-stage asynchronous consensus result. If the second-stage asynchronous consensus result is a consensus success, the cross-chain transaction package is packaged into a block and chained. This improves the efficiency of asynchronous consensus.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of blockchain technology, and in particular to an asynchronous consensus method based on fuzzy clustering analysis of transaction signatures in a relay chain. Background Art

[0002] Since the development of blockchain, different types of blockchains have emerged, such as public chains, consortium chains, and private chains. The development of these blockchains has also brought about a new problem, that is, how different blockchains interact with each other. In this environment, cross-chain technology has gradually developed. Cross-chain technology refers to the use of certain specific technical means to enable value to directly interact across the barriers between chains, thereby realizing the circulation of assets and value transfer between different blockchains. Relay Chain refers to a chain structure that connects different blockchains. It is at the highest level of the cross-chain protocol system and is used to handle the interaction and communication between different blockchains. The relay chain is highly flexible and easy to expand, and its security is guaranteed by the consensus mechanism. The consensus mechanism of the relay chain is an indispensable part of realizing cross-chain operations, and the consensus mechanism determines the efficiency of the relay chain. At present, the consensus mechanism used in the relay chain is mostly a semi-synchronous consensus mechanism, which has low performance in an unstable network environment. At the same time, there is a lack of research on asynchronous consensus mechanisms, so it is urgent to study a high-performance asynchronous consensus mechanism in the relay chain scenario.

[0003] The asynchronous consensus mechanism is very robust and can tolerate network communication failures. It is an ideal consensus technology to ensure the robust operation of blockchain in the Internet environment. In an asynchronous environment, consensus nodes cannot predict the delay and message delivery order in network communication, so the problem that needs to be solved in the asynchronous consensus mechanism is how all honest nodes in an asynchronous Byzantine environment receive and process the same message set in the same order. The existing HB-BFT (Honey Badger Byzantine Fault Tolerant) consensus mechanism uses an asynchronous common subset module to realize message propagation and processing. The module consists of a reliable broadcast module and an asynchronous binary consensus module. The reliable broadcast module simulates a reliable communication channel through a point-to-point channel. The channel ensures data consistency (any two nodes with the correct sending path receive the same message from the source node), globality (as long as one node receives a message from the source node, all nodes with the correct sending path will eventually receive the message) and credibility (if the source node is correct, all nodes with the correct sending path must receive the same message as the message sent by the source node). The asynchronous binary consensus module is to reach a consensus on a bit and output a bit, and the output is required to come from an honest node. In the HB-BFT consensus mechanism, multiple asynchronous binary consensus modules must be run in each round of consensus, and each node must verify a large number of threshold signatures. The CPU consumption of the node is high, resulting in low efficiency of asynchronous consensus. In order to reduce the number of instances of the asynchronous binary consensus module, the existing asynchronous consensus mechanism randomly selects a part of the transactions proposed by the consensus nodes as proposals, and the consensus nodes perform asynchronous binary consensus on the proposals to reduce the number of instances of the asynchronous binary consensus module and the time required to reach consensus. However, the problem with this method is that during the consensus process, the randomly selected consensus nodes may be malicious nodes, and malicious nodes may propose wrong transactions or not send transactions, resulting in low consensus efficiency. In the cross-chain consensus research, there is an existing consensus algorithm based on reputation proof, which is implemented in Cosmos, but this method is not friendly to new members, and the accounting rights are easily concentrated in the hands of members who have registered for a long time. The existing side chain scheme based on PoS (Proof-of-Stake) and PoW (Proof-of-Work) realizes cross-chain transfer by aggregating votes into cross-chain certificates to increase the speed of cross-chain transmission and reduce the delay, bandwidth and storage overhead of cross-chain transaction transmission. The above methods all have a common problem: the nodes are not adjusted dynamically. If fixed nodes participate in consensus for a long time, there is a high risk of nodes being invaded, resulting in low consensus efficiency. Summary of the invention

[0004] Based on this, it is necessary to provide an asynchronous consensus method based on fuzzy clustering analysis of transaction signatures in the relay chain that can improve consensus efficiency in response to the above technical problems.

[0005] An asynchronous consensus method based on fuzzy clustering analysis of transaction signatures in a relay chain, the method comprising:

[0006] Each verification group in the relay chain will source the cross-chain transaction package T After verification, the cross-chain transaction package T , cross-chain transaction package T Number M , Verify node signature P and stage identification K Encapsulated as a cross-chain transaction package T The first-stage signature package is sent to the source chain signature queue of each consensus node of the relay chain committee;

[0007] Each consensus node of the relay chain committee takes the cross-chain transaction package from the source chain signature queue T of m The first-stage signature package is used to conduct proposal consensus using the preset proposal consensus method to obtain the first-stage consensus proposal, and the first-stage consensus proposal is sent to each cluster node of the relay chain committee;

[0008] Each clustering node of the relay chain committee clusters the received first-stage consensus proposals using a fuzzy clustering method, determines the priority of each first-stage consensus proposal, and broadcasts the first-stage consensus proposal to each consensus node in a manner of preferentially broadcasting the consensus proposal with the highest priority according to the priority of each first-stage consensus proposal. Each consensus node performs asynchronous binary consensus using a preset asynchronous binary consensus method according to the first-stage consensus proposal broadcast by the clustering node, and obtains the first-stage asynchronous consensus result;

[0009] In the case where the result of the first phase asynchronous consensus is the success of the asynchronous binary consensus, the cross-chain transaction package is included by providing the consensus node of the first phase consensus proposal that succeeded the asynchronous binary consensus. T The first phase asynchronous consensus result is sent to the relay chain collection node, and the cross-chain transaction package in the source chain signature queue is sent to the relay chain collection node. T The first stage signature package of the deletion;

[0010] The relay chain collection node sends the cross-chain transaction package T The first phase asynchronous consensus result is sent to the target chain for verification, and the target chain is verified according to the cross-chain transaction package T After the verification result of the asynchronous consensus result of the first phase is verified, the cross-chain transaction package T The verification result is sent to each verification group in the relay chain for further verification;

[0011] The cross-chain transaction package sent by each verification group in the relay chain to the target chainT After the verification result is passed, the cross-chain transaction package T , cross-chain transaction package T Number M , Verify node signature P and stage identification K Encapsulated as a cross-chain transaction package T The second-stage signature package is sent to the target chain signature queue of the relay chain committee;

[0012] Each consensus node of the relay chain committee takes the cross-chain transaction package from the target chain signature queue T of m The second-stage signature package is used to conduct proposal consensus using the preset proposal consensus method to obtain the second-stage consensus proposal, and the second-stage consensus proposal is sent to each cluster node of the relay chain committee;

[0013] Each clustering node of the relay chain committee clusters the received second-stage consensus proposals using a fuzzy clustering method, determines the priority of each second-stage consensus proposal, and broadcasts the second-stage consensus proposal to each consensus node in a manner of preferentially broadcasting the consensus proposal with the highest priority according to the priority of each second-stage consensus proposal. Each consensus node performs asynchronous binary consensus using a preset asynchronous binary consensus method according to the second-stage consensus proposal broadcast by the clustering node, and obtains the second-stage asynchronous consensus result;

[0014] In the case where the result of the second-stage asynchronous consensus is a successful asynchronous binary consensus, the cross-chain transaction package is included by providing the consensus node of the second-stage consensus proposal that succeeded the asynchronous binary consensus. T Pack it into blocks and broadcast the message to the relay chain collection node, and send the cross-chain transaction package in the target chain signature queue T The second stage signature package of is deleted.

[0015] In one embodiment, the preset proposal consensus method is:

[0016] The relay chain committee includes n consensus nodes and b In the case of cluster nodes, each consensus node has a T of m The transactions in the cross-chain transaction package of the signature package are the same and the verification node signature is valid. After the verification is passed, the consensus node signature, the number of the cross-chain transaction package and the verification node signature are used as the transaction package message, and the reliable broadcast protocol is called to send the transaction package message to other consensus nodes. d Transaction package message sent The content is: =< N d , M d , P d >, d ∈1, 2, 3, … n ,in, N d Consensus Node d Signature, M d Consensus Node d The number of the selected cross-chain transaction package, P d Consensus Node d The verification node signature of the selected cross-chain transaction package;

[0017] Each consensus node verifies the consensus node signature, cross-chain transaction package number and verification node signature in the received transaction package message in real time, and adds the verification node signature and cross-chain transaction package number in the verified transaction package message to the consensus proposal. When the consensus node calls the reliable broadcast protocol to execute, the cross-chain transaction package number and verification node signature in the consensus proposal are packaged and sent to each clustering node.

[0018] In one embodiment, the fuzzy clustering method is:

[0019] Each cluster node receives f After +1 consensus proposal, the set of consensus proposals is obtained ={ F 1, F 2, ..., F i , ..., F f+1}, F i For the i consensus proposals, f for n The number of malicious nodes among consensus nodes;

[0020] Each cluster node is based on a set of consensus proposals In f +1 consensus proposals are clustered to determine the membership of each consensus proposal in each consensus proposal class, and the consensus proposal corresponding to each consensus proposal class is determined based on the membership of each consensus proposal in each consensus proposal class;

[0021] Each clustering node analyzes the consensus priority of each consensus proposal class according to the number of consensus proposals corresponding to each consensus proposal class, and determines the consensus priority of each consensus proposal class.

[0022] In one embodiment, each cluster node generates a set of consensus proposals. In f +1 consensus proposals are clustered to determine the membership of each consensus proposal in each consensus proposal class. According to the membership of each consensus proposal in each consensus proposal class, the consensus proposal corresponding to each consensus proposal class is determined, including:

[0023] Set the error threshold for clustering , initialize the membership matrix U 1 , initialize the elements in the membership matrix to random values ​​[0, 1], where ;

[0024] According to the previous iteration x The membership matrix U x , calculate the j The cluster center p Features , determine the current iteration x+ 1st j Cluster Centers q j , No. j Cluster Centers q j include , and , the j The cluster center p Features The expression is:

[0025] ,

[0026] in, F i For the i consensus proposals, F i The features include ASCII value, number of digits and number of letters, respectively. , and express, s is the number of cluster categories;

[0027] Based on the current iteration x+ 1st j Cluster Centers q j , determine the current iteration x+ 1st i The consensus proposal andj The membership degree of cluster centers u i,j , get the current iteration x+ The first degree membership matrix U x+1 , the i The consensus proposal and j The membership degree of cluster centers u i,j The expression is: ,

[0028] Among them, ||*|| is the L2 norm;

[0029] Iterate and update the membership matrix until the current iteration occurs twice in a row x+ Each membership degree in the membership matrix of the previous iteration is x The difference between the corresponding memberships in the membership matrix does not exceed the error threshold, that is, , the iteration is terminated and the final membership matrix is ​​output;

[0030] According to the final membership matrix, perform argmax Function, determine the consensus proposal corresponding to each consensus proposal class, the expression is:

[0031] C j ={ F w | w = argmax ( u w,j ), w ∈[1, f +1], w ∈Z +},

[0032] in, argmax () is to find the consensus proposal category C j The function of the consensus proposal, Z + is a positive integer, u w,j For the w The consensus proposal and j The membership degree of each cluster center.

[0033] In one embodiment, the consensus proposal class C j Consensus priority Q j The expression is:

[0034] ,

[0035] ,

[0036] C j ={ F w | w = argmax ( u w,j ), w ∈[1, f +1], w ∈Z +};

[0037] in,{ L 1, L 2, ..., L f+1}represent f +1 consensus priority, D j For consensus proposal class C j The consensus priority judgment value of V j For the j The number of consensus proposals contained in the consensus proposal class, G w Proposal for consensus F w The timestamp interval value, is the weight coefficient of consensus priority, argmax () is to find the consensus proposal category C j The function of the consensus proposal.

[0038] In one embodiment, the preset asynchronous binary consensus method is:

[0039] The consensus node that sent the highest priority consensus proposal a The asynchronous binary consensus module is called for execution. Other consensus nodes verify the consensus proposal with the highest priority received. If the verification is correct, 1 is sent to the consensus node. a , otherwise send 0 to the consensus node a If, after the broadcast of the highest priority consensus proposal is completed, there are other consensus nodes that have not received the highest priority consensus proposal, then the other consensus nodes send 0 to the consensus node a ;

[0040] Consensus Node a Upon receiving n - f After a 1 or 0 is generated, the pre-output is set to 1 or 0 accordingly. aGenerate a random value of 0 or 1. If it is the same as the pre-output, set the preliminary asynchronous consensus result to the pre-output and output the preliminary asynchronous consensus result. If the preliminary asynchronous consensus result of the highest priority consensus proposal is 0, broadcast the message that the preliminary asynchronous consensus result is 0 to each clustering node, so that each clustering node can agree on the next priority consensus proposal and send it to each consensus node, iterating the next round of asynchronous binary consensus until the preliminary asynchronous consensus result is 1 or f After +1 round, the iterative asynchronous binary consensus ends and the asynchronous consensus result is output. f After +1 round, the asynchronous consensus result is still 0, which means that the consensus proposal has an error, and the asynchronous binary consensus fails. If the asynchronous consensus result is 1, the asynchronous binary consensus succeeds.

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

[0042] In each round, the consensus node sends the consensus proposal to the clustering node. Each clustering node uses fuzzy clustering to cluster. After determining the priority of the consensus proposal, the consensus node of each round is calculated. d The time score of t Consensus nodes for rounds d Time score for:

[0043] ,

[0044] in, For the t Consensus nodes for rounds d The timestamp when the consensus proposal arrives at the cluster node. For the t The minimum timestamp of the consensus proposal sent to the cluster node among all consensus nodes in the round, For the t The maximum value of the timestamp of consensus proposals sent to cluster nodes among all consensus nodes in the round. is the division value of the score interval;

[0045] Each clustering node calculates the current round t The level score of each consensus node determines the level of each consensus node in the current round. t The levels include low speed, normal speed and high speed.

[0046] If each clustering node t At the end of the time period of the consensus mechanism, according to the consensus nodes in the current round t The level of the low-speed level is broadcast to other cluster nodes.

[0047] In more than 2b / When 3 cluster nodes send the same consensus node number, all cluster nodes send a low-speed consensus node exit message carrying the consensus node number to other consensus nodes. , after receiving the message, other consensus nodes delete the information of the consensus node corresponding to the consensus node number;

[0048] The new consensus node submits registration information to each cluster node. The registration information includes IP address and port information.

[0049] Each cluster node broadcasts the registration information of the new consensus node to other consensus nodes;

[0050] After receiving the registration information of the new consensus node, other consensus nodes record the registration information of the new consensus node;

[0051] Each cluster node sends the registration information of other consensus nodes to the new consensus node;

[0052] The new consensus node records the registration information of other consensus nodes and joins the consensus.

[0053] In one embodiment, the current round t Consensus Node d Level score The expression is:

[0054] ,

[0055] in, Consensus node for round 1 d Time score, I The round of sending consensus proposals in a time cycle of the consensus mechanism. For the current round t- 1 consensus node d 's level score.

[0056] In one embodiment, the consensus node d In the current round t Level The expression is:

[0057] .

[0058] The asynchronous consensus method based on fuzzy clustering analysis of transaction signatures in the above relay chain uses each verification group in the relay chain to package the cross-chain transaction of the source chain. T After verification, the cross-chain transaction package T , cross-chain transaction package T Number M , Verify node signature P and stage identificationK Encapsulated as a cross-chain transaction package T The first-stage signature package is sent to the source chain signature queue of each consensus node of the relay chain committee; each consensus node of the relay chain committee takes the cross-chain transaction package from the source chain signature queue T of m The first-stage signature package is obtained by using the preset proposal consensus method to conduct proposal consensus, and the first-stage consensus proposal is sent to each clustering node of the relay chain committee; each clustering node of the relay chain committee clusters the received first-stage consensus proposals using the fuzzy clustering method to determine the priority of each first-stage consensus proposal, and broadcasts the first-stage consensus proposal to each consensus node in a manner of giving priority to the consensus proposal with the highest priority according to the priority of each first-stage consensus proposal. Each consensus node conducts asynchronous binary consensus according to the first-stage consensus proposal broadcasted by the clustering node using the preset asynchronous binary consensus method to obtain the first-stage asynchronous consensus result; when the first-stage asynchronous consensus result is a successful asynchronous binary consensus, the cross-chain transaction package is sent to the consensus node of the first-stage consensus proposal that provides a successful asynchronous binary consensus. T The first phase asynchronous consensus result is sent to the relay chain collection node, and the cross-chain transaction package in the source chain signature queue is sent to the relay chain collection node. T The first phase signature package is deleted; the relay chain collection node will cross-chain transaction package T The first phase asynchronous consensus result is sent to the target chain for verification. T After the verification result of the asynchronous consensus result of the first phase is passed, the cross-chain transaction package T The verification results are sent to each verification group in the relay chain for further verification; each verification group in the relay chain sends a cross-chain transaction package to the target chain T After the verification result is passed, the cross-chain transaction package T , cross-chain transaction package T Number M , Verify node signature P and stage identification K Encapsulated as a cross-chain transaction package T The second-stage signature package is sent to the target chain signature queue of the relay chain committee; each consensus node of the relay chain committee takes the cross-chain transaction package from the target chain signature queue. T of mThe second-stage signature package is obtained by using the preset proposal consensus method to perform proposal consensus, and the second-stage consensus proposal is sent to each clustering node of the relay chain committee; each clustering node of the relay chain committee clusters the received second-stage consensus proposals using the fuzzy clustering method to determine the priority of each second-stage consensus proposal, and broadcasts the second-stage consensus proposal to each consensus node in a manner of giving priority to the consensus proposal with the highest priority according to the priority of each second-stage consensus proposal. Each consensus node performs asynchronous binary consensus using the preset asynchronous binary consensus method according to the second-stage consensus proposal broadcast by the clustering node to obtain the second-stage asynchronous consensus result; when the second-stage asynchronous consensus result is a successful asynchronous binary consensus, the cross-chain transaction package is sent to the consensus node of the second-stage consensus proposal that provides the successful asynchronous binary consensus. T Pack it into blocks and upload it to the chain, broadcast the chain message to the relay chain collection node, and send the cross-chain transaction package in the target chain signature queue T The second-stage signature package of is deleted. Therefore, the nodes of the relay chain committee are divided into consensus nodes and clustering nodes. The consensus nodes use cross-chain transactions and signatures as consensus proposals. After the reliable broadcast is completed, the consensus proposals are updated and broadcast to the clustering node cluster. The clustering nodes aggregate the consensus proposals into consensus proposal classes and calculate the consensus priority of each consensus proposal class. The clustering nodes give priority to sending consensus proposals of high-priority consensus proposal classes to the consensus nodes for asynchronous binary consensus, reducing the number of asynchronous binary consensus instances and the time to select consensus proposals for consensus, thereby improving the efficiency of asynchronous consensus. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 It is a flowchart of an asynchronous consensus method based on fuzzy clustering analysis of transaction signatures in a relay chain in one embodiment;

[0060] Figure 2 The figure is a flowchart of fuzzy clustering and asynchronous consensus in one embodiment. DETAILED DESCRIPTION

[0061] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0062] In one embodiment, Figure 1 As shown, an asynchronous consensus method based on fuzzy clustering analysis of transaction signatures in a relay chain is provided, comprising the following steps:

[0063] Step S220: Each verification group in the relay chain sends the cross-chain transaction package of the source chain to T After verification, the cross-chain transaction package T, cross-chain transaction package T Number M , Verify node signature P and stage identification K Encapsulated as a cross-chain transaction package T The first-phase signature package is sent to the source chain signature queue of each consensus node of the relay chain committee.

[0064] Among them, the relay chain is a third-party blockchain that connects multiple application chains in the network. The relay chain is responsible for cross-chain operations between different application chains. The relay chain nodes are divided into committee nodes (including consensus nodes and clustering nodes), verification nodes (nodes in each verification group) and relay chain collection nodes. The committee nodes are responsible for the consensus and packaged block broadcast of cross-chain transaction signatures, the verification nodes are responsible for the verification operation of cross-chain transactions, the verification group jointly verifies the transaction package, and the relay chain collection nodes are responsible for receiving cross-chain transaction information and forwarding transaction results.

[0065] Among them, the application chain is the blockchain connected to the relay chain. Each application chain has a separate consensus mechanism to ensure the security of the application chain. The application chain where the transaction initiator is located is the source chain, and the application chain where the transaction recipient is located is the target chain.

[0066] Step S240: Each consensus node of the relay chain committee takes out the cross-chain transaction package from the source chain signature queue. T of m The first-phase signature package is used to conduct proposal consensus using the preset proposal consensus method to obtain the first-phase consensus proposal, and the first-phase consensus proposal is sent to each cluster node of the relay chain committee.

[0067] in, m Can be the number of verification groups in the relay chain.

[0068] In step S260, each clustering node of the relay chain committee clusters the received first-stage consensus proposals using a fuzzy clustering method to determine the priority of each first-stage consensus proposal. According to the priority of each first-stage consensus proposal, the first-stage consensus proposal is broadcast to each consensus node in a manner of giving priority to the consensus proposal with the highest priority. Each consensus node performs asynchronous binary consensus according to the first-stage consensus proposal broadcast by the clustering node using a preset asynchronous binary consensus method to obtain the first-stage asynchronous consensus result.

[0069] Step S280, when the result of the first phase asynchronous consensus is that the asynchronous binary consensus is successful, the cross-chain transaction package is sent to the consensus node of the first phase consensus proposal that succeeded the asynchronous binary consensus. T The first phase asynchronous consensus result is sent to the relay chain collection node, and the cross-chain transaction package in the source chain signature queue is sent to the relay chain collection node. TThe first stage signature package of is removed.

[0070] Step S300: The relay chain collection node sends the cross-chain transaction package T The first phase asynchronous consensus result is sent to the target chain for verification. T After the verification result of the asynchronous consensus result of the first phase is passed, the cross-chain transaction package T The verification results are sent to each verification group in the relay chain for further verification.

[0071] Step S320: Each verification group in the relay chain sends a cross-chain transaction packet to the target chain. T After the verification result is passed, the cross-chain transaction package T , cross-chain transaction package T Number M , Verify node signature P and stage identification K Encapsulated as a cross-chain transaction package T The second-phase signature package is sent to the target chain signature queue of the relay chain committee.

[0072] Step S340: Each consensus node of the relay chain committee takes out the cross-chain transaction package from the target chain signature queue. T of m The second-stage signature package is used to conduct proposal consensus using the preset proposal consensus method to obtain the second-stage consensus proposal, and the second-stage consensus proposal is sent to each cluster node of the relay chain committee.

[0073] In step S360, each clustering node of the relay chain committee clusters the received second-stage consensus proposals using a fuzzy clustering method to determine the priority of each second-stage consensus proposal. According to the priority of each second-stage consensus proposal, the second-stage consensus proposal is broadcast to each consensus node in a manner of giving priority to the consensus proposal with the highest priority. Each consensus node performs asynchronous binary consensus according to the second-stage consensus proposal broadcast by the clustering node using a preset asynchronous binary consensus method to obtain the second-stage asynchronous consensus result.

[0074] Step S380, when the result of the second-stage asynchronous consensus is that the asynchronous binary consensus is successful, the cross-chain transaction package is sent to the consensus node of the second-stage consensus proposal that has successfully reached the asynchronous binary consensus. T Pack it into blocks and upload it to the chain, broadcast the chain message to the relay chain collection node, and send the cross-chain transaction package in the target chain signature queue T The second stage signature package of is deleted.

[0075] Among them, the method of broadcasting the highest priority consensus proposals first includes:

[0076] Each clustering node selects the consensus proposal with the highest membership from each consensus proposal class as the consensus proposal to be broadcasted for each consensus proposal class; each clustering node, according to the round of asynchronous binary consensus, preferentially broadcasts the consensus proposal to be broadcasted of the consensus proposal class with the highest priority, and forwards the consensus proposal to be broadcasted of the corresponding round to other clustering nodes; each clustering node receives 2 b / After 3 identical consensus proposals are received, the consensus proposal is broadcast to each consensus node.

[0077] Among them, the consensus proposals to be broadcasted of the highest priority consensus proposal class are received by the consensus node in the first round of asynchronous binary consensus, and the consensus proposals to be broadcasted of the second highest priority consensus proposal class are received by the consensus node in the second round of asynchronous binary consensus, and so on.

[0078] Among them, the method of broadcasting the highest priority consensus proposals first can be used for broadcasting consensus proposals in the first phase, and can also be used for broadcasting consensus proposals in the second phase. It should be understood that when used for broadcasting consensus proposals in the first phase, the consensus proposal mentioned is the first phase consensus proposal; when used for broadcasting consensus proposals in the second phase, the consensus proposal mentioned is the second phase consensus proposal.

[0079] The signature queue can be a source chain signature queue or a target chain signature queue. The signature queue contains multiple signature packages. Each consensus node of the relay chain committee has its own source chain signature queue and target chain signature queue. Each consensus node of the relay chain committee sorts the received signature packages into the corresponding signature queue. The consensus node of the relay chain committee starts asynchronous consensus after collecting the signature packages sent by all verification groups. X It is expressed as:

[0080] X ={ S 1, S 2, ..., S r}

[0081] in, S 1 is the head of the queue, the first signature packet in the queue; S r The last one in the queue r Signature bags, r The value is determined by the computing power and storage capacity of the node. The signature package is sent by the leader node of the verification group. One cross-chain transaction package corresponds to multiple signature packages. S The structure is:

[0082] S =< T , M ,P , K >

[0083] in, T It is a cross-chain transaction package, which contains multiple transactions. M It is the number of the cross-chain transaction package, which is used to determine whether it is the same transaction package. The initial transaction package number is 1. P Sign for the verification node of the verification group, K It is a stage identifier used to distinguish signature packages in different stages. K= 1. Second stage K= 2.

[0084] Among them, the consensus proposal can be a first-stage consensus proposal or a second-stage consensus proposal, and the consensus proposal refers to the content of consensus reached by the consensus nodes.

[0085] Among them, the fuzzy clustering method can be the Fuzzy C-Means (FCM) class. The FCM clustering method is a mixed data clustering method based on fuzzy theory. The FCM clustering method is an iterative algorithm with a fast convergence speed. It can quickly cluster large-scale data, with a fast clustering speed and a good clustering effect. The clustering object is transaction signature data, which has fewer features. The calculation process during clustering is fast, which can ensure the clustering speed and reduce the impact of the clustering method on the asynchronous consensus speed.

[0086] In the above-mentioned asynchronous consensus method based on fuzzy clustering analysis of transaction signatures in the relay chain, the nodes of the relay chain committee are divided into consensus nodes and clustering nodes. The consensus nodes use cross-chain transaction packages and signatures as consensus proposals. After the reliable broadcast is completed, the consensus proposals are updated and broadcast to the clustering node cluster. The clustering nodes aggregate the consensus proposals into consensus proposal classes and calculate the consensus priority of each consensus proposal class. The clustering nodes give priority to sending consensus proposals of high-priority consensus proposal classes to the consensus nodes for asynchronous binary consensus, thereby reducing the number of instances of asynchronous binary consensus and the time for selecting consensus proposals for consensus, thereby improving the efficiency of asynchronous consensus.

[0087] like Figure 2 As shown, in one embodiment, the preset proposal consensus method is:

[0088] The relay chain committee includes n consensus nodes and b In the case of cluster nodes, each consensus node has a cross-chain transaction package. T of mThe transactions in the cross-chain transaction package of the signature package are the same and the verification node signature is valid. After the verification is passed, the consensus node signature, the number of the cross-chain transaction package and the verification node signature are used as the transaction package message, and the reliable broadcast protocol is called to send the transaction package message to other consensus nodes. d Transaction package message sent The content is: =< N d , M d , P d >, d ∈1, 2, 3, … n ,in, N d Consensus Node d Signature, M d Consensus Node d The number of the selected cross-chain transaction package, P d Consensus Node d The verification node signature of the selected cross-chain transaction package; each consensus node verifies the consensus node signature, the number of the cross-chain transaction package and the verification node signature in the received transaction package message in real time, and adds the verification node signature and the number of the cross-chain transaction package in the verified transaction package message to the consensus proposal. When the consensus node calls the reliable broadcast protocol to execute, the number of the cross-chain transaction package and the verification node signature in the consensus proposal are packaged and sent to each clustering node.

[0089] Among them, the preset proposal consensus method can be to conduct a proposal consensus on the first-stage signature package to obtain a first-stage consensus proposal, or it can be to conduct a proposal consensus on the second-stage signature package to obtain a second-stage consensus proposal. It should be understood that in the case of conducting a proposal consensus on the first-stage signature package to obtain a first-stage consensus proposal, the signature package mentioned in the preset proposal consensus method is the first-stage signature package, and the consensus proposal sent to each clustering node is the first-stage consensus proposal; in the case of conducting a proposal consensus on the second-stage signature package to obtain a second-stage consensus proposal, the signature package mentioned in the preset proposal consensus method is the second-stage signature package, and the consensus proposal sent to each clustering node is the second-stage consensus proposal.

[0090] like Figure 2 As shown, in one embodiment, the fuzzy clustering method is:

[0091] Each cluster node receives f After +1 consensus proposal, the set of consensus proposals is obtained ={ F 1, F2, ..., F i , ..., F f+1}, F i For the i consensus proposals, f for n The number of malicious nodes in the consensus nodes; each cluster node is based on the set of consensus proposals In f +1 consensus proposals are clustered to determine the membership of each consensus proposal in each consensus proposal class, and the consensus proposal corresponding to each consensus proposal class is determined based on the membership of each consensus proposal in each consensus proposal class; each clustering node analyzes the consensus priority of each consensus proposal class based on the number of consensus proposals corresponding to each consensus proposal class, and determines the consensus priority of each consensus proposal class.

[0092] It should be understood that, during the process of asynchronous binary consensus of consensus nodes, if each clustering node needs to send a consensus proposal of the next priority to each consensus node, each clustering node selects the consensus proposal with the highest membership from the consensus proposal class of the next consensus priority as the consensus proposal to be broadcast; each clustering node forwards the consensus proposal to be broadcast to other clustering nodes; each clustering node receives 2 b / After 3 identical consensus proposals are received, the consensus proposal is determined as the next priority consensus proposal and broadcasted to each consensus node. This process is repeated to determine the consensus proposal for each round of asynchronous binary consensus.

[0093] Among them, after fuzzy clustering, the consensus proposal with the highest membership in each consensus proposal class represents the consensus proposal of that class.

[0094] It should be understood that the purpose of fuzzy clustering is to select an optimal consensus proposal for consensus, which is recognized by most clustering nodes. After receiving the consensus proposal, the consensus nodes can quickly start consensus, thereby improving the efficiency of asynchronous consensus.

[0095] In one embodiment, each cluster node generates a set of consensus proposals. In f +1 consensus proposals are clustered to determine the membership of each consensus proposal in each consensus proposal class. According to the membership of each consensus proposal in each consensus proposal class, the consensus proposal corresponding to each consensus proposal class is determined, including:

[0096] Set the error threshold for clustering , initialize the membership matrix U 1, initialize the elements in the membership matrix to random values ​​[0, 1], where ;

[0097] According to the previous iteration x The membership matrix U x , calculate the j The cluster center p Features , determine the current iteration x+ 1st j Cluster Centers q j , No. j Cluster Centers q j include , and , the j The cluster center p Features The expression is:

[0098] ,

[0099] in, F i For the i consensus proposals, F i The features include ASCII value, number of digits and number of letters, respectively. , and express, s is the number of cluster categories, where s≤ f +1;

[0100] Based on the current iteration x+ 1st j Cluster Centers q j , determine the current iteration x+ 1st i The consensus proposal and j The membership degree of cluster centers u i,j , get the current iteration x+ The first degree membership matrix U x+1 , the i The consensus proposal and j The membership degree of cluster centers u i,j The expression is: ,

[0101] Among them, ||*|| is the L2 norm;

[0102] Iterate and update the membership matrix until the current iteration occurs twice in a row x+ Each membership degree in the membership matrix of the previous iteration is x The difference between the corresponding memberships in the membership matrix does not exceed the error threshold, that is, , the iteration is terminated and the final membership matrix is ​​output;

[0103] According to the final membership matrix, perform argmax Function, determine the consensus proposal corresponding to each consensus proposal class, the expression is:

[0104] C j ={ F w | w = argmax ( u w,j ), w ∈[1, f +1], w ∈Z +},

[0105] in, argmax () is to find the consensus proposal category C j The function of the consensus proposal, Z + is a positive integer, u w,j For the w The consensus proposal and j The membership degree of each cluster center.

[0106] In one embodiment, the consensus proposal class C j Consensus priority Q j The expression is:

[0107] ,

[0108] ,

[0109] C j ={ F w | w = argmax ( u w,j ), w ∈[1, f +1], w ∈Z+};

[0110] in,{ L 1, L 2, ..., L f+1}represent f +1 consensus priority, D j For consensus proposal class C j The consensus priority judgment value of V j For the j The number of consensus proposals contained in the consensus proposal class, G w Proposal for consensus F w The timestamp interval value, is the weight coefficient of consensus priority, argmax () is to find the consensus proposal category C j The function of the consensus proposal.

[0111] Among them, the weight coefficient of consensus priority The determination method can be to use Sigmoid The function weights is mapped between 0 and 1, and when V j The larger the weight The larger the The value of .

[0112] Among them, consensus proposal F w Timestamp interval value G w The calculation method is: G w =1 / (1+ H w ), H w Proposal for consensus F w The interval value between the timestamp of arrival at the cluster node and the end timestamp of the cluster node receiving the consensus proposal.

[0113] Among them, the fuzzy clustering method can cluster the first-stage consensus proposals to determine the priority of the first-stage consensus proposals, and can also cluster the second-stage consensus proposals to determine the priority of the second-stage consensus proposals. It should be understood that when the first-stage consensus proposals are clustered to determine the priority of the first-stage consensus proposals, the consensus proposals mentioned in the fuzzy clustering method are the first-stage consensus proposals; when the second-stage consensus proposals are clustered to determine the priority of the second-stage consensus proposals, the consensus proposals mentioned in the fuzzy clustering method are the second-stage consensus proposals.

[0114] like Figure 2 As shown, in one embodiment, the preset asynchronous binary consensus method is:

[0115] The consensus node that sent the highest priority consensus proposal a The asynchronous binary consensus module is called for execution. Other consensus nodes verify the consensus proposal with the highest priority received. If the verification is correct, 1 is sent to the consensus node. a , otherwise send 0 to the consensus node a If, after the broadcast of the highest priority consensus proposal is completed, there are other consensus nodes that have not received the highest priority consensus proposal, then the other consensus nodes send 0 to the consensus node a ;

[0116] Consensus Node a Upon receiving n - f After a 1 or 0 is generated, the pre-output is set to 1 or 0 accordingly. a Generate a random value of 0 or 1. If it is the same as the pre-output, set the preliminary asynchronous consensus result to the pre-output and output the preliminary asynchronous consensus result. If the preliminary asynchronous consensus result of the highest priority consensus proposal is 0, broadcast the message that the preliminary asynchronous consensus result is 0 to each clustering node, so that each clustering node can agree on the next priority consensus proposal and send it to each consensus node, iterating the next round of asynchronous binary consensus until the preliminary asynchronous consensus result is 1 or f After +1 round, the iterative asynchronous binary consensus ends and the asynchronous consensus result is output. f After +1 round, the asynchronous consensus result is still 0, which means that the consensus proposal has an error, and the asynchronous binary consensus fails. If the asynchronous consensus result is 1, the asynchronous binary consensus succeeds.

[0117] Among them, consensus nodes a for n The consensus node that sends the highest priority consensus proposal among the consensus nodes.

[0118] It should be understood that consensus nodes a Upon receiving n- f 1, the pre-output corresponding to 1; consensus node a Upon receiving n - f If there are 0s, the corresponding pre-output is set to 0.

[0119] It should be understood that in the first round of asynchronous binary consensus, the preliminary asynchronous consensus result is 0, and each cluster node will receive a message that the preliminary asynchronous consensus result is 0. Then each cluster node needs to reach a consensus among the cluster nodes on the consensus proposal class with the second highest consensus priority to be broadcast, so that each cluster node receives 2 b / After 3 identical consensus proposals are received, the consensus proposal is broadcast to each consensus node.

[0120] Among them, the preset asynchronous binary consensus method can perform asynchronous binary consensus on the first-stage consensus proposal to determine the first-stage asynchronous consensus result, and can also perform asynchronous binary consensus on the second-stage consensus proposal to determine the second-stage asynchronous consensus result. It should be understood that when the first-stage consensus proposal is performed through asynchronous binary consensus to determine the first-stage asynchronous consensus result, the consensus proposal mentioned in the preset asynchronous binary consensus method is the first-stage consensus proposal, and the asynchronous consensus result mentioned in the preset asynchronous binary consensus method is the first-stage asynchronous consensus result; when the second-stage consensus proposal is performed through asynchronous binary consensus to determine the second-stage asynchronous consensus result, the consensus proposal mentioned in the preset asynchronous binary consensus method is the second-stage consensus proposal, and the asynchronous consensus result mentioned in the preset asynchronous binary consensus method is the second-stage asynchronous consensus result.

[0121] It should be understood that the security of the relay chain is guaranteed by the consensus nodes of the relay chain. With the development of the relay chain, the number of connected application chains will also increase. If cross-chain transactions are handled by fixed consensus nodes for a long time, once an attacker invades the consensus node, it will affect the consensus efficiency of the relay chain and even cause the relay chain system to paralyze. Therefore, this problem can be solved by dynamically adjusting the consensus nodes based on the exponential moving average method.

[0122] In one embodiment, the asynchronous consensus method based on fuzzy clustering analysis of transaction signatures in the relay chain also includes:

[0123] In each round, the consensus node sends the consensus proposal to the clustering node. Each clustering node uses fuzzy clustering to cluster. After determining the priority of the consensus proposal, the consensus node of each round is calculated. d The time score of t Consensus nodes for rounds d Time score for:

[0124] ,

[0125] in, For the t Consensus nodes for rounds d The timestamp when the consensus proposal arrives at the cluster node. For the t The minimum timestamp of the consensus proposal sent to the cluster node among all consensus nodes in the round, For the t The maximum value of the timestamp of consensus proposals sent to cluster nodes among all consensus nodes in the round. is the division value of the score interval;

[0126] Each clustering node calculates the current round t The level score of each consensus node determines the level of each consensus node in the current round. t The levels include low speed, normal speed and high speed.

[0127] If each clustering node t At the end of the time period of the consensus mechanism, according to the consensus nodes in the current round t The level of the low-speed level is broadcast to other cluster nodes.

[0128] In more than 2 b / When 3 cluster nodes send the same consensus node number, all cluster nodes send a low-speed consensus node exit message carrying the consensus node number to other consensus nodes. , after receiving the message, other consensus nodes delete the information of the consensus node corresponding to the consensus node number;

[0129] The new consensus node submits registration information to each cluster node. The registration information includes IP address and port information.

[0130] Each cluster node broadcasts the registration information of the new consensus node to other consensus nodes;

[0131] After receiving the registration information of the new consensus node, other consensus nodes record the registration information of the new consensus node;

[0132] Each cluster node sends the registration information of other consensus nodes to the new consensus node;

[0133] The new consensus node records the registration information of other consensus nodes and joins the consensus.

[0134] It should be understood that by calculating the level score of the consensus node in this round through the set time period of the consensus mechanism, the time score and the level score of the previous round, it is possible to effectively distinguish the different speeds of consensus nodes sending data. The ABC classification method is usually applicable to scenarios where things need to be classified according to their value. The way this application dynamically adjusts the consensus node is to calculate the time it takes for the consensus node to send data, and then divide the consensus node. Therefore, the time it takes for the consensus node to send data is used as the value, and the ABC classification method is used to divide it into three levels: low speed, ordinary and high speed. After the time period of the consensus mechanism ends, the clustering node dynamically adjusts the consensus node based on the exponential moving average method, removes the consensus nodes with low speed levels, and adds new consensus nodes to join the consensus.

[0135] It should be understood that for each clustering node in the clustering node cluster, a time period for the operation of the consensus mechanism is set. From the beginning to the end of a time period for the operation of a consensus mechanism, each clustering node determines the priority of the consensus proposal and cooperates with the consensus node to complete the asynchronous binary consensus. At the end of the time period for the operation of the consensus mechanism, after each clustering node determines the priority of the consensus proposal, the consensus node is dynamically adjusted. After the adjustment is completed, the next time period for the operation of the consensus mechanism is carried out, and the priority of the consensus proposal is determined again based on the consensus proposal sent by each consensus node in the new consensus node cluster, and the consensus node is cooperated to complete the asynchronous binary consensus.

[0136] In an example, the time period for the operation of a consensus mechanism is 10 rounds of consensus nodes sending consensus proposals, that is, the counting starts from the time period for the operation of a consensus mechanism. When the round in which the consensus node sends consensus proposals is less than 11 times, each clustering node determines the priority of the consensus proposal and cooperates with the consensus node to complete the asynchronous binary consensus. When the round in which the consensus node sends consensus proposals is 11 times, each clustering node determines the priority of the consensus proposal and then dynamically adjusts the consensus node, and starts counting from the next time period for the operation of the consensus mechanism.

[0137] In one embodiment, the current round t Consensus Node d Level score The expression is:

[0138] ,

[0139] in, Consensus node for round 1 d Time score, I The round of sending consensus proposals in a time cycle of the consensus mechanism. For the current round t- 1 consensus node d 's level score.

[0140] In one embodiment, the consensus node d In the current round t Level The expression is:

[0141] .

[0142] It should be understood that the asynchronous consensus method based on fuzzy clustering analysis of transaction signatures in the above-mentioned relay chain also records the time when the consensus node sends data through the clustering node and calculates the level score through the exponential moving average method. The consensus node is updated to three different levels: high speed, normal and low speed according to the level score. After the time period of the consensus mechanism ends, that is, the time node for adjusting the consensus node is reached, the clustering node cluster adjusts the consensus node of the low speed level, and the new consensus node replaces the consensus node of the low speed level for consensus, so as to improve the efficiency of asynchronous consensus.

[0143] It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0144] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0145] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. An asynchronous consensus method based on fuzzy clustering analysis of transaction signatures in a relay chain, characterized in that: The method comprises: Each verification group in the relay chain will source the cross-chain transaction package T After verification, the cross-chain transaction package T , cross-chain transaction package T Number M , Verify node signature P and stage identification K Encapsulated as a cross-chain transaction package T The first-stage signature package is sent to the source chain signature queue of each consensus node of the relay chain committee; Each consensus node of the relay chain committee takes the cross-chain transaction package from the source chain signature queue T of m The first-stage signature package is used to conduct proposal consensus using the preset proposal consensus method to obtain the first-stage consensus proposal, and the first-stage consensus proposal is sent to each cluster node of the relay chain committee; Each clustering node of the relay chain committee clusters the received first-stage consensus proposals using a fuzzy clustering method, determines the priority of each first-stage consensus proposal, and broadcasts the first-stage consensus proposal to each consensus node in a manner of preferentially broadcasting the consensus proposal with the highest priority according to the priority of each first-stage consensus proposal. Each consensus node performs asynchronous binary consensus using a preset asynchronous binary consensus method according to the first-stage consensus proposal broadcast by the clustering node, and obtains the first-stage asynchronous consensus result; In the case where the result of the first phase asynchronous consensus is the success of the asynchronous binary consensus, the cross-chain transaction package is included by providing the consensus node of the first phase consensus proposal that succeeded the asynchronous binary consensus. T The first phase asynchronous consensus result is sent to the relay chain collection node, and the cross-chain transaction package in the source chain signature queue is sent to the relay chain collection node. T The first stage signature package of the deletion; The relay chain collection node sends the cross-chain transaction package T The first phase asynchronous consensus result is sent to the target chain for verification, and the target chain is verified according to the cross-chain transaction package T After the verification result of the asynchronous consensus result of the first phase is verified, the cross-chain transaction package T The verification result is sent to each verification group in the relay chain for further verification; The cross-chain transaction package sent by each verification group in the relay chain to the target chain T After the verification result is passed, the cross-chain transaction package T , cross-chain transaction package T Number M , Verify node signature P and stage identification K Encapsulated as a cross-chain transaction package T The second-stage signature package is sent to the target chain signature queue of the relay chain committee; Each consensus node of the relay chain committee takes the cross-chain transaction package from the target chain signature queue T of m The second-stage signature package is used to conduct proposal consensus using the preset proposal consensus method to obtain the second-stage consensus proposal, and the second-stage consensus proposal is sent to each cluster node of the relay chain committee; Each clustering node of the relay chain committee clusters the received second-stage consensus proposals using a fuzzy clustering method, determines the priority of each second-stage consensus proposal, and broadcasts the second-stage consensus proposal to each consensus node in a manner of preferentially broadcasting the consensus proposal with the highest priority according to the priority of each second-stage consensus proposal. Each consensus node performs asynchronous binary consensus using a preset asynchronous binary consensus method according to the second-stage consensus proposal broadcast by the clustering node, and obtains the second-stage asynchronous consensus result; In the case where the result of the second-stage asynchronous consensus is a successful asynchronous binary consensus, the cross-chain transaction package is included by providing the consensus node of the second-stage consensus proposal that succeeded the asynchronous binary consensus. T Pack it into blocks and broadcast the message to the relay chain collection node, and send the cross-chain transaction package in the target chain signature queue T The second stage signature package of the is deleted; The preset proposal consensus method is: The relay chain committee includes n consensus nodes and b In the case of cluster nodes, each consensus node has a T of m The transactions in the cross-chain transaction package of the signature package are the same and the verification node signature is valid. After the verification is passed, the consensus node signature, the number of the cross-chain transaction package and the verification node signature are used as the transaction package message, and the reliable broadcast protocol is called to send the transaction package message to other consensus nodes. d Transaction package message sent The content is: =< N d , M d , P d >, d ∈1, 2, 3, … n ,in, N d Consensus Node d Signature, M d Consensus Node d The number of the selected cross-chain transaction package, P d Consensus Node d The verification node signature of the selected cross-chain transaction package; Each consensus node verifies the consensus node signature, the number of the cross-chain transaction package, and the verification node signature in the received transaction package message in real time, and adds the verification node signature and the number of the cross-chain transaction package in the verified transaction package message to the consensus proposal. When the consensus node calls the reliable broadcast protocol to execute, the number of the cross-chain transaction package and the verification node signature in the consensus proposal are packaged and sent to each cluster node; The fuzzy clustering method is: Each cluster node receives f After +1 consensus proposal, the set of consensus proposals is obtained ={ F 1, F 2, ..., F i ,..., F f+1 }, F i For the i consensus proposals, f for n The number of malicious nodes among consensus nodes; Each cluster node is based on a set of consensus proposals In f +1 consensus proposals are clustered to determine the membership of each consensus proposal in each consensus proposal class, and the consensus proposal corresponding to each consensus proposal class is determined based on the membership of each consensus proposal in each consensus proposal class; Each clustering node analyzes the consensus priority of each consensus proposal class according to the number of consensus proposals corresponding to each consensus proposal class, and determines the consensus priority of each consensus proposal class; Each cluster node is based on a set of consensus proposals In f +1 consensus proposals are clustered to determine the membership of each consensus proposal in each consensus proposal class. According to the membership of each consensus proposal in each consensus proposal class, the consensus proposal corresponding to each consensus proposal class is determined, including: Set the clustering error threshold , initialize the membership matrix U 1 , initialize the elements in the membership matrix to random values ​​[0, 1], where ; According to the previous iteration x The membership matrix U x , calculate the j The cluster center p Features , determine the current iteration x+ 1st j Cluster Centers q j , No. j Cluster Centers q j include , and , the j The cluster center p Features The expression is: , in, F i For the i consensus proposals, F i The features include ASCII value, number of digits and number of letters, respectively. , and express, s is the number of cluster categories; Based on the current iteration x+ 1st j Cluster Centers q j , determine the current iteration x+ 1st i The consensus proposal and j The membership degree of cluster centers u i,j , get the current iteration x+ The first degree membership matrix U x+1 , the i The consensus proposal and j The membership degree of cluster centers u i,j The expression is: , Among them, ||*|| is the L2 norm; Iterate and update the membership matrix until the current iteration occurs twice in a row x+ Each membership degree in the membership matrix of the previous iteration is x The difference between the corresponding memberships in the membership matrix does not exceed the error threshold, that is, , the iteration is terminated and the final membership matrix is ​​output; According to the final membership matrix, perform argmax Function, determine the consensus proposal corresponding to each consensus proposal class, the expression is: C j ={ F w | w = argmax ( u w,j ), w ∈[1, f +1], w ∈Z +}, in, argmax () is to find the consensus proposal category C j The function of the consensus proposal, Z + is a positive integer, u w,j For the w The consensus proposal and j The membership degree of each cluster center; Consensus Proposal C j Consensus priority Q j The expression is: , , C j ={ F w | w = argmax ( u w,j ), w ∈[1, f +1], w ∈Z +}; in,{ L 1, L 2, ..., L f+1 }represent f +1 consensus priority, D j For consensus proposal class C j The consensus priority judgment value of V j For the j The number of consensus proposals contained in the consensus proposal class, G w Proposal for consensus F w The timestamp interval value, is the weight coefficient of consensus priority, argmax () is to find the consensus proposal category C j The function of the consensus proposal.

2. The asynchronous consensus method based on fuzzy clustering analysis of transaction signatures in the relay chain according to claim 1 is characterized in that: The preset asynchronous binary consensus method is: The consensus node that sent the highest priority consensus proposal a The asynchronous binary consensus module is called for execution. Other consensus nodes verify the consensus proposal with the highest priority received. If the verification is correct, 1 is sent to the consensus node. a , otherwise send 0 to the consensus node a If, after the broadcast of the highest priority consensus proposal is completed, there are other consensus nodes that have not received the highest priority consensus proposal, then the other consensus nodes send 0 to the consensus node a ; Consensus Node a Upon receiving n - f After a 1 or 0 is generated, the pre-output is set to 1 or 0 accordingly. a Generate a random value of 0 or 1. If it is the same as the pre-output, set the preliminary asynchronous consensus result as the pre-output and output the preliminary asynchronous consensus result. If the preliminary asynchronous consensus result of the highest priority consensus proposal is 0, the message that the preliminary asynchronous consensus result is 0 is broadcast to each cluster node, so that each cluster node can agree on the next priority consensus proposal and send it to each consensus node, and iterate the next round of asynchronous binary consensus until the preliminary asynchronous consensus result is 1 or f After +1 round, the iterative asynchronous binary consensus ends and the asynchronous consensus result is output. f After +1 round, the asynchronous consensus result is still 0, which means that the consensus proposal has an error, and the asynchronous binary consensus fails. If the asynchronous consensus result is 1, the asynchronous binary consensus succeeds.

3. The asynchronous consensus method based on fuzzy clustering analysis of transaction signatures in the relay chain according to claim 1 is characterized in that: The method further comprises: In each round, the consensus node sends the consensus proposal to the clustering node. Each clustering node uses fuzzy clustering to cluster. After determining the priority of the consensus proposal, the consensus node of each round is calculated. d The time score of t Consensus nodes for each round d Time score for: , in, For the t Consensus nodes for each round d The timestamp when the consensus proposal arrives at the cluster node. For the t The minimum timestamp of the consensus proposal sent to the cluster node among all consensus nodes in the round, For the t The maximum value of the timestamp of consensus proposals sent to cluster nodes among all consensus nodes in the round. is the division value of the score interval; Each clustering node calculates the current round t The level score of each consensus node determines the level of each consensus node in the current round. t The levels include low speed, normal speed and high speed. If each clustering node t At the end of the time period of the consensus mechanism, according to the consensus nodes in the current round t The level of the low-speed level is broadcast to other cluster nodes. In more than 2 b / When 3 cluster nodes send the same consensus node number, all cluster nodes send a low-speed consensus node exit message carrying the consensus node number to other consensus nodes. , after receiving the message, other consensus nodes delete the information of the consensus node corresponding to the consensus node number; The new consensus node submits registration information to each cluster node. The registration information includes IP address and port information. Each cluster node broadcasts the registration information of the new consensus node to other consensus nodes; After receiving the registration information of the new consensus node, other consensus nodes record the registration information of the new consensus node; Each cluster node sends the registration information of other consensus nodes to the new consensus node; The new consensus node records the registration information of other consensus nodes and joins the consensus.

4. The asynchronous consensus method based on fuzzy clustering analysis of transaction signatures in the relay chain according to claim 3 is characterized in that: The current round t Consensus Node d Level score The expression is: , in, Consensus node for round 1 d Time score, I The round of sending consensus proposals in a time cycle of the consensus mechanism. For the current round t- 1 consensus node d 's level score.

5. The asynchronous consensus method based on fuzzy clustering analysis of transaction signatures in the relay chain according to claim 4 is characterized in that: The consensus node d In the current round t Level The expression is: 。