Node trustworthiness consensus method

By combining node grouping and consensus node election with blockchain records, the drone cluster node consensus is optimized, solving the problems of high communication costs and extended consensus time in traditional methods, and achieving lightweight and efficient node credibility consensus.

CN119520536BActive Publication Date: 2025-10-10NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411740188.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-10-10
Estimated Expiration
2044-11-29

AI Technical Summary

Technical Problem

When node energy is limited and computing power is low, the traditional blockchain node consensus method requires full-node communication, resulting in high communication costs and extended consensus time, making it difficult to meet the lightweight requirements of decentralized systems such as drone swarms.

Method used

Nodes are grouped and consensus nodes are elected. Abnormal behavior monitoring and consensus are carried out within the group. The credibility of consensus nodes between groups is updated. The grouping strategy is optimized to consider node location and credibility. The consensus results are recorded through the blockchain to reduce storage and communication loads.

Benefits of technology

It reduces the communication overhead of node consensus, improves consensus efficiency, adapts to network topology changes caused by node mobility, and realizes lightweight node credibility consensus.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119520536B_ABST
    Figure CN119520536B_ABST
Patent Text Reader

Abstract

The application discloses a node credibility consensus method, which comprises the following steps: grouping nodes and electing consensus nodes in each node group; each node monitors adjacent nodes in the node group, generates transaction information based on abnormal behaviors of the adjacent nodes, and sends the transaction information to the consensus nodes in the corresponding node group; credibility change information of the nodes with abnormal behaviors is generated based on the transaction information, and the credibility change information is consensused among the consensus nodes of each node group, and the credibility information of each node is updated based on the consensus result; based on the updated node credibility information, the credible nodes are screened, the credible nodes are grouped, the consensus nodes of each node group are reselected, and a new round of node credibility consensus is performed. Compared with the prior art, the application improves the judgment accuracy of malicious nodes, effectively reduces the complexity of communication, and improves the consensus efficiency. The application realizes a lightweight storage and efficient consensus blockchain scheme.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of network communication technology, and specifically relates to a node credibility consensus method, system, device and readable storage medium. Background Art

[0002] With the increasing development of network communications and other technologies, decentralized node cluster systems are being widely used in various fields. For example, drones can not only carry weapons directly for attack, but also perform auxiliary tasks on the battlefield, such as enemy reconnaissance, intelligence gathering, and information relay. However, because drone clusters operate in an open battlefield environment, they are often subject to hostile threats, which can affect the normal operation and security of the entire cluster. Therefore, in scenarios such as drone clusters, it is necessary to maintain the credibility of network nodes to ensure overall reliability.

[0003] Blockchain is essentially a distributed storage database. Due to its inherent advantages, it is relatively suitable for deployment in decentralized systems such as drone swarms to ensure the trustworthiness of node identities. However, traditional blockchains often require the storage of large amounts of block information for verification, and the consensus process consumes considerable computing resources and network bandwidth. In some current scenarios, the limited resources available for device task execution prevent excessive allocation to blockchain maintenance.

[0004] When node energy is limited and computing power is low, the classic PBFT protocol requires all nodes to communicate. As the number of nodes in the network increases, the communication cost will increase sharply. In a cluster system, the limited network bandwidth cannot support massive communication and information forwarding.

[0005] Therefore, in response to the above technical problems, it is necessary to provide a lightweight node consensus method.

[0006] The information disclosed in this background technology section is only intended to enhance understanding of the overall background of the invention and should not be regarded as an admission or any form of suggestion that the information constitutes the prior art already known to a person skilled in the art. Summary of the Invention

[0007] The purpose of the present invention is to provide a node credibility consensus method, system, device and readable storage medium, which can reduce the communication overhead of node consensus and shorten the consensus delay while ensuring the credibility of node identity.

[0008] In order to achieve the above object, a specific embodiment of the present invention provides the following technical solutions:

[0009] In a first aspect, the present invention provides a node credibility consensus method, which includes:

[0010] Group nodes and elect consensus nodes within each node group;

[0011] Each node monitors the adjacent nodes in its node group, generates transaction information based on the abnormal behavior of the adjacent nodes, and sends it to the consensus node in the corresponding node group. The transaction information includes the node information where the abnormal behavior occurred and the type of abnormal behavior;

[0012] Generate credibility change information of the node where abnormal behavior occurs based on the transaction information, reach a consensus on the credibility change information among the consensus nodes of each node group, and update the credibility information of each node based on the consensus result;

[0013] Based on the updated node credibility information, the trusted nodes are screened, the trusted nodes are grouped, and the consensus nodes of each node group are reselected to conduct a new round of node credibility consensus.

[0014] In one or more embodiments of the present invention, grouping nodes includes:

[0015] Determine the number of node groups and select the cluster centers of each node group from the cluster one by one; the first selected cluster center is any node in the cluster, and the Nth selected cluster center is the node in the cluster with the largest sum of distances to the N-1 selected cluster centers, where N is a positive integer greater than or equal to 2;

[0016] Based on each of the cluster centers, the trusted nodes in the cluster are clustered to form multiple node groups.

[0017] In one or more embodiments of the present invention, the method further comprises:

[0018] Obtain the mean of the spatial positions of each node in the node group, and select the node closest to the spatial position corresponding to the mean as the central node of the node group;

[0019] Based on the distance to the central node, a value is assigned to the nodes in the node group where the central node is located, and the distance to the central node is proportional to the size of the node assignment value.

[0020] In one or more embodiments of the present invention, the consensus node of each node group is selected, including:

[0021] Calculate the node score based on the size of the node assignment, the updated credibility of each node, and the number of times each node has served as a consensus node;

[0022] In the first round of node consensus, the consensus node of the corresponding node group is selected based on the node assignment;

[0023] In non-first-round node consensus, the consensus nodes of the corresponding node group are selected based on the node score.

[0024] In one or more embodiments of the present invention, the scoring formula is:

[0025] score=α×TVal-β×DisScoe-γ×Cnt

[0026] Among them, size(Gi) is the number of nodes in the node group Gi; num is the node assignment based on the distance from the node to the central node; score is the node score; TVal is the node's credibility; Cnt is the number of times the node serves as a consensus node; DisScore is the size of the node assignment; α, β, and γ are the preset weight values.

[0027] In one or more embodiments of the present invention, the method further comprises:

[0028] Record the number of nodes that report transaction information on the same suspicious node;

[0029] If the ratio of the reported number of nodes to the total number of nodes in the corresponding node group is greater than or equal to a preset verification threshold, the transaction information corresponding to the suspicious node is credible;

[0030] If the ratio of the reported number of nodes to the total number of nodes in the corresponding node group is less than a preset verification threshold, the transaction information corresponding to the suspicious node is unreliable.

[0031] In one or more embodiments of the present invention, the method further comprises:

[0032] Set up a preliminary consensus node in each node group;

[0033] If abnormal forwarding behavior is detected in the consensus node of the node group, the transaction information corresponding to the abnormal forwarding behavior of the consensus node is sent to the standby consensus node of the same node group;

[0034] If the transaction information corresponding to the abnormal forwarding behavior of the consensus node is credible, the preliminary consensus node initiates a consensus node change consensus to other nodes in the node group;

[0035] Based on the consensus results, a new consensus node is selected.

[0036] In one or more embodiments of the present invention, the screening of trusted nodes includes:

[0037] If the node credibility is greater than or equal to a preset first credibility threshold, the node is a fully trusted node;

[0038] If the node credibility is less than a preset first credibility threshold and greater than or equal to a preset second credibility threshold, the node is a receiving-only node which does not participate in consensus node election and cannot report transaction information; the credible node includes a fully credible node and a receiving-only node.

[0039] If the node credibility is less than a preset third credibility threshold, the node is a blacklisted node.

[0040] In one or more embodiments of the present application, the method further comprises:

[0041] generating a credibility table item of all nodes in the cluster based on the consensus result of credibility change between the consensus nodes of each node group;

[0042] filtering credible nodes based on the credibility table item, grouping the credible nodes and reselecting consensus nodes of each node group;

[0043] storing the credibility table item, node grouping information and new consensus node data of each node group in a blockchain and broadcasting a block to all credible nodes.

[0044] In one or more embodiments of the present application, the node monitors the forwarding state of adjacent nodes in the node group, comprising:

[0045] analyzing the generation time of the received information sent from adjacent nodes of the same node group and the time stamp of receiving the information to determine whether the sending node has a delayed forwarding behavior;

[0046] verifying the content of the received information sent from adjacent nodes of the same node group to determine whether the sending node tampers with the information;

[0047] creating a first table item recording adjacent nodes of the same group and a second table item recording nodes sending information to the node;

[0048] comparing the first table item and the second table item and resetting the first table item and the second table item at a preset time interval, and determining whether there is a non-forwarding behavior based on the comparison result.

[0049] Compared with the prior art, the node credibility consensus method provided by the present application macroscopically groups node networks and elects consensus nodes for each node group, respectively performs group node consensus and inter-group consensus node consensus on abnormal forwarding behavior, improves the judgment accuracy of malicious nodes, effectively reduces the complexity of communication, and improves the consensus efficiency.

[0050] Further, the application considers the influence of distance on node consensus in the Internet of Things, optimizes the grouping strategy, and takes the spatial position of the node as the grouping principle. Meanwhile, the node needs to be regrouped in each round of consensus, which can effectively counter the changes in network topology caused by node mobility.

[0051] At the node consensus level, the node credibility threshold is set, and the credibility is increased or decreased for different forwarding behaviors to reflect the node performance in real time. Meanwhile, in order to avoid the "monopoly" phenomenon of consensus nodes in each node group, that is, a few specific nodes are always elected as consensus nodes, the application establishes a scoring election mechanism for consensus nodes to prevent excessive concentration of power and encourage nodes to participate in the consensus process honestly and actively.

[0052] At the blockchain application level, the application sets up a blockchain network before executing the task, sets up a new blockchain for each task execution and discards the old blockchain storage to reduce the storage occupation of the node by the block data, and realizes a lightweight storage and efficient consensus blockchain scheme. BRIEF DESCRIPTION OF DRAWINGS

[0053] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments described in the application, and other drawings can be obtained by those skilled in the art without creative labor.

[0054] Figure 1 is a schematic diagram of a node credibility consensus scenario in an embodiment of the application;

[0055] Figure 2 is a flowchart of a node credibility consensus method in an embodiment of the application;

[0056] Figure 3 is a structural block diagram of a node credibility consensus system in an embodiment of the application;

[0057] Figure 4 is a structural block diagram of an electronic device in an embodiment of the application;

[0058] Figure 5 is a corresponding relationship diagram between the number of transactions sent and forwarded in the network and the total number of nodes in the network in an embodiment of the application in the identification of the delay forwarding scenario;

[0059] Figure 6 is a corresponding relationship diagram between the number of transactions sent and forwarded in the network and the total number of nodes in the network in an embodiment of the application in the identification of the selfish node scenario;

[0060] Figure 7 This is a graph showing the corresponding relationship between the number of transactions sent and forwarded in the network and the total number of network points in a scenario of identifying data tampering nodes in one embodiment of the present invention. DETAILED DESCRIPTION

[0061] In order to enable those skilled in the art to better understand the technical solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0062] Unless expressly stated otherwise, throughout the specification and claims, the term "comprise" or variations such as "include" or "comprising", etc., will be understood to include the stated elements or components but not to exclude other elements or other components.

[0063] Existing technical solutions include methods for achieving node trustworthiness consensus in decentralized systems. Specifically, each node detects abnormal forwarding behavior from other nodes within the cluster. When a client sends a request to the master node, the master node broadcasts the request to other nodes. The nodes then execute the three-phase consensus process of the PBFT algorithm to reach a consensus on the abnormal forwarding behavior detected by each node. After completing the three-phase process, the node returns a message to the client. When the client receives the same message from a preset number of nodes, it indicates that consensus has been successfully reached. Based on the consensus results, the client can then evaluate changes in the trustworthiness of each node.

[0064] While the PBFT algorithm can achieve node trustworthiness consensus in decentralized systems, since the classic PBFT protocol requires full-node communication, communication costs increase dramatically as the number of nodes in the network increases. In small decentralized systems like drone swarms, limited network bandwidth struggles to support massive amounts of communication and information forwarding. Furthermore, due to inherent flaws in the PBFT algorithm, the communication complexity of node trustworthiness consensus using the PBFT algorithm is excessively high, and its scalability is relatively low. Performance degrades rapidly when the number of nodes reaches a certain level. Furthermore, in unstable network conditions, consensus latency is extremely high, making it difficult to meet the requirements of some lightweight use cases. Furthermore, node mobility can lead to changes in network topology, making it difficult to cope with frequent node exits and entries.

[0065] The inventors of the present invention have discovered the main shortcomings of the existing technology and proposed a new technical implementation idea based on the shortcomings of the existing technology: cluster the nodes in the cluster according to their physical location, prioritize the consensus strategy, first conduct consensus on the nodes in the node group, and further conduct consensus on the consensus results among the consensus nodes elected by each node group. Based on the consensus results, the credibility of each node is updated. From the two aspects of grouping method and consensus mode, the complexity of communication is improved and the consensus is made lighter, reducing the communication load pressure. Before the next round of consensus begins, based on the updated node credibility, the trusted nodes are screened, re-grouped and the consensus nodes are elected. The updated grouping information and consensus nodes are recorded in the block, and the block is broadcast among the trusted nodes.

[0066] Please refer to Figure 1 , which shows a schematic diagram of an application scenario of the node credibility consensus method provided by the present invention under one embodiment. The scenario is a decentralized network composed of drones. The specific implementation scenario is: the drones are centrally managed before performing a task, and are recycled after the task is completed, and then released when the next task is performed. During the two tasks, the drones in the cluster can be managed in a centralized manner, and the credibility of the drones is guaranteed by trusted management facilities. During the execution of the task, the drones work in a decentralized manner, and there may be situations where nodes are lost, damaged, or hijacked. Therefore, the node credibility consensus method provided by the present invention can be applied, and the drone blockchain can be used to identify and eliminate these abnormal nodes to ensure the overall credibility of the task process. This implementation scenario specifically includes: drone grouping, drone blockchain network, and centralized drone management facilities.

[0067] It should be noted that communication connections are established between the drone groups, the drone blockchain network, and the centralized drone management facility. The communication network extended by the above communication connections can include various connection types, including but not limited to: wired connections, wireless connections, or fiber optic cable connections. At the same time, the communication network can be a local area network, a metropolitan area network, a wide area network, or any combination of the three.

[0068] It is understandable that, in this application scenario, the centralized drone management facility is only used for the centralized management of drones and the initialization of the decentralized blockchain network. Specifically, it includes: sending a wake-up command to the drone; after receiving the wake-up message, the drone performs a self-check and generates a public-private key pair (PubKey and PriKey) for encryption and decryption of information in this mission, as well as a signature and verification pair (SignKey and VerifyKey) for the message from the node; the successfully generated node sends this information and identity information such as ID and Mac address to the central server as a response; based on the confirmation information received, the registration server generates certificate information for each node; the registration server initializes the credibility information for each node, selects a suitable node as the consensus node for the first round of consensus, and records this information in the genesis block; distributes certificates and public-private keys; sends the genesis block to the drone nodes; and the drone nodes communicate and network to form a decentralized blockchain network.

[0069] When starting to reach a trustworthiness consensus on the decentralized drone nodes that are performing tasks, the drone nodes are first clustered and grouped based on their locations within the cluster, forming multiple drone groups as described above. Trusted nodes establish mutual supervision and detect the forwarding behavior and task execution of neighboring nodes within the group. For suspicious behaviors of neighboring nodes, such as delayed forwarding, selfish behavior, and only sending, blockchain transaction information is generated and sent to the consensus nodes elected within the group. After receiving the transaction information, the consensus node verifies it and then reaches consensus on it among the consensus nodes in each group. Based on the consensus results, a trustworthiness table for the global nodes is generated. The consensus node then uses a clustering algorithm to regroup the trusted nodes in the current network based on their location information and selects new consensus nodes from them to form the next round of consensus committees. The trustworthiness table and consensus committee node data are recorded in the drone blockchain network, and the new block is broadcast to all trusted nodes. The node updates the data and begins the next round of consensus.

[0070] It should also be noted that, under one embodiment of the present invention, a user terminal is also required to implement the node credibility consensus method. The user terminal is installed with a computer software program that matches the node credibility consensus method provided by this method, which is used for the user to configure some parameters necessary for implementing this method, such as the initial value of the node credibility, node classification, the credibility interval corresponding to different types of nodes, the credibility penalty / reward value caused by abnormal forwarding behavior, etc.; the user terminal may include but is not limited to a desktop computer (PC), desktop computer, smart phone, handheld computer, tablet computer, personal digital assistant (PDA) and other portable electronic devices or wearable electronic devices, and the embodiments of the present invention do not limit the above content.

[0071] It should also be noted that the node credibility consensus method of the embodiment of the present invention can be applied to the node credibility consensus system of the embodiment of the present invention. The node credibility consensus system can be configured on a terminal. The terminal may include but is not limited to a PC (Personal Computer), PDA (Tablet Computer), smartphone, smart wearable device, etc.

[0072] Please refer to Figure 2 FIG2 is a flow chart of a node credibility consensus method according to an embodiment of the present invention. The node credibility consensus method specifically includes the following steps:

[0073] S201: Group the nodes and elect a consensus node in each node group;

[0074] It is understood that the purpose of grouping nodes in the present invention is to achieve hierarchical intra-group and inter-group consensus, thereby reducing the amount of information forwarding required for consensus and increasing consensus efficiency. Optionally, each node can be numbered, and the corresponding nodes can be divided into a desired number of node groups based on random selection or orderly arrangement of the numbers. Alternatively, grouping can be performed based on node communication resources, so that the mean communication resource values ​​of nodes within each group are similar. The embodiments of the present invention do not limit the node grouping strategy.

[0075] It should be noted that the distance between nodes can affect the network topology of the corresponding centralized system and the communication quality between nodes. Therefore, in one embodiment of the present invention, clustering is preferably performed based on the distance between nodes. Specifically, the distance from each node in the cluster to the cluster center can be obtained. The nodes are grouped based on the Euclidean distance from each node to the cluster center. Nodes are divided into node groups corresponding to the cluster center closest to the node. The number of cluster centers should be consistent with the desired number of node groups.

[0076] Among them, the cluster center can be any point in the node distribution area, and the embodiment of the present invention does not limit the type and location of the cluster center. In order to ensure resource conservation and lightweightness during the node consensus process, it is preferred to take the nodes in the cluster as cluster centers. At the same time, it is understandable that if the selection of cluster centers is too concentrated, it may lead to large differences in the number of nodes in each node group generated, which greatly reduces the positive effect of grouping. Therefore, it is preferred to ensure that the cluster centers are relatively dispersed in the cluster.

[0077] In an exemplary embodiment of the present invention, grouping nodes includes: determining the number of node groups, and selecting the cluster center of each node group from the cluster one by one; wherein the first selected cluster center is any node in the cluster, and the Nth selected cluster center is the node in the cluster with the largest sum of distances to the selected N-1 cluster centers; based on each of the cluster centers, clustering the trusted nodes in the cluster to form multiple node groups, where N is a positive integer greater than or equal to 2.

[0078] For example, when selecting cluster centers, first randomly select a node in the cluster as the first cluster center. The second cluster center should be the node in the cluster farthest from the first cluster center. The third cluster center should be the node in the cluster with the largest sum of its distances to the first cluster center and the second cluster center. The Nth selected cluster center is the node in the cluster with the largest sum of its distances to the N-1 selected cluster centers. This process is repeated until the number of cluster centers matches the number of node groups obtained by the desired partitioning.

[0079] Based on the above exemplary embodiment, the node used as the first cluster center can be used to automatically select other cluster centers. While achieving grouping, it reduces the subjective uncertainty caused by manual selection and maximizes the beneficial effects of node grouping and hierarchical consensus. It should be noted that if there are multiple nodes with the same and farthest distance to the selected cluster centers, any one of the above nodes will be selected as the new cluster center, or a selection will be made based on the current node's credibility.

[0080] On the other hand, the consensus nodes elected within each node group not only receive information about abnormal behavior within the group but also directly participate in subsequent inter-group consensus. Therefore, consensus nodes have greater authority in credibility consensus than ordinary nodes. Therefore, the election of consensus nodes requires consideration of multiple dimensions to improve system consensus efficiency.

[0081] In an exemplary embodiment of the present invention, the consensus node of each node group is selected, including: calculating the score of the node based on the size of the node assignment, the updated credibility of each node and the number of times each node serves as a consensus node, and electing the consensus node of the corresponding node group based on the size of the score.

[0082] The size of the node assignment depends on the Euclidean distance between the node's central node and the node's spatial position. The central node of a node group is the node closest to the mean of the spatial positions of all nodes in the node group. It should be noted that in scenarios where computing resources are significantly insufficient, the node corresponding to the cluster center during clustering can be used as the central node.

[0083] It is understandable that in the first round of node consensus, since the credibility of each node is initialized to the same value and no node has ever served as a consensus node, in this first round of node consensus, the consensus node for each node group is selected based solely on the value assigned to each node. Furthermore, since the distance from the central node to itself is always 0, in the first round of node consensus, the central node of each node group is defaulted to the corresponding consensus node. In non-first-round node consensus, multiple parameters jointly determine the size of the node score. Therefore, the node score should be calculated and the consensus node of the node group should be selected based on the score size.

[0084] In an exemplary embodiment, the scoring formula is:

[0085] scoe=α×TVal-β×DisScore-γ×Cnt

[0086] Among them, size(Gi) is the number of nodes in the node group Gi; num is the node assignment based on the distance from the node to the central node; score is the node score; TVal is the node's credibility; Cnt is the number of times the node serves as a consensus node; DisScore is the size of the node assignment; α, β, and γ are the preset weight values.

[0087] It should be noted that the weights can be adaptively adjusted based on the user's needs and usage scenarios. For example, if an application scenario has extremely strict security requirements, the weight α corresponding to the node's credibility can be increased. If node resources are very unevenly distributed in an application scenario, it is important to avoid excessive concentration of power and avoid exacerbating resource imbalances. Therefore, the weight γ corresponding to the number of times a node serves as a consensus node can be increased.

[0088] On the other hand, if nodes with high scores are taken as consensus nodes, then under certain other conditions, the closer the node is to the central node of the corresponding node group, the higher the score should be. At this time, the setting of the weight value can make the scoring strategy applicable to any decentralized system without changing the system's node assignment rules. For example, in one implementation scenario, the decentralized system sets the node assignment to be inversely proportional to the distance from the node to the central node, that is, the greater the distance from the node to the central node, the smaller the node assignment. In the consensus, the weight β of the node assignment should be adaptively modified to a negative number, so that as the node assignment increases (as the distance from the node to the central node decreases), the node score increases.

[0089] S202: Each node monitors its neighboring nodes within its node group, generates transaction information based on abnormal behavior of the neighboring nodes, and sends it to the consensus node in the corresponding node group;

[0090] It should be noted that the adjacent node of the node in the present application refers to the node directly communicating and interconnecting with the node in the same node group. The transaction information includes the node information of abnormal behavior and the type of abnormal behavior. Based on the node information of abnormal behavior, the consensus node can determine the node of abnormal behavior, and the type of abnormal behavior determines the change data of the credibility of the behavior of the node after consensus. At the same time, the type of abnormal behavior can include but is not limited to: forwarding behavior, task execution behavior, etc. The present application does not limit the type of abnormal behavior and the credibility change value corresponding to different types of abnormal behavior, and can be adaptively adjusted based on the use scene.

[0091] In an exemplary embodiment, each node monitors the forwarding state of the adjacent node in the node group, including: analyzing the generation time of the information received from the adjacent node in the same node group and the time stamp of receiving the information, judging whether the sending node has delayed forwarding behavior; verifying the content of the information received from the adjacent node in the same node group, judging whether the sending node tampers the information; creating a first table item recording the adjacent node of the same group and a second table item recording the node sending information to the node; interval preset time period, compare the first table item and the second table item and reset the first table item and the second table item, and judge whether there is selfish behavior of not forwarding information based on the comparison result.

[0092] It should be noted that the time period is the time when the adjacent node in the node group at least communicates once. The setting of the time period depends on the frequency of receiving and transmitting of each node in the cluster, and the present application does not limit the specific value of the time period.

[0093] It should be further noted that when implementing the node credibility consensus method provided by the present application, a second time period should also be set. If the adjacent node has not been detected by the node for abnormal behavior within the second time period, the adjacent node reports the normal blockchain transaction information of the adjacent node to the consensus node.

[0094] In particular, the selection of the consensus node based on the above implementation can ensure the credibility of the consensus node to a certain extent, but it is still impossible to completely avoid the election of malicious nodes as consensus nodes. In view of the above situation, the present application further provides another embodiment, as follows:

[0095] A standby consensus node is set in each node group; if abnormal forwarding behavior of the consensus node of the node group is detected, the transaction information corresponding to the abnormal forwarding behavior of the consensus node is sent to the standby consensus node of the same node group; if the transaction information corresponding to the abnormal forwarding behavior of the consensus node is credible, the standby consensus node initiates a consensus node change consensus to other nodes in the node group; based on the consensus result, a new consensus node is selected.

[0096] The new consensus node can be a node in the group or a consensus node of another node group, and the application does not limit this. The election of the standby consensus node can adopt the same election strategy as the election of the consensus node. For the first round of node credibility consensus, the node with the closest Euclidean distance to the center node except the center node can be selected as the standby consensus node based on the node assignment. For non-first round election, the node with the optimal score except the consensus node can be selected as the standby consensus node based on the score of the node.

[0097] S203: generating credibility change information of the node with abnormal behavior based on the transaction information, and performing consensus on the credibility change information among the consensus nodes of each node group, and updating the credibility information of each node based on the consensus result;

[0098] It should be noted that the node credibility consensus method of the application further comprises: recording the number of nodes reporting transaction information of the same suspicious node; if the ratio of the number of reported nodes to the total number of nodes in the corresponding node group is greater than or equal to a preset verification threshold, the transaction information corresponding to the suspicious node is credible; if the ratio of the number of reported nodes to the total number of nodes in the corresponding node group is less than the preset verification threshold, the transaction information corresponding to the suspicious node is not credible.

[0099] Most of the nodes in the node group are in a state of communication interconnection. Therefore, for the abnormal behavior of the same node, there should be multiple nodes detecting the abnormal behavior. Based on this property, if the number of different nodes reporting the transaction information of the same node reaches a preset threshold, it can be considered that the node indeed has malicious behavior, and the abnormal behavior transaction information of the node is regarded as a credible message. It can be understood that in an embodiment of the application, only the credible transaction information is processed to generate credibility change information of the node with abnormal behavior; and the consensus node discards the uncredible transaction information.

[0100] For example, after the consensus node receives the suspicious behavior message of the same node, if the number of reporting nodes exceeds 2 / 3 of the total number of nodes in the current node group, the consensus node accepts the credibility change. Next, the consensus node initiates a consensus on the credibility change of the node as a client of the PBFT algorithm to the blockchain network. After the consensus of all the consensus nodes in the group, the credibility change is accepted by all the nodes.

[0101] It should be further noted that the credibility change information of the node depends on the type of abnormal behavior of the node. As described above, the embodiments of the application do not limit the type of abnormal behavior and the credibility change value corresponding to different types of abnormal behavior.

[0102] For example, the node behavior corresponding to the credibility reward and punishment strategy shown in the following table can be adopted. When a consensus node does not receive transaction information of a node or receives transaction information of the node that is not credible in a round of node credibility consensus, it is considered that the node performs normal forwarding behavior in the round of node consensus. For a node whose credibility does not reach the upper limit, the credibility value of the node can be increased; for a node whose credibility has reached the upper limit, the credibility of the node is maintained at the upper limit value and is not increased.

[0103] Table 1: Credibility reward and punishment corresponding to node behavior

[0104] Forwarding behavior type Credibility rewards and penalties Normal forwarding 0(+1) Delayed forwarding -1 Receive data but do not forward it -2 Forwarding incorrect data / tampering -3

[0105] In the embodiments of the present application, the node consensus algorithm used by the group consensus of the transaction information of the abnormal behavior or the inter-group consensus node for the change of the node credibility can include but is not limited to the Byzantine fault tolerance consensus algorithm, the Tendermint-BFT algorithm, etc., and the embodiments of the present application do not limit this.

[0106] S204: Based on the updated node credibility information, screening the credible nodes, grouping the credible nodes and reselecting the consensus nodes of each node group to perform a new round of node credibility consensus.

[0107] In an exemplary embodiment of the present application, if the node credibility is greater than or equal to a preset first credibility threshold, the node is a fully credible node; if the node credibility is less than the preset first credibility threshold and greater than or equal to a preset second credibility threshold, the node is a receiving-only node, which does not participate in the election of consensus nodes and cannot report transaction information; the credible nodes include fully credible nodes and receiving-only nodes; if the node credibility is less than a preset third credibility threshold, the node is a blacklisted node. It can be understood that the first credibility threshold is greater than the second credibility threshold, which is greater than the third credibility threshold.

[0108] The fully credible node in the network has the right to monitor the behavior of the neighboring node, generate transaction information and participate in the election to become a consensus node. The receiving-only node will not be selected as a consensus committee member in the network and only has the right to receive blocks and synchronize; the receiving-only node will obtain a credibility reward when maintaining normal forwarding behavior, and will be treated as a general node when the credibility is restored to the initial value. The blacklisted node is derived from the suspicious behavior reported in the consensus process, and the node whose credibility is reduced to the third credibility threshold due to credibility punishment. These nodes are considered to be malicious nodes and are recorded in the blacklist. In the subsequent task execution process, the blacklisted node will be excluded from the blockchain, and other nodes in the system will not forward data to this node or accept data from this node.

[0109] In particular, reconnected nodes in the network—that is, nodes that have lost contact with other nodes for a period of time and then rejoined the network—need to reset their trustworthiness upon rejoining the network. This reset trustworthiness should be less than the first trustworthiness threshold and greater than the third trustworthiness threshold. This means that reconnected nodes in the network are configured as receive-only nodes.

[0110] It should be noted that the node credibility consensus method provided by the present invention also includes: generating credibility table entries for all nodes in the cluster based on the consensus results of credibility changes between the consensus nodes of each node group; screening trusted nodes based on the credibility table entries, grouping the trusted nodes, and reselecting consensus nodes for each node group; storing the credibility table entries, node grouping information, and new consensus node data for each node group in the blockchain, and broadcasting the block to all trusted nodes. The characteristics of blockchain include decentralization, immutability, transparency, security, and programmability. Each data block is linked to the previous block, forming a continuous chain, which ensures the integrity and security of the node history.

[0111] In order to further illustrate the remarkable effects of the present invention, a specific control experiment is given as follows:

[0112] To evaluate the performance of the proposed method, a simulation was conducted using OMNeT++ 6.03. The network was set to generate a new block every 500ms, in which changes in the credibility of all nodes were recorded. Initial values ​​were set using OMNeT's initial file to simulate the initial setup phase. During the network maintenance phase, message forwarding was configured to simulate the generation and forwarding of transactions and blocks, as well as the selection of consensus nodes.

[0113] In the experimental comparison, the general PBFT algorithm reaches consensus among all nodes; the YPBFT algorithm randomly selects a portion of nodes as consensus nodes, and the other nodes only receive the consensus results; the LPBFT algorithm is the node credibility consensus algorithm provided by the present invention.

[0114] In the simulation, the initial credibility of a node was set to 10. After the credibility dropped to 5, the node could only accept blocks. When the credibility dropped to 0 or below, the node was identified as a malicious node and added to the blacklist. In the experiment, three types of malicious nodes were simulated in the network: delayed forwarding, non-forwarding, and data tampering. The credibility changes were set to -1, -2, and -3, respectively.

[0115] In the experiment, a new blockchain is generated and sent by the current leader node (randomly selected from the consensus committee nodes) every 500 ms of simulation time. According to the recorded number of malicious nodes, it can be determined whether a new malicious node is identified. The number of blocks generated during this period is used as a measure of consensus latency. The number of blocks required for different types of malicious nodes to be confirmed is shown in Table 2.

[0116] Table 2 Number of blocks required for different types of malicious nodes to be confirmed

[0117]

[0118] Based on the above table, it can be seen that compared with the prior art, the node credibility consensus algorithm provided by the present application requires fewer blocks on average for the identification of three different types of abnormal forwarding. That is, the consensus latency of the node credibility consensus algorithm provided by the present application is significantly improved compared with the prior art.

[0119] In the simulation experiment, the number of transactions sent and forwarded in the network is used as a measure of blockchain communication overhead. This experiment examines the network communication overhead during the consensus of a single malicious node in the system. The test results are shown in Figure 5-7 Specifically, Figure 5 for the scenario of identifying a delayed forwarding node; Figure 6 for the scenario of identifying a selfish node; Figure 7 for the scenario of identifying a data tampering node.

[0120] The number of transactions required by the node to reach consensus with different types of malicious nodes decreases with the severity of the malicious node behavior. That is, the more severe the malicious behavior, the faster it is identified as a malicious node by the network and expelled from the network. At the same time, under the same malicious behavior and the same total number of nodes, the LPBFT algorithm requires fewer sending and forwarding than the traditional PBFT algorithm and the YPBFT algorithm, which confirms the superiority of the present application in reducing communication overhead and improving consensus efficiency.

[0121] Please refer to Figure 3 Based on the same inventive concept as the aforementioned node credibility consensus method, an embodiment of the present application provides a node credibility consensus system 300, which includes a grouping module 301, a monitoring module 302, a consensus module 303, and an updating module 304.

[0122] Specifically, the grouping module 301 is used to group the nodes and elect a consensus node in each node group; the monitoring module 302 is used to enable each node to monitor the adjacent nodes in its node group, generate transaction information based on the abnormal behavior of the adjacent nodes, and send it to the consensus node in the corresponding node group, the transaction information includes the node information of the abnormal behavior and the type of abnormal behavior; the consensus module 303 is used to generate the credibility change information of the node where the abnormal behavior occurs based on the transaction information, and reach a consensus on the credibility change information among the consensus nodes of each node group, and update the credibility information of each node based on the consensus result; the update module 304 is used to screen the trusted nodes based on the updated node credibility information, group the trusted nodes and reselect the consensus nodes of each node group to conduct a new round of node credibility consensus.

[0123] Please refer to Figure 4 As shown, an embodiment of the present invention further provides an electronic device 400, which includes at least one processor 401, a memory 402 (e.g., a non-volatile memory), a storage 403, and a communication interface 404, and the at least one processor 401, the memory 402, the storage 403, and the communication interface 404 are connected together via a bus 405. The at least one processor 401 is used to call at least one program instruction stored or encoded in the memory 402, so that the at least one processor 401 performs various operations and functions of the node credibility consensus method described in various embodiments of this specification.

[0124] In the embodiments of the present specification, the electronic device 400 may include but is not limited to: a personal computer, a server computer, a workstation, a desktop computer, a laptop computer, a notebook computer, a mobile electronic device, a smart phone, a tablet computer, a cellular phone, a personal digital assistant (PDA), a handheld device, a messaging device, a wearable electronic device, a consumer electronic device, and the like.

[0125] An embodiment of the present invention also provides a computer-readable medium, which carries computer-executable instructions. When the computer-executable instructions are executed by a processor, they can be used to implement the various operations and functions of the node credibility consensus method described in the various embodiments of this specification.

[0126] The computer-readable medium in the present invention can be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer 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 of the above. In the present invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device.

[0127] In the present invention, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination thereof.

[0128] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take 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.) containing computer-usable program code.

[0129] The present invention is described with reference to flowcharts and / or block diagrams of methods, apparatuses, systems, and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts 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, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. 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.

[0130] The foregoing descriptions of specific exemplary embodiments of the present invention are for purposes of illustration and description. These descriptions are not intended to limit the invention to the precise forms disclosed, and it is apparent that many variations and modifications are possible in light of the foregoing teachings. The exemplary embodiments have been selected and described for the purpose of explaining the specific principles of the invention and their practical application, thereby enabling those skilled in the art to realize and utilize a variety of exemplary embodiments of the invention and various options and modifications. The scope of the invention is intended to be defined by the claims and their equivalents.

[0131] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above and that the invention can be embodied in other specific forms without departing from the spirit or essential characteristics of the invention. Therefore, the embodiments should be considered in all respects as illustrative and non-restrictive, and the scope of the invention is defined by the appended claims, not the foregoing description, and all variations within the meaning and range of equivalents of the claims are intended to be included therein. Any reference sign in a claim should not be construed as limiting the claim to which it relates.

[0132] In addition, it should be understood that although this specification is described in terms of implementation methods, not every implementation method contains only one independent technical solution. This narrative method of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment can also be appropriately combined to form other implementation methods that can be understood by those skilled in the art.

Claims

1. A node credibility consensus method, characterized in that: include: Group nodes and elect consensus nodes within each node group; Each node monitors the adjacent nodes in its node group, generates transaction information based on the abnormal behavior of the adjacent nodes, and sends it to the consensus node in the corresponding node group. The transaction information includes the node information where the abnormal behavior occurred and the type of abnormal behavior; Generate credibility change information of the node where abnormal behavior occurs based on the transaction information, reach a consensus on the credibility change information among the consensus nodes of each node group, and update the credibility information of each node based on the consensus result; Based on the updated node credibility information, the trusted nodes are screened, the trusted nodes are grouped, and the consensus nodes of each node group are reselected to conduct a new round of node credibility consensus.

2. The node credibility consensus method according to claim 1, characterized in that: Grouping nodes involves: Determine the number of node groups and select the cluster centers of each node group from the cluster one by one; the first selected cluster center is any node in the cluster, and the Nth selected cluster center is the node in the cluster with the largest sum of distances to the N-1 selected cluster centers, where N is a positive integer greater than or equal to 2; Based on each of the cluster centers, the trusted nodes in the cluster are clustered to form multiple node groups.

3. The node credibility consensus method according to claim 1, characterized in that: The method further comprises: Obtain the mean of the spatial positions of each node in the node group, and select the node closest to the spatial position corresponding to the mean as the central node of the node group; Based on the distance to the central node, a value is assigned to the nodes in the node group where the central node is located, and the distance to the central node is proportional to the size of the node assignment value.

4. The node credibility consensus method according to claim 3, characterized in that: Select the consensus nodes of each node group, including: Calculate the node score based on the size of the node assignment, the updated credibility of each node, and the number of times each node has served as a consensus node; In the first round of node consensus, the consensus node of the corresponding node group is selected based on the node assignment; In non-first-round node consensus, the consensus nodes of the corresponding node group are selected based on the node scores.

5. The node credibility consensus method according to claim 4, characterized in that: The scoring formula is: ; in, is the node score, is the credibility of the node; The number of times the node has served as a consensus node; The size of the value assigned to the node; 、 、 The preset weight value.

6. The node credibility consensus method according to claim 1, characterized in that: The method further comprises: Record the number of nodes that report transaction information on the same suspicious node; If the ratio of the reported number of nodes to the total number of nodes in the corresponding node group is greater than or equal to a preset verification threshold, the transaction information corresponding to the suspicious node is credible; If the ratio of the reported number of nodes to the total number of nodes in the corresponding node group is less than a preset verification threshold, the transaction information corresponding to the suspicious node is unreliable.

7. The node credibility consensus method according to claim 6, characterized in that: The method further comprises: Set up a preliminary consensus node in each node group; If abnormal forwarding behavior is detected in the consensus node of the node group, the transaction information corresponding to the abnormal forwarding behavior of the consensus node is sent to the standby consensus node of the same node group; If the transaction information corresponding to the abnormal forwarding behavior of the consensus node is credible, the preliminary consensus node initiates a consensus node change consensus to other nodes in the node group; Based on the consensus results, a new consensus node is selected.

8. The node credibility consensus method according to claim 1, characterized in that: The screening of trusted nodes includes: If the node credibility is greater than or equal to a preset first credibility threshold, the node is a fully trusted node; If the node credibility is less than a preset first credibility threshold and greater than or equal to a preset second credibility threshold, the node is a receive-only node. The receive-only node does not participate in consensus node election and cannot report transaction information. The trusted nodes include fully trusted nodes and receive-only nodes. If the node credibility is less than a preset third credibility threshold, the node is a blacklist node.

9. The node credibility consensus method according to claim 8, characterized in that: The method further comprises: Generate a credibility table entry for all nodes in the cluster based on the consensus result of credibility change among the consensus nodes of each node group; Filtering trusted nodes based on the credibility table, grouping the trusted nodes and reselecting consensus nodes for each node group; The credibility table items, node grouping information, and new consensus node data of each node group are stored in the blockchain, and the block is broadcast to all trusted nodes.

10. The node credibility consensus method according to claim 1, characterized in that: Each node monitors the forwarding status of adjacent nodes in its node group, including: Parsing the generation time and the timestamp of the information received from the adjacent nodes in the same node group to determine whether the sending node has delayed forwarding behavior; Verify the content of the information received from adjacent nodes in the same node group to determine whether the sending node has tampered with the information; Create a first table entry that records adjacent nodes in the same group and a second table entry that records nodes that send information to the current node; compare the first table entry and the second table entry at preset time intervals and reset the first table entry and the second table entry, and determine whether there is any behavior of not forwarding information based on the comparison result.

Citation Information

Patent Citations

  • Block chain node consensus method and device, equipment and medium

    CN115314369A

  • Transaction processing method and device based on block chain, equipment and medium

    CN116957792A