Asynchronous node event consensus method and device, electronic equipment and storage medium

By adopting the event consensus method of asynchronous nodes in the ad hoc network, and using performance data to schedule event propagation, the problem of low consensus efficiency in low throughput and narrow bandwidth environments is solved, and efficient and dynamic event consensus is achieved.

CN120151345AActive Publication Date: 2025-06-13BEIJING UNIV OF POSTS & TELECOMM
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510210564.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-25
Publication Date
2025-06-13
Estimated Expiration
2045-02-25

AI Technical Summary

Technical Problem

In ad hoc networking, the prior art is difficult to achieve efficient event consensus in low throughput, narrow bandwidth and weak connection environments, and lacks real-time dynamic scheduling and fast adaptive message selection strategies, resulting in low consensus efficiency between nodes.

Method used

An event consensus method for asynchronous nodes is proposed. By using multiple nodes as event nodes in the communication system and performing consensus operations based on events, acquiring performance data of the target node, determining the next event node that receives the event, and updating the performance data, to achieve accurate scheduling and reducing redundant event transmission.

Benefits of technology

It improves the consensus efficiency between nodes, reduces redundant event transmission, adapts to changes in dynamic topological structures, and maintains efficient event consensus in weak connection and high-latency scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120151345A_ABST
    Figure CN120151345A_ABST
Patent Text Reader

Abstract

The invention provides an event consensus method and device for asynchronous nodes, electronic equipment and a storage medium, and the method comprises the steps: executing at least one round of consensus operation: responding to a node which does not receive an event, and obtaining the performance data of a current round; determining a next event node, and sending the event to the next event node; updating the performance data; aiming at the event nodes, taking the target node of which the next event node is removed as the target node of the next round, and taking the screened performance data as the performance data of the next round; for the next event node, taking the plurality of nodes as target nodes of the next round, and taking the performance data corresponding to the plurality of nodes as performance data of the next round; taking the event node of the current round and the next event node as all event nodes in the next round; and in response to determining that no node which does not receive the event exists, quitting at least one round of consensus operation, thereby solving the technical problem of low consensus efficiency between nodes with a communication relationship in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technologies, and in particular, to an event consensus method, apparatus, electronic device, and storage medium for asynchronous nodes. Background Art

[0002] Due to its high degree of dynamicity, self-organizing ability, and flexibility, the ad-hoc network technology has broad application prospects in modern communication. In an ad-hoc network, the node hardware platforms are diverse, the computing capabilities and link bandwidths vary significantly, and weak connections and high packet loss are common. Traditional consensus algorithms with high requirements are difficult to apply. At the same time, the frequent online and offline or movement of nodes leads to continuous changes in the topological structure. Especially in the absence of dynamic evaluation and adjustment, it is easy to generate redundant event propagation and invalid operations, further slowing down the consensus speed.

[0003] Especially for more complex communication scenarios such as low-throughput narrow bandwidth, uneven node reputations, and dynamic changes in the online status, the following limitations also exist:

[0004] 1. Lack of real-time dynamic scheduling

[0005] Relying solely on clustering or asynchronous propagation, it is difficult to accurately schedule the propagation process based on the latest status and historical performance of nodes, resulting in a large number of redundant event transmissions still possible in weak connection and high-latency scenarios, thereby leading to low consensus efficiency among nodes.

[0006] 2. Lack of a fast adaptive message selection strategy

[0007] When the number of nodes is large and the state iteration is frequent, only relying on the topological optimization of clustering is not sufficient to find the optimal event propagation path at the whole network level. Without a directional transmission and load balancing mechanism, it is possible that a single cluster or a few high-computing-power nodes are overloaded, resulting in event redundancy and slowing down the consensus efficiency. Summary of the Invention

[0008] In view of this, the purpose of the present application is to propose an event consensus method, apparatus, electronic device, and storage medium for asynchronous nodes to overcome all or part of the deficiencies in the prior art.

[0009] For the above purposes, the present application provides an event consensus method for asynchronous nodes, which is applied to a communication system. The communication system includes multiple nodes with communication relationships. The method includes: regarding each node in at least one starting node that receives an event among the multiple nodes as an event node, and regarding the multiple nodes as the target nodes corresponding to each event node; based on the event, performing at least one round of consensus operation so that each node among the multiple nodes receives the event; each round of consensus operation is performed as follows: for each event node, in response to determining that there is a node among the target nodes corresponding to the event node that has not received the event, obtaining the performance data of the target nodes in the current round; based on the performance data, determining the next event node that receives the event, and sending the event from the event node to the next event node; based on the event, updating the performance data; for the event node, regarding the target nodes after excluding the next event node as the target nodes corresponding to the event node in the next round of consensus operation, using the target nodes after excluding the next event node to screen the updated performance data, and taking the screened performance data as the performance data of the target nodes corresponding to the event node in the next round of consensus operation; for the next event node, regarding the multiple nodes as the target nodes corresponding to the next event node in the next round of consensus operation, and taking the performance data corresponding to the multiple nodes as the performance data of the target nodes corresponding to the next event node in the next round of consensus operation; regarding each event node in the current round and the next event node determined by each event node as all the event nodes in the next round of consensus operation; in response to determining that there is no node among the target nodes corresponding to the event node that has not received the event, exiting at least one round of consensus operation.

[0010] Optionally, the determining, based on the performance data, the next event node that receives the event includes: for each node among the target nodes, determining the target reputation value corresponding to the node based on the performance data; determining the target probability distribution value corresponding to the node based on the target reputation value; determining the event transition probability matrix corresponding to the target nodes based on all the target probability distribution values; generating a random number within a predetermined range, and determining the next event node based on the event transition probability matrix and the random number.

[0011] Optionally, the determining the target probability distribution value corresponding to the node based on the target reputation value includes: determining the target probability distribution value through the following formula: where, π target,i is the target probability distribution value of the i-th node, R′(i) is the target reputation value of the i-th node, δ i is the adaptive smoothing amount of the i-th node, δ jis the adaptive smoothing amount of the j-th node, and R′(n) is the sum of the target reputation values of the target nodes with a total number of n.

[0012] Optionally, determining the event transition probability matrix corresponding to the target node based on all the target probability distribution values includes: constructing an initial event transition probability matrix that satisfies a predetermined probability storage order based on the target node; using a predetermined summation matrix and all the target probability distribution values to correct the initial event transition probability matrix to obtain the event transition probability matrix.

[0013] Optionally, determining the target reputation value corresponding to the node based on the performance data includes: determining the basic reputation value, the current reputation value, and the historical reputation value of the node based on the performance data; performing a weighted sum on the basic reputation value, the current reputation value, and the historical reputation value to obtain an overall reputation value; performing a smoothing process on the overall reputation value to obtain the target reputation value.

[0014] Optionally, performing a smoothing process on the overall reputation value to obtain the target reputation value includes: performing a smoothing process on the overall reputation value through the following formula: R′(i) = (1 - r)·ln(1 + R(i)) + r·R(i), where R′(i) is the target reputation value of the i-th node, R(i) is the overall reputation value of the i-th node, and r is a predetermined adjustment parameter.

[0015] Optionally, determining the next event node based on the event transition probability matrix and the random number includes: searching in the event transition probability matrix for multiple probability parameters corresponding to the nodes that initiate event transitions with the event node; sorting the multiple probability parameters in a predetermined probability storage order to obtain a first sequence; for each probability parameter, adding the probability parameter to all the probability parameters located before it in the first sequence to obtain a probability comparison value; sorting all the probability comparison values and the random number in ascending order to obtain a second sequence, and determining the sorting serial number corresponding to the random number in the second sequence as the target serial number; searching in the first sequence for the target probability parameter corresponding to the target serial number; and determining the node that receives the event transition corresponding to the target probability parameter as the next event node.

[0016] Based on the same inventive concept, the present application further provides an event consensus device for an asynchronous node, which is applied to a communication system. The communication system includes a plurality of nodes having a communication relationship. The device includes: a receiving module configured to use each node in at least one starting node that receives an event among the plurality of nodes as an event node, and use the plurality of nodes as target nodes corresponding to each event node; a consensus operation module configured to perform at least one round of consensus operation based on the event so that each node among the plurality of nodes receives the event. The consensus operation module is further configured to perform the following for each round of consensus operation: for each event node, in response to determining that there is a node among the target nodes corresponding to the event node that has not received the event, obtain the performance data of the target nodes in the current round; based on the performance data, determine the next event node that receives the event, and send the event from the event node to the next event node; update the performance data based on the event; for the event node, use the target nodes after excluding the next event node as the target nodes corresponding to the event node in the next round of consensus operation, screen the updated performance data by using the target nodes after excluding the next event node, and use the screened performance data as the performance data of the target nodes corresponding to the event node in the next round of consensus operation; for the next event node, use the plurality of nodes as the target nodes corresponding to the next event node in the next round of consensus operation, and use the performance data corresponding to the plurality of nodes as the performance data of the target nodes corresponding to the next event node in the next round of consensus operation; use each event node in the current round and the next event node determined by each event node together as all event nodes in the next round of consensus operation; in response to determining that there is no node among the target nodes corresponding to the event node that has not received the event, exit at least one round of consensus operation.

[0017] Based on the same inventive concept, the present application further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable by the processor. When the processor executes the computer program, the above-mentioned method is implemented.

[0018] Based on the same inventive concept, the present application further provides a non-transitory computer-readable storage medium. The non-transitory computer-readable storage medium stores computer instructions for causing a computer to execute the above-mentioned method.

[0019] As can be seen from the above, the asynchronous node event consensus method, apparatus, electronic device, and storage medium provided by this application. The method includes using each node in at least one starting node that receives an event among multiple nodes as an event node, and using the multiple nodes as target nodes corresponding to each event node; based on the event, performing at least one round of consensus operation so that each node among the multiple nodes receives the event; each round of consensus operation is performed as follows: for each event node, in response to determining that there are nodes among the target nodes corresponding to the event node that have not received the event, obtaining performance data of the target nodes in the current round; based on the performance data, determining the next event node that receives the event, and sending the event from the event node to the next event node; based on the event, updating the performance data; for the event node, using the target nodes after removing the next event node as the target nodes corresponding to the event node in the next round of consensus operation, screening the updated performance data using the target nodes after removing the next event node, and using the screened performance data as the performance data of the target nodes corresponding to the event node in the next round of consensus operation; for the next event node, using the multiple nodes as the target nodes corresponding to the next event node in the next round of consensus operation, and using the performance data corresponding to the multiple nodes as the performance data of the target nodes corresponding to the next event node in the next round of consensus operation; using each event node in the current round and the next event node determined by each event node together as all event nodes in the next round of consensus operation; in response to determining that there are no nodes among the target nodes corresponding to the event node that have not received the event, exiting at least one round of consensus operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in this application or related technologies, the following will briefly introduce the drawings required for use in the description of the embodiments or related technologies. Obviously, the drawings in the following description are only embodiments of this application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0021] Figure 1 It is a flowchart of the asynchronous node event consensus method according to an embodiment of this application;

[0022] Figure 2 It is a schematic diagram of the consensus architecture between nodes according to an embodiment of this application;

[0023] Figure 3 It is a schematic diagram of the consensus event selection and propagation strategy based on probability according to an embodiment of this application;

[0024] Figure 4It is a schematic flowchart of the dynamic multi-dimensional credit evaluation according to the embodiments of the present application;

[0025] Figure 5 It is a schematic structural diagram of the event consensus device of the asynchronous node according to the embodiments of the present application;

[0026] Figure 6 It is a schematic hardware structure diagram of an electronic device according to the embodiments of the present application. Detailed implementation manners

[0027] To make the objectives, technical solutions, and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to specific embodiments and the accompanying drawings.

[0028] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should have the ordinary meanings understood by those of ordinary skill in the art to which the present application belongs. The "first", "second", and similar terms used in the embodiments of the present application do not denote any order, quantity, or importance, but are only used to distinguish different components. The terms such as "including" or "comprising" mean that the elements or objects appearing before this word cover the elements or objects listed after this word and their equivalents, without excluding other elements or objects. The terms such as "connected" or "coupled" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The terms such as "upper", "lower", "left", and "right" are only used to represent relative positional relationships, and when the absolute position of the object being described changes, the relative positional relationship may also change accordingly.

[0029] As described in the background art section, with the rapid development of the Internet, the network scale has been continuously expanding, and the network topology has become increasingly complex. In some special scenarios (such as emergency communication, post-disaster rescue, etc.), due to damaged infrastructure or limited conditions, it is difficult for the network to rely on traditional centralized facilities, and it is often necessary to quickly construct and deploy a decentralized and centerless self-organizing network. Self-organizing network technology has broad application prospects in modern communication due to its high dynamics, self-organizing ability, and flexibility. For example, in smart homes, self-organizing network technology can achieve the interconnection and interoperability of various devices within a home, improving the convenience and comfort of life. In the field of industrial automation, self-organizing networks can achieve real-time communication and data transmission between devices, improving production efficiency and intelligent levels. Among them, the above devices can be regarded as nodes. In addition, self-organizing networks are also widely used in fields such as emergency communication, wireless sensor networks, unmanned driving, and network monitoring.

[0030] However, self-organizing networks face problems such as link heterogeneity, narrow bandwidth, unstable nodes, dynamic online and offline, etc., which often limit the communication quality between nodes, resulting in high latency, high packet loss rate, and low throughput, greatly increasing the difficulty of achieving network consensus. In these applications, the connection links between nodes are diverse and often face challenges of low throughput, narrow bandwidth, and weak connections. For example, in remote areas or complex terrains, communication signals are easily interfered with, leading to unstable network connections. In a monitoring network, the network bandwidth status of different network nodes changes dynamically. In some distributed systems, such as large-scale data monitoring networks across regions, devices may be deployed in different cities, and the bandwidth resources between these devices will fluctuate dynamically due to environmental conditions and load changes. In this case, how to ensure the real-time synchronization of monitoring data and the rapid update of monitoring strategies is the core issue for the stable operation of the communication system. In such an environment, the consensus mechanism is particularly important because it can ensure that each node in the network can still reach a consistent data state in the face of communication interruptions, data loss, and node failures, achieving global aggregation. This is crucial for maintaining the stability and reliability of the network.

[0031] Although the consensus mechanism plays an important role in self-organizing networks, existing consensus algorithms still face many challenges in environments with low throughput, narrow bandwidth, and weak connections. First of all, many consensus algorithms do not fully consider the limitations of network bandwidth during design, resulting in a large consumption of bandwidth resources during data transmission. For example, traditional Byzantine fault-tolerant algorithms (such as PBFT) maintain a high message complexity both under normal circumstances and in the case of leader failures, which will lead to an increase in communication latency and slow down the consensus efficiency in a bandwidth-constrained environment. Secondly, the complexity and computational overhead of consensus algorithms are relatively large, which is a challenge for resource-constrained self-organizing network nodes. For example, some blockchain-based consensus algorithms require complex cryptographic calculations and verification processes, which not only increase the computational burden on nodes but may also lead to a decrease in the consensus speed. In addition, the dynamic topology of self-organizing networks also poses difficulties for consensus algorithms because the joining and leaving of nodes are frequent and unpredictable, which may lead to information loss and inconsistencies between nodes during the consensus process. Therefore, how to design lightweight, low-bandwidth-consuming, and consensus algorithms that can adapt to dynamic topology changes is an important research direction in the current development of self-organizing network technology.

[0032] In order to better adapt to dynamic topology and reduce synchronization overhead, some existing technologies have begun to try to use the directed acyclic graph (DAG) structure of hash graph to record the events and state evolution of nodes in the network. Unlike traditional blockchains, hash graphs form topological structures through direct references between events, allowing nodes to exchange event information with each other in an asynchronous manner of "gossip", thereby reducing the reliance on strict synchronization in a network environment with weak connections and narrow bandwidth. At the same time, in ad hoc networks, a common way of organizing networks is to cluster nodes, that is, according to factors such as geographical location or signal strength, nodes with close distance (or communication quality) are aggregated into a cluster, and the cluster head node is responsible for cluster management and cross-cluster communication. Clustering can reduce the number of direct communications across the entire network, shorten some data transmission paths, and improve the scalability and management efficiency of the network. Combining hash graphs with clustering has also become a way of coping with frequent changes in network topology and weak connections in some solutions.

[0033] However, the idea of ​​combining hash graph with clustering alone still has some shortcomings in the actual system: on the one hand, the dynamic differences in performance between nodes are not fully considered, and redundant propagation may occur when the connection is weak or the bandwidth is extremely limited; on the other hand, it is impossible to effectively determine the optimal path for event propagation at the network level, and there is a lack of real-time feedback and adjustment mechanism for nodes with different performance and unstable status. This method performs well in a topologically stable environment, but in the low-throughput and narrow-bandwidth environment of self-organizing networks, random and blind propagation methods are prone to redundant communication, resulting in bandwidth waste, increased propagation delays, and even load imbalance. Therefore, how to further reduce the amount of communication, improve consensus efficiency, and adapt to the dynamic changes in node reputation based on the asynchronous propagation of hash graphs is still an important problem to be solved.

[0034] In summary, using hash graphs to achieve asynchronous consensus and clustering nodes to reduce communication burden can solve some problems caused by frequent changes in network topology to a certain extent. However, for more complex real-world scenarios such as low throughput and narrow bandwidth, uneven node reputation, and dynamic changes in online status, there are still the following obvious limitations:

[0035] 1. Lack of real-time dynamic scheduling

[0036] It is difficult to accurately schedule the propagation process based on the latest status and historical performance of the nodes by relying solely on clustering or asynchronous propagation, which may result in a large number of redundant event transmissions in weak connection and high latency scenarios, leading to low consensus efficiency between nodes.

[0037] 2. Lack of fast and adaptive message selection strategy

[0038] When the number of nodes is huge and the state iteration is frequent, relying solely on the topological optimization of clustering is not sufficient to find the optimal event propagation path at the whole network level. Without a directional transmission and load balancing mechanism, single clusters or a few high-computing nodes may be overloaded, and even new bottlenecks may form, resulting in event redundancy and slowing down the consensus efficiency.

[0039] In view of this, the embodiments of the present application propose an event consensus method for asynchronous nodes, referring to Figure 1 , which is applied to a communication system. The communication system includes a plurality of nodes with communication relationships, and the method includes the following steps:

[0040] Step 101, each node in at least one starting node that receives an event among the plurality of nodes is used as an event node, and the plurality of nodes are used as target nodes corresponding to each event node.

[0041] In this step, the hashgraph adopts a unique "gossip protocol" (Gossip protocol) and a virtual voting mechanism to ensure the rapid propagation of transaction information and the consensus on the transaction order, providing a decentralized, secure and efficient solution for distributed systems. In the hashgraph, nodes spread information through the Gossip protocol. Each node will spread the events it knows to other nodes and record the timestamps and order of the spread. This propagation method ensures that information can be quickly and widely spread throughout the network. Subsequently, nodes will conduct virtual voting based on the received information and timestamps to confirm the validity of the transaction and reach a consensus. The multiple nodes in the present application form a hashgraph and are nodes in a self-organizing network. In addition, the nodes in the present application are asynchronous nodes, where an asynchronous node refers to a node that can operate independently without waiting for synchronization signals or event completion from other nodes in an asynchronous execution environment.

[0042] The present application uses a hashgraph as the infrastructure for recording and tracking events, and cooperates with an asynchronous Gossip protocol to spread events among nodes, thus avoiding the excessive dependence of traditional consensus algorithms on synchronization and stable topologies. As Figure 2 shown, the hashgraph model serves as the basic layer, representing the historical record of events through a directed acyclic graph (DAG). Each event contains a timestamp and associated information. The clustering mechanism serves as the organizational layer of the network, providing a dynamic way of node management and communication. The hashgraph consensus propagation uses the Gossip protocol to spread events by randomly selecting neighbor nodes.

[0043] A node can receive an event. Each node among at least one starting node that has received the event among multiple nodes is used as an event node. When a node has not received the event before and newly receives the event, the node is used as an event node. All nodes in the communication system are used as the target nodes corresponding to each event node. By naming the nodes, the purpose of differentiating different nodes is achieved.

[0044] Step 102: Based on the event, perform at least one round of consensus operation so that each node among the multiple nodes receives the event.

[0045] In this step, when an event node receives an event, it performs at least one round of consensus operation so that each node among the multiple nodes receives the event. Among them, the consensus operation refers to the process in a distributed system where multiple nodes reach an agreement on a certain event through specific algorithms and protocols. By performing at least one round of consensus operation, the purpose of data consistency among nodes is achieved.

[0046] It should be noted that the communication system can perform consensus operations on multiple events simultaneously.

[0047] Step 103: Each round of consensus operation is performed as follows: For each event node, in response to determining that there are nodes among the target nodes corresponding to the event node that have not received the event, obtain the performance data of the target nodes in the current round.

[0048] In this step, for each event node, if there are nodes among the target nodes corresponding to the event node that have not received the event, it indicates that the consensus operation for this event in the current round has not been completed. Obtain the performance data of the target nodes in the current round. Among them, the performance data is data associated with the ability of a node to process events. Exemplarily, the performance data includes the remaining computing power of the node, network bandwidth, node security, latency response, packet integrity, node response speed, and response time, etc. The performance data includes sub-performance data corresponding to each node.

[0049] Step 104: Based on the performance data, determine the next event node to receive the event, and send the event from the event node to the next event node.

[0050] In this step, if the dynamic differences in performance between nodes are not considered, relying solely on the topological optimization of clustering is not sufficient to find the optimal event propagation path at the network-wide level, resulting in a large number of redundant event transmissions and thus a low consensus efficiency among nodes. To solve the above problems, this application determines the next event node for receiving an event based on performance data that can reflect the event processing capabilities of nodes, and sends the event from the event node to the next event node. Through the performance data of the current round, the event can be preferentially sent to the next event node with relatively stronger event processing capabilities, achieving the purpose of precise scheduling of events. At the same time, the possibility of generating a large number of redundant events is reduced, thereby improving the consensus efficiency among nodes.

[0051] It should be noted that the event node and the next event node can be the same node or different nodes.

[0052] Step 105: Update the performance data based on the event.

[0053] In this step, since the event node may process the event after receiving it, which will change the current event processing capabilities of the node. Therefore, it is necessary to find the sub-performance data corresponding to the event node and the sub-performance data corresponding to the next event node in the performance data, and update the sub-performance data corresponding to the event node and the sub-performance data corresponding to the next event node based on the event. By updating the performance data, the real-time nature and accuracy of the performance data are ensured.

[0054] Step 106: For the event node, use the target nodes after removing the next event node as the target nodes corresponding to the event node in the next round of consensus operation, and use the target nodes after removing the next event node to screen the updated performance data, and use the screened performance data as the performance data of the target nodes corresponding to the event node in the next round of consensus operation.

[0055] In this step, since the consensus operation in the current round is not the last round of consensus operation and the next round of consensus operation is still required, based on the data of the current round, the data to be used in the next round is determined. Also, since the event node has already sent the event to the target node, in the next round of consensus operation, it is not necessary to send the event to the next event node again. The target node after removing the next event node is used as the target node corresponding to this event node in the next round of consensus operation. At this time, the performance data corresponding to the target node has also changed. The updated performance data is filtered using the target node after removing the next event node, and the sub-performance data corresponding to the next event node is removed from all the performance data. The filtered performance data is used as the performance data of the target node corresponding to this event node in the next round of consensus operation. By determining the data of this event node in the next round of consensus operation through the data of the current round of consensus operation, the purpose of dynamically updating the data of the next round of consensus operation is achieved, ensuring the accuracy of the data participating in the next round of consensus operation, so that subsequent accurate scheduling of events can be made according to the latest status of the nodes.

[0056] Step 107: For the next event node, use the multiple nodes as the target nodes corresponding to the next event node in the next round of consensus operation, and use the performance data corresponding to the multiple nodes as the performance data of the target nodes corresponding to the next event node in the next round of consensus operation.

[0057] In this step, since the next event node has already received the event, in the next round of consensus operation, the next event node can also continue to consensus the event with other nodes. Therefore, it is necessary to determine the data used by the next event node in the next round of consensus operation. Since the next event node receives the event for the first time, the target nodes of the next event node are all the nodes in the communication system. From this, it can also be seen that the events between the nodes in this application are transmitted bidirectionally, that is, node A sends an event to node B, and there is also a possibility that node B sends the event back to node A. Use the multiple nodes as the target nodes corresponding to this next event node in the next round of consensus operation, and use the performance data corresponding to the multiple nodes as the performance data of the target nodes corresponding to this next event node in the next round of consensus operation. By determining the data of this next event node in the next round of consensus operation through the data of the current round of consensus operation, the purpose of dynamically determining the data of the next round of consensus operation is achieved, ensuring the accuracy of the data participating in the next round of consensus operation, so that subsequent accurate scheduling of events can be made according to the latest status of the nodes.

[0058] Step 108: Use each event node in the current round and the next event node determined by each event node together as all the event nodes in the next round of consensus operation.

[0059] In this step, since in the current round, each event node and the next event node determined by each event node have received the event, therefore, the event nodes and the next event nodes in the current round can both serve as event nodes in the next round of consensus operations and continue to perform the consensus operations.

[0060] It should be noted that there is a possibility that event node A and the next event node B both send this event to node C in the next round of consensus operations. At this time, node C needs to determine which event to process based on the trust mechanism. The events in this application are executed asynchronously. Without special requirements, a node will not immediately execute an event after receiving it.

[0061] Step 109, in response to determining that there is no node among the target nodes corresponding to the event node that has not received the event, exit at least one round of consensus operations.

[0062] In this step, if there is no node among the target nodes corresponding to the event node that has not received the event, it means that all nodes in the communication system have received the event, and there is no need to perform the consensus operation anymore. Exit at least one round of consensus operations. When the nodes in this application perform event consensus, they tend to perform consensus with nodes that have strong event processing capabilities. Nodes with strong event processing capabilities have relatively high performance and have good performance both in terms of event processing and event consensus, improving the efficiency of completing the consensus operation and thus improving the consensus efficiency among nodes.

[0063] Through the above solution, each node in at least one starting node that receives an event among multiple nodes is used as an event node, and the multiple nodes are used as target nodes corresponding to each event node. Based on the event, at least one round of consensus operation is performed so that each node among the multiple nodes receives the event. By performing at least one round of consensus operation, the purpose of data consistency among nodes is achieved. Each round of consensus operation is performed as follows: For each event node, in response to determining that there is a node among the target nodes corresponding to the event node that has not received the event, obtain the performance data of the target nodes in the current round. Based on the performance data, determine the next event node that receives the event, and send the event from the event node to the next event node. Through the performance data of the current round, the event can be preferentially sent to the next event node with relatively strong event processing ability, achieving the purpose of precise scheduling of events. At the same time, the possibility of generating a large number of redundant events is reduced, thereby improving the consensus efficiency among nodes. Based on the event, update the performance data. By updating the performance data, the real-time and accuracy of the performance data are ensured. For the event node, use the target nodes after removing the next event node as the target nodes corresponding to the event node in the next round of consensus operation, and use the target nodes after removing the next event node to screen the updated performance data. The screened performance data is used as the performance data of the target nodes corresponding to the event node in the next round of consensus operation, achieving the purpose of dynamically updating the data for the next round of consensus operation and ensuring the accuracy of the data participating in the next round of consensus operation. For the next event node, use the multiple nodes as the target nodes corresponding to the next event node in the next round of consensus operation, and use the performance data corresponding to the multiple nodes as the performance data of the target nodes corresponding to the next event node in the next round of consensus operation, achieving the purpose of dynamically determining the data for the next round of consensus operation and ensuring the accuracy of the data participating in the next round of consensus operation. Use each event node in the current round and the next event node determined by each event node together as all event nodes in the next round of consensus operation. In response to determining that there is no node among the target nodes corresponding to the event node that has not received the event, exit at least one round of consensus operation, improving the efficiency of completing the consensus operation, and thereby improving the consensus efficiency among nodes.

[0064] In some embodiments, determining the next event node for receiving the event based on the performance data includes: for each node in the target nodes, determining a target reputation value corresponding to the node based on the performance data; determining a target probability distribution value corresponding to the node based on the target reputation value; determining an event transition probability matrix corresponding to the target nodes based on all the target probability distribution values; generating a random number belonging to a predetermined range, and determining the next event node based on the event transition probability matrix and the random number.

[0065] In this embodiment, when the performance data of the current round is known, it is necessary to integrate the performance data so that the integrated value can guide the determination of the next event node. Therefore, based on the performance data, the target reputation value corresponding to the node is determined. To enhance the reliability and efficiency in a weak connection environment, the present application further introduces a dynamic evaluation mechanism for node reputation, and forms a real-time feedback on the comprehensive performance of nodes in the network by monitoring indicators such as computing power, stability, response time, and error rate. Without smooth mapping and reputation probability guidance, pure random Gossip is likely to cause bandwidth waste and redundant propagation, and may repeatedly send events to offline nodes or low-performance nodes. After being guided by the target reputation value, most events will be consensus to nodes with relatively high target reputation values faster, and at the same time, it also ensures that nodes with medium and high target reputation values in the target nodes bear reasonable loads, reducing ineffective communication. Based on the adaptive propagation method of Markov chain Monte Carlo, when a node selects an event propagation target, it takes the node reputation as a reference and decides the forwarding object of the message according to a certain probability distribution, so that high-reputation nodes can receive and process more events without forming a single-point bottleneck. Even if some nodes fail or disconnect from the network, the remaining nodes can gradually maintain the consistency of the whole network in the process of continuously exchanging and updating the hash graph. Since the reputation mechanism can be dynamically adjusted at any time according to the online duration, processing delay, error rate, etc. of the node, once the node is overloaded or the connection state deteriorates, its reputation score will naturally decrease, thereby reducing the subsequent dependence on it.

[0066] Based on the target reputation value, determine the target probability distribution value corresponding to the node. The target reputation value of each node is an important indicator to measure the performance and reliability of the node. Therefore, a target probability distribution value can be designed based on the target reputation value to describe the proportion of consensus events that each node should receive under ideal conditions. Based on all the target probability distribution values, determine the event transition probability matrix corresponding to the target nodes, where the event transition probability matrix includes the probability of a node consensus event to another node. For example, the event transition probability matrix is as follows:

[0067]

[0068] It should be noted that there is a predetermined probability storage order in the event transition probability matrix. Suppose a communication system has six nodes, namely N1, N2, N3, N4, N5, and N6. Then, the first row of the event probability transition matrix stores the nodes that initiate event transitions with N1, the second row stores the nodes that initiate event transitions with N2, and so on. The sixth row stores the nodes that initiate event transitions with N6. The first position in the first row stores the probability that N1 transfers the event to N1, the second position in the first row stores the probability that N1 transfers the event to N2, and so on. The sixth position in the first row stores the probability that N1 transfers the event to N6. And so on.

[0069] Design the target probability distribution through the dynamic multi-dimensional reputation evaluation mechanism, so that high-reputation nodes undertake more consensus tasks, optimize the event propagation path, thereby reducing redundant communication and ineffective propagation, effectively reducing bandwidth consumption, and improving the utilization efficiency of network resources. This application is based on the consensus directional propagation strategy of the Markov Chain Monte Carlo (MCMC) method. Dynamically calculate the ideal event probability distribution based on the change of node reputation values, construct the Markov chain state transition matrix, make the event propagation have a clear directionality, preferentially select high-reputation nodes for propagation, and avoid single-point overload while ensuring efficiency, thereby significantly accelerating the consensus reaching speed and improving the propagation success rate in a weak connection environment.

[0070] Generate a random number within a predetermined range, where the predetermined range is greater than 0 and less than 1. Based on the event transition probability matrix and the random number, use the Monte Carlo method to determine the next event node. As Figure 3 shown, through event propagation and dynamic adjustment, as the communication system operates, the actual distribution of nodes receiving events gradually approaches the target distribution, thereby achieving load balancing and maximizing the utilization of consensus resources.

[0071] In some embodiments, determining the target probability distribution value corresponding to the node based on the target reputation value includes: determining the target probability distribution value through the following formula: where, π target,i is the target probability distribution value of the i-th node, R′(i) is the target reputation value of the i-th node, δ i is the adaptive smoothing amount of the i-th node, δ j is the adaptive smoothing amount of the j-th node, and R′(n) is the sum of the target reputation values of the target nodes with a total number of n.

[0072] In this embodiment, relying solely on the number of events owned by each node to naturally form the actual distribution of consensus propagation often leads to unbalanced load in the communication system.

[0073] π actual =(x 1, x 2 , …, x i , …, x n ) T ,

[0074] where x i represents the proportion of events received by a node in the total number of events.

[0075] The target reputation value of each node is an important indicator to measure the performance and reliability of the node. Therefore, a set of target probability distribution values π target can be designed based on the target reputation value, describing the proportion of consensus events that each node should receive under ideal conditions.

[0076] π target = (π target,1 , π target,2 , …, π target,i , …, π target,n ).

[0077] To avoid problems such as imbalance of the target probability distribution or increased sparsity of the transition matrix that may be caused by sudden situations such as node offline, the Laplace smoothing method is introduced. By adding a small smoothing amount to the target probability of each node, it prevents the allocation ratio from being too small or zero, ensures the ergodicity and irreducibility of the Markov chain, and further adopts an adaptive smoothing amount to dynamically select a suitable small smoothing amount according to the reputation value of each node and the average reputation value of the overall system.

[0078] The adaptive smoothing amount is calculated as follows:

[0079]

[0080] where represents the average target reputation value of all nodes, and ∈ is a predetermined adjustment parameter used to control the intensity of smoothing. When the reputation value of a node is less than or close to the average reputation, the smoothing parameter δ i is larger, which can avoid the possibility that the target probability of a node with too low reputation approaches 0; while when the reputation value of a node is much higher than the average reputation, the smoothing parameter δ i is smaller, maintaining the target probability of high-reputation nodes. Through the target probability distribution value, the transition probability of events between nodes can be reflected. By calculating the target probability distribution value through a formula, the target probability distribution value is numericalized to accurately determine the target probability distribution value.

[0081] The target probability distribution value is determined by smoothing the target reputation value. The Laplace smoothing method and the adaptive smoothing adjustment mechanism are introduced to ensure that low-reputation or weakly connected nodes are not completely excluded during the propagation process, maintaining the ergodicity of the Markov chain and the connectivity of the network. When nodes frequently go online and offline or the network connection fluctuates, the system consistency can be continuously maintained, enhancing the fault tolerance and robustness of the network.

[0082] In some embodiments, determining the event transition probability matrix corresponding to the target node based on all the target probability distribution values includes: constructing an initial event transition probability matrix that satisfies a predetermined probability storage order based on the target node; and correcting the initial event transition probability matrix by using a predetermined summation matrix and all the target probability distribution values to obtain the event transition probability matrix.

[0083] In this embodiment, an initial event transition matrix that satisfies a predetermined probability storage order is constructed based on the target node. The predetermined probability storage order is set according to historical experience. The probability parameters corresponding to the node that initiates the event transition are stored in the same row of the initial event transition probability matrix, and the sum of all the probability parameters in this row is 1. According to the predetermined probability storage order, the parameter order in the predetermined summation matrix is determined. The initial event probability transition matrix is corrected by using the predetermined summation matrix and all the target probability distribution values to obtain the event transition probability matrix. Among them, there is a one-to-one corresponding target probability distribution value for the probability parameter in the initial event probability transition matrix, and there is also a one-to-one corresponding parameter in the predetermined summation matrix. The probability parameter is corrected by using the target probability distribution value corresponding to the probability parameter and the parameter in the predetermined summation matrix. The corresponding relationship means that the node that initiates the event transition and the node that receives the event transition are the same. By correcting the initial event transition probability matrix, the accuracy of the probability parameters in the obtained event transition probability matrix is ensured.

[0084] Specifically, if the sequence x 0 ,x 1 ,x 2 ,…,x k+1 is generated by the conditional probability distribution p(x k+1 |x k ), and the conditional probability distribution satisfies the formula (that is, the distribution of x k+1 only depends on the current state x k rather than the historical state), then x 0 ,x 1 ,x 2 ,…,x k+1 constitutes a Markov chain.

[0085] p(x k+1 =x|xk , x k-1 , …) = p(x k+1 = x|x k ),

[0086] Here, x 0 is the given initial condition. According to the conditional probability distribution, the probability characteristics of state x k+1 are given by the previous state x k . When k approaches infinity, x k is independent of the initial value. That is to say, when k increases, the random vector in the Markov chain will converge to the steady-state distribution, and at this time, it is considered that the Markov chain has reached the convergence state. When a smooth probability distribution π target is given, it is very difficult to directly find the corresponding Markov chain state transition matrix P, where the Markov chain state transition matrix is the event transition probability matrix in this application.

[0087] The matrix P that satisfies the ergodic theorem not only satisfies Pπ target = π target , but also through the transformation of the matrix P, any initial distribution π 0 can converge to the target stationary distribution.

[0088] Since the event distribution usually starts with a random distribution, it is necessary to be able to adjust the distribution of any state so that it reaches the target stationary distribution after a finite number of transfers. It is necessary to calculate the transition matrix P that satisfies the ergodic theorem, and this matrix can be used for the detailed smoothing conditions of the Markov chain.

[0089] If the state transition matrix P and the probability distribution π of the non-cyclic Markov chain satisfy the formula for all i, j, then the probability distribution π is called the stationary distribution of the state transition matrix P.

[0090] p ij π target,j = p ji π target,i ,

[0091] The formula satisfies the convergence property of the Markov chain. Therefore, it is only necessary to find a matrix P such that the probability distribution π satisfies the detailed stationary distribution. This provides a new idea for finding the corresponding Markov chain state transition matrix P from the stationary distribution π. However, it is still difficult to find a suitable matrix P only through the detailed smoothing conditions. If there is a target stationary distribution π, then it is very difficult to make a randomly selected Markov chain state transition matrix Q (as shown in the formula) satisfy the detailed smoothing conditions. In other words, q ij π target,j ≠ q ji π target , i

[0092] The transition matrix designed based on the Markov chain proposed by this method is defined as follows:

[0093]

[0094] In this case, it is only necessary to add a predetermined summation matrix U to both sides of the inequality, as shown in the formula:

[0095]

[0096] Since only numerical operations are involved on both sides of the equation, only let u ij , u ji As shown in the following formula:

[0097]

[0098] Then the following equation can hold.

[0099] u ij p ij π target,j = u ji p ji π target,i ,

[0100] Let the matrix P satisfy the condition:

[0101]

[0102] Through calculation, if the matrix P satisfies the formula, then the matrix P can satisfy the detailed smoothing condition of the Markov chain, and there exists a unique stationary distribution π target .

[0103]

[0104] In some embodiments, determining the target reputation value corresponding to the node based on the performance data includes: determining the basic reputation value, the current reputation value, and the historical reputation value of the node based on the performance data; performing a weighted sum on the basic reputation value, the current reputation value, and the historical reputation value to obtain an overall reputation value; and performing a smoothing process on the overall reputation value to obtain the target reputation value.

[0105] In this embodiment, as Figure 4As shown, a multi-dimensional dynamic reputation model is proposed. This model comprehensively considers three major dimensions: the basic reputation value (initial hardware capabilities), the historical reputation value (long-term performance), and the current reputation value (real-time status). It dynamically calculates the overall reputation value of a node through weighted summation. The overall reputation value is smoothed to obtain the target reputation value. Among them, the basic reputation can evaluate the initial characteristics of a node, such as computing power, bandwidth, and response time; the historical reputation can prevent outdated information from affecting the results by adopting a time decay mechanism based on the feedback records in long-term interactions; the current reputation can monitor the latest state changes of a node in real time to ensure the timeliness and accuracy of reputation evaluation. The multi-dimensional dynamic reputation model improves the fault tolerance and consensus efficiency of consensus participating nodes in a weak connection environment, effectively avoiding consensus failures caused by sudden changes in node states.

[0106] In an ad hoc network, due to the high dynamicity of network nodes and frequent topology changes, traditional consensus mechanisms that rely on fixed topology structures are insufficient in dealing with the uncertainty of node behavior in an ad hoc network environment. This application proposes a multi-dimensional dynamic reputation model. The reputation evaluation model divides the reputation value of a node into three parts: basic reputation, historical reputation, and current reputation. It dynamically adjusts the reputation value by monitoring the network participation behavior and resource contribution degree of the node in real time. Combining a feedback mechanism and an incentive strategy, it enhances the enthusiasm of nodes to participate in the consensus process and the stability of the system. The basic reputation reflects the comprehensive capabilities of a node in the initial stage of the system, including key parameters such as the remaining computing power Sc, network bandwidth Nb, node security Ns, and response delay Rt. These factors directly affect the ability of a node to complete data synchronization and event verification during the consensus process. For example, the remaining computing power of a node is an important indicator to measure its task processing efficiency, while the network bandwidth affects the throughput of data transmission. To ensure the rationality of the basic reputation, the model comprehensively evaluates the capabilities of each node during system initialization and assigns initial weights. The historical reputation is accumulated based on the performance of a node in long-term interactions and is mainly calculated through the historical feedback records of the node. Whenever a node completes a data interaction, its cooperative nodes will evaluate its behavior and generate feedback information. These feedback information includes key indicators such as network delay, packet integrity, node response speed, and whether there is malicious behavior, and are recorded in the local hash map of the node. To prevent malicious nodes from disrupting the system through false feedback, the model introduces a feedback credibility weighting strategy, that is, the weight of the feedback is dynamically adjusted according to the reputation value of the feedback node itself, thereby reducing the impact of low-reputation nodes on the overall system evaluation.

[0107] In addition, to address the problem of possible invalidation of feedback information, the model designs a time decay mechanism to gradually reduce the weight of historical feedback that exceeds a certain time threshold. The current reputation reflects the recent behavior and state changes of nodes, aiming to reflect the current performance and participation enthusiasm of nodes in real time. In the actual operation of the system, parameters such as the remaining computing power, network bandwidth, and response time of nodes have dynamic characteristics. Therefore, the model adopts a dynamic weight adjustment mechanism to ensure that the current reputation can accurately reflect the latest state of nodes. By combining rapid feedback in the short term and dynamic weight adjustment, the model can promptly identify changes in node states and respond accordingly.

[0108] (1) Calculation process of the basic reputation value:

[0109]

[0110]

[0111] Among them, Sc is the remaining computing power, Nb is the network bandwidth, Ns is the node security, and Rt is the response delay.

[0112] The calculation formula for the basic reputation value is:

[0113]

[0114] Among them, Base(n) represents the initial reputation value of node n, S j is the initial value of node n on the jth performance data, and W 1j is the first predetermined coefficient of the jth performance data, which can be adjusted according to the actual situation of the system to adapt to the importance of each index score in different network environments.

[0115] (2) Calculation process of the historical reputation value:

[0116] The calculation formula for the historical reputation value is:

[0117]

[0118] Among them, Hist(n) represents the sum of all reputation values received by node n, Num(n) is the number of feedbacks received by node n, FB(n,i) is the feedback value on the ith performance data of node n, FN(n,i) is the node that gives the ith feedback to node n, and C(FN(n,i)) represents the weight of the feedback node, that is, the credibility corresponding to the feedback score.

[0119] By comparing the differences between new and old feedback to ensure the reliability of feedback, a threshold θ is set to identify possible deviations. If the absolute value of the difference between the score of the new feedback and the average score of the previous feedback is less than or equal to θ, it indicates that the feedback is reasonable, and the weight of the node is increased accordingly; otherwise, the weight is decreased. The feedback penalty mechanism is as follows:

[0120]

[0121] where it is required that Δ 1 <Δ 2 , that is, the penalty for malicious feedback is greater than the reward for positive feedback, which helps to maintain the stability of the node reputation value.

[0122] Considering that over time, the early feedback information may not accurately reflect the current behavior and performance of the node. By introducing a time decay factor σ, the model can gradually reduce the weight of historical feedback, so as to ensure that the calculation of the reputation value focuses more on the recent performance. The optimized calculation of the historical reputation value is as follows:

[0123]

[0124] where Δt is the time interval between the i-th feedback of node n and the current time.

[0125] (3) Calculation process of the current reputation value:

[0126] The formula for calculating the current reputation value is:

[0127]

[0128] where Curr(n) represents the current reputation value of node n, S(t) j is the current value on the j-th dimensional performance data of node n, and W 2j is the second predetermined coefficient of the j-th performance data.

[0129] (4) Calculation process of the overall reputation value:

[0130] It is obtained by weighted summation of the basic reputation value, historical reputation value and current reputation value, and the weight of each part is dynamically adjusted according to the system operation status and requirements. For example, when the system is in a high-load state, the weight of the current reputation can be appropriately increased to preferentially select nodes with good recent performance to participate in the consensus. This multi-stage reputation evaluation strategy can not only encourage nodes to actively participate, but also effectively reduce the impact of malicious nodes, thereby improving the overall stability and security of the system.

[0131] The calculation of the overall reputation value is as follows:

[0132] R(n) = α * Base(n) + β * Hist(n) + γ * Curr(n)

[0133] Among them, α, β, and γ respectively represent the weights of the basic credit value, historical credit value, and current credit value in the overall credit, and satisfy α + β + γ = 1.

[0134] After smoothing the overall credit value, the target credit value is obtained.

[0135] In some embodiments, the smoothing the overall credit value to obtain the target credit value includes: smoothing the overall credit value through the following formula: R′(i) = (1 - r)·ln(1 + R(i)) + r·R(i), where R′(i) is the target credit value of the i-th node, R(i) is the overall credit value of the i-th node, and r is a predetermined adjustment parameter.

[0136] In this embodiment, considering that in this multi-dimensional credit calculation method, the dimension ranges of credits in different dimensions are inconsistent, and there may be large fluctuations in the credit degrees of nodes, it is necessary to perform a smooth mapping of the overall credit degree. Directly using linear mapping will result in overly extreme allocation, where some high-credit nodes may be overloaded while low-credit nodes have almost no load. To solve this problem, we adopt a smooth adjustment model that combines two mechanisms of logarithmic smoothing and linear growth. While retaining the credit differences between nodes, it moderately compresses the credit values to obtain the smoothed target credit value. Among them, the adjustment parameter r ∈ [0, 1] controls the weights of the smoothing process and the linear mapping. When r = 0, the model completely adopts logarithmic smoothing and is more inclined to an equilibrium distribution. When r = 1, the model completely adopts linear mapping and is more inclined to highlight the credit differences between nodes. By selecting an appropriate adjustment parameter r, the balance between smoothness and discrimination can be flexibly adjusted to ensure the measurement accuracy of node performance and reliability.

[0137] Compared with the traditional static credit mechanism, this dynamic credit model shows significant advantages in terms of adaptability and effectiveness. In a dynamic network environment, this model accurately reflects the comprehensive reliability of nodes through hierarchical weighted evaluation of basic credit, historical credit, and current credit, thereby reducing the negative impact on the system caused by malicious behaviors or performance fluctuations of nodes. In addition, combined with the incentive and punishment mechanisms, this model effectively improves the node resource contribution degree and the overall performance of the system, providing an efficient and robust consensus mechanism guarantee for the self-organizing network.

[0138] In some embodiments, determining the next event node based on the event transition probability matrix and the random number includes: finding, in the event transition probability matrix, a plurality of probability parameters corresponding to the nodes for which the event node is the initiating event transition; sorting the plurality of probability parameters in a predetermined probability storage order to obtain a first sequence; for each probability parameter, adding the probability parameter to all the probability parameters located before it in the first sequence to obtain a probability comparison value; sorting all the probability comparison values and the random number in ascending order to obtain a second sequence, and determining the sorting serial number corresponding to the random number in the second sequence as the target serial number; finding, in the first sequence, the target probability parameter corresponding to the target serial number; and determining the node receiving the event transition corresponding to the target probability parameter as the next event node.

[0139] In this embodiment, by finding, in the event transition probability matrix, a plurality of probability parameters corresponding to the nodes for which the event node is the initiating event transition, the probability of the event node transferring the event to other nodes can be obtained. Sorting the plurality of probability parameters in a predetermined probability storage order to obtain a first sequence. Accumulating the probability parameters in the first sequence, for each probability parameter, adding the probability parameter to all the probability parameters located before it in the first sequence to obtain a probability comparison value. Sorting all the probability comparison values and the random number in ascending order to obtain a second sequence, and determining the sorting serial number corresponding to the random number in the second sequence as the target serial number; finding, in the first sequence, the target probability parameter corresponding to the target serial number; and determining the node receiving the event transition corresponding to the target probability parameter as the next event node. Selecting propagation through the Monte Carlo method achieves the purpose of accurately determining the next event node.

[0140] Exemplarily, when the probability transition matrix is and the event node is N1 and the comparison value is 0.35, the first sequence is (0.05, 0.18, 0.26, 0.12, 0.22, 0.17), and the probability comparison values are: c 1 = 0.05, c 2 = 0.05 + 0.18 = 0.23, c 3 = 0.23 + 0.26 = 0.49, c 4 = 0.49 + 0.12 = 0.61, c 5 = 0.61 + 0.22 = 0.83, c 6 = 1.0. Then the second sequence is (0.05, 0.23, 0.35, 0.4, 0.61, 0.83, 1.0), the target serial number is 3, finding the target probability parameter corresponding to the target serial number in the first sequence is 0.26, and the node N3 receiving the event transition corresponding to the target probability parameter, and determining N3 as the next event node.

[0141] The event transfer probability matrix P represents the probability distribution of each node sending events to other nodes. According to the Monte Carlo method, the probability distribution of sending events is mathematically modeled to construct a geometric probability model. According to the formula (where p Si is the probability of sending an event from node S to node i, which comes from matrix P, it can be known that a t is a random sample value. According to the range of a t , the target node for sending the event can be determined.

[0142]

[0143] ……

[0144]

[0145] Compared with the traditional Gossip random propagation strategy, the probability-based consensus event selection and propagation strategy uses the reputation value to construct the target probability distribution, guides the selection of the event propagation path, makes the event propagation change from random blindness to reputation-based precise propagation, effectively reduces communication redundancy and propagation delay, and ensures that this strategy can achieve efficient consensus in a low-throughput and narrow-bandwidth environment.

[0146] In another embodiment provided by the present application, based on the above challenges, the present application proposes a dynamic evaluation mechanism for node reputation and a directional propagation strategy based on the Monte Carlo method on the basis of the existing hash graph asynchronous consensus idea to solve the problems of low efficiency, easy bottleneck and high error rate of traditional consensus algorithms in environments such as weak connections, narrow bandwidth, and frequent online and offline of nodes. The hash graph model is used to record the event order and dependency relationship between nodes. Compared with the traditional method that requires strict synchronization, the hash graph can perform asynchronous Gossip-style propagation between nodes, greatly reducing the dependence on synchronous clocks and stable connections and adapting to frequent changes in the topology. A dynamic reputation evaluation model is introduced to comprehensively calculate indicators such as computing power, stability, response time, and error rate, and update the node reputation score in real time. When a node selects the event propagation target, a Markov chain is constructed based on the node reputation distribution and probability sampling is performed. The higher the reputation score, the greater the probability that the node is selected; but at the same time, a certain probability is reserved for other nodes to prevent over-concentration on a few nodes, so as to maintain the best consensus efficiency and network fault tolerance in a weak connection and high-latency environment.

[0147] The following presents an exemplary scenario to show how to use the hash graph asynchronous consensus architecture, dynamic multi-dimensional reputation evaluation method, and probability-based event selection and propagation strategy of this application in an ad hoc network to accelerate the consensus speed and improve throughput. The data structure and calculation process will be presented in detail in the example, including: the calculation of the basic reputation value, historical reputation value, and current reputation value of nodes; the smooth mapping of the target reputation; the Laplace smoothing of the target probability distribution; the construction of the event transition probability matrix, and the Monte Carlo process of the final event propagation.

[0148] 1. Scenario and Node Settings

[0149] Suppose in a cross-border data monitoring system, monitoring devices are distributed in different cities, and each device forms a distributed monitoring network through ad hoc network technology. However, the available bandwidth of device nodes fluctuates continuously due to the dynamic changes of the environment and load. To simulate this complex environment, it is assumed that there are 6 nodes {N 1 , N 2 , N 3 , N 4 , N 5 , N 6} in the ad hoc network. These nodes may be distributed in different locations and have different computing capabilities, bandwidths, and online durations, etc. To demonstrate the advantages of this application in dealing with "large differences in node reputation" and "some nodes may be offline or have extremely weak connections", a node with a very low reputation value is deliberately set (for example, N 6 may be offline for a long time), and there are obvious differences among other nodes.

[0150] Referring to the evaluation dimensions given in this application (with a maximum of 10 points and a minimum of 1 point):

[0151] 1. Remaining computing power S c : The larger the value, the stronger the computing power.

[0152] 2. Network bandwidth N b : The larger the value, the better the bandwidth.

[0153] 3. Node security N s : The larger the value, the safer it is.

[0154] 4. Response delay R t : The higher the value, the smaller the delay.

[0155] These four indicators will be given certain weights {W 1 , W 2 , W 3 , W 4} in the basic reputation. In this example, let W 1 = 0.25, W 2= 0.25, W 3 = 0.3, W 4 = 0.2, and the basic reputation scores of 6 nodes are given in Table 1:

[0156] Table 1 Scoring Table Corresponding to Basic Reputation

[0157]

[0158]

[0159] Calculate using the node dynamic multi-dimensional reputation evaluation method:

[0160] According to the basic reputation formula:

[0161]

[0162] Among them, S j is the initial value of node n on the jth performance data (see Sc, Nb, Ns, Rt in the above table), and W 1j is the first predetermined coefficient of the jth performance data. Taking N 1 as an example, Base(N 1 ) = (S c ×W 1 ) + (N b ×W 2 ) + (Ns×W 3 ) + (R t ×W 4 ) = 8×0.25 + 7×0.25 + 6×0.3 + 8×0.2 = 2 + 1.75 + 1.8 + 1.6 = 7.15

[0163] Similarly, the basic reputation of the remaining nodes can be calculated, and the results are shown in Table 2:

[0164] Table 2 Calculation Table of Basic Reputation Values of Each Node

[0165] Node Base(n) calculation Result <![CDATA[N 1 > 2+1.75+1.8+1.6 7.15 <![CDATA[N 2 > 1.5+2.25+2.1+1.4 7.25 <![CDATA[N 3 > 2.25+2.25+2.7+1.8 9.0 <![CDATA[N 4 > 1.0+1.25+1.8+1.0 5.05 <![CDATA[N 5 > 1.75+2.0+1.5+1.2 6.45 <![CDATA[N 6 > 0.5+0.5+0.6+0.4 2.0

[0166] Historical reputation Hist(n):

[0167] Assume that the system has feedback records on the performance of each node in the past period (such as the recent several propagation rounds), and reliability weighting and time decay processing have been carried out. Here, only a simplified calculation process is shown schematically (ignoring the detailed splitting of item-by-item comparison and time decay) to reflect the positive feedback of some nodes, the medium feedback of most nodes, and N 6 has almost no positive feedback or a large amount of negative feedback. Let the weighted historical reputation value aggregated by each node be:

[0168] ·Hist(N1 ) = 5.2

[0169] ·Hist(N 2 ) = 5.5

[0170] ·Hist(N 3 ) = 8.1

[0171] ·Hist(N 4 ) = 4.0

[0172] ·Hist(N 5 ) = 5.0

[0173] ·Hist(N 6 ) = 1.0

[0174] Current reputation Curr(n):

[0175] To reflect the running status of a node in the recent period (such as this round or the previous two rounds), a dynamic measurement of Sc, Nb, Ns, and Rt can be performed again. As shown in Table 3, for example:

[0176] Table 3 Scoring table corresponding to the current reputation

[0177]

[0178]

[0179] The calculation method of the current reputation is the same as that of the basic reputation, except that it is replaced with the recent measurement values; the weights are still {0.25, 0.25, 0.3, 0.2}. For example, for N 1 the current reputation is:

[0180] Curr(N 1 ) = 8.5 × 0.25 + 6.5 × 0.25 + 6.0 × 0.3 + 8.0 × 0.2

[0181] = 2.125 + 1.625 + 1.8 + 1.6

[0182] = 7.15

[0183] Similarly, the calculation is as shown in Table 4 below:

[0184] Table 4 Calculation table of the current reputation value of each node

[0185] Node Curr(n) calculation Result <![CDATA[N 1 > 2.125+1.625+1.8+1.6 7.15 <![CDATA[N 2 > 1.375+2.125+2.1+1.3 6.9 <![CDATA[N 3 > 2.2+2.25+2.7+1.8 8.95 <![CDATA[N 4 > 1.125+1.25+1.65+0.9 4.925 <![CDATA[N 5 > 1.75+2.0+1.65+1.2 6.6 <![CDATA[N 6 > 0.375+0.5+0.6+0.4 1.875

[0186] Target reputation R'(n):

[0187] According to the weighted formula of the overall reputation R(n):

[0188] R(n) = α·Base(n) + β·Hist(n) + γ·Curr(n),

[0189] where α + β + γ = 1. In this example, let α = 0.3, β = 0.4, and γ = 0.3.

[0190] Taking N 1 as an example: R(N 1 ) = 0.3·Base(N 1 ) + 0.4·Hist(N 1 ) + 0.3·Curr(N 1 ) = 0.3×7.15 + 0.4×5.2 + 0.3×7.15 = 2.145 + 2.08 + 2.145 = 6.37.

[0191] As shown in Table 5:

[0192] Table 5 Calculation Table of the Overall Reputation Value of Each Node

[0193]

[0194]

[0195] As can be seen from the above table, N 3 has the highest reputation, and N 6 is significantly the lowest; the remaining nodes N 1 , N 2 , N 5 are above average, and N 4 is slightly lower.

[0196] To avoid excessive differences between high - reputation and low - reputation nodes leading to extremely unbalanced loads, a processing method combining logarithmic smoothing and linear mapping of the overall reputation value R(n) is proposed:

[0197] R′(n) = (1 - r)·ln(1 + R(n)) + r·R(n)

[0198] where r ∈ [0, 1] controls the smoothing intensity. If r = 0, then logarithmic smoothing is completely adopted; if r = 1, then it is completely linear. Here, in the example, r = 0.5, which can, to a certain extent, retain the differences and avoid excessive polarization.

[0199] Taking N 3 as an example for demonstration: R′(N 3 ) = 0.5×ln(1 + 8.625) + 0.5×8.625 = 0.5×ln(9.625) + 0.5×8.625 = 1.1335 + 4.3125 = 5.446.

[0200] As shown in Table 6, calculate the smoothed reputation R′(n) of 6 nodes in the same way:

[0201] Table 6 Calculation Table of Target Reputation Values for Each Node

[0202]

[0203] It can be seen that after smoothing, the value of N 3 has decreased to approximately 5.446, and N 6 has also been adjusted from 1.5625 to 1.25125 accordingly, making the gap between nodes relatively smaller. (If the smoothing mapping is not used, the reputation difference between N 3 –N 6 is 8.625 - 1.5625 = 7.0625; after using the smoothing mapping, the difference becomes 5.446 - 1.25125 = 4.19475, and it can be seen that the degree of polarization is significantly suppressed)

[0204] Adopt a consensus event selection and propagation strategy based on probability

[0205] Adaptive Laplacian smoothing to calculate the target distribution

[0206] In order to achieve load balancing in subsequent Gossip propagation, it is necessary to obtain the target probability distribution π target based on the reputation value (here, the smoothed T′(n)), and add an adaptive Laplacian smoothing amount δ i to avoid the situation of "0 probability" for nodes with too low reputation.

[0207] First, calculate the adaptive smoothing amount:

[0208]

[0209] Among them

[0210] Take ∈ = 0.05 (which can be adjusted according to the network scale and actual requirements) to calculate the smoothing amount δ i of each node:

[0211] For example, for N 6 of

[0212] As shown in Table 7, the calculation for the remaining nodes is the same:

[0213] Table 7 Target Reputation Values for Each Node

[0214] Node R′(n) <![CDATA[δ i > <![CDATA[N 1 > 4.1845 ≈0.043 <![CDATA[N 2 > 4.2255 ≈0.0428 <![CDATA[N 3 > 5.446 ≈0.0319 <![CDATA[N 4 > 3.15625 ≈0.0547 <![CDATA[N 5 > 3.923 ≈0.0471 <![CDATA[N 6 > 1.25125 ≈0.14215

[0215] Then calculate the target probability distribution value π target,i

[0216]

[0217] As shown in Table 8:

[0218] The target probability distribution value of each node in Table 8

[0219]

[0220] It can be seen that N 6 Although the credibility is very low, it still gets a target probability of about 6.18% (not zero). In this way, even when N 6 is offline, the load can be gradually transferred to other nodes later; and once N 6 returns to online, this probability distribution can also enable it to participate in event processing to a certain extent.

[0221] Construction of Markov chain transition matrix

[0222] According to the patent, it is necessary to construct a transition matrix P that satisfies the detailed balance condition starting from the target distribution π target In an actual system, a "initial" transition matrix Q may be randomly generated first, and then it is corrected to P = U·Q by introducing the matrix U and satisfies:

[0223]

[0224] Here, π target itself is used as the row reference, and a random jump matrix is constructed row by row. For example, on each node row, a small probability (such as 0.05) is reserved for "itself", and the remaining 0.95 is distributed according to the proportion of π target For example, for the row of N 1 Row:

[0225] p 1,1 = 0.05

[0226]

[0227] By normalizing, the sum of the whole row can be made 1, and it is ensured that π target is the direction of the larger probability. Then, through a certain symmetrization process, a P that satisfies the detailed balance can be obtained, and this process can be completed through an iterative algorithm in the implementation.

[0228]

[0229] Monte Carlo method for selection and propagation

[0230] In the Gossip process, if a certain node S is ready to propagate an event to the next hop, then according to the S row of the transition matrix P, the following steps are taken:

[0231] 1. Generate a uniformly distributed random number a t ∈(0,1).

[0232] 2. Order Find the one that satisfies c k-1 t ≤c k , we can determine that the next hop is node k.

[0233] For example: the current node is N 1 , and its corresponding rows (0.05, 0.18, 0.26, 0.12, 0.22, 0.17) are accumulated:

[0234] c 1 =0.05,

[0235] c 2 =0.05+0.18=0.23,

[0236] c 3 =0.23+0.26=0.49,

[0237] c 4 =0.49+0.12=0.61,

[0238] c 5 =0.61+0.22=0.83,

[0239] c 6 =1.0

[0240] If a t =0.35, then c 2 =0.23<0.35≤c 3 =0.49, so the next hop is N 3 .

[0241] After repeating multiple rounds of Gossip, the system randomly distributes events to each node. If a node is offline, it cannot receive events. However, if it reconnects after a period of time, the above strategy will still give it a certain probability of receiving events, thereby gradually converging to a full network consensus state synchronized with the hash graph.

[0242] N 6 The credibility is very low. Although the target probability is only about 0.0618, it is not 0. 6 ​When occasionally going online or when the network recovers briefly, there is still a chance to receive events. The hash graph will synchronize its state to keep the overall network complete. If offline for too long, its reputation will be lower and the allocated load will be less, ensuring that other nodes do not waste too many resources on ineffective transmissions. And in the test, it can be observed that the number of rounds for the whole network to reach consensus decreases. Originally, it took 15 rounds of propagation for 90% of the nodes to reach a consensus on an event. After improvement, it only takes 9 - 10 rounds. Due to the dynamic balance of the load, the network bottleneck is reduced. And high-reputation nodes can quickly process and relay events, enabling more consensus events to be processed within the same time, and the overall throughput is improved. In the test, the throughput (the number of event consensuses that can be completed per unit time) has increased by 20% - 30% compared with the pure random Gossip scheme.

[0243] It should be noted that the method of the embodiment of the present application can be executed by a single device, such as a computer or a server, etc. The method of this embodiment can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In this case of a distributed scenario, one of the multiple devices can only execute one or more steps of the method of the embodiment of the present application, and these multiple devices will interact with each other to complete the described method.

[0244] It should be noted that some embodiments of the present application have been described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the above embodiments and still achieve the desired result. Additionally, the processes depicted in the figures do not necessarily require the particular order or sequential order shown to achieve the desired result. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0245] Based on the same inventive concept, corresponding to the method of any of the above embodiments, the present application also provides an event consensus device for asynchronous nodes.

[0246] Refer to Figure 5 , the event consensus device for asynchronous nodes is applied to a communication system, the communication system includes multiple nodes with communication relationships, and the device includes:

[0247] A receiving module 10, configured to regard each node in at least one starting node that receives an event among the multiple nodes as an event node, and regard the multiple nodes as target nodes corresponding to each event node;

[0248] A consensus operation module 20, configured to perform at least one round of consensus operation based on the event, so that each node among the multiple nodes receives the event;

[0249] The consensus operation module 20 is further configured to perform the following operations for each round of consensus operation: for each event node, in response to determining that there is a node in the target nodes corresponding to the event node that has not received the event, obtain the performance data of the target nodes in the current round; based on the performance data, determine the next event node that receives the event, and send the event from the event node to the next event node; update the performance data based on the event; for the event node, use the target nodes after removing the next event node as the target nodes corresponding to the event node in the next round of consensus operation, screen the updated performance data by using the target nodes after removing the next event node, and use the screened performance data as the performance data of the target nodes corresponding to the event node in the next round of consensus operation; for the next event node, use the multiple nodes as the target nodes corresponding to the next event node in the next round of consensus operation, and use the performance data corresponding to the multiple nodes as the performance data of the target nodes corresponding to the next event node in the next round of consensus operation; use each event node in the current round and the next event node determined by each event node together as all event nodes in the next round of consensus operation; in response to determining that there is no node in the target nodes corresponding to the event node that has not received the event, exit at least one round of consensus operation.

[0250] Through the above device, each node in at least one starting node that receives an event among multiple nodes is used as an event node, and the multiple nodes are used as target nodes corresponding to each event node. Based on the event, at least one round of consensus operation is performed so that each node among the multiple nodes receives the event. By performing at least one round of consensus operation, the purpose of data consistency among nodes is achieved. Each round of consensus operation is performed as follows: For each event node, in response to determining that there is a node among the target nodes corresponding to the event node that has not received the event, obtain the performance data of the target nodes in the current round. Based on the performance data, determine the next event node that receives the event, and send the event from the event node to the next event node. Through the performance data of the current round, the event can be preferentially sent to the next event node with relatively strong event processing ability, achieving the purpose of precise scheduling of events. At the same time, the possibility of generating a large number of redundant events is reduced, thereby improving the consensus efficiency among nodes. Based on the event, update the performance data. By updating the performance data, the real-time and accuracy of the performance data are ensured. For the event node, use the target nodes after removing the next event node as the target nodes corresponding to the event node in the next round of consensus operation, use the target nodes after removing the next event node to screen the updated performance data, and use the screened performance data as the performance data of the target nodes corresponding to the event node in the next round of consensus operation, achieving the purpose of dynamically updating the data of the next round of consensus operation and ensuring the accuracy of the data participating in the next round of consensus operation. For the next event node, use the multiple nodes as the target nodes corresponding to the next event node in the next round of consensus operation, and use the performance data corresponding to the multiple nodes as the performance data of the target nodes corresponding to the next event node in the next round of consensus operation, achieving the purpose of dynamically determining the data of the next round of consensus operation and ensuring the accuracy of the data participating in the next round of consensus operation. Use each event node in the current round and the next event node determined by each event node together as all event nodes in the next round of consensus operation. In response to determining that there is no node among the target nodes corresponding to the event node that has not received the event, exit at least one round of consensus operation, improving the efficiency of completing the consensus operation, and thus improving the consensus efficiency among nodes.

[0251] In some embodiments, the consensus operation module 20 is further configured to, for each node in the target nodes, determine the target reputation value corresponding to the node based on the performance data; determine the target probability distribution value corresponding to the node based on the target reputation value; determine the event transition probability matrix corresponding to the target nodes based on all the target probability distribution values; generate a random number within a predetermined range, and determine the next event node based on the event transition probability matrix and the random number.

[0252] In some embodiments, the consensus operation module 20 is further configured to determine the target probability distribution value through the following formula: where π target,i is the target probability distribution value of the i-th node, R′(i) is the target reputation value of the i-th node, δ i is the adaptive smoothing amount of the i-th node, δ j is the adaptive smoothing amount of the j-th node, and R′(n) is the sum of the target reputation values of the target nodes with a total number of n.

[0253] In some embodiments, the consensus operation module 20 is further configured to construct an initial event transition probability matrix that satisfies a predetermined probability storage order based on the target nodes; and correct the initial event transition probability matrix by using a predetermined summation matrix and all the target probability distribution values to obtain the event transition probability matrix.

[0254] In some embodiments, the consensus operation module 20 is further configured to determine the basic reputation value, the current reputation value, and the historical reputation value of the node based on the performance data; perform a weighted summation on the basic reputation value, the current reputation value, and the historical reputation value to obtain an overall reputation value; and perform a smoothing process on the overall reputation value to obtain the target reputation value.

[0255] In some embodiments, the consensus operation module 20 is further configured to perform a smoothing process on the overall reputation value through the following formula: R′(i) = (1 - r)·ln(1 + R(i)) + r·R(i), where R′(i) is the target reputation value of the i-th node, R(i) is the overall reputation value of the i-th node, and r is a predetermined adjustment parameter.

[0256] In some embodiments, the consensus operation module 20 is further configured to find multiple probability parameters corresponding to the nodes that initiate event transitions with the event node in the event transition probability matrix; sort the multiple probability parameters in a predetermined probability storage order to obtain a first sequence; for each probability parameter, add the probability parameter to all the probability parameters located before it in the first sequence to obtain a probability comparison value; sort all the probability comparison values and the random number in ascending order to obtain a second sequence, determine the sorting serial number corresponding to the random number in the second sequence as the target serial number; find the target probability parameter corresponding to the target serial number in the first sequence; and determine the node that receives the event transition corresponding to the target probability parameter as the next event node.

[0257] For the convenience of description, when describing the above device, it is divided into various modules according to functions for separate description. Of course, when implementing the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.

[0258] The device of the above embodiment is used to implement the event consensus method of the corresponding asynchronous node in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be elaborated here.

[0259] Based on the same inventive concept, corresponding to the method of any of the above embodiments, the present application further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the event consensus method of the asynchronous node as described in any of the above embodiments.

[0260] Figure 6 FIG. shows a more specific schematic diagram of the hardware structure of the electronic device provided in this embodiment. The device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. Among them, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are communicatively connected to each other inside the device through the bus 1050.

[0261] The processor 1010 can be implemented in a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, etc., and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0262] The memory 1020 can be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, etc. The memory 1020 can store an operating system and other application programs. When implementing the technical solutions provided in the embodiments of this specification through software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.

[0263] The input / output interface 1030 is used to connect to the input / output module to achieve information input and output. The input / output module can be configured as a component in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. The input devices can include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output devices can include a display, a speaker, a vibrator, an indicator light, etc.

[0264] The communication interface 1040 is used to connect to the communication module (not shown in the figure) to achieve communication interaction between this device and other devices. The communication module can achieve communication through wired means (such as USB, network cable, etc.) or through wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0265] The bus 1050 includes a path for transmitting information between various components of the device (such as the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).

[0266] It should be noted that although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040, and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, those skilled in the art can understand that the above device may also only include the components necessary to implement the solution of the embodiments of this specification, and do not have to include all the components shown in the figure.

[0267] The electronic device of the above embodiment is used to implement the event consensus method of the corresponding asynchronous node in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be elaborated here.

[0268] Based on the same inventive concept, corresponding to the method of any of the above embodiments, the present application also provides a non-transitory computer-readable storage medium. The non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to cause the computer to execute the event consensus method of the asynchronous node as described in any of the foregoing embodiments.

[0269] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tapes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible by a computing device.

[0270] The computer instructions stored in the storage medium of the above embodiment are used to cause the computer to execute the event consensus method of the asynchronous node described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be elaborated here.

[0271] Based on the same concept, corresponding to the method of any of the above embodiments, the present application also provides a computer program product, including computer program instructions. When the computer program instructions run on a computer, the computer is caused to execute the event consensus method of the asynchronous node described in any of the above embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be elaborated here.

[0272] It should be noted that the embodiments of the present application can also be further described in the following manner:

[0273] It can be understood that before using the technical solutions of the various embodiments in the present disclosure, the types, usage scopes, usage scenarios, etc. of the personal information involved will be informed to the user in an appropriate manner, and the user's authorization will be obtained.

[0274] For example, in response to receiving an active request from the user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be executed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application program, server, or storage medium that performs the operations of the technical solutions of the present disclosure according to the prompt message.

[0275] As an optional but non-limiting implementation manner, the manner of sending a prompt message to the user in response to receiving an active request from the user can be, for example, in the form of a pop-up window. The prompt message can be presented in text in the pop-up window. In addition, the pop-up window can also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0276] It should be understood that the above-mentioned notice and the process of obtaining user authorization are only illustrative and do not limit the implementation manner of the present disclosure. Other manners that comply with relevant laws and regulations can also be applied to the implementation manner of the present disclosure.

[0277] Those of ordinary skill in the art should understand that the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of the present application is limited to these examples; within the concept of the present application, the technical features in the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations in different aspects of the embodiments of the present application as described above, and they are not provided in detail for the sake of brevity.

[0278] In addition, for the sake of simplicity of description and discussion, and in order not to make the embodiments of the present application difficult to understand, the well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided drawings. In addition, the devices may be shown in block diagram form in order not to make the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation manner of these block diagram devices are highly dependent on the platform on which the embodiments of the present application are to be implemented (i.e., these details should be fully within the understanding of those skilled in the art). In the case where specific details (such as circuits) are set forth to describe the exemplary embodiments of the present application, it will be apparent to those skilled in the art that the embodiments of the present application can be implemented without these specific details or with variations of these specific details. Therefore, these descriptions should be considered illustrative rather than restrictive.

[0279] Although the present application has been described in connection with specific embodiments of the present application, many alternatives, modifications, and variations of these embodiments will be apparent to those of ordinary skill in the art based on the foregoing description. For example, other memory architectures (such as dynamic RAM (DRAM)) can be used with the embodiments discussed.

[0280] The embodiments of the present application are intended to cover all such alternatives, modifications, and variations that fall within the broad scope of the present application. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application shall be included within the protection scope of the present application.

Claims

1. An event consensus method for asynchronous nodes, characterized in that: Applied to a communication system, the communication system includes a plurality of nodes having a communication relationship, the method includes: Taking each node in at least one starting node that receives an event from a plurality of nodes as an event node, and taking the plurality of nodes as target nodes corresponding to each event node; Based on the event, perform at least one round of consensus operation so that each of the plurality of nodes receives the event; Each round of consensus operation is performed as follows: For each event node, in response to determining that there is a node among the target nodes corresponding to the event node that has not received the event, acquiring performance data of the target nodes of the current round; Based on the performance data, determining a next event node to receive the event, and sending the event from the event node to the next event node; Based on the event, updating the performance data; For the event node, the target node after excluding the next event node is used as the target node corresponding to the event node in the next round of consensus operation, and the updated performance data is screened using the target node after excluding the next event node, and the screened performance data is used as the performance data of the target node corresponding to the event node in the next round of consensus operation; For the next event node, use the multiple nodes as target nodes corresponding to the next event node in the next round of consensus operation, and use the performance data corresponding to the multiple nodes as performance data of the target node corresponding to the next event node in the next round of consensus operation; Take each event node of the current round and the next event node determined by each event node as all event nodes in the next round of consensus operation; In response to determining that there is no node that has not received the event among the target nodes corresponding to the event node, exiting at least one round of consensus operation.

2. The method according to claim 1, characterized in that The determining, based on the performance data, a next event node for receiving the event comprises: For each of the target nodes, determining a target reputation value corresponding to the node based on the performance data; Based on the target reputation value, determining a target probability distribution value corresponding to the node; Based on all target probability distribution values, determining the event transition probability matrix corresponding to the target node; Generate a random number within a predetermined range, and determine the next event node based on the event transition probability matrix and the random number.

3. The method according to claim 2, characterized in that The determining, based on the target reputation value, a target probability distribution value corresponding to the node includes: The target probability distribution value is determined by the following formula: Among them, π target,i is the target probability distribution value of the i-th node, R′(i) is the target reputation value of the i-th node, δ i is the adaptive smoothing amount of the i-th node, δ j is the adaptive smoothing amount of the jth node, and R′(n) is the sum of the target reputation values ​​of the total number of target nodes, which is n.

4. The method according to claim 2, characterized in that: The determining, based on all target probability distribution values, an event transition probability matrix corresponding to the target node comprises: Based on the target node, construct an initial event transition probability matrix that satisfies a predetermined probability storage order; The initial event transition probability matrix is ​​modified using a predetermined summation matrix and all target probability distribution values ​​to obtain the event transition probability matrix.

5. The method according to claim 2, characterized in that: The determining, based on the performance data, a target reputation value corresponding to the node includes: Based on the performance data, determining a basic reputation value, a current reputation value, and a historical reputation value of the node; Performing a weighted summation on the basic reputation value, the current reputation value and the historical reputation value to obtain an overall reputation value; The overall reputation value is smoothed to obtain the target reputation value.

6. The method according to claim 5, characterized in that The smoothing process on the overall reputation value to obtain the target reputation value includes: The overall reputation value is smoothed by the following formula: R′(i)=(1-r)·ln(1+R(i))+r·R(i), Among them, R′(i) is the target reputation value of the i-th node, R(i) is the overall reputation value of the i-th node, and r is a predetermined adjustment parameter.

7. The method according to claim 2, characterized in that The determining the next event node based on the event transition probability matrix and the random number includes: Searching the event transfer probability matrix for a plurality of probability parameters corresponding to the event node as the node for initiating event transfer; Sorting the plurality of probability parameters according to a predetermined probability storage order to obtain a first sequence; For each probability parameter, add the probability parameter to all probability parameters located before it in the first sequence to obtain a probability comparison value; Sorting all probability comparison values ​​and the random number in ascending order to obtain a second sequence, and determining the sorting sequence number corresponding to the random number in the second sequence as the target sequence number; Searching for a target probability parameter corresponding to the target sequence number in the first sequence; The node receiving the event transfer corresponding to the target probability parameter is determined as the next event node.

8. An event consensus device for asynchronous nodes, characterized in that: Applied to a communication system, the communication system includes a plurality of nodes having a communication relationship, and the device includes: A receiving module is configured to use each node of at least one starting node that receives an event from a plurality of nodes as an event node, and use the plurality of nodes as target nodes corresponding to each event node; A consensus operation module, configured to perform at least one round of consensus operation based on the event, so that each of the plurality of nodes receives the event; The consensus operation module is also configured to perform each round of consensus operation as follows: For each event node, in response to determining that there is a node among the target nodes corresponding to the event node that has not received the event, acquiring performance data of the target nodes of the current round; Based on the performance data, determining a next event node to receive the event, and sending the event from the event node to the next event node; Based on the event, updating the performance data; For the event node, the target node after excluding the next event node is used as the target node corresponding to the event node in the next round of consensus operation, and the updated performance data is screened using the target node after excluding the next event node, and the screened performance data is used as the performance data of the target node corresponding to the event node in the next round of consensus operation; For the next event node, use the multiple nodes as target nodes corresponding to the next event node in the next round of consensus operation, and use the performance data corresponding to the multiple nodes as performance data of the target node corresponding to the next event node in the next round of consensus operation; Take each event node of the current round and the next event node determined by each event node as all event nodes in the next round of consensus operation; In response to determining that there is no node that has not received the event among the target nodes corresponding to the event node, exiting at least one round of consensus operation.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 7 is implemented.

10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Consensus node generation method and device, storage medium and processor

    CN113225191A

  • Asynchronous Byzantine consensus method and system based on DAG

    CN113923217A

  • Consensus method based on dynamic selection of consensus nodes and storage medium

    CN118764156A

  • System and method to reach consensus in a multi-chain IoT environment

    US20230138816A1