Blockchain DPoS consensus mechanism improvement method based on trust mechanism
By extracting features and filtering votes from blockchain nodes, malicious nodes are identified and suppressed, thus solving the security risk of malicious node election in the DPOS consensus mechanism and realizing secure management of the blockchain.
Patent Information
- Application Number
- CN202211705872.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-29
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2042-12-29
AI Technical Summary
In the DPOS consensus mechanism, there is room for human manipulation during the election of proxy nodes, which leads to security risks. How to select and manage non-malicious nodes to maintain blockchain security is a challenge.
By extracting node features, using voting and filtering mechanisms, malicious nodes are identified and suppressed, and malicious nodes that have been repeatedly filtered out by voting are removed to prevent them from obtaining the right to record transactions.
This effectively prevents malicious nodes from gaining the right to record transactions, improves the security of the blockchain, and reduces the risks caused by human intervention.
Smart Images

Figure CN115967573B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of blockchains, in particular to a blockchain DPoS consensus mechanism improvement method based on a trust mechanism. BACKGROUND
[0002] DPOS (Delegated Proof of Stake) is a consensus algorithm based on voting election, and the DPOS consensus mechanism does not require energy consumption and hardware devices, shortens the block generation time and confirmation time, improves the system efficiency, and does not require mining or full node verification, but is verified by a limited number of witness nodes, and thus is simple and efficient, but in the process of using the DPOS consensus mechanism, there is a large space for human operation in the election process of the proxy accounting node, which has a certain security risk, and therefore how to maintain the selected proxy accounting node as a non-malicious node in the running process of the DPOS consensus mechanism to maintain the security of the blockchain is a problem to be solved. SUMMARY
[0003] The embodiment of the present application provides a blockchain DPoS consensus mechanism improvement method based on a trust mechanism, which extracts features of nodes and adopts a voting method to screen out malicious nodes and inhibit them from obtaining accounting rights, and simultaneously manages and removes malicious nodes screened out by voting multiple times, so as to avoid malicious nodes from obtaining accounting rights and maintain the security of the blockchain.
[0004] A blockchain DPoS consensus mechanism improvement method based on a trust mechanism, comprising the following steps:
[0005] S1, node feature extraction, performing feature extraction on each joined node;
[0006] S2, node feature collection, sorting the features of each joined node in chronological order according to the time sequence to form a node feature data list library;
[0007] S3, first voting, each node votes for other nodes according to the node features recorded in the node feature data list library, and the node with no votes is determined as a malicious node;
[0008] S4, malicious node feature extraction, extracting the features of the nodes determined as malicious nodes from the node feature data list library, and finding other malicious nodes with similar features by traversing the node feature data list library according to the extracted node features;
[0009] S5, right inhibition, inhibiting the nodes determined as malicious nodes from obtaining the next three rounds of accounting rights;
[0010] S6, the newly added node determines whether the newly added node is a malicious node according to the node characteristics of the malicious node, if the newly added node is determined to be a malicious node, the newly added node determined to be a malicious node is inhibited from obtaining the next three rounds of accounting rights, if the newly added node is not determined to be a malicious node, the newly added node is not inhibited from obtaining the accounting rights, meanwhile, the characteristics of the newly added node are extracted and recorded in the node characteristic data list library;
[0011] S7, second voting, after three rounds of accounting, the node characteristics in the node characteristic data list library are updated, each node votes for other nodes according to the node characteristics recorded in the updated node characteristic data list library, and the node without the number of votes is determined to be a malicious node;
[0012] S8, node elimination, after the malicious node is determined to be a malicious node again after three rounds of accounting, the characteristics of the node determined to be a malicious node again are extracted, and the node characteristic data list library is traversed to extract the nodes with consistent characteristics, if the number of times that the extracted nodes with consistent characteristics are determined to be malicious nodes is greater than or equal to two times in succession, the node determined to be a malicious node again and the node with consistent characteristics determined to be a malicious node and the number of times that the extracted node is determined to be a malicious node is less than or equal to one time are eliminated, if the number of times that the extracted node is determined to be a malicious node is less than or equal to one time, the node is determined to be a malicious node and is inhibited from obtaining the next three rounds of accounting rights.
[0013] Further, the process of extracting the characteristics of the node in step S1 includes identifying the operation of each node, obtaining the identification result, and classifying the identification result to form the characteristics of the node.
[0014] Further, the operation of identifying the node is performed in real time, the operation of the node is recorded and identified when the node exists, and the obtained identification result is synchronized to the node characteristic data list library.
[0015] Further, the similar node in step S4 is specifically a node with a feature coincidence degree of 90% or above.
[0016] Further, in step S4, if the current node has a number of votes, and the characteristics of the node coincide with the characteristics of the malicious node by 90% or above, the current node needs to be determined to be a malicious node.
[0017] Further, in step S7, all nodes determined to be malicious nodes need to participate in voting for other nodes or be voted by other nodes after three rounds of accounting.
[0018] Further, if the malicious node obtains the number of votes after three times of three rounds of accounting, the record of the malicious node is cleared.
[0019] Further, all nodes keep the data in the node feature data inventory library updated in real time.
[0020] Further, all nodes can view the data in the node feature data inventory library.
[0021] The beneficial effects of the above technical solutions provided by the embodiments of the present application at least include: the present application extracts features of nodes and adopts a voting manner to screen out malicious nodes and inhibit them from obtaining the right to record, and the malicious nodes are managed to eliminate the malicious nodes screened out by voting for multiple times, so that the effect of avoiding the malicious nodes from obtaining the right to record and maintaining the safety of the blockchain is achieved.
[0022] Other features and advantages of the present application will be set forth in the following description, and in part will become apparent to those skilled in the art from the description, or can be learned by practice of the present application. The objects and other advantages of the present application can be achieved and obtained by the structure particularly pointed out in the written description, claims, and drawings.
[0023] The technical solutions of the present application will be further described in detail below with the help of the drawings and embodiments. BRIEF DESCRIPTION OF DRAWINGS
[0024] The accompanying drawings are included to provide a further understanding of the present application, and constitute a part of the specification, illustrate embodiments of the present application, and are used to explain the present application together with the embodiments of the present application, and do not constitute a limitation on the present application. In the drawings:
[0025] Figure 1 The flowchart of the improved method of the blockchain DPoS consensus mechanism based on the trust mechanism disclosed by the embodiments of the present application. DETAILED DESCRIPTION
[0026] The exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided so that the present disclosure can be more thoroughly understood and the scope of the present disclosure can be accurately conveyed to those skilled in the art.
[0027] As Figure 1 shown, the embodiments of the present application provide an improved method of a blockchain DPoS consensus mechanism based on a trust mechanism, comprising the following steps:
[0028] S1, feature extraction of nodes, feature extraction is performed on each joined node;
[0029] It should be noted that the process of feature extraction of nodes includes identifying the operation of each node, and the operation is all operations of the current node in the recording period.
[0030] S2, Node Feature Aggregation: The features of each added node are sorted according to the time of addition and time series to form a node feature data list library.
[0031] It should be noted that the operation of the identification node is carried out in real time, realizing the monitoring of the node. When the node is in operation, the operation of the node is recorded and identified. The identification results are synchronized to the node feature data list library, and the identification results are classified to form the features of the node.
[0032] S3, the first vote: each node votes for other nodes based on the node characteristics recorded in the node characteristic data list database. Nodes without votes are judged as malicious nodes.
[0033] Specifically, after three rounds of accounting, a vote is taken. The node features recorded in the feature data list are the latest node features of each node. Each node evaluates other nodes based on the node features recorded in the feature data list and then votes. Nodes that receive votes are judged as benign nodes, and the higher the number of votes, the higher the trust level and the greater the probability of obtaining the right to record transactions in the next round. Conversely, if no votes are received, the node will be judged as a malicious node. Malicious nodes will be punished by being suppressed from obtaining the right to record transactions for three consecutive rounds and will not obtain the right to record transactions in three consecutive accounting cycles.
[0034] S4, Malicious Node Feature Extraction: Extract the node features that are identified as malicious nodes from the node feature data list library, and traverse the node feature data list library based on the extracted node features to find other malicious nodes with similar features.
[0035] It should be noted that similar nodes are other nodes whose features overlap by 90%. It should also be noted that if the current node has votes and its features overlap with those of a malicious node by 90% or more, the current node should be identified as a malicious node.
[0036] S5, permission suppression, suppresses nodes identified as malicious from obtaining the right to record transactions in the next three rounds;
[0037] Specifically, in the next three accounting cycles, nodes identified as malicious nodes will not obtain the right to record transactions. If a node is not identified as a malicious node again after three accounting cycles, its right to record transactions will no longer be restricted, and it can compete with other nodes to obtain the right to record transactions. It should also be noted that restricting its right to record transactions means prohibiting malicious nodes from obtaining the right to record transactions, and malicious nodes cannot participate in the competition for the right to record transactions.
[0038] S6, the newly added node determines whether the newly added node is a malicious node according to the node characteristics of the malicious node, if the newly added node is determined to be a malicious node, the newly added node determined to be a malicious node is inhibited from obtaining the next three rounds of accounting right, if the newly added node is not determined to be a malicious node, the newly added node is not inhibited from obtaining the accounting right, meanwhile, the characteristics of the newly added node are extracted and recorded in the node characteristic data list library;
[0039] It should be noted that the newly added node is preferentially determined to be a malicious node, and the determination needs to wait for the newly added node to complete the current three rounds of accounting period before the determination, if the new node is added in the second round or the third round of the three rounds of accounting period, the characteristics of the new node are determined according to the characteristics of the malicious node after the remaining accounting is completed, if the new node is not determined to be a malicious node, the characteristics of the new node are extracted and saved in the node characteristic data list library in time sequence.
[0040] S7, second voting, after three rounds of accounting, the node characteristics in the node characteristic data list library are updated, each node votes for other nodes according to the node characteristics recorded in the updated node characteristic data list library, and the node with no votes is determined to be a malicious node;
[0041] It should be noted that all nodes determined to be malicious nodes need to participate in voting for other nodes or be voted by other nodes after three rounds of accounting, and each voting needs to be performed after three rounds of accounting, that is, if voting is needed, three rounds of accounting are needed before voting, here, the operation of the node is recorded and analyzed, so that the characteristics of each node are more perfect, and the malicious node is easily found.
[0042] S8, node elimination, after the malicious node is determined to be a malicious node again after three rounds of accounting, the characteristics of the node determined to be a malicious node again are extracted, and the node characteristic data list library is traversed to extract the nodes with consistent characteristics, if the extracted nodes with consistent characteristics are determined to be malicious nodes for more than or equal to two times in succession, the node determined to be a malicious node again and the node determined to be a malicious node for more than or equal to two times in succession are eliminated, if the extracted nodes are determined to be malicious nodes for less than or equal to one time, the node is determined to be a malicious node and is inhibited from obtaining the next three rounds of accounting right.
[0043] It should be noted that if the malicious node obtains the votes after three consecutive three-round accounting, the record of the malicious node is cleared, and it should be noted that the malicious node will not suppress its right to obtain accounting in the second three-round accounting after the first three-round accounting, but the record of the malicious node will still be recorded, and in the case of the same number of votes, the probability of obtaining the right to account is lower than that of the node with the same number of votes. Only after three consecutive three-round accounting and being judged as a malicious node, the record of the malicious node is cleared.
[0044] The blockchain DPoS consensus mechanism improvement method based on the trust mechanism improves the method by identifying and extracting the features of the operation of each joined node, sorting the features of each joined node in the order of joining time according to the time sequence to form a node feature data list library, and after three rounds of accounting, each node respectively evaluates and votes other nodes according to the node features recorded in the feature data list library. The node with the votes is judged as a benign node, and if no votes are obtained, it will be judged as a malicious node. The malicious node will be punished by being suppressed for three rounds of obtaining the right to account, and will not obtain the right to account in the next three rounds of accounting. According to the characteristics of the malicious node, the node feature data list library is traversed to find other malicious nodes with similar features and suppress their three-round right to account. The malicious node cannot participate in the competition for the right to account. The newly joined node is preferentially judged as a malicious node. If it is not judged as a malicious node, its features are extracted and saved in the node feature data list library according to the time sequence. After three rounds of accounting, the node features in the node feature data list library are updated. Each node votes other nodes according to the node features recorded in the updated node feature data list library. The node without votes is judged as a malicious node. After three rounds of accounting, the malicious node is judged as a malicious node again. The features of the current node judged as a malicious node are extracted, and the node feature data list library is traversed to extract the nodes with consistent features. If the extracted nodes with consistent features are judged as malicious nodes for more than or equal to two consecutive times, the nodes judged as malicious nodes and the nodes with consistent features judged as malicious nodes for more than or equal to two consecutive times are removed. If the extracted nodes are judged as malicious nodes for less than or equal to one time, they are judged as malicious nodes and are suppressed for the next three rounds of accounting. The present application extracts the features of the nodes and screens out the malicious nodes by voting to suppress their right to account, and the malicious nodes are managed to remove the malicious nodes screened out by voting for multiple times, which achieves the effect of avoiding the malicious nodes obtaining the right to account and maintaining the security of the blockchain.
[0045] It should be understood that the particular order in which the steps of processes presented in the disclosure have been presented can be rearranged. Furthermore, various aspects of the disclosure can be used alone or in various combinations. In the appended claims, means-plus-function or step-plus-function clauses can have their application interpreted merely as open-ended limits of a particular combination of steps that are done on the apparatus, as specified in 35 U.S.C. § 112(f). However, the steps of the claims are not to be interpreted as requiring their order to be followed or requiring individual steps to be completed before another step can be initiated.
[0046] In the foregoing detailed description, various features are grouped together in single embodiments for the purpose of streamlining the disclosure. This method of disclosure should not be interpreted as reflecting a necessity to disclose features in any single claim. Rather, inventive embodiments can be directed to less than all features of a disclosed embodiment. Thus, the following claims are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate preferred embodiment. In the appended claims, the terms "including" and "comprising" are used in the sense of "including at least the recited feature but not excluding others." Thus, specifying a process step as "comprising" a feature or step is merely an attempt to define the content of the step with some functionality, and is not intended to foreclose the process step from having additional features or steps.
[0047] Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the embodiments disclosed herein can be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the overall system. Skilled artisans can implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
[0048] The steps of a method or algorithm described in connection with the embodiments disclosed herein can be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module can reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such that the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium can be integral to the processor. The processor and the storage medium can reside in an ASIC. The ASIC can reside in a user terminal. In the alternative, the processor and the storage medium can reside as discrete components in a user terminal.
[0049] For a software implementation, the techniques described herein can be implemented with modules (e.g., procedures, functions, and so on) that perform the functions described herein. The software codes can be stored in memory units and executed by processors. The memory unit can be implemented within the processor or external to the processor, in which case it can be communicatively coupled to the processor via various means as is known in the art.
[0050] The above description includes examples of one or more embodiments. Of course, not all possible combinations of components or methods described above can be implemented to make up a particular embodiment, but one of ordinary skill in the art will recognize that many such combinations are possible. Accordingly, the present embodiments are intended to embrace all such alterations, modifications and variations that fall within the scope of the appended claims. Furthermore, to the extent that the term "includes" is used in either the detailed description or the claims, such term is intended to be interpreted as "including but not limited to." Additionally, where the description or the claims recite a range of values, it is intended that every possible value within the range be "incorporated" into the disclosure.
Claims
1. An improved method of a blockchain DPoS consensus mechanism based on a trust mechanism, characterized in that, The method comprises the following steps: S1, node feature extraction, extracting features of each joined node; S2, node feature collection, sorting features of each joined node in chronological order according to time sequence to form a node feature data inventory; S3, first voting, each node votes for other nodes according to the node features recorded in the node feature data inventory, and a node without votes is determined as a malicious node; S4, malicious node feature extraction, extracting the features of the nodes determined as malicious nodes from the node feature data inventory, and finding other malicious nodes with similar features according to the extracted node features; S5, authority suppression, suppressing the nodes determined as malicious nodes from obtaining the next three rounds of recording rights; S6, new node determination, determining whether the newly joined node is a malicious node according to the node features of the malicious nodes, if the newly joined node is determined as a malicious node, suppressing the newly joined node from obtaining the next three rounds of recording rights, if the newly joined node is not determined as a malicious node, not suppressing the recording rights of the newly joined node, and extracting features of the newly joined node and recording the features in the node feature data inventory; S7, second voting, after three rounds of recording, the node features in the node feature data inventory are updated, each node votes for other nodes according to the updated node features recorded in the node feature data inventory, and a node without votes is determined as a malicious node; S8, node elimination, after three rounds of recording, the malicious nodes are determined again, the features of the nodes determined as malicious nodes are extracted, and the nodes with consistent features are extracted from the node feature data inventory, if the number of nodes with consistent features determined as malicious nodes is greater than or equal to two times in succession, the nodes determined as malicious nodes and the nodes with consistent features determined as malicious nodes are eliminated, if the number of nodes determined as malicious nodes is less than or equal to one time, the node is determined as a malicious node and is suppressed from obtaining the next three rounds of recording rights.
2. The improved method of blockchain DPoS consensus mechanism based on trust mechanism according to claim 1, characterized in that, The process of extracting features of the node in step S1 includes identifying the operation of each node, obtaining an identification result, and classifying the identification result to form the features of the node.
3. The improved method of blockchain DPoS consensus mechanism based on trust mechanism according to claim 2, characterized in that, The operation of identifying the node is performed in real time, the operation of the node is recorded and identified during the operation of the node, and the obtained identification result is synchronized to the node feature data inventory.
4. The improved blockchain DPoS consensus mechanism based on a trust mechanism according to claim 1, characterized in that, The similar node in step S4 is a node with a feature coincidence degree of 90% or above.
5. The improved method of blockchain DPoS consensus mechanism based on trust mechanism according to claim 4, characterized in that, In step S4, if the current node has votes, and the features of the node coincide with the features of the malicious node by 90% or above, the current node needs to be determined as a malicious node.
6. The improved method of blockchain DPoS consensus mechanism based on trust mechanism according to claim 1, characterized in that, In step S7, all nodes determined as malicious nodes need to participate in voting for other nodes or be voted by other nodes after three rounds of recording.
7. The improved method of blockchain DPoS consensus mechanism based on trust mechanism according to claim 1, characterized in that, If the malicious node obtains votes after three consecutive three-round recordings, the record of the malicious node is cleared. 8.The improved method of blockchain DPoS consensus mechanism based on trust mechanism of claim 1, wherein, The data of all nodes in the node feature data inventory is updated in real time. 9.The improved blockchain DPoS consensus mechanism based on a trust mechanism of claim 1, wherein, All nodes can view data in the node feature data library.
Citation Information
Patent Citations
Model training method and device, electronic equipment and storage medium
CN114169387A
Block chain consensus method based on neural network and related equipment thereof
CN115189893A