Node determination methods, apparatus, equipment, storage media and products
By generating voting links and obtaining voting information in the consortium blockchain, and dynamically selecting management and auditing nodes, the security issue of fixed smart contract management nodes is resolved, thus improving the security of the consortium blockchain.
Patent Information
- Application Number
- CN202410999734.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-24
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2044-07-24
AI Technical Summary
In consortium blockchains, the management nodes for smart contracts are relatively fixed, which can lead to fraudulent activities during the management process and lower security.
By identifying multiple candidate nodes in the consortium blockchain, generating voting links, obtaining voting information from multiple voting nodes, and determining the management and review nodes of the target smart contract based on the voting information and node weights, the management and review nodes are dynamically selected.
It improves the security of smart contract management by dynamically selecting management and auditing nodes, reducing the possibility of fraudulent activities.
Smart Images

Figure CN118944853B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of blockchain technology, and in particular to a method, apparatus, device, storage medium and product for determining nodes. Background Technology
[0002] A consortium blockchain is a new type of blockchain that can include multiple consortium nodes. These nodes can automatically execute agreements reached between them through smart contracts. Each smart contract can be used to execute different functions and business logic. For any given smart contract, it is necessary to determine the corresponding management node.
[0003] In existing technologies, when a management node needs to be determined for a smart contract, consortium nodes in a consortium blockchain can apply to become the management node. Upon receiving an application request from any consortium node in the blockchain, that node can be designated as the management node. However, in this process, the consortium nodes submitting applications are relatively fixed, resulting in a relatively fixed management node for the smart contract. This could lead to fraudulent activities during the management process, thus lowering the security of smart contract management. Summary of the Invention
[0004] This application provides a node determination method, apparatus, device, storage medium, and product to address the technical problem of low security in smart contract management.
[0005] Firstly, this application provides a node determination method, including:
[0006] In the consortium blockchain, multiple candidate nodes are identified corresponding to the target smart contract. These candidate nodes are the nodes for election management nodes and review nodes.
[0007] Based on the multiple candidate nodes, a voting link is generated. The voting link includes at least one voting topic, which is used to request the determination of a management node or an auditing node.
[0008] According to the voting link, the voting information of multiple voting nodes in the consortium blockchain is obtained. The voting information includes the selected node corresponding to each voting topic and the node weight corresponding to the selected node. The selected node is the node selected from the multiple candidate nodes.
[0009] Based on the voting information from the multiple voting nodes, the target nodes for each voting topic of the target smart contract are determined, and the target nodes include management nodes and auditing nodes.
[0010] In one possible implementation, for any given voting topic, determining the target node for that voting topic based on the voting information from the plurality of voting nodes includes:
[0011] Determine the first business type of the target smart contract;
[0012] Based on the first business type, determine the voting weight of each voting node;
[0013] Based on the voting information and voting weight of each voting node, the target node for the voting topic is determined.
[0014] In one possible implementation, the target node for the voting topic is determined based on the voting information and voting weight of each voting node, including:
[0015] Based on the voting information of each voting node, determine the selection node and node weight of each voting node corresponding to the voting topic;
[0016] For any selected node, the node weight and voting weight of the selected node are processed to obtain the selection weight of the selected node.
[0017] The target node of the voting node is determined based on the selection weight of each selection node in the voting topic.
[0018] In one possible implementation, determining the target node of the voting node based on the selection weight of each selection node in the voting topic includes:
[0019] Determine whether there is a selection weight that is greater than or equal to the first threshold;
[0020] If so, then determine at least one selection node corresponding to the selection weight, and determine the target node among the at least one selection node;
[0021] If not, the node with the highest weight will be selected as the target node.
[0022] In one possible implementation, determining the voting weight of each voting node based on the first business type includes:
[0023] Determine the second business type for each voting node;
[0024] Determine the difference level between the second business type and the first business type for each voting node;
[0025] The voting weight of each voting node is determined based on the difference level of each voting node.
[0026] In one possible implementation, the voting link includes managing and approving voting topics; generating the voting link based on the plurality of candidate nodes includes:
[0027] Among the plurality of candidate nodes, at least one first candidate node for managing the voting topic and at least one second candidate node for reviewing the voting topic are determined, wherein there are no identical candidate nodes among the at least one first candidate node and the at least one second candidate node.
[0028] In one possible implementation, the consortium blockchain includes multiple consortium nodes; according to the voting link, obtaining voting information from multiple voting nodes in the consortium blockchain includes:
[0029] Multiple authentication nodes are identified among the multiple alliance nodes;
[0030] Determine the computing power occupancy of each authentication node;
[0031] The authentication nodes whose computing power utilization rate is less than or equal to the first threshold are identified as voting nodes, thereby identifying multiple voting nodes;
[0032] Send the voting link to the multiple voting nodes and receive the voting information from the multiple voting nodes.
[0033] Secondly, embodiments of this application provide a node determination device, including a first determination module, a generation module, an acquisition module, and a second determination module:
[0034] The first determining module is used to determine multiple candidate nodes corresponding to the target smart contract in the consortium blockchain, wherein the candidate nodes are nodes for election management nodes and review nodes;
[0035] The generation module is used to generate a voting link based on the plurality of candidate nodes. The voting link includes at least one voting topic, which is used to request the determination of a management node or an auditing node.
[0036] The acquisition module is used to acquire voting information of multiple voting nodes in the consortium blockchain according to the voting link. The voting information includes the selected node corresponding to each voting topic and the node weight corresponding to the selected node. The selected node is the node selected from the multiple candidate nodes.
[0037] The second determining module is used to determine the target node for each voting topic of the target smart contract based on the voting information of the multiple voting nodes. The target node includes a management node and an auditing node.
[0038] In one possible implementation, for any given voting topic; the second determining module is specifically used for:
[0039] Determine the first business type of the target smart contract;
[0040] Based on the first business type, determine the voting weight of each voting node;
[0041] Based on the voting information and voting weight of each voting node, the target node for the voting topic is determined.
[0042] In one possible implementation, the second determining module is specifically used for:
[0043] Based on the voting information of each voting node, determine the selection node and node weight of each voting node corresponding to the voting topic;
[0044] For any selected node, the node weight and voting weight of the selected node are processed to obtain the selection weight of the selected node.
[0045] The target node of the voting node is determined based on the selection weight of each selection node in the voting topic.
[0046] In one possible implementation, the second determining module is specifically used for:
[0047] Determine whether there is a selection weight that is greater than or equal to the first threshold;
[0048] If so, then determine at least one selection node corresponding to the selection weight, and determine the target node among the at least one selection node;
[0049] If not, the node with the highest weight will be selected as the target node.
[0050] In one possible implementation, the second determining module is specifically used for:
[0051] Determine the second business type for each voting node;
[0052] Determine the difference level between the second business type and the first business type for each voting node;
[0053] The voting weight of each voting node is determined based on the difference level of each voting node.
[0054] In one possible implementation, the voting link includes managing and approving voting topics; the generation module is specifically used for:
[0055] Among the plurality of candidate nodes, at least one first candidate node for managing the voting topic and at least one second candidate node for reviewing the voting topic are determined, wherein there are no identical candidate nodes among the at least one first candidate node and the at least one second candidate node.
[0056] In one possible implementation, the consortium blockchain includes multiple consortium nodes; the acquisition module is specifically used for:
[0057] Multiple authentication nodes are identified among the multiple alliance nodes;
[0058] Determine the computing power occupancy of each authentication node;
[0059] The authentication nodes whose computing power utilization rate is less than or equal to the first threshold are identified as voting nodes, thereby identifying multiple voting nodes;
[0060] Send the voting link to the multiple voting nodes and receive the voting information from the multiple voting nodes.
[0061] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor.
[0062] The memory stores computer-executed instructions;
[0063] The processor executes computer execution instructions stored in the memory, causing the processor to perform the node determination method according to any one of the first aspects.
[0064] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the node determination method described in any of the first aspects.
[0065] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the node determination method described in any of the first aspects.
[0066] The node determination method, apparatus, device, storage medium, and product provided in this application can determine multiple candidate nodes among multiple consortium nodes, generate voting links based on the multiple candidate nodes, and the voting links can include at least one voting topic. The voting topic can be used to request the determination of management nodes and auditing nodes. After receiving the voting information from multiple voting nodes, the target nodes for each voting topic of the target smart contract can be determined. The target nodes include management nodes and auditing nodes. By determining multiple candidate nodes among multiple consortium nodes in the consortium blockchain, management nodes and auditing nodes can be randomly determined from the multiple candidate nodes. The smart contract can be managed jointly by management nodes and auditing nodes, which can improve the security of smart contract management. Attached Figure Description
[0067] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0068] Figure 1 A schematic diagram illustrating an application scenario provided in an embodiment of this application;
[0069] Figure 2 A flowchart illustrating a node determination method provided in an embodiment of this application;
[0070] Figure 3 A flowchart illustrating another node determination method provided in an embodiment of this application;
[0071] Figure 4 A schematic diagram of the architecture of a node determination method provided in an embodiment of this application;
[0072] Figure 5 This is a schematic diagram of the structure of a node determination device provided in an embodiment of this application;
[0073] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0074] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0075] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0076] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use, processing, transmission, provision, disclosure, and application of the relevant data all comply with the relevant laws, regulations, and standards of the relevant countries and regions, have taken necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation portals for users to choose to authorize or refuse.
[0077] Furthermore, the technical solution involved in this application, which involves big data analysis of user information (including but not limited to personal biometrics, identity data, consumption data, asset data, electronic terminal operation data, etc.) and the use of artificial intelligence technology for automated decision-making, and makes decisions that have a significant impact on personal rights based on the results of automated decision-making, provides users with corresponding operation entry points for users to choose to agree to or reject the results of automated decision-making; if the user chooses to reject, the process will proceed to the expert decision-making process.
[0078] It should be noted that the methods and apparatus defined in this application can be used in the field of blockchain technology, or in any field other than blockchain technology. The application fields of the methods and apparatus defined in this application are not limited.
[0079] Figure 1 This is a schematic diagram illustrating an application scenario provided by an embodiment of this application. Please refer to [link / reference]. Figure 1 It includes multiple alliance nodes 101 and processing devices 102.
[0080] A blockchain can be controlled and managed by a consortium of multiple consortium nodes 101; this blockchain is called a consortium blockchain. Each consortium node 101 can be a terminal device of an organization or institution. After a new target smart contract is generated in the consortium blockchain, the processing device 102 can determine multiple candidate nodes corresponding to the target smart contract from among the multiple consortium nodes 101, and generate a voting link based on these candidate nodes. The voting link can include at least one voting topic, which can be used to request the determination of a management node or an auditing node.
[0081] Processing device 102 can obtain voting information from multiple voting nodes in the consortium blockchain based on the voting link. The voting information may include the selected node among multiple candidate nodes. Processing device 102 can determine the target node for each voting topic of the target smart contract based on the voting information from multiple voting nodes. The target node may include management nodes and auditing nodes.
[0082] In existing technologies, when a management node needs to be determined for a smart contract, consortium nodes in a consortium blockchain can apply to become the management node. Upon receiving an application request from any consortium node in the blockchain, that node can be designated as the management node. However, in this process, the consortium nodes submitting applications are relatively fixed, resulting in a relatively fixed management node for the smart contract. This could lead to fraudulent activities during the management process, thus lowering the security of smart contract management.
[0083] The node determination method provided in this application can identify multiple candidate nodes from multiple consortium nodes, generate voting links based on the multiple candidate nodes, and the voting links can include at least one voting topic. The voting topic can be used to request the determination of management nodes and auditing nodes. After receiving the voting information from multiple voting nodes, the target nodes for each voting topic of the target smart contract can be determined. The target nodes include management nodes and auditing nodes. By identifying multiple candidate nodes from multiple consortium nodes in the consortium blockchain, management nodes and auditing nodes can be randomly determined from the multiple candidate nodes. The smart contract can be managed jointly by management nodes and auditing nodes, which can improve the security of smart contract management.
[0084] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0085] Figure 2 This is a flowchart illustrating a node determination method provided in an embodiment of this application. Please refer to... Figure 2 The method may include:
[0086] S201. Identify multiple candidate nodes corresponding to the target smart contract in the consortium blockchain.
[0087] The execution entity in this application embodiment can be a processing device or a business processing unit installed within the processing device. The business processing unit can be implemented through software or through a combination of software and hardware.
[0088] A consortium blockchain can include multiple consortium nodes that collaborate within a specific industry or field, and the relationships between these nodes are typically based on mutual trust and non-competition.
[0089] Multiple candidate nodes can be determined from multiple alliance nodes using a random number algorithm. These candidate nodes can be used to elect management nodes and auditing nodes.
[0090] For example, random number algorithms can be any of the following: linear congruential algorithm, Mersenne rotation algorithm, XORshift algorithm, Monte Carlo method, von Neumann method, etc.
[0091] The target smart contract can be an automated contract for a consortium blockchain, capable of automatically executing agreements reached between multiple consortium nodes.
[0092] S202. Generate a voting link based on multiple candidate nodes.
[0093] A voting link may include at least one voting topic, which may be used to request the identification of an administrative node or an auditing node.
[0094] For any given voting topic, at least one candidate node can be identified from multiple candidate nodes, and voting nodes can select and score from at least one candidate node.
[0095] One of the candidate nodes can be randomly determined from multiple candidate nodes using a random number algorithm.
[0096] For example, suppose there are two voting topics, namely voting topic 1 and voting topic 2, and there are six candidate nodes, namely candidate nodes 1-6. Then the candidate nodes for voting topic 1 can be candidate node 1, candidate node 3 and candidate node 4, and the candidate nodes for voting topic 2 can be candidate node 1, candidate node 2 and candidate node 5.
[0097] In some embodiments, the voting link includes managing the voting topic and reviewing the voting topic, and at least one first candidate node for managing the voting topic and at least one second candidate node for reviewing the voting topic are determined from a plurality of candidate nodes, wherein there are no identical candidate nodes among the at least one first candidate node and the at least one second candidate node.
[0098] For example, suppose there are two voting topics: the management voting topic and the review voting topic. Suppose there are six candidate nodes, namely candidate nodes 1-6. Then the candidate nodes for the management voting topic can be candidate node 1, candidate node 3, and candidate node 4, and the candidate nodes for the review voting topic can be candidate node 2, candidate node 5, and candidate node 6.
[0099] S203. Obtain voting information from multiple voting nodes in the consortium blockchain based on the voting link.
[0100] Voting nodes can be nodes in the consortium blockchain that have voting qualification certification but are not candidate nodes.
[0101] For example, suppose there are 8 alliance nodes, namely nodes 1-8, and suppose the candidate nodes are nodes 1, 2 and 3. Suppose that nodes 4, 5, 6 and 7 are eligible to vote, then the voting nodes can be nodes 4, 5, 6 and 7.
[0102] Voting information can include the selected node for each voting topic and the node weight of the selected node. The selected node can be a node chosen from multiple candidate nodes.
[0103] S204. Based on the voting information from multiple voting nodes, determine the target node for each voting topic of the target smart contract.
[0104] Target nodes can include management nodes and audit nodes.
[0105] In some embodiments, for any voting topic, the selection weight of each selection node can be determined based on the node weight of the selection node corresponding to each voting node, and the selection node with the largest selection weight can be determined as the target node.
[0106] For any given selection node, the average of the node weights corresponding to at least one voting node can be determined as the selection weight of that selection node.
[0107] For example, suppose there are two selection nodes for voting topic 1, namely node 1 and node 2, and three voting nodes, namely node 3, node 4 and node 5. Suppose that node 3 selects node 1, and the node weight of node 1 is 0.8; node 4 selects node 1, and the node weight of node 1 is 0.5; node 4 selects node 2, and the node weight of node 2 is 0.8. Then we can determine that the selection weight of node 1 is 0.75 and the selection weight of node 2 is 0.8. Therefore, node 2 can be identified as the target node.
[0108] In some embodiments, for any given voting topic, the target node for that voting topic can be determined as follows: determine the first business type of the target smart contract; determine the voting weight of each voting node based on the first business type; and determine the target node for the voting topic based on the voting information and voting weight of each voting node.
[0109] For example, suppose the first business type of the target smart contract is business type 1, and there are 3 voting nodes, namely voting node 1, voting node 2 and voting node 3. Based on business type 1, the voting weight of voting node 1 is determined to be 0.9, the voting weight of voting node 2 is 0.7, and the voting weight of voting node 3 is 0.7.
[0110] This application provides a node determination method that can identify multiple candidate nodes from multiple consortium nodes, generate voting links based on the multiple candidate nodes, and the voting links can include at least one voting topic. The voting topic can be used to request the determination of management nodes and auditing nodes. After receiving the voting information from multiple voting nodes, the target nodes for each voting topic of the target smart contract can be determined. The target nodes include management nodes and auditing nodes. By identifying multiple candidate nodes from multiple consortium nodes in the consortium blockchain, management nodes and auditing nodes can be dynamically determined from the multiple candidate nodes. The smart contract can be managed by management nodes and auditing nodes simultaneously, which can improve the security of smart contract management.
[0111] Figure 3 This is a flowchart illustrating another node determination method provided in an embodiment of this application. Please refer to... Figure 3 The method may include:
[0112] S301. Identify multiple candidate nodes corresponding to the target smart contract in the consortium blockchain.
[0113] S302. Generate a voting link based on multiple candidate nodes.
[0114] The execution process of S301-S302 can be found in the execution process of S201-S202, and will not be repeated here.
[0115] S303. Identify multiple authentication nodes among multiple alliance nodes.
[0116] The voting eligibility of each alliance node, excluding candidate nodes, can be authenticated to obtain the authentication result of each alliance node. Alliance nodes that are successfully authenticated can be identified as authenticated nodes.
[0117] For example, suppose there are 6 alliance nodes, namely nodes 1-6. If the candidate nodes are nodes 1 and 2, then nodes 3-6 are authenticated. If the authentication results of nodes 3, 5 and 6 are successful, and the authentication result of node 4 is unsuccessful, then nodes 3, 5 and 6 are determined as the authentication nodes.
[0118] S304. Determine the computing power occupancy rate of each authentication node.
[0119] In a consortium blockchain, multiple consortium nodes need to perform their corresponding business processes, which requires a certain amount of computing power. Some consortium nodes have a large computing power load. If the consortium node with a large computing power load is identified as the voting node, it may cause the voting to fail.
[0120] S305. Identify the authentication nodes whose computing power utilization rate is less than or equal to the first threshold as voting nodes, so as to identify multiple voting nodes.
[0121] For example, suppose there are 5 authentication nodes, namely nodes 1-5. Assume that the computing power utilization rate of node 1 is 80%, that of node 2 is 85%, that of node 3 is 90%, that of node 4 is 50%, and that of node 5 is 35%. Assume that the first threshold is 85%. Then, nodes 1, 2, 4, and 5 will be determined as voting nodes.
[0122] S306. Send voting links to multiple voting nodes and receive voting information from multiple voting nodes.
[0123] In some embodiments, the voting information may include at least one selected node and the node weight corresponding to each selected node.
[0124] In some embodiments, the voting link may include a voting duration, which can be used to define the end time of the voting link. If no voting information is received from a voting node within the voting duration, it is determined that the voting node has abstained from voting.
[0125] S307. For any given voting topic, determine the first business type of the target smart contract.
[0126] For any given smart contract, there is a corresponding business type. In the consortium blockchain, there are multiple associated nodes that are strongly related to this business type. The smart contract can constrain these multiple associated nodes.
[0127] S308. Determine the second business type for each voting node.
[0128] The second business type of each voting node can be compared with the first business type of the target smart contract. For any given voting node, if the difference between the second business type and the first business type is large, the influence of the voting information of that voting node is small; if the difference between the second business type and the first business type of that voting node is small, the influence of the voting information of that voting node is large.
[0129] S309. Determine the difference level between the second business type and the first business type for each voting node.
[0130] Furthermore, a difference level table can be obtained, and the difference level between the second business type of each voting node and the first business type of the target smart contract can be determined based on the difference level table. The difference level table can include difference levels between multiple business types.
[0131] For example, assuming there are 4 business types, the difference level table can be as shown in Table 1, which can include 4 difference levels, namely difference level 1, difference level 2, difference level 3 and difference level 4. Among them, difference level 1 has the lowest difference and difference level 4 has the highest difference.
[0132] Table 1
[0133]
[0134] S310. Determine the voting weight of each voting node based on the difference level of each voting node.
[0135] For any voting node, the voting weight can be determined based on the difference level between the voting node and the target smart contract. The greater the difference level, the lower the voting weight. That is, voting nodes of the same business type have a larger voting weight, while voting nodes of unrelated business types have a smaller voting weight.
[0136] For example, suppose there are 4 levels of difference, namely level 1 to level 4. The voting weight corresponding to level 1 can be 0.9, level 2 can be 0.7, level 3 can be 0.5, and level 4 can be 0.3.
[0137] S311. Based on the voting information of each voting node, determine the selection node and node weight of each voting node corresponding to the voting topic.
[0138] For any given voting topic, a voting node can select a chosen node and its node weight from at least one candidate node in the voting link.
[0139] S312. For any selected node, perform data processing on the node weight and voting weight corresponding to at least one voting node to obtain the selection weight of the selected node.
[0140] Furthermore, the node weight and voting weight of each voting node can be multiplied to obtain at least one first product. The average of at least one first product is then determined as the selection weight of the selected node.
[0141] For example, suppose node 1 is selected, and there are three voting nodes that select node 1: node 2, node 3, and node 4. Suppose node 2 has a voting weight of 0.9 and a node weight of 0.8 for node 1; node 3 has a voting weight of 0.5 and a node weight of 0.8 for node 1; and node 4 has a voting weight of 0.9 and a selection weight of 0.7. Then, the selection weight of node 2 for node 1 is 0.72, the selection weight of node 3 for node 1 is 0.4, the selection weight of node 4 for node 1 is 0.63, and the selection weight of node 1 is 0.6.
[0142] In some embodiments, the impact of the computing power occupancy of the selected node on the selection weight can be considered, and the selection weight of the selected node can be determined based on the computing power occupancy of the selected node, as well as the node weight and voting weight of each voting node.
[0143] Specifically, the node weight and voting weight of each voting node can be multiplied to obtain at least one first product. The average of at least one first product is determined as the median weight of the selected node. The median weight of the selected node is divided by the computing power occupancy rate to determine the selection weight.
[0144] The higher the computing power share of a selected node, the lower the probability of selecting that node; that is, the smaller the selection weight.
[0145] For example, suppose node 1 is selected, and there are three voting nodes that select node 1: node 2, node 3, and node 4. Assume node 2 has a voting weight of 0.9 and a node weight of 0.8 for node 1; node 3 has a voting weight of 0.5 and a node weight of 0.8 for node 1; and node 4 has a voting weight of 0.9 and a selection weight of 0.7. Therefore, the selection weight of node 2 relative to node 1 is 0.72, node 3 relative to node 1 is 0.4, node 4 relative to node 1 is 0.63, and the median weight of node 1 is 0.6. Assuming node 1's computing power share is 0.9, its selection weight is 0.67.
[0146] S313. Determine the target node of the voting node based on the selection weight of each selection node in the voting topic.
[0147] For example, suppose the voting topic is voting topic 1, and there are two selection nodes for voting topic 1, namely node 1 and node 2. Suppose the selection weight of node 1 is 0.5 and the selection weight of node 2 is 0.3, then node 1 is determined to be the target node of voting topic 1.
[0148] In some embodiments, it can be determined whether there is a selection weight greater than or equal to a first threshold; if so, at least one selection node corresponding to the selection weight is determined, and the target node is determined among the at least one selection node; if not, the selection node with the largest selection weight is determined as the target node.
[0149] The target node can be randomly determined from at least one selection node using a random number algorithm.
[0150] For example, suppose the voting topic is voting topic 1, and there are 4 selection nodes for voting topic 1, namely node 1, node 2, node 3 and node 4. Suppose the selection weight of node 1 is 0.6, the selection weight of node 2 is 0.45, the selection weight of node 3 is 0.7, the selection weight of node 4 is 0.3, and the first threshold is 0.5. Then, either node 1 or node 3 can be determined as the target node.
[0151] The node determination method provided in this application can identify multiple candidate nodes from multiple consortium nodes, generate voting links based on these candidate nodes, and the voting links can include at least one voting topic. The voting topic can be used to request the determination of management nodes and auditing nodes. Multiple voting nodes can be identified from multiple consortium nodes. After receiving voting information from multiple voting nodes, for any given voting topic, multiple selection nodes can be identified, along with at least one corresponding voting node for each selection node. The selection weight of each selection node can be determined based on its voting weight and node weight, and the target node for the voting topic can be determined based on its selection weight. The target node can be either a management node or an auditing node. In this process, candidate nodes can be dynamically identified from multiple consortium nodes, and selection nodes can be determined from among these candidate nodes through voting. Based on the selection weights of the selection nodes, management nodes and auditing nodes can be determined, increasing the flexibility in determining management and auditing nodes and improving the security of smart contract management.
[0152] Figure 4 This is a schematic diagram illustrating the architecture of a node determination method provided in an embodiment of this application. Please refer to [link / reference]. Figure 4 In a consortium blockchain, multiple candidate nodes are identified for the target smart contract. These candidate nodes are used to elect both management and review nodes. Voting links are generated based on these candidate nodes. These links can include management and review voting topics. Management voting topics can be used to request the selection of a management node, and review voting topics can be used to request the selection of a review node. Multiple voting nodes can be identified within the consortium blockchain. Based on the voting links, multiple voting information from these nodes can be obtained. Based on this voting information, multiple candidate nodes, the node weight of each candidate node, and at least one voting node corresponding to each candidate node can be determined.
[0153] For any given voting topic, we can determine the first business type of the target smart contract, the second business type of each voting node, the voting weight of each voting node based on the difference level between the second and first business types, the selection weight of each selection node based on the voting weight of each voting node and the node weight of the selection node, and the target node of the voting nodes based on the selection weight of each selection node of the voting topic.
[0154] Figure 5 This is a schematic diagram of a node determination device provided in an embodiment of this application. Please refer to... Figure 5 The node determination device 10 may include a first determination module 11, a generation module 12, an acquisition module 13, and a second determination module 14.
[0155] The first determining module 11 is used to determine multiple candidate nodes corresponding to the target smart contract in the consortium blockchain. The candidate nodes are nodes for election management nodes and review nodes.
[0156] The generation module 12 is used to generate a voting link based on multiple candidate nodes. The voting link includes at least one voting topic, which is used to request the determination of a management node or an audit node.
[0157] The acquisition module 13 is used to acquire voting information of multiple voting nodes in the consortium blockchain based on the voting link. The voting information includes the selected node corresponding to each voting topic and the node weight corresponding to the selected node. The selected node is the node selected from multiple candidate nodes.
[0158] The second determining module 14 is used to determine the target node for each voting topic of the target smart contract based on the voting information of multiple voting nodes. The target nodes include management nodes and auditing nodes.
[0159] The node determination device provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.
[0160] In one possible implementation, for any given voting topic, the second determining module 14 is specifically used for:
[0161] Determine the primary business type of the target smart contract;
[0162] Based on the first business type, determine the voting weight of each voting node;
[0163] Based on the voting information and voting weight of each voting node, the target node for the voting topic is determined.
[0164] In one possible implementation, the second determining module 14 is specifically used for:
[0165] Based on the voting information of each voting node, determine the selection node and node weight of each voting node corresponding to the voting topic;
[0166] For any selection node, the node weight and voting weight of the selection node of at least one voting node are processed to obtain the selection weight of the selection node.
[0167] The target node for the voting node is determined based on the selection weight of each node in the voting topic.
[0168] In one possible implementation, the second determining module 14 is specifically used for:
[0169] Determine whether there is a selection weight that is greater than or equal to the first threshold;
[0170] If so, then determine at least one selection node corresponding to the selection weight, and determine the target node among at least one selection node;
[0171] If not, the node with the highest weight will be selected as the target node.
[0172] In one possible implementation, the second determining module 14 is specifically used for:
[0173] Determine the second business type for each voting node;
[0174] Determine the level of difference between the second business type and the first business type for each voting node;
[0175] The voting weight of each voting node is determined based on its differential level.
[0176] In one possible implementation, the voting link includes managing and approving voting topics; the generation module 12 is specifically used for:
[0177] Among multiple candidate nodes, at least one first candidate node for managing the voting topic and at least one second candidate node for reviewing the voting topic are determined, wherein there are no identical candidate nodes among the at least one first candidate node and the at least one second candidate node.
[0178] In one possible implementation, the consortium blockchain includes multiple consortium nodes; the acquisition module 13 is specifically used for:
[0179] Identify multiple authentication nodes among multiple alliance nodes;
[0180] Determine the computing power occupancy of each authentication node;
[0181] Authentication nodes whose computing power utilization rate is less than or equal to the first threshold are identified as voting nodes, thereby determining multiple voting nodes;
[0182] Send voting links to multiple voting nodes and receive voting information from multiple voting nodes.
[0183] The node determination device provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.
[0184] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Please refer to... Figure 6 The electronic device 20 may include a processor 21 and a memory 22. Exemplarily, the processor 21 and the memory 22 are interconnected via a bus 23.
[0185] Memory 22 stores instructions executed by the computer;
[0186] The processor 21 executes computer execution instructions stored in the memory 22, causing the processor 21 to perform the node determination method as shown in the above method embodiment.
[0187] Accordingly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the node determination method of the above-described method embodiments.
[0188] Accordingly, embodiments of this application may also provide a computer program product, including a computer program, which, when executed by a processor, can implement the node determination method shown in the above method embodiments.
[0189] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0190] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0191] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0192] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0193] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0194] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0195] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0196] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0197] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A node determination method, characterized in that, include: In the consortium blockchain, multiple candidate nodes are identified corresponding to the target smart contract. These candidate nodes are the nodes for election management nodes and review nodes. Based on the multiple candidate nodes, a voting link is generated. The voting link includes at least one voting topic, which is used to request the determination of a management node or an auditing node. According to the voting link, the voting information of multiple voting nodes in the consortium blockchain is obtained. The voting information includes the selected node corresponding to each voting topic and the node weight corresponding to the selected node. The selected node is the node selected from the multiple candidate nodes. Based on the voting information from the multiple voting nodes, the target node for each voting topic of the target smart contract is determined, and the target node includes management nodes and auditing nodes; For any given voting topic; Determining the target node for the voting topic based on the voting information of the multiple voting nodes includes: determining a first business type of the target smart contract; determining the voting weight of each voting node based on the first business type; determining the selected node and node weight of each voting node corresponding to the voting topic based on the voting information of each voting node; for any selected node, performing data processing on the node weight and voting weight of at least one voting node to obtain the selection weight of the selected node; and determining the target node for the voting topic based on the selection weight of each selected node.
2. The method according to claim 1, characterized in that, Based on the selection weight of each selection node in the voting topic, the target node of the voting node is determined, including: Determine whether there is a selection weight that is greater than or equal to the first threshold; If so, then determine at least one selection node corresponding to the selection weight, and determine the target node among the at least one selection node; If not, the node with the highest weight will be selected as the target node.
3. The method according to claim 1, characterized in that, Based on the first business type, the voting weight of each voting node is determined, including: Determine the second business type for each voting node; Determine the difference level between the second business type and the first business type for each voting node; The voting weight of each voting node is determined based on the difference level of each voting node.
4. The method according to any one of claims 1-3, characterized in that, The voting link includes managing the voting topic and approving the voting topic; the voting link is generated based on the multiple candidate nodes, including: Among the plurality of candidate nodes, at least one first candidate node for managing the voting topic and at least one second candidate node for reviewing the voting topic are determined, wherein there are no identical candidate nodes among the at least one first candidate node and the at least one second candidate node.
5. The method according to any one of claims 1-4, characterized in that, The consortium blockchain includes multiple consortium nodes; Based on the voting link, obtain the voting information of multiple voting nodes in the consortium blockchain, including: Multiple authentication nodes are identified among the multiple alliance nodes; Determine the computing power occupancy of each authentication node; The authentication nodes whose computing power utilization rate is less than or equal to the first threshold are identified as voting nodes, thereby identifying multiple voting nodes; Send the voting link to the multiple voting nodes and receive the voting information from the multiple voting nodes.
6. A node determination device, characterized in that, It includes a first determining module, a generating module, an acquiring module, and a second determining module: The first determining module is used to determine multiple candidate nodes corresponding to the target smart contract in the consortium blockchain, wherein the candidate nodes are nodes for election management nodes and review nodes; The generation module is used to generate a voting link based on the plurality of candidate nodes. The voting link includes at least one voting topic, which is used to request the determination of a management node or an auditing node. The acquisition module is used to acquire voting information of multiple voting nodes in the consortium blockchain according to the voting link. The voting information includes the selected node corresponding to each voting topic and the node weight corresponding to the selected node. The selected node is the node selected from the multiple candidate nodes. The second determining module is used to determine the target node for each voting topic of the target smart contract based on the voting information of the multiple voting nodes, wherein the target node includes a management node and an auditing node; The second determining module is specifically used to: for any given voting topic; determine the first business type of the target smart contract; determine the voting weight of each voting node based on the first business type; and determine the selection node and node weight of each voting node corresponding to the voting topic based on the voting information of each voting node. For any selection node, the node weight and voting weight of the selection node of at least one voting node are processed to obtain the selection weight of the selection node; the target node of the voting node is determined according to the selection weight of each selection node of the voting topic.
7. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 5.
9. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1-5.
Citation Information
Patent Citations
Method and device for realizing control processing for voting network based on dynamic weight, processor and storage medium thereof
CN112995318A
Block chain-based voting method and system, electronic equipment and storage medium
CN117390607A