Consensus proposal processing method and device, electronic equipment and storage medium
By distributing consensus proposals to a set of bound slave nodes in the blockchain system, the network bandwidth pressure problem of the master node is solved, and the broadcast speed of the consensus proposal and the consensus performance of the blockchain system are improved.
Patent Information
- Application Number
- CN202410288243.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-13
- Publication Date
- 2025-09-16
AI Technical Summary
In the blockchain system, due to the large number of slave nodes and the large amount of consensus proposal data, the network bandwidth pressure of the master node is relatively high, which affects the broadcast speed of the consensus proposal and thus affects the consensus performance of the blockchain system.
The master node sends the consensus proposal to each first slave node in the first slave node set, and sends the consensus proposal to the bound second slave node after verification. The number of nodes in the first slave node set is greater than the upper limit of the number of abnormal nodes in the blockchain system, ensuring that the second slave node set can receive the consensus proposal.
By allocating the network bandwidth pressure of the master node, the broadcast speed of the consensus proposal is improved, so that the slave nodes can receive the consensus proposal in a timely manner, thereby improving the consensus performance and stability of the blockchain system.
Smart Images

Figure CN120658752A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of blockchain technology, and in particular to a consensus proposal processing method, device, electronic device, and storage medium. Background Art
[0002] A blockchain is an encrypted, chained transaction storage structure formed by blocks. A blockchain system is a distributed system composed of multiple nodes that generates and links blocks based on an inter-node consensus algorithm. This inter-node consensus algorithm can be a Byzantine consensus algorithm, which specifically refers to the process in which the blockchain's master node packages transactions into a consensus proposal (or block) and then broadcasts the consensus proposal to the blockchain's slave nodes for voting and consensus.
[0003] However, in the process of the master node broadcasting the consensus proposal to the slave nodes, the large number of slave nodes and the large amount of data in the consensus proposal (for example, including multiple transactions) may cause greater pressure on the network bandwidth of the master node, thereby affecting the broadcast speed of the consensus proposal, making it impossible for the slave nodes to receive the consensus proposal in time, and ultimately affecting the consensus performance of the blockchain system. Summary of the Invention
[0004] The embodiments of the present application provide a consensus proposal processing method, device, electronic device, and storage medium to improve the consensus performance of a blockchain system.
[0005] In one aspect, an embodiment of the present application provides a consensus proposal processing method, which is applied to a master node in a blockchain system, wherein the blockchain system also includes multiple slave nodes. The method includes:
[0006] Obtaining node partitioning information, the node partitioning information including: a first slave node set and a second slave node set divided based on the plurality of slave nodes, the number of nodes in the first slave node set being greater than an upper limit on the number of abnormal nodes in the blockchain system, and each second slave node in the second slave node set having a binding relationship with a corresponding first slave node in the first slave node set;
[0007] The consensus proposal is sent to each first slave node in the first slave node set respectively, so that after at least one first slave node verifies the consensus proposal and passes it, when it is determined that a second slave node is bound, the consensus proposal is at least sent to the bound second slave node.
[0008] In one aspect, an embodiment of the present application provides a consensus proposal processing method, which is applied to a first slave node in a blockchain system. The method includes:
[0009] If a consensus proposal is received from a master node in the blockchain system, the consensus proposal is verified;
[0010] After the consensus proposal is verified, node division information is obtained. If it is determined based on the node division information that a second slave node is bound, the consensus proposal is sent to the bound second slave node.
[0011] The node division information includes: a first slave node set and a second slave node set divided based on multiple slave nodes, the first slave node belongs to the first slave node set, the second slave node belongs to the second slave node set, the number of nodes in the first slave node set is greater than the upper limit of the number of abnormal nodes in the blockchain system, and each second slave node in the second slave node set has a binding relationship with the corresponding first slave node in the first slave node set.
[0012] On the one hand, an embodiment of the present application provides a consensus proposal processing method, which is applied to a second slave node in a blockchain system, and the method includes:
[0013] If a consensus proposal is received from the first slave node bound to the blockchain system, verify the consensus proposal;
[0014] The second slave node is provided with node division information, and the node division information includes: a first slave node set and a second slave node set divided based on multiple slave nodes, the first slave node belongs to the first slave node set, the second slave node belongs to the second slave node set, the number of nodes in the first slave node set is greater than the upper limit of the number of abnormal nodes in the blockchain system, and each second slave node in the second slave node set has a binding relationship with the corresponding first slave node in the first slave node set.
[0015] In one aspect, an embodiment of the present application provides a consensus proposal processing device, which is provided in a master node of a blockchain system, wherein the blockchain system further includes multiple slave nodes, and the device includes:
[0016] an acquiring unit, configured to acquire node division information, the node division information including: a first slave node set and a second slave node set divided based on the plurality of slave nodes, the number of nodes in the first slave node set being greater than an upper limit on the number of abnormal nodes in the blockchain system, and each second slave node in the second slave node set being bound to a corresponding first slave node in the first slave node set;
[0017] The sending unit is configured to send the consensus proposal to each first slave node in the first slave node set, so that after at least one first slave node verifies the consensus proposal and passes it, when it is determined that a second slave node is bound, the consensus proposal is at least sent to the bound second slave node.
[0018] Optionally, the device further includes a setting unit, configured to set the node division information by setting a division method as follows:
[0019] Sorting the identification information of each of the plurality of slave nodes according to a set sorting rule to obtain a slave node identification sequence;
[0020] Selecting N pieces of identification information from the slave node identification sequence according to a set selection rule, and using the slave nodes corresponding to the N pieces of identification information as first slave nodes, thereby obtaining the first slave node set; wherein N is an integer and is greater than the upper limit of the number of abnormal nodes in the blockchain system;
[0021] taking slave nodes other than the first slave node set among the plurality of slave nodes as second slave nodes, to obtain the second slave node set;
[0022] According to the set binding rule, each second slave node in the second slave node set is bound to the corresponding first slave node in the first slave node set.
[0023] Optionally, when selecting N pieces of identification information from the slave node identification sequence according to a set selection rule, the setting unit is specifically configured to:
[0024] Sequentially set the node index information corresponding to each identification information in the slave node identification sequence;
[0025] Based on the node index information corresponding to each of the plurality of identification information, N identification information located at a set arrangement position are selected from the slave node identification sequence.
[0026] Optionally, the setting unit is further configured to:
[0027] When a setting situation occurs in the blockchain system, a plurality of new slave nodes are determined, and based on the new plurality of slave nodes, the node division information is reset according to the setting division method; wherein the setting situation includes any one of the following situations:
[0028] Add a new slave node;
[0029] Delete the slave node;
[0030] Switch between the master node and the slave node.
[0031] In one aspect, an embodiment of the present application provides a consensus proposal processing device, which is provided in a first slave node in a blockchain system, and includes:
[0032] a verification unit, configured to verify a consensus proposal sent by a master node in the blockchain system upon receipt of the consensus proposal;
[0033] a sending unit, configured to obtain node division information after the consensus proposal is verified, and if it is determined based on the node division information that a second slave node is bound, send the consensus proposal to the bound second slave node;
[0034] The node division information includes: a first slave node set and a second slave node set divided based on multiple slave nodes, the first slave node belongs to the first slave node set, the second slave node belongs to the second slave node set, the number of nodes in the first slave node set is greater than the upper limit of the number of abnormal nodes in the blockchain system, and each second slave node in the second slave node set has a binding relationship with the corresponding first slave node in the first slave node set.
[0035] Optionally, after the consensus proposal is verified, the sending unit is further configured to:
[0036] If a proposal acquisition request is received from an unbound second slave node, the consensus proposal is sent to the unbound second slave node.
[0037] In one aspect, an embodiment of the present application provides a consensus proposal processing device, which is provided in a second slave node in a blockchain system, and includes:
[0038] a verification unit, configured to verify the consensus proposal upon receiving the consensus proposal sent by the first slave node bound to the blockchain system;
[0039] The second slave node is provided with node division information, and the node division information includes: a first slave node set and a second slave node set divided based on multiple slave nodes, the first slave node belongs to the first slave node set, the second slave node belongs to the second slave node set, the number of nodes in the first slave node set is greater than the upper limit of the number of abnormal nodes in the blockchain system, and each second slave node in the second slave node set has a binding relationship with the corresponding first slave node in the first slave node set.
[0040] Optionally, the device further includes:
[0041] a sending unit, configured to, if no consensus proposal is received from the bound first slave node in the blockchain system, select at least one unbound first slave node from the first slave node set based on the node partitioning information, and send a proposal acquisition request to the at least one unbound first slave node;
[0042] The verification unit is further configured to verify the consensus proposal if it receives the consensus proposal sent by any unbound first slave node.
[0043] Optionally, the sending unit is further configured to:
[0044] Selecting an unbound first slave node from the first slave node set based on the node partitioning information, and sending a proposal acquisition request to the first slave node;
[0045] If the consensus proposal sent by the one first slave node is not received, based on the node partitioning information, another unbound first slave node is selected from the first slave node set, and the proposal acquisition request is sent to the another first slave node.
[0046] An electronic device provided in an embodiment of the present application includes a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of any one of the above-mentioned consensus proposal processing methods.
[0047] An embodiment of the present application provides a computer-readable storage medium, which includes a computer program. When the computer program is run on an electronic device, the computer program is used to enable the electronic device to perform the steps of any one of the above-mentioned consensus proposal processing methods.
[0048] An embodiment of the present application provides a computer program product, which includes a computer program stored in a computer-readable storage medium; when a processor of an electronic device reads the computer program from the computer-readable storage medium, the processor executes the computer program, causing the electronic device to perform the steps of any one of the above-mentioned consensus proposal processing methods.
[0049] The solution of the embodiment of the present application has at least the following beneficial effects:
[0050] The embodiments of the present application provide a consensus proposal processing method, device, electronic device, and storage medium. When a master node in a blockchain system needs to send a consensus proposal, it obtains node partitioning information, which includes a first slave node set and a second slave node set, and each second slave node has a binding relationship with a corresponding first slave node. The master node sends the consensus proposal to each first slave node in the first slave node set, so that after at least one first slave node verifies the consensus proposal, when it is determined that there is a second slave node bound, the master node sends the consensus proposal to at least the bound second slave node. The number of nodes in the first slave node set is greater than the upper limit of the number of abnormal nodes in the blockchain system, that is, there are normal first slave nodes in the first slave node set. This is to ensure that the second slave node set can receive the consensus proposal from the first slave node set, thereby ensuring the stability and security of the blockchain system.
[0051] Through the above solution, while ensuring the stability and security of the blockchain system, the network bandwidth pressure of the master node for sending consensus proposals can be distributed to the first slave node in the first slave node set, thereby significantly reducing the network bandwidth pressure of the master node, improving the broadcast speed of the consensus proposal, and enabling the slave nodes to receive the consensus proposals in a timely manner, thereby improving the consensus performance of the blockchain system.
[0052] Other features and advantages of the present application will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present application. The purposes and other advantages of the present application can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0054] Figure 1 An optional structural diagram of a distributed system provided in an embodiment of the present application applied to a blockchain system;
[0055] Figure 2 This is an optional schematic diagram of the block structure provided in the embodiment of the present application;
[0056] Figure 3A This is a schematic diagram of a node consensus process of a blockchain system provided by an embodiment of the present application;
[0057] Figure 3B This is a schematic diagram of the broadcast process of a consensus proposal provided in an embodiment of the present application;
[0058] Figure 4 A schematic diagram of an application scenario of a consensus proposal processing method provided in an embodiment of the present application;
[0059] Figure 5 A flowchart of a consensus proposal processing method provided in an embodiment of the present application;
[0060] Figure 6 A schematic diagram of slave node sorting provided in an embodiment of the present application;
[0061] Figure 7A A schematic diagram of a node partitioning process provided in an embodiment of the present application;
[0062] Figure 7B A schematic diagram of a node partitioning information partitioning process provided in an embodiment of the present application;
[0063] Figure 8A flowchart of another consensus proposal processing method provided in an embodiment of the present application;
[0064] Figure 9 A flowchart of another consensus proposal processing method provided in an embodiment of the present application;
[0065] Figure 10 A logical diagram of obtaining a consensus proposal from a node request provided in an embodiment of the present application;
[0066] Figure 11 An overall logic diagram of a consensus proposal processing method provided in an embodiment of the present application;
[0067] Figure 12 A schematic diagram of the structure of a consensus proposal processing device provided in an embodiment of the present application;
[0068] Figure 13 A schematic diagram of the composition structure of another consensus proposal processing device provided in an embodiment of the present application;
[0069] Figure 14 A schematic diagram of the composition structure of another consensus proposal processing device provided in an embodiment of the present application;
[0070] Figure 15 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0071] Figure 16 A schematic diagram of the structure of another electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0072] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of the technical solutions of this application, but not all of them. Based on the embodiments described in this application document, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the technical solutions of this application.
[0073] The blockchain system involved in the embodiments of the present application can be a distributed system formed by connecting a client and multiple nodes (any form of computing device in the access network, such as a server and a user terminal) through network communication.
[0074] Taking the distributed system as the blockchain system as an example, see Figure 1 , Figure 1This is an optional structural diagram of a distributed system 100 provided by an embodiment of the present invention applied to a blockchain system. It consists of multiple nodes 200 (any type of computing device connected to the network, such as a server or user terminal) and clients 300. The nodes form a peer-to-peer network. The peer-to-peer protocol is an application layer protocol running on top of the Transmission Control Protocol (TCP). In a distributed system, any machine, such as a server or terminal, can join and become a node. Nodes include hardware layers, a middle layer, an operating system layer, and an application layer.
[0075] See also Figure 1 The functions of each node in the blockchain system shown include:
[0076] 1) Routing: A basic function of a node, used to support communication between nodes.
[0077] In addition to the routing function, nodes can also have the following functions:
[0078] 2) Applications, deployed in the blockchain, implement specific services based on actual business needs, record data related to the implementation of functions to form record data, carry digital signatures in the record data to indicate the source of the task data, and send the record data to other nodes in the blockchain system for other nodes to add the record data to a temporary block when they successfully verify the source and integrity of the record data.
[0079] For example, the services implemented by the application include:
[0080] 2.1) Wallet: This provides the functionality for conducting electronic currency transactions, including initiating transactions (i.e., sending the current transaction record to other nodes in the blockchain system. Upon successful verification by other nodes, the transaction record data is stored in a temporary block of the blockchain as a response to acknowledge the transaction's validity). The wallet also supports querying the remaining electronic currency in an electronic currency address.
[0081] 2.2) Shared ledgers are used to store, query, and modify account data. Records of operations on account data are sent to other nodes in the blockchain system. After verification, other nodes acknowledge the validity of the account data by storing the recorded data in a temporary block. They can also send a confirmation to the node that initiated the operation.
[0082] 2.3) Smart contracts are computerized protocols that can enforce the terms of a contract. They are implemented through code deployed on a shared ledger that is executed when certain conditions are met. Based on actual business needs, the code is used to complete automated transactions, such as querying the logistics status of a buyer's purchased goods and transferring the buyer's electronic currency to the merchant's address after the buyer signs for the goods. Of course, smart contracts are not limited to executing contracts for transactions, but can also execute contracts that process received information.
[0083] 3) Blockchain, including a series of blocks that are connected to each other in the order of their generation. Once a new block is added to the blockchain, it will not be removed. The block records the record data submitted by the nodes in the blockchain system.
[0084] See also Figure 2 , Figure 2 This is an optional schematic diagram of the block structure provided by an embodiment of the present invention. Each block includes the hash value of the transaction records stored in the block (the hash value of the current block) and the hash value of the previous block. The blocks are connected by hash values to form a blockchain. In addition, the block may also include information such as the timestamp when the block was generated. Blockchain is essentially a decentralized database, a series of data blocks generated using cryptographic methods. Each data block contains relevant information used to verify the validity of the information (anti-counterfeiting) and generate the next block.
[0085] Before explaining the embodiments of the present application in detail, the design ideas of the embodiments of the present application are first explained.
[0086] The blockchain system includes multiple nodes, each of which has a transaction pool for storing transactions. After receiving a transaction from a client, any node in the transaction pool shares it with the other nodes, allowing all nodes to store the transaction in the transaction pool. This ensures that the transactions stored in the transaction pools of the multiple nodes are consistent and can be processed. For any pending transaction in the transaction pool, after reaching consensus among the multiple nodes, the transaction can be executed and stored on the blockchain.
[0087] Generally, leader-based consensus algorithms, such as the Byzantine Fault Tolerance (BFT) and Practical Byzantine Fault Tolerance (PBFT) consensus algorithms, are used to reach consensus on transactions. After reaching consensus, the transaction is executed and stored on the blockchain. Leader-based consensus algorithms require a leader to lead the consensus process. The leader is elected from multiple nodes in the blockchain system and is responsible for broadcasting consensus proposals generated based on transactions. During each round of consensus, one node is elected from these multiple nodes as the leader, and the remaining nodes are designated as slaves. Proposal consensus is achieved through the leader and slave nodes in each round.
[0088] The following uses the PBFT consensus algorithm as an example to illustrate the proposal consensus execution process in related technologies. Figure 3A As shown, the process includes the following steps (1) to (4):
[0089] (1) In the proposal phase, after the master node packages the pending transactions into a consensus proposal, it does not execute the consensus proposal, but broadcasts the consensus proposal to the slave nodes.
[0090] (2) After receiving the consensus proposal, the slave node enters the pre-voting stage (prevote), then initiates a pre-vote vote on the consensus proposal and broadcasts the voting results to other nodes.
[0091] (3) When a node receives more than 2 / 3 of the voting results, it enters the pre-confirmation phase (precommit), generates a precommit vote, and broadcasts the voting results to other nodes.
[0092] (4) If a node receives more than 2 / 3+1 pre-confirmation information, it enters the confirmation phase (commit).
[0093] In addition, Byzantine consensus generally guarantees security and activity. If the master node fails or is abnormal, a new node is switched to become the master node and steps (1)-(4) are executed again. For example, if any node does not obtain a sufficient number of commit messages with consistent execution results within the limited time (i.e., the timeout threshold), a timeout is triggered and the master node switching process is entered. After the master node is switched, the switched master node will initiate a new consensus proposal. After receiving the new consensus proposal, the corresponding slave node will abandon the temporarily stored execution change state and execute the new consensus proposal instead.
[0094] Currently, the masternode broadcasts the consensus proposal in the following way: Figure 3BAs shown in the figure, slave nodes send consensus proposals to each slave node separately. If the blockchain system has a large number of nodes and the consensus proposal contains a large amount of data (for example, it contains multiple transactions), the master node may not be able to broadcast the consensus proposal to all slave nodes in a timely manner. The key to consensus performance is that the slave nodes can receive the consensus proposal in a timely manner. Only when the consensus proposal is received as soon as possible can the vote and ultimately submit the block be initiated as soon as possible. Therefore, the current consensus proposal broadcast scheme will have a very low consensus performance in the blockchain system when there are many nodes.
[0095] In view of this, embodiments of the present application provide a consensus proposal processing method, apparatus, electronic device, and storage medium. When a master node in a blockchain system needs to send a consensus proposal, it obtains node partitioning information, which includes a first set of slave nodes and a second set of slave nodes, each of which is bound to a corresponding first slave node. The master node then sends the consensus proposal to each first slave node in the first set of slave nodes. In this way, after at least one first slave node verifies the consensus proposal and determines that it is bound to a second slave node, it sends the consensus proposal to at least the bound second slave node. The number of nodes in the first set of slave nodes is greater than the upper limit of the number of abnormal nodes in the blockchain system. This is to ensure that the second set of slave nodes can receive the consensus proposal from the first set of slave nodes, thereby ensuring the stability and security of the blockchain system. Because the network bandwidth pressure of the master node sending the consensus proposal is distributed among the first slave nodes in the first set of slave nodes, the network bandwidth pressure on the master node is significantly reduced, the broadcast speed of the consensus proposal is increased, and the slave nodes receive the consensus proposal in a timely manner, thereby improving the consensus performance of the blockchain system.
[0096] The preferred embodiments of the present application are described below in conjunction with the drawings in the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application and are not used to limit the present application. In addition, the embodiments and features in the embodiments of the present application can be combined with each other if there is no conflict.
[0097] like Figure 4 As shown, it is a schematic diagram of the application scenario of an embodiment of the present application.
[0098] See also Figure 4Blockchain system 400 refers to a system for sharing data between nodes. Blockchain system 400 may include multiple nodes 401. During normal operation, each node 401 may receive input information and maintain shared data within blockchain system 400 based on the received input information. To ensure information interoperability within blockchain system 400, information connections may exist between each node 401 in blockchain system 400, allowing nodes 401 to transmit information through these connections. For example, when any node 401 in blockchain system 400 receives input information, the other nodes 401 in blockchain system 400 obtain the input information according to a consensus algorithm and store it as part of the shared data, ensuring that the data stored on all nodes 401 in blockchain system 400 is consistent. In other words, each node 401 in blockchain system 400 stores the same blockchain.
[0099] Blockchain system 400 utilizes computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Blockchain system 400 is a distributed, shared ledger and database characterized by decentralization, immutability, full traceability, traceability, collective maintenance, and transparency. These characteristics ensure the blockchain's shared openness, authenticity, integrity, security, and reliability.
[0100] In each round of consensus process, there is a master node and multiple slave nodes in the multiple nodes 401 of the blockchain system 400. The master node and multiple slave nodes in each round can execute the following Figure 2 The proposal consensus execution method of the embodiment is used to achieve consensus and execution of each round of proposals.
[0101] In the embodiments of the present application, each node can be any form of computing device, such as a server or terminal device. Terminal devices include but are not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, aircraft, etc. A server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.
[0102] The consensus proposal processing method provided by the exemplary embodiment of the present application will be described below in combination with the application scenarios described above and with reference to the accompanying drawings. It should be noted that the above application scenarios are only shown to facilitate understanding of the spirit and principles of the present application, and the implementation of the present application is not limited in this respect.
[0103] See Figure 5 As shown in FIG, a flowchart of a consensus proposal processing method provided in an embodiment of the present application is shown. The execution subject is the master node in the blockchain system. The specific implementation process of the method is as follows:
[0104] S51. The master node obtains node division information, where the node division information includes: a first slave node set and a second slave node set divided based on multiple slave nodes, the number of nodes in the first slave node set is greater than the upper limit of the number of abnormal nodes in the blockchain system, and each second slave node in the second slave node set has a binding relationship with the corresponding first slave node in the first slave node set.
[0105] The master node can divide multiple slave nodes according to the set division method to obtain node division information. During the division process, assuming that the upper limit of the number of abnormal nodes in the blockchain system is m, the number of nodes in the first slave node set is at least m+1.
[0106] The master node and multiple slave nodes can respectively divide multiple slave nodes according to the set division method to ensure that the master node and multiple slave nodes obtain the same node division information. This is because if a master node or a slave node sends the divided node division information to other nodes, it may be because the master node or the slave node is an abnormal node, and it cannot be guaranteed that other nodes can receive the node division information.
[0107] The following embodiment specifically introduces the process of setting node division information.
[0108] In some embodiments, when the master node divides multiple slave nodes according to a set division method, the following steps A1-A3 may be performed:
[0109] A1. Sort identification information of multiple slave nodes according to a set sorting rule to obtain a slave node identification sequence.
[0110] The identification information of the slave node may be information that uniquely identifies the slave node, such as a node ID (Identity document), a public key, etc., which is not limited thereto. That is, the identification information of each slave node is different from the identification information of other slave nodes.
[0111] The sorting rules can be set as needed. For example, the sorting rules can be set to sort in dictionary order (i.e., alphabetical order), in numerical order, or in any custom order, without limitation.
[0112] For example, taking dictionary order as an example, multiple slave nodes are sorted according to the order of the letters in their identification information in the alphabet, including alphabetical sorting from first to last and alphabetical sorting from first to last. Assuming alphabetical sorting from first to last, the identification information of one slave node is represented by "iloveyou" and the identification information of another slave node is represented by "baray". The first letter of "iloveyou" is "i", and the first letter of "baray" is "b". In the alphabet, "b" comes before "i", so "baray" should be sorted before "iloveyou". It should be noted that when the first letter of the identification information of two slave nodes is the same, the order of the second letter in the alphabet can be compared, and so on.
[0113] For another example, taking the order of numerical size as an example, multiple slave nodes are sorted according to the size of the numbers in their identification information, including sorting from largest to smallest and from smallest to largest. Assuming that they are sorted from largest to smallest, the identification information of one slave node is represented as "123" and the identification information of another slave node is represented as "234". The first digit of "123" is "1", and the first digit of "234" is "2". "1" is smaller than "2", so "234" should be sorted before "123". It should be noted that when the first digits of the identification information of two slave nodes are the same, the size of the second digits can be compared, and so on.
[0114] For another example, taking the custom order as an example, the identification information of multiple slave nodes can be calculated based on the set calculation method. For example, each letter in the identification information of each slave node is mapped to a number, and then the numbers are summed to obtain the total number, such as a corresponds to 10, b corresponds to 11,..., f corresponds to 16...; then, the total number corresponding to the identification information of multiple slave nodes is sorted in order of size.
[0115] For example, Figure 6 As shown, after sorting the identification information of multiple slave nodes, a slave node identification sequence is obtained, and a node index number is set for each identification information in the slave node identification sequence in turn, such as 1, 2, 3...M, so that multiple slave nodes can be divided according to the node index number later.
[0116] A2. Select N pieces of identification information from the slave node identification sequence according to a set selection rule, and use the slave nodes corresponding to each of the N pieces of identification information as first slave nodes to obtain the first slave node set; where N is an integer and is greater than the upper limit of the number of abnormal nodes in the blockchain system.
[0117] The selection rule can be set as needed and is not limited thereto. For example, N identification information at a set arrangement position is selected from the above slave node identification sequence.
[0118] To ensure that the first slave node set contains healthy nodes, the number of nodes in the first slave node set is set to be greater than the upper limit of the number of abnormal nodes in the blockchain system. For example, in the Practical Byzantine Fault Tolerance consensus algorithm, the blockchain system must have at least 2n / 3+1 healthy nodes, where n is the total number of nodes in the blockchain system. Therefore, the upper limit of the number of abnormal nodes in the blockchain system is (n-1) / 3. Alternatively, the number of nodes in the first slave node set can be (n-1) / 3+1.
[0119] In a possible implementation, selecting N pieces of identification information from the slave node identification sequence according to a set selection rule may include the following steps A21-A22:
[0120] A21. Set the node index information corresponding to each identification information in the node identification sequence in sequence.
[0121] The node index information is used to indicate the arrangement position of the identification information in the slave node identification sequence, and may specifically be an index number, such as 1, 2, 3, etc., which is not limited thereto.
[0122] A22. Based on the node index information corresponding to each of the plurality of identification information, select N identification information located at a set arrangement position from the node identification sequence.
[0123] The position of each slave node's identification information in the slave node identification sequence can be determined based on the node index information. The position can be set as needed, for example, to the first N positions from left to right or the first N positions from right to left, without limitation.
[0124] For example, the node index information corresponding to each of the multiple identification information is: 1, 2, 3, ..., N, .... Assuming that the arrangement position is set to the first N positions from left to right, then N identification information with node index information of 1, 2, 3...N are selected from the node identification sequence to determine the selected N slave nodes.
[0125] In an embodiment of the present application, by setting the node index information of each identification information in the slave node identification sequence, it is convenient to quickly select N identification information located at a set arrangement position from the slave node identification sequence to determine the selected N slave nodes, that is, to obtain the first slave node set.
[0126] A2. Take the slave nodes other than the first slave node set among the plurality of slave nodes as second slave nodes to obtain a second slave node set.
[0127] The second slave nodes in the second slave node set are arranged in the order of the identification information of the second slave nodes in the slave node identification sequence. For example, if the slave node identification sequence includes: node1, node2, node3, node4, node5, node6, and the identification information of the first slave nodes is node1, node2, node3, then the identification information of the second slave nodes is node4, node5, node6, and the second slave node set includes: the second slave node corresponding to node4, the second slave node corresponding to node5, and the second slave node corresponding to node6.
[0128] A3. Bind each second slave node in the second slave node set to the corresponding first slave node in the first slave node set according to the set binding rule.
[0129] Among them, the binding rules can be set as needed. Specifically, each first slave node in the first slave node set corresponds to node index information, and each second slave node in the second slave node set also corresponds to node index information. According to the node index information, the binding relationship between the second slave node and the first slave node can be set; for example, the node index information of each first slave node is 1, 2, and 3 respectively; the node index information of each second slave node is 4, 5, 6, and 7 respectively. It can be set to bind 1 with 4 and 5, and 2 with 6 and 7.
[0130] It should be noted that a second slave node can be bound to one first slave node or multiple first slave nodes; and a first slave node can be bound to one second slave node or multiple second slave nodes, or may not be bound to any second slave node, and there is no limitation on this.
[0131] The following description takes an example in which one first slave node is bound to two second slave nodes, and one second slave node is bound to one first slave node.
[0132] For example, Figure 7AAs shown, all nodes in the blockchain system are divided into three layers to obtain node division information; specifically, the first layer is the master node; the second layer is the first slave node set, assuming that the number of nodes in the second layer is (n-1) / 3+1, including the slave nodes corresponding to the index numbers of the first (n-1) / 3+1 in the slave node identification sequence, such as: slave node 1, slave node 2...slave node (n-1) / 3+1, where n represents the total number of nodes in the blockchain system and (n-1) / 3 is the upper limit of the number of abnormal nodes; the third layer is the second slave node set, including the first (n-1) / 3 in the slave node identification sequence. The slave nodes corresponding to the index numbers after the index number (n-1) + 1 are as follows: slave node (n-1) / 3+2, slave node (n-1) / 3+3, slave node (n-1) / 3+4, slave node (n-1) / 3+5, etc. Assuming that every two second slave nodes in the third layer are bound to one first slave node in the second layer, for example, slave nodes (n-1) / 3+2 and slave node (n-1) / 3+3 in the third layer are respectively bound to slave node 1 in the second layer, slave nodes (n-1) / 3+4 and slave node (n-1) / 3+5 in the third layer are respectively bound to slave node 2 in the second layer, and so on. In addition, due to the insufficient total number of nodes, the first slave node in the second layer may not be bound to the second slave node in the third layer, or may only be bound to one second slave node in the third layer.
[0133] The following takes one second slave node binding two first slave nodes as an example for explanation.
[0134] For example, Figure 7B As shown, still based on the above Figure 7A Take the blockchain system in the example, the first layer is the master node; the second layer is the first slave node set, including: slave node 1, slave node 2... slave node (n-1) / 3+1; the third layer is the second slave node set, including the slave nodes corresponding to the index numbers after the first (n-1) / 3+1 index numbers in the slave node identification sequence, such as: slave node (n-1) / 3+2, slave node (n-1) / 3+3, slave node (n-1) / 3+4, slave node (n-1) / 3+5..., assuming that in the third layer Each second slave node is bound to two first slave nodes in the second layer. For example, slave node (n-1) / 3+2 of the third layer is bound to slave node 1 and slave node 2 of the second layer, slave node (n-1) / 3+3 of the third layer is bound to slave node 1 and slave node 2 of the second layer, slave node (n-1) / 3+4 of the third layer is bound to slave node 1 and slave node 2 of the second layer, slave node (n-1) / 3+5 of the third layer is bound to slave node 1 and slave node 2 of the second layer, and so on.
[0135] Taking the blockchain system's upper limit on the number of abnormal nodes as (n-1) / 3 and the number of second-layer nodes as (n-1) / 3+1 as an example, the following Table 1 exemplifies the relationship between the total number of nodes in the blockchain system, the lower limit on the number of normal nodes, the upper limit on the number of abnormal nodes, the number of second-layer nodes (i.e., the number of nodes in the first slave node set), and the number of third-layer nodes (i.e., the number of nodes in the second slave node set).
[0136] Table 1
[0137]
[0138] In an embodiment of the present application, multiple slave nodes in a blockchain system are divided according to a set division method to obtain node division information. Specifically, the identification information of the multiple slave nodes is sorted to obtain a slave node identification sequence, and a first slave node set and a second slave node set are divided based on the slave node identification sequence; and each second slave node in the second slave node set is bound to a corresponding first slave node in the first slave node set according to a set binding rule. In this way, each node in the blockchain system (including master nodes and slave nodes) can obtain the same node division information based on the set division method, thereby ensuring that subsequent consensus proposals are accurately sent based on the node division information.
[0139] In some embodiments, when a setting situation occurs in the blockchain system, multiple new slave nodes are determined, and based on the new multiple slave nodes, the node division information is reset according to the setting division method; wherein the setting situation includes any of the following situations:
[0140] Add a new slave node;
[0141] Delete the slave node;
[0142] Switch between the master node and the slave node.
[0143] When a master node fails or becomes abnormal, a slave node is selected from multiple slave nodes as a new master node, that is, a switch occurs between the master node and the slave node.
[0144] In an embodiment of the present application, each time a master node changes, a slave node is added, or a slave node is deleted in the blockchain system, the node division information is reset based on the new multiple slave nodes in accordance with the set division method to ensure that the node division information is up to date, so as to ensure that the consensus proposal is correctly sent subsequently based on the latest node division information.
[0145] S52. The master node sends the consensus proposal to each first slave node in the first slave node set, so that after at least one first slave node verifies the consensus proposal and passes it, when it is determined that a second slave node is bound, the master node sends the consensus proposal to at least the bound second slave node.
[0146] In an embodiment of the present application, when a master node in a blockchain system needs to send a consensus proposal, it obtains node partitioning information and determines a first slave node set based on the node partitioning information. The master node sends the consensus proposal to each first slave node in the first slave node set. In this way, after at least one first slave node verifies the consensus proposal and determines that a second slave node is bound, it sends the consensus proposal to at least the bound second slave node. The number of nodes in the first slave node set is greater than the upper limit of the number of abnormal nodes in the blockchain system. This is to ensure that the second slave node set can receive the consensus proposal from the first slave node set, thereby ensuring the stability and security of the blockchain system. Since the network bandwidth pressure of the master node sending the consensus proposal is shared among the first slave nodes in the first slave node set, the network bandwidth pressure of the master node is greatly reduced, the broadcast speed of the consensus proposal is increased, and the slave nodes receive the consensus proposal in a timely manner, thereby improving the consensus performance of the blockchain system.
[0147] Considering that when the number of nodes in the blockchain system is small, the network bandwidth pressure of the master node sending consensus proposals to the slave nodes is relatively small, therefore, when the number of nodes in the blockchain system is not less than the set number, the consensus proposal processing method of the embodiment of the present application can be adopted. The set number can be set as needed, for example, to 4, and there is no limitation on this.
[0148] The following introduces the consensus proposal processing method on the first slave node side of an embodiment of the present application.
[0149] See Figure 8 As shown, the embodiment of the present application provides a consensus proposal processing method, which is applied to the first slave node in the blockchain system, specifically including the following S81-S82:
[0150] S81. If the first slave node receives a consensus proposal sent by the master node in the blockchain system, it verifies the consensus proposal.
[0151] In a blockchain system, the master node packages pending transactions into a consensus proposal and sends it to each first slave node in the set of first slave nodes. Upon receiving the consensus proposal from the master node, each first slave node verifies it. Specifically, this includes verifying the master node's signature, confirming that the consensus proposal was packaged by the master node, and verifying the transactions within the consensus proposal.
[0152] S82. After the first slave node verifies the consensus proposal, it obtains node partition information. If it is determined based on the node partition information that a second slave node is bound, the consensus proposal is sent to the bound second slave node.
[0153] Among them, the node division information includes: a first slave node set and a second slave node set divided based on multiple slave nodes, the number of nodes in the first slave node set is greater than the upper limit of the number of abnormal nodes in the blockchain system, and each second slave node in the second slave node set has a binding relationship with the corresponding first slave node in the first slave node set.
[0154] In an embodiment of the present application, the first slave node can pre-set node division information in the same way as the master node sets the node division information in the above embodiment to ensure that the node division information set by the first slave node is the same as the node division information set by the master node.
[0155] Based on the above embodiments of the present application, it can be known that the first slave node may be bound to one or more second slave nodes, or may not be bound to a second slave node. Specifically, based on the node division information, it can be determined whether it is bound to a second slave node. If it is determined that it is bound to a second slave node, the consensus proposal will be sent to the bound second slave node.
[0156] In addition, if the first slave node fails to verify the consensus proposal, it does not need to send the consensus proposal to the bound second slave node.
[0157] In an embodiment of the present application, the first slave node can receive the consensus proposal sent by the master node and, after verifying the consensus proposal, send the consensus proposal to the bound second slave node. Because the number of first slave nodes exceeds the upper limit of the number of abnormal nodes in the blockchain system, it can be guaranteed that the second slave node set can receive the consensus proposal from the first slave node set, thereby ensuring the stability and security of the blockchain system. Because the network bandwidth pressure of the master node sending the consensus proposal is shared among the first slave node in the first slave node set, the network bandwidth pressure of the master node is greatly reduced, the broadcast speed of the consensus proposal is increased, and the slave nodes receive the consensus proposal in a timely manner, thereby improving the consensus performance of the blockchain system.
[0158] In some embodiments, after the first slave node verifies the consensus proposal, if it receives a proposal acquisition request sent by an unbound second slave node, it sends the consensus proposal to the unbound second slave node.
[0159] Specifically, some second slave nodes in the second slave node set may not be able to receive the consensus proposal from the bound first slave node. For example, if the bound first slave node is an abnormal node, then if these second slave nodes do not receive the consensus proposal sent by the bound first slave node within the timer, they can determine at least one unbound first slave node based on the set node division information, and send a proposal acquisition request to the at least one unbound first slave node. It should be noted that the slave nodes in the blockchain system (including the first slave node and the second slave node) can set a timer to wait for the reception of the consensus proposal. If the consensus proposal is not received within the timer, the proposal acquisition request can be sent to the upper-level node (the upper-level node of the first slave node is the master node, and the upper-level node of the second slave node is the first slave node).
[0160] In an embodiment of the present application, in addition to sending a consensus proposal to a bound second slave node, the first slave node may also send the consensus proposal to the unbound second slave node upon receiving a proposal acquisition request sent by the unbound second slave node, thereby ensuring that each second slave node in the set of second slave nodes can receive the consensus proposal, thereby ensuring the stability and security of the blockchain system.
[0161] The following introduces the consensus proposal processing method on the first slave node side of an embodiment of the present application.
[0162] See Figure 9 As shown, the embodiment of the present application provides a consensus proposal processing method, which is applied to the second slave node in the blockchain system, specifically including the following S91:
[0163] S91. If the second slave node receives a consensus proposal sent by the first slave node bound to the blockchain system, it verifies the consensus proposal; wherein the second slave node is provided with node division information, and the node division information includes: a first slave node set and a second slave node set divided based on multiple slave nodes, the number of nodes in the first slave node set is greater than the upper limit of the number of abnormal nodes in the blockchain system, and each second slave node in the second slave node set has a binding relationship with the corresponding first slave node in the first slave node set.
[0164] The second slave node can be bound to a first slave node in the first slave node set, or it can be bound to multiple first slave nodes. When the second slave node is bound to multiple first slave nodes, upon receiving a consensus proposal sent by any bound first slave node, the second slave node verifies the consensus proposal.
[0165] Specifically, the second slave node can pre-set node division information in the same way as the master node and the first slave node set the node division information in the above embodiment to ensure that the node division information set by the second slave node, the master node and the first slave node is the same.
[0166] In an embodiment of the present application, the second slave node can receive the consensus proposal from the bound first slave node. In this way, the network bandwidth pressure of the master node to send the consensus proposal is shared to the first slave node in the first slave node set, thereby greatly reducing the network bandwidth pressure of the master node, improving the broadcast speed of the consensus proposal, and enabling the slave node to receive the consensus proposal in a timely manner, thereby improving the consensus performance of the blockchain system.
[0167] In some embodiments, if the second slave node does not receive a consensus proposal sent by a bound first slave node in the blockchain system, it selects at least one unbound first slave node from the set of first slave nodes based on the node partitioning information, and sends a proposal acquisition request to the at least one unbound first slave node; if it receives a consensus proposal sent by any unbound first slave node, it verifies the consensus proposal.
[0168] Among them, if the second node determines that there are multiple unbound first slave nodes, it can send a proposal acquisition request to one of the first slave nodes. When no consensus proposal is received from the first slave node, it can continue to send a proposal acquisition request to another first slave node, and so on. In addition, the second node can also send proposal acquisition requests to multiple first slave nodes at the same time.
[0169] Optionally, the second slave node selects at least one unbound first slave node from the first slave node set based on the node partition information, and when sending a proposal acquisition request to the at least one unbound first slave node, the following steps B1-B2 may be performed:
[0170] B1. Based on the node partition information, select an unbound first slave node from the first slave node set, and send a proposal acquisition request to the first slave node.
[0171] Based on the above embodiments of the present application, it can be known that the first slave nodes in the first slave node set can be arranged in order. Specifically, the second slave node can select the first slave node that is arranged behind the bound first slave node from the first slave node set, or it can arbitrarily select an unbound first slave node. There is no limitation on this.
[0172] B2. If no consensus proposal is received from an unbound first slave node, another unbound first slave node is selected from the set of first slave nodes based on the node partition information, and a proposal acquisition request is sent to the other first slave node.
[0173] Specifically, the second slave node may select a first slave node that is arranged behind an unbound slave node from the first slave node set, or may arbitrarily select another unbound first slave node, which is not limited.
[0174] For example, Figure 10 As shown, also with the above embodiment Figure 7A Taking the node partitioning information shown as an example, the second layer is the first slave node set, the third layer is the second slave node set, slave nodes (n-1) / 3+2 and (n-1) / 3+3 in the third layer are respectively bound to slave node 1 in the second layer, and slave nodes (n-1) / 3+4 and (n-1) / 3+5 in the third layer are respectively bound to slave node 2 in the second layer. When slave nodes (n-1) / 3+2 and (n-1) / 3+3 do not receive the consensus proposal sent by slave node 1, they can determine slave node 2 that is ranked after slave node 1 based on the node partitioning information and send a proposal acquisition request to slave node 2. If the consensus proposal sent by slave node 2 is received, the consensus proposal is verified. If the consensus proposal sent by slave node 2 is not received, the proposal acquisition request is continued to be sent to the slave nodes ranked after slave node 2.
[0175] In an embodiment of the present application, if the second slave node does not receive the consensus proposal sent by the bound first slave node, it can determine at least one unbound first slave node based on the node division information, and send a proposal acquisition request to the at least one unbound first slave node, thereby ensuring that the second slave node can receive the consensus proposal, thereby ensuring the stability and security of the blockchain system.
[0176] The following combination Figure 11 The overall process of the consensus proposal processing method of the embodiment of the present application is exemplarily introduced.
[0177] like Figure 11 As shown, the total number of nodes in the blockchain system is 8, the upper limit of the number of abnormal nodes is 2, and the node partitioning information is as follows: the first slave node set includes nodes 1, 2, and 3, and the second slave node set includes nodes 4, 5, 6, and 7. Node 1 is bound to nodes 4 and 5, respectively, and node 2 is bound to nodes 6 and 7, respectively. After the master node packages pending transactions into consensus proposals, it determines the first slave node set based on the node partitioning information and sends the consensus proposals to nodes 1, 2, and 3 in the first slave node set. After node 1 verifies the consensus proposal, it determines that nodes 4 and 5 are bound to it based on the node partitioning information and sends the consensus proposal to these bound nodes. After node 2 verifies the consensus proposal, it determines that nodes 6 and 7 are bound to it based on the node partitioning information and sends the consensus proposal to these bound nodes. This distributes the network bandwidth pressure on the master node to send the consensus proposal to the nodes in the first slave node set, significantly reducing the network bandwidth pressure on the master node and increasing the broadcast speed of the consensus proposal, thereby improving the consensus performance of the blockchain system.
[0178] The consensus proposal processing method of the present embodiment can be applied to any application scenario that utilizes blockchain technology. Blockchain technology has a wide range of applications, including but not limited to: finance, the Internet of Things, gaming, supply chain management, copyright protection, healthcare, social networking, evidence storage and anti-counterfeiting, public services, and government affairs. With the development and innovation of technology, the application scenarios of blockchain technology continue to expand and deepen.
[0179] Taking financial transactions as an example, blockchain technology creates a decentralized digital asset system that encodes asset transaction information into transaction data on the blockchain. Each transaction is recorded in a transparent, immutable ledger, allowing users to conduct peer-to-peer asset transactions without the need for intermediaries. For example, in the IoT (Internet of Things) context, data generated by IoT devices, such as temperature, humidity, and location, can be written to the blockchain. Each piece of data represents a transaction, including a timestamp and device origin information. The blockchain's immutability ensures a high degree of trust in historical data records, facilitating the tracing of data and status changes throughout a device's lifecycle, including production, transportation, use, and maintenance. For example, in-game items (such as props, equipment, and skins) and virtual assets can be stored on the blockchain, allowing players to initiate transactions for these items and virtual assets. Blockchain technology makes the purchase and sale of digital assets in-game more secure and transparent.
[0180] For transactions in each of the above scenarios, in an embodiment of the present application, any one of the multiple nodes in the blockchain system will share the transaction with other nodes after receiving the transaction from the client, so that the multiple nodes all store the transaction in the transaction pool. In this way, the transactions stored in the transaction pools of the multiple nodes are consistent, and the transactions in the transaction pool can be processed. Multiple nodes can broadcast consensus proposals according to the consensus proposal processing method of the embodiment of the present application. Specifically, the master node among the multiple nodes can package one or more transactions to be processed in the transaction pool into a consensus proposal, and send the consensus proposal to each first slave node in the first slave node set. After the first slave node verifies the consensus proposal, it sends the consensus proposal to the second slave node in the second slave node set, so that the second slave node verifies the consensus proposal.
[0181] Based on the same inventive concept, an embodiment of the present application also provides a consensus proposal processing device. The principle of solving the problem by this device is similar to the method on the master node side of the above embodiment. Therefore, the implementation of this device can refer to the implementation of the method on the master node side, and the repeated parts will not be repeated.
[0182] like Figure 12As shown in FIG, it is a schematic diagram of the structure of the consensus proposal processing device 1200. The device is set in the master node of the blockchain system. The blockchain system also includes multiple slave nodes. The device includes:
[0183] An acquiring unit 1201 is configured to acquire node partitioning information, the node partitioning information including: a first slave node set and a second slave node set divided based on a plurality of slave nodes, the number of nodes in the first slave node set being greater than an upper limit on the number of abnormal nodes in the blockchain system, and each second slave node in the second slave node set being bound to a corresponding first slave node in the first slave node set;
[0184] The sending unit 1202 is configured to send the consensus proposal to each first slave node in the first slave node set, so that after at least one first slave node verifies the consensus proposal and passes it, when it is determined that a second slave node is bound, the consensus proposal is at least sent to the bound second slave node.
[0185] In an embodiment of the present application, when a master node in a blockchain system needs to send a consensus proposal, it obtains node partitioning information and determines a first slave node set based on the node partitioning information. The master node sends the consensus proposal to each first slave node in the first slave node set. In this way, after at least one first slave node verifies the consensus proposal and determines that a second slave node is bound, it sends the consensus proposal to at least the bound second slave node. The number of nodes in the first slave node set is greater than the upper limit of the number of abnormal nodes in the blockchain system. This is to ensure that the second slave node set can receive the consensus proposal from the first slave node set, thereby ensuring the stability and security of the blockchain system. Since the network bandwidth pressure of the master node sending the consensus proposal is shared among the first slave nodes in the first slave node set, the network bandwidth pressure of the master node is greatly reduced, the broadcast speed of the consensus proposal is increased, and the slave nodes receive the consensus proposal in a timely manner, thereby improving the consensus performance of the blockchain system.
[0186] Optionally, the apparatus further includes a setting unit, configured to set the node division information in the following manner:
[0187] Sorting the identification information of each of the plurality of slave nodes according to a set sorting rule to obtain a slave node identification sequence;
[0188] Selecting N pieces of identification information from the slave node identification sequence according to a set selection rule, and using the slave nodes corresponding to the N pieces of identification information as first slave nodes, thereby obtaining the first slave node set; wherein N is an integer and is greater than the upper limit of the number of abnormal nodes in the blockchain system;
[0189] taking slave nodes other than the first slave node set among the plurality of slave nodes as second slave nodes, to obtain the second slave node set;
[0190] According to the set binding rule, each second slave node in the second slave node set is bound to the corresponding first slave node in the first slave node set.
[0191] Optionally, when selecting N pieces of identification information from the slave node identification sequence according to a set selection rule, the setting unit is specifically configured to:
[0192] Sequentially set the node index information corresponding to each identification information in the slave node identification sequence;
[0193] Based on the node index information corresponding to each of the plurality of identification information, N identification information located at a set arrangement position are selected from the slave node identification sequence.
[0194] Optionally, the setting unit is further configured to:
[0195] When a setting situation occurs in the blockchain system, multiple new slave nodes are determined, and node partition information is reset based on the new multiple slave nodes; wherein the setting situation includes any of the following situations:
[0196] Add a new slave node;
[0197] Delete the slave node;
[0198] Switch between the master node and the slave node.
[0199] Based on the same inventive concept, an embodiment of the present application also provides a consensus proposal processing device. The principle of solving the problem by this device is similar to the method on the first slave node side of the above embodiment. Therefore, the implementation of this device can refer to the implementation of the method on the first slave node side, and the repeated parts will not be repeated.
[0200] like Figure 13 , which is a schematic diagram of the structure of the consensus proposal processing device 1300, which is set in the first slave node in the blockchain system, and includes:
[0201] The verification unit 1301 is configured to verify the consensus proposal received from the master node in the blockchain system;
[0202] The sending unit 1302 is configured to obtain node partition information after the consensus proposal is verified, and if it is determined based on the node partition information that a second slave node is bound, send the consensus proposal to the bound second slave node;
[0203] Among them, the node division information includes: a first slave node set and a second slave node set divided based on multiple slave nodes, the first slave node belongs to the first slave node set, the second slave node belongs to the second slave node set, the number of nodes in the first slave node set is greater than the upper limit of the number of abnormal nodes in the blockchain system, and each second slave node in the second slave node set has a binding relationship with the corresponding first slave node in the first slave node set.
[0204] In an embodiment of the present application, the first slave node can receive the consensus proposal sent by the master node and, after verifying the consensus proposal, send the consensus proposal to the bound second slave node. Because the number of first slave nodes exceeds the upper limit of the number of abnormal nodes in the blockchain system, it can be guaranteed that the second slave node set can receive the consensus proposal from the first slave node set, thereby ensuring the stability and security of the blockchain system. Because the network bandwidth pressure of the master node sending the consensus proposal is shared among the first slave node in the first slave node set, the network bandwidth pressure of the master node is greatly reduced, the broadcast speed of the consensus proposal is increased, and the slave nodes receive the consensus proposal in a timely manner, thereby improving the consensus performance of the blockchain system.
[0205] Optionally, after the consensus proposal is verified, the sending unit 1302 is further configured to:
[0206] If a proposal acquisition request is received from an unbound second slave node, the consensus proposal is sent to the unbound second slave node.
[0207] Based on the same inventive concept, an embodiment of the present application also provides a consensus proposal processing device. The principle of solving the problem by this device is similar to the method on the second slave node side of the above embodiment. Therefore, the implementation of this device can refer to the implementation of the method on the second slave node side, and the repeated parts will not be repeated.
[0208] like Figure 14 , which is a schematic diagram of the structure of the consensus proposal processing device 1400, which is set in the second slave node in the blockchain system, and includes:
[0209] The verification unit 1401 is configured to verify the consensus proposal upon receiving the consensus proposal sent by the first slave node bound to the blockchain system;
[0210] Among them, the second slave node is provided with node division information, and the node division information includes: a first slave node set and a second slave node set divided based on multiple slave nodes, the first slave node belongs to the first slave node set, the second slave node belongs to the second slave node set, the number of nodes in the first slave node set is greater than the upper limit of the number of abnormal nodes in the blockchain system, and each second slave node in the second slave node set has a binding relationship with the corresponding first slave node in the first slave node set.
[0211] In an embodiment of the present application, the second slave node can receive the consensus proposal from the bound first slave node. In this way, the network bandwidth pressure of the master node to send the consensus proposal is shared to the first slave node in the first slave node set, thereby greatly reducing the network bandwidth pressure of the master node, improving the broadcast speed of the consensus proposal, and enabling the slave node to receive the consensus proposal in a timely manner, thereby improving the consensus performance of the blockchain system.
[0212] Optionally, the device further comprises:
[0213] The sending unit 1402 is configured to select at least one unbound first slave node from the set of first slave nodes based on the node partitioning information if no consensus proposal is received from the bound first slave node in the blockchain system, and send a proposal acquisition request to the at least one unbound first slave node;
[0214] The verification unit 1401 is further configured to verify the consensus proposal if a consensus proposal sent by any unbound first slave node is received.
[0215] Optionally, the sending unit 1402 is further configured to:
[0216] Based on the node partition information, select an unbound first slave node from the first slave node set, and send a proposal acquisition request to the first slave node;
[0217] If a consensus proposal sent by a first slave node is not received, another unbound first slave node is selected from the first slave node set based on the node partition information, and a proposal acquisition request is sent to the other first slave node.
[0218] For the convenience of description, the above parts are divided into modules (or units) according to their functions and described separately. Of course, when implementing this application, the functions of each module (or unit) can be implemented in the same or multiple software or hardware.
[0219] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program that has a predetermined function and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
[0220] After introducing the consensus proposal processing method and apparatus according to an exemplary embodiment of the present application, an electronic device according to another exemplary embodiment of the present application will be introduced next.
[0221] Based on the same inventive concept as the above method embodiment, an electronic device is also provided in the embodiment of the present application. In one embodiment, the electronic device may be a server or a terminal device. In this embodiment, the structure of the electronic device may be as follows: Figure 15 As shown, it includes a memory 1501 , a communication module 1503 and one or more processors 1502 .
[0222] Memory 1501 is used to store computer programs executed by processor 1502. Memory 1501 may primarily include a program storage area and a data storage area. The program storage area may store an operating system and programs required for running instant messaging functions, while the data storage area may store various instant messaging messages and operating instruction sets.
[0223] Memory 1501 may be a volatile memory, such as random-access memory (RAM); a non-volatile memory, such as read-only memory, flash memory, a hard disk drive (HDD), or a solid-state drive (SSD); or any other medium capable of carrying or storing a desired computer program in the form of instructions or data structures and accessible by a computer, but is not limited thereto. Memory 1501 may be a combination of the aforementioned memories.
[0224] The processor 1502 may include one or more central processing units (CPUs) or digital processing units, etc. The processor 1502 is configured to implement the above-mentioned consensus proposal processing method when calling the computer program stored in the memory 1501 .
[0225] The communication module 1503 is used to communicate with terminal devices and other servers.
[0226] The specific connection medium between the memory 1501, the communication module 1503 and the processor 1502 is not limited in the embodiment of the present application. Figure 15 In the embodiment, the memory 1501 and the processor 1502 are connected via a bus 1504. The bus 1504 is connected to the processor 1502 via a bus 1504. Figure 15 The connections between the other components are shown in bold lines for illustration only and are not intended to be limiting. The bus 1504 can be divided into an address bus, a data bus, a control bus, etc. For ease of description, Figure 15 The diagram shows a single thick line, but this does not indicate that there is only one bus or one type of bus.
[0227] The memory 1501 stores a computer storage medium, which stores computer executable instructions. The computer executable instructions are used to implement the consensus proposal processing method of the embodiment of the present application. The processor 1502 is used to execute the above-mentioned consensus proposal processing method, such as Figure 5 、 Figure 8 or Figure 9 Steps shown.
[0228] In another embodiment, the electronic device may also be other electronic devices, such as Figure 1 The terminal device 110 shown in FIG. In this embodiment, the structure of the electronic device can be as follows: Figure 16 As shown, it includes: a communication component 1610, a memory 1620, a display unit 1630, a camera 1640, a sensor 1650, an audio circuit 1660, a Bluetooth module 1670, a processor 1680 and other components.
[0229] The communication component 1610 is used to communicate with the server. In some embodiments, it may include a wireless fidelity (WiFi) module. The WiFi module is a short-range wireless transmission technology. Electronic devices can help users send and receive information through the WiFi module.
[0230] Memory 1620 can be used to store software programs and data. Processor 1680 executes various functions and data processing of terminal device 110 by running the software programs or data stored in memory 1620. Memory 1620 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Memory 1620 stores an operating system that enables terminal device 110 to run. In this application, memory 1620 can store an operating system and various application programs, and may also store a computer program that executes the consensus proposal processing method of the embodiment of this application.
[0231] The display unit 1630 may also be used to display information input by the user or provided to the user, as well as a graphical user interface (GUI) of various menus of the terminal device 110. Specifically, the display unit 1630 may include a display screen 1632 disposed on the front of the terminal device 110. The display screen 1632 may be configured in the form of a liquid crystal display, a light emitting diode, or the like.
[0232] The display unit 1630 can also be used to receive input digital or character information and generate signal input related to the user settings and function control of the terminal device 110. Specifically, the display unit 1630 may include a touch screen 1631 set on the front of the terminal device 110, which can collect user touch operations on or near it, such as clicking a button, dragging a scroll box, etc.
[0233] The touch screen 1631 can be covered on the display screen 1632, or the touch screen 1631 and the display screen 1632 can be integrated to realize the input and output functions of the terminal device 110. The integrated display screen can be simply called a touch screen. In this application, the display unit 1630 can display applications and corresponding operation steps.
[0234] The camera 1640 can be used to capture still images, and users can publish images captured by the camera 1640 through an application. There can be one or more cameras 1640. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then transmitted to the processor 1680 for conversion into a digital image signal.
[0235] The terminal device may further include at least one sensor 1650, such as an acceleration sensor 1651, a distance sensor 1652, a fingerprint sensor 1653, and a temperature sensor 1654. The terminal device may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, a light sensor, and a motion sensor.
[0236] The audio circuit 1660, speaker 1661, and microphone 1662 provide an audio interface between the user and the terminal device 110. The audio circuit 1660 can convert the received audio data into an electrical signal and transmit it to the speaker 1661, which converts it into a sound signal for output. The terminal device 110 may also be equipped with a volume button for adjusting the volume of the sound signal. On the other hand, the microphone 1662 converts the collected sound signal into an electrical signal, which is received by the audio circuit 1660 and converted into audio data. The audio data is then output to the communication component 1610 for transmission to, for example, another terminal device 110, or the audio data is output to the memory 1620 for further processing.
[0237] The Bluetooth module 1670 is used to exchange information with other Bluetooth devices having a Bluetooth module through the Bluetooth protocol. For example, the terminal device can establish a Bluetooth connection with a wearable electronic device (such as a smart watch) that also has a Bluetooth module through the Bluetooth module 1670 to exchange data.
[0238] The processor 1680 is the control center of the terminal device. It uses various interfaces and lines to connect various parts of the entire terminal. It executes various functions of the terminal device and processes data by running or executing software programs stored in the memory 1620 and calling data stored in the memory 1620. In some embodiments, the processor 1680 may include one or more processing units; the processor 1680 may also integrate an application processor and a baseband processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the baseband processor mainly processes wireless communications. It is understandable that the above-mentioned baseband processor may not be integrated into the processor 1680. In the present application, the processor 1680 can run the operating system, application programs, user interface display and touch response, as well as the consensus proposal processing method of the embodiment of the present application. In addition, the processor 1680 is coupled to the display unit 1630.
[0239] In some possible implementations, various aspects of the consensus proposal processing method provided by the present application may also be implemented in the form of a program product, which includes a computer program. When the program product is run on an electronic device, the computer program is used to enable the electronic device to execute the steps of the consensus proposal processing method according to various exemplary embodiments of the present application described above in this specification. For example, the electronic device may execute the following steps: Figure 5 、 Figure 8 or Figure 9 Follow the steps shown in .
[0240] The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0241] The program product of the embodiment of the present application may be a portable compact disc read-only memory (CD-ROM) and include a computer program, and can be run on an electronic device. However, the program product of the present application is not limited thereto. In this document, a readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with a command execution system, apparatus, or device.
[0242] A readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries a readable computer program. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transfer a program for use by or in conjunction with a command execution system, apparatus, or device.
[0243] The computer program embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0244] The computer program for performing the operations of the present application can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The computer program can be executed entirely on the user electronic device, partially on the user electronic device, as a separate software package, partially on the user electronic device and partially on a remote electronic device, or entirely on a remote electronic device or server. In cases involving remote electronic devices, the remote electronic device can be connected to the user electronic device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external electronic device (for example, using an Internet service provider to connect through the Internet).
[0245] It should be noted that although several units or subunits of the device are mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, depending on the embodiment of the application, the features and functions of two or more units described above can be embodied in a single unit. Conversely, the features and functions of a single unit described above can be further divided and embodied by multiple units.
[0246] Furthermore, although the operations of the method of the present application are described in a particular order in the accompanying drawings, this does not require or imply that the operations must be performed in this particular order, or that all illustrated operations must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.
[0247] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain a computer-usable computer program.
[0248] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program commands. These computer program commands can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the commands executed by the processor of the computer or other programmable data processing device generate commands for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0249] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising a command device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0250] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0251] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present application.
[0252] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.
Claims
1. A consensus proposal processing method, characterized in that: A method for applying a master node to a blockchain system, wherein the blockchain system further includes a plurality of slave nodes, includes: Obtaining node partitioning information, the node partitioning information including: a first slave node set and a second slave node set divided based on the plurality of slave nodes, the number of nodes in the first slave node set being greater than an upper limit on the number of abnormal nodes in the blockchain system, and each second slave node in the second slave node set having a binding relationship with a corresponding first slave node in the first slave node set; The consensus proposal is sent to each first slave node in the first slave node set respectively, so that after at least one first slave node verifies the consensus proposal and passes it, when it is determined that a second slave node is bound, the consensus proposal is at least sent to the bound second slave node.
2. The method according to claim 1, characterized in that The node division information is obtained by setting the division method as follows: Sorting the identification information of each of the plurality of slave nodes according to a set sorting rule to obtain a slave node identification sequence; Selecting N pieces of identification information from the slave node identification sequence according to a set selection rule, and using the slave nodes corresponding to the N pieces of identification information as first slave nodes, thereby obtaining the first slave node set; wherein N is an integer and is greater than the upper limit of the number of abnormal nodes in the blockchain system; taking slave nodes other than the first slave node set among the plurality of slave nodes as second slave nodes, to obtain the second slave node set; According to the set binding rule, each second slave node in the second slave node set is bound to the corresponding first slave node in the first slave node set.
3. The method according to claim 2, characterized in that The selecting N pieces of identification information from the slave node identification sequence according to a set selection rule includes: Sequentially set the node index information corresponding to each identification information in the slave node identification sequence; Based on the node index information corresponding to each of the plurality of identification information, N identification information located at a set arrangement position are selected from the slave node identification sequence.
4. The method according to claim 1 or 2, characterized in that The method further comprises: When a setting situation occurs in the blockchain system, a plurality of new slave nodes are determined, and based on the new plurality of slave nodes, the node division information is reset according to the setting division method; wherein the setting situation includes any one of the following situations: Add a new slave node; Delete the slave node; Switch between the master node and the slave node.
5. A consensus proposal processing method, characterized in that: Applied to a first slave node in a blockchain system, the method includes: If a consensus proposal is received from a master node in the blockchain system, the consensus proposal is verified; After the consensus proposal is verified, node division information is obtained. If it is determined based on the node division information that a second slave node is bound, the consensus proposal is sent to the bound second slave node. The node division information includes: a first slave node set and a second slave node set divided based on multiple slave nodes, the first slave node belongs to the first slave node set, the second slave node belongs to the second slave node set, the number of nodes in the first slave node set is greater than the upper limit of the number of abnormal nodes in the blockchain system, and each second slave node in the second slave node set has a binding relationship with the corresponding first slave node in the first slave node set.
6. The method according to claim 5, characterized in that After the consensus proposal is verified, the method further includes: If a proposal acquisition request is received from an unbound second slave node, the consensus proposal is sent to the unbound second slave node.
7. A consensus proposal processing method, characterized in that: Applied to a second slave node in a blockchain system, the method includes: If a consensus proposal is received from the first slave node bound to the blockchain system, verify the consensus proposal; The second slave node is provided with node division information, and the node division information includes: a first slave node set and a second slave node set divided based on multiple slave nodes, the first slave node belongs to the first slave node set, the second slave node belongs to the second slave node set, the number of nodes in the first slave node set is greater than the upper limit of the number of abnormal nodes in the blockchain system, and each second slave node in the second slave node set has a binding relationship with the corresponding first slave node in the first slave node set.
8. The method according to claim 7, characterized in that The method further comprises: If no consensus proposal is received from the bound first slave node in the blockchain system, selecting at least one unbound first slave node from the first slave node set based on the node partitioning information, and sending a proposal acquisition request to the at least one unbound first slave node; If the consensus proposal is received from any unbound first slave node, the consensus proposal is verified.
9. The method according to claim 7, characterized in that The selecting, based on the node partitioning information, at least one unbound first slave node from the first slave node set, and sending a proposal acquisition request to the at least one unbound first slave node includes: Selecting an unbound first slave node from the first slave node set based on the node partitioning information, and sending a proposal acquisition request to the first slave node; If the consensus proposal sent by the one first slave node is not received, based on the node partitioning information, another unbound first slave node is selected from the first slave node set, and the proposal acquisition request is sent to the another first slave node.
10. A consensus proposal processing device, characterized in that: The device is provided in a master node of a blockchain system, wherein the blockchain system further includes a plurality of slave nodes, and comprises: an acquiring unit, configured to acquire node division information, the node division information including: a first slave node set and a second slave node set divided based on the plurality of slave nodes, the number of nodes in the first slave node set being greater than an upper limit on the number of abnormal nodes in the blockchain system, and each second slave node in the second slave node set being bound to a corresponding first slave node in the first slave node set; The sending unit is configured to send the consensus proposal to each first slave node in the first slave node set, so that after at least one first slave node verifies the consensus proposal and passes it, when it is determined that a second slave node is bound, the consensus proposal is at least sent to the bound second slave node.
11. A consensus proposal processing device, characterized in that: The device is provided in a first slave node in a blockchain system, and includes: a verification unit, configured to verify a consensus proposal sent by a master node in the blockchain system upon receipt of the consensus proposal; a sending unit, configured to obtain node division information after the consensus proposal is verified, and if it is determined based on the node division information that a second slave node is bound, send the consensus proposal to the bound second slave node; The node division information includes: a first slave node set and a second slave node set divided based on multiple slave nodes, the first slave node belongs to the first slave node set, the second slave node belongs to the second slave node set, the number of nodes in the first slave node set is greater than the upper limit of the number of abnormal nodes in the blockchain system, and each second slave node in the second slave node set has a binding relationship with the corresponding first slave node in the first slave node set.
12. A consensus proposal processing device, characterized in that: The device is provided in a second slave node in the blockchain system, and includes: a verification unit, configured to verify the consensus proposal upon receiving the consensus proposal sent by the first slave node bound to the blockchain system; The second slave node is provided with node division information, and the node division information includes: a first slave node set and a second slave node set divided based on multiple slave nodes, the first slave node belongs to the first slave node set, the second slave node belongs to the second slave node set, the number of nodes in the first slave node set is greater than the upper limit of the number of abnormal nodes in the blockchain system, and each second slave node in the second slave node set has a binding relationship with the corresponding first slave node in the first slave node set.
13. An electronic device, characterized in that: It includes a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method described in any one of claims 1 to 4, any one of 5 to 6, or any one of 7 to 9.
14. A computer-readable storage medium, characterized in that It includes a computer program, which, when running on an electronic device, is used to enable the electronic device to execute the steps of the method according to any one of claims 1 to 4, any one of 5 to 6, or any one of 7 to 9.
15. A computer program product, characterized in that The method comprises a computer program stored in a computer-readable storage medium; when a processor of an electronic device reads the computer program from the computer-readable storage medium, the processor executes the computer program, so that the electronic device performs the steps of the method described in any one of claims 1 to 4, any one of 5 to 6, or any one of 7 to 9.