Blockchain topology-consensus collaborative evolution method and system based on reinforcement learning

By employing a reinforcement learning-based blockchain topology-consensus co-evolution method, and utilizing node state encoding and structural dynamic constraints, adaptive optimization of the blockchain network topology is achieved. This solves the problems of low efficiency in topology optimization and unstable consensus convergence in existing technologies, thereby improving the overall optimization effect and anti-disturbance capability of the network.

CN121418296BActive Publication Date: 2026-08-25EAST CHINA UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511592652.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-03
Publication Date
2026-08-25
Estimated Expiration
2045-11-03

AI Technical Summary

Technical Problem

Existing blockchain topology-consensus co-evolution methods and systems are difficult to adapt to dynamic environments, resulting in low efficiency in topology optimization, unbalanced node connections, delayed or unstable consensus convergence, lack of dynamic balancing models, and inability to effectively improve the overall network optimization effect.

Method used

A reinforcement learning-based approach is adopted to construct a topology evolution strategy through node state encoding, introduce a structural dynamic constraint mechanism, calculate the difference between potential energy change and global structural entropy, establish a topology-consensus balance equation, realize dynamic collaborative optimization of topology structure and consensus process, and verify the credibility of the process through blockchain recording.

Benefits of technology

It improves the efficiency of network topology evolution, enhances the coordination between local node behavior and the overall network structure, strengthens network reliability and anti-disturbance capabilities, and ensures rapid convergence and stability under high load or dynamic environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121418296B_ABST
    Figure CN121418296B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of communication network, and discloses a blockchain topology-consensus collaborative evolution method and system based on reinforcement learning, which comprises collecting state information of each node in a blockchain network, standardizing and multi-dimensionally extracting the state information of each node, mapping the state information into a node state feature vector available for reinforcement learning to form a node state code; constructing a reinforcement learning strategy space according to the node state code, dynamically generating a topology evolution strategy by using a strategy iteration method to realize adaptive evolution of the topology of the blockchain network; introducing a structure dynamic constraint mechanism in the reinforcement learning process to endogenously drive the topology evolution; calculating the dynamic difference between potential energy change and global structure entropy among the nodes of the blockchain network, establishing an evolution constraint function, and dynamically updating the topology evolution strategy parameters; and effectively improving the flexibility and scalability of the network structure.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of communication network technology, and more specifically, to a method and system for blockchain topology-consensus collaborative evolution based on reinforcement learning. Background Technology

[0002] Existing blockchain topology-consensus co-evolution methods and systems mainly suffer from the following problems: With the widespread application of blockchain technology in decentralized finance, IoT trust management, and multi-party collaborative computing, the network scale and number of nodes continue to grow. The dynamic evolution of the network topology has a significant impact on the consensus efficiency and security of the system. To maintain an efficient and stable consensus process in complex environments, how to achieve synergistic optimization of the blockchain network topology and consensus mechanism has become a key research issue.

[0003] However, existing blockchain topology-consensus co-evolution methods and systems still have significant shortcomings. Existing methods mostly rely on static rules or simple heuristic strategies to adjust the network connection structure, lacking the ability to adaptively adjust based on the dynamic state of nodes, interaction behavior, and global network characteristics. This results in low topology evolution efficiency and difficulty in targeted optimization of the network structure.

[0004] Existing technologies often ignore the impact of potential energy distribution and trust relationships between nodes on topology adjustments, and cannot measure the contribution of local node behavior to global network stability and consensus efficiency, which can easily lead to unbalanced or overly concentrated updates of node connection relationships.

[0005] Existing methods generally do not establish a dynamic balance model between topology changes, consensus convergence speed and system structure entropy changes, which leads to the disconnect between the topology optimization process and the consensus evolution process. Under conditions of high dynamic load or frequent node changes, the network may experience consensus convergence delay, oscillation or instability.

[0006] The topology reconstruction process of traditional blockchain systems often relies on manually set connection strategies or threshold mechanisms, lacking real-time linkage with node behavior feedback and global consensus state, making it difficult to achieve self-organized evolution of the topology structure. Existing methods also fail to quantify the impact of topology changes on consensus stability and structural entropy changes on network orderliness at the system level, resulting in limited overall network optimization effects.

[0007] In view of this, the present invention proposes a blockchain topology-consensus co-evolution method based on reinforcement learning to solve the above problems. Summary of the Invention

[0008] To overcome the aforementioned shortcomings of existing technologies and achieve the above objectives, this invention provides the following technical solution: a reinforcement learning-based blockchain topology-consensus co-evolution method, comprising: S1. Collect the state information of each node in the blockchain network, standardize the state information of each node and extract multi-dimensional features, map it into a node state feature vector that can be used for reinforcement learning, and form a node state code. S2. Construct a reinforcement learning policy space based on node state encoding, and dynamically generate topology evolution policies using policy iteration methods to achieve topology adaptive evolution of the blockchain network. S3. Introduce a structural dynamic constraint mechanism during reinforcement learning to drive the endogenous evolution of topology; calculate the dynamic difference between the potential energy change and the global structural entropy among blockchain network nodes, establish an evolution constraint function, and dynamically update the parameters of the topology evolution strategy. S4. Based on the updated topology evolution strategy parameters, construct the topology-consensus balance equation to characterize the dynamic balance relationship between topology evolution and consensus convergence process; and solve the balance equation to obtain the topology evolution state parameters. S5. Record the topology evolution state parameters in a cryptographic manner to the blockchain ledger to achieve trusted verification of the topology-consensus co-evolution process driven by reinforcement learning.

[0009] Specifically, the state information of each node in the blockchain network includes computing resource parameter information, storage resource parameter information, communication characteristic parameter information, behavioral characteristic parameter information, reputation and security characteristic information, and topology characteristic information.

[0010] Specifically, the method for forming node state codes includes: The state information of each node in the blockchain network is periodically collected according to a preset sampling frequency, and node identifiers and timestamps for traceability are added; the collected state information of each node is preprocessed and then normalized to obtain node state data. Basic and derived features are extracted from the node state data, and then concatenated in a unified format for feature vector mapping to obtain node state feature vectors. Time series encoding is then performed on the node state feature vectors to form node state codes for reinforcement learning input.

[0011] Specifically, the method for realizing the topology adaptive evolution of the blockchain network includes: The node state encoding is used as the input to the reinforcement learning environment. The scope of the topology evolution policy is defined based on the node state encoding, and the set of topology evolution actions is constructed based on the scope of the topology evolution policy. The node state encoding and the set of topology evolution actions are used as the input to policy iteration to perform an alternating policy evaluation and policy improvement process. The expected cumulative reward is calculated based on the results of multiple executions of the current strategy driven by node state encoding. The topology evolution strategy is then updated based on the expected cumulative reward during the strategy improvement process. By continuously iterating, the set of topology evolution actions gradually approaches the optimal value, thereby obtaining the topology evolution strategy. The topology evolution strategy is then written back into the blockchain network structure to drive the adaptive adjustment of node connection relationships and topology structure during operation, thus forming a topology adaptive evolution of the blockchain network based on reinforcement learning.

[0012] Specifically, the endogenous driving method for topological evolution includes: In the reinforcement learning process, a structural dynamic constraint mechanism is introduced to drive the endogenous evolution of topology. The structural dynamic constraint mechanism constrains the connection weights, interaction frequencies, and local clustering of nodes by embedding dynamic feedback quantities of the network structure into the state-action space of the reinforcement learning agent. During the training iteration process, reinforcement learning agents adjust and reconstruct the node connection relationships based on the current dynamic state of the network structure, forming a self-regulating closed loop of structure. This enables the network topology to spontaneously reorganize when there are external disturbances or internal energy imbalances, realizing the endogenous driving force of the topology shape to evolve with the structural dynamics.

[0013] Specifically, the method for dynamically updating the topology evolution strategy parameters includes: In the reinforcement learning training process of the blockchain network, a reinforcement evolution constraint function is established to calculate the dynamic difference between the potential energy change and the global structural entropy among the blockchain network nodes; based on the reinforcement evolution constraint function, the parameters of the topology evolution strategy are dynamically updated.

[0014] Specifically, the method for characterizing the dynamic balance between topological evolution and consensus convergence includes: Define the network topology evolution rate to measure the blockchain network at a given point in time. The overall changes in the weights of internal links; based on the updated topology evolution strategy parameters and combined with the network topology evolution rate, a topology-consensus balance equation is constructed to characterize the dynamic balance relationship between topology evolution and consensus convergence process.

[0015] Specifically, the method for obtaining the topological evolution state parameters includes: The topology-consensus balance equation under continuous time is discretized, and the network topology evolution rate is iteratively calculated within discrete time steps. In each iteration period, the parameters of the topology-consensus balance equation are corrected according to the changes in the topology evolution rate, consensus convergence rate, and global structural entropy. When the iteration reaches the preset convergence condition, the parameters of the topology-consensus balance equation and the network topology evolution rate are output as topology evolution state parameters.

[0016] Specifically, the method for achieving trusted verification of the topology-consensus co-evolution process driven by reinforcement learning includes: The acquired topology evolution state parameters are encrypted to generate digital signatures. The encrypted topology evolution state parameters are broadcast and stored through the transaction generation and on-chain mechanism of the blockchain network. After each node receives the transaction, it uses the public key corresponding to the digital signature to verify the consistency of the digital signature, thereby verifying the authenticity and integrity of the topology evolution state parameters and realizing the trusted verification of the topology-consensus co-evolution process driven by reinforcement learning.

[0017] A blockchain topology-consensus co-evolution system based on reinforcement learning includes: The node state awareness module collects the state information of each node in the blockchain network, standardizes and extracts multi-dimensional features from the state information of each node, maps it into a node state feature vector that can be used for reinforcement learning, and forms a node state code. The topology evolution module constructs a reinforcement learning policy space based on node state encoding, and dynamically generates topology evolution policies using policy iteration methods to achieve adaptive topology evolution of the blockchain network. The evolution constraint module is strengthened by introducing a structural dynamic constraint mechanism during the reinforcement learning process to drive the endogenous evolution of the topology. The dynamic difference between the potential energy change and the global structural entropy among the blockchain network nodes is calculated to establish an evolution constraint function and dynamically update the parameters of the topology evolution strategy. The topology-consensus coupling balancing module constructs a topology-consensus balancing equation based on the updated topology evolution strategy parameters, characterizing the dynamic balance relationship between topology evolution and consensus convergence; and solves the balancing equation to obtain the topology evolution state parameters. The trusted verification module records the topology evolution state parameters to the blockchain ledger in an encrypted manner, thereby enabling trusted verification of the topology-consensus co-evolution process driven by reinforcement learning.

[0018] Compared with the prior art, the present invention has the following beneficial effects: This invention introduces an endogenous driving mechanism by reinforcing the evolutionary constraint function, enabling dynamic adaptive optimization of the topology based on node states and the overall network, thus improving network topology evolution efficiency. By dynamically adjusting the policy in conjunction with node potential and trust strength, the local behavior of each node aligns with the overall network structure, enhancing network reliability and resilience. The policy update process simultaneously considers global structural entropy and topology evolution rate, achieving a dynamic balance between topology optimization and consensus convergence, improving convergence speed and stability under high load or dynamic environments. Mapping the complex network topology optimization problem to a differentiable reinforcing evolutionary constraint function allows reinforcement learning agents to efficiently learn optimal policies, demonstrating feasibility and operability.

[0019] Through the topology-consensus balancing equation, the network can dynamically adjust its topology and consensus strategy, enabling them to work synergistically and improve overall network convergence efficiency. The network topology evolution rate and global structural entropy provide precise and quantifiable data for policy optimization, enhancing the accuracy of network management and optimization. The dynamic balancing mechanism between topology evolution and consensus convergence effectively suppresses convergence delays and instabilities caused by high disorder, improving the network's resilience to disturbances. Incorporating the topology evolution rate and global structural entropy into state features enables reinforcement learning agents to efficiently learn optimal policies, ensuring the network's adaptability in complex environments. Attached Figure Description

[0020] Figure 1 This is a schematic diagram of the blockchain topology-consensus collaborative evolution method based on reinforcement learning according to the present invention; Figure 2 This is a schematic diagram of the blockchain topology-consensus collaborative evolution system based on reinforcement learning according to the present invention. Detailed Implementation

[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0022] Example 1

[0023] Please see Figure 1 As shown, this embodiment provides a reinforcement learning-based blockchain topology-consensus co-evolution method, which specifically includes the following steps: S1. Collect the state information of each node in the blockchain network, standardize the state information of each node and extract multi-dimensional features, map it into a node state feature vector that can be used for reinforcement learning, and form a node state code. S2. Construct a reinforcement learning policy space based on node state encoding, and dynamically generate topology evolution policies using policy iteration methods to achieve topology adaptive evolution of the blockchain network. S3. Introduce a structural dynamic constraint mechanism during reinforcement learning to drive the endogenous evolution of topology; calculate the dynamic difference between the potential energy change and the global structural entropy among blockchain network nodes, establish an evolution constraint function, and dynamically update the parameters of the topology evolution strategy. S4. Based on the updated topology evolution strategy parameters, construct the topology-consensus balance equation to characterize the dynamic balance relationship between topology evolution and consensus convergence process; and solve the balance equation to obtain the topology evolution state parameters. S5. Record the topology evolution state parameters in a cryptographic manner to the blockchain ledger to achieve trusted verification of the topology-consensus co-evolution process driven by reinforcement learning.

[0024] The state information of each node in a blockchain network includes computing resource parameters, storage resource parameters, communication characteristic parameters, behavioral characteristic parameters, reputation and security characteristic information, and topology characteristic information.

[0025] Computing resource parameters include the node's real-time computing power, CPU or GPU utilization, and task execution load rate, which reflect the node's computing power level for processing transactions and participating in consensus; storage resource parameters include the node's available storage space, ledger data synchronization latency, and historical block cache ratio, which are used to evaluate the node's data carrying capacity and ledger maintenance efficiency; communication characteristic parameters include the average transmission latency between nodes, bandwidth utilization, link stability, and message packet loss rate, which describe the node's communication performance and reliability in the network topology. Behavioral characteristic parameters include the node's transaction initiation frequency, transaction verification count, voting participation count, and average response time, used to characterize the node's activity and consensus participation in the network; reputation and security characteristic information includes the node's historical consensus records, abnormal behavior detection results, trust scores, and penalized participation records, used to measure the node's stability and credibility; topological structure characteristic information includes node connectivity, number of neighboring nodes, local clustering coefficient, and betweenness centrality, used to characterize the node's position and influence in the network structure.

[0026] Methods for generating node state codes include: The state information of each node in the blockchain network is periodically collected according to a preset sampling frequency, and node identifiers and timestamps for traceability are added; the collected state information of each node is preprocessed and then normalized to obtain node state data. The preprocessing operations performed on the collected node status information include missing value compensation, outlier detection, and data standardization. Outlier detection can be performed on the node status information based on statistical methods such as standard deviation or quartiles. After filtering outlier data, missing value compensation is further performed using methods such as sliding window mean or exponential moving average. Finally, data standardization is performed through Min-Max normalization to obtain the processed node status data. Basic and derived features are extracted from the node state data, and then concatenated in a unified format for feature vector mapping to obtain node state feature vectors. Furthermore, time series encoding is performed on the node state feature vectors (for example, by concatenating node state feature vectors from multiple time points through a sliding window to form a time-fusion state code) to form a node state code for reinforcement learning input.

[0027] It should be noted that the basic features of node status data can be extracted using statistical methods. For example, within a preset fixed time window, window statistical features can be extracted from the pre-processed node status data to obtain basic statistical quantities such as mean, variance, extreme values, and data deviation. This allows us to obtain the basic features of the node status data, which can be used to characterize the stability and volatility of the node status data within the current time window. The process of extracting derived features from node status data includes: constructing derived features based on the physical and logical relationships between different node status data, such as: calculating the ratio of real-time computing power to task execution load rate to obtain a unit computing power load index; combining average transmission latency and link stability to generate a communication reliability metric; and combining node connectivity and local clustering coefficient to characterize the load concentration of nodes in the topology. Based on node state data, growth rate derived features are constructed using adjacent window differences to extract derived features reflecting changing trends, such as calculating dynamic trends of accumulated load pressure, communication degradation, or behavioral pattern changes. For topological feature information, graph structure embedding calculations are performed based on the position of nodes in the network structure, transforming structural quantities such as node connectivity, number of adjacent nodes, local clustering coefficient, and betweenness centrality into fixed-length topological embedding vectors to form topological derived features. Finally, the basic features and derived features are concatenated and integrated in a unified format, and the feature vectors are mapped using linear mapping (such as fully connected layers) or non-linear mapping (such as transformations with activation functions) to obtain the node state feature vectors.

[0028] Feature vector mapping is used to unify feature dimensions (compressing features of varying lengths to a fixed length) and to remove redundancy, compress, and extract expressive patterns that can be used for decision-making. For example, assuming that the feature vector formed by splicing and integrating is 87-dimensional, and the input for reinforcement learning is pre-set to be 64-dimensional (which can be set by experts or staff), then feature mapping is performed on the 87-dimensional feature vector to output a 64-dimensional feature vector, which is the node state feature vector.

[0029] Methods for achieving topology adaptive evolution of blockchain networks include: The node state encoding is used as the input to the reinforcement learning environment. The scope of the topology evolution policy is defined based on the node state encoding, and the set of topology evolution actions is constructed based on the scope of the topology evolution policy. The node state encoding and the set of topology evolution actions are used as the input to policy iteration to perform an alternating policy evaluation and policy improvement process. The expected cumulative reward is calculated based on the results of multiple executions of the current strategy driven by node state encoding (for example, after the connection between the execution action nodes C and D, the consensus delay, block generation success rate and topology entropy change are observed and the corresponding reward value is calculated). During the strategy improvement process, the topology evolution strategy is updated according to the expected cumulative reward, so that subsequent decisions tend to be in the direction of topology evolution action that obtains higher cumulative rewards. By continuously iterating, the set of topology evolution actions gradually approaches the optimal (e.g., the cumulative reward is expected to converge), thereby obtaining the topology evolution strategy. The topology evolution strategy is then written back into the blockchain network structure to drive the adaptive adjustment of node connection relationships and topology structure during operation, thus forming a topology adaptive evolution of the blockchain network based on reinforcement learning.

[0030] It should be noted that the scope of the topology evolution strategy specifically refers to the boundary of the topology adjustment operations that are allowed to be performed in reinforcement learning decision-making. That is, it specifies which types of topology modifications are allowed and which are not. For example, the scope of allowed topology operations such as adding connections, deleting connections, adjusting connection weights, and reallocating neighbor sets. The set of topology evolution actions refers to the instantiation of the abstract policy scope into executable actions after defining the topology evolution policy scope and combining it with the current "node state encoding", which constitutes the Action Space in reinforcement learning; for example: A1: Add a connection edge between nodes A and B (add connection); A2: Delete the connection edge between nodes C and D (delete connection); A3: Move the original neighbor H of node G to node J (redistribute the neighbor set).

[0031] Endogenous driving methods for topological evolution include: In the reinforcement learning process, a structural dynamic constraint mechanism is introduced to drive the endogenous evolution of the topology. The structural dynamic constraint mechanism embeds the dynamic feedback of the network structure into the state-action space of the reinforcement learning agent, constraining the connection weights, interaction frequencies and local clustering of nodes. This makes the evolution of the network structure no longer dependent on external reward signals, but driven by the stability and dynamic balance of the internal structure of the network. It should be noted that the constraint on the connection weight between nodes is used to prevent the structural centralization problem caused by a few nodes having excessively high weights. By limiting the maximum inbound and outbound weights of a single node and controlling the weight adjustment rate, the balance and dynamic smoothness of the connections between nodes are maintained. The constraint on the interaction frequency between nodes is used to suppress the on-chain load imbalance problem caused by excessive communication or transaction behavior. By setting an upper limit on the interaction frequency, the strategy can automatically balance the interaction activity and network energy efficiency during the update process.

[0032] Constraints on local clustering are used to control network clustering and prevent node isolation during topology evolution. By dynamically monitoring the local clustering coefficient of each node and keeping it within a preset range, strategies are implemented to suppress further internal connections when clustering is too high and to guide cross-community connections when clustering is too low, thereby maintaining a dynamic balance between global synergy and local autonomy in the topology.

[0033] During the training iteration process, reinforcement learning agents adjust and reconstruct the node connection relationships based on the current dynamic state of the network structure, forming a self-regulating closed loop of structure. This enables the network topology to spontaneously reorganize when there are external disturbances or internal energy imbalances, realizing the endogenous driving force of the topology shape to evolve with the structural dynamics.

[0034] Methods for dynamically updating topology evolution strategy parameters include: In the reinforcement learning training process of the blockchain network, a reinforcement evolution constraint function is established to calculate the dynamic difference between the potential energy change and the global structural entropy among the blockchain network nodes. The enhanced evolution constraint function is: ;in, The reinforcement evolution constraint function is a time integral objective function used to measure the performance of the entire network at time points. Previous topological evolution results; This represents the upper limit of the time point in the topological evolution; This indicates that the ordered reinforcement weights control the influence of the network topological potential gradient on policy updates. This represents the disordered penalty weight, which controls the inhibitory effect of network structure entropy on policy updates. The structural gradient of the network potential field is used to measure the cooperative strength of topology reconstruction, which is equivalent to the rate of change of potential energy along the topological direction within the network. The node potential-trust coupling term represents the time-dependent relationship between nodes in the network. The local dynamic state; This represents the squared magnitude of the structural gradient; Indicates a point in time The global structural entropy represents the degree of disorder or complexity of the network. It is an indicator of disorder and is obtained based on the entropy distribution of node degree. Indicates the time interval Any instantaneous point in time within; Node potential-trust coupling term: Any instantaneous point in time within; Node potential-trust coupling term: Represents a node The trust strength represents the influence of a node in the network. It is obtained by quantifying and weighting the block success rate, transaction verification accuracy, and network activity of each node. Represents a node The topological potential energy is obtained by counting the degree of a node, that is, by counting the number of direct connections between a node and its neighboring nodes. This represents the index of each node in the blockchain network; Based on the reinforcement evolution constraint function, the parameters of the topology evolution strategy are dynamically updated. The update law is defined as follows: ;in, This indicates that the reinforcement learning agent is in the first... The policy parameters are updated after the next iteration. This indicates that the reinforcement learning agent is in the first... Strategy parameters at the next iteration; The learning rate controls the step size for each policy update. The gradient represents the policy gradient, which is the effect of the reinforcement evolution constraint function on the policy parameters. The direction of the partial derivative; Indicates the strategy parameters; Indicates the number of iterations in reinforcement learning; This solution addresses the following technical problems of existing technologies: Existing methods largely rely on static rules to adjust network structure, failing to adaptively adjust the topology based on node dynamic states and the overall network structure, resulting in low topology evolution efficiency and difficulty in optimizing the network structure. Existing technologies often neglect the impact of potential energy distribution and trust relationships between nodes on topology adjustments, failing to measure the contribution of local node behavior to global network stability. Furthermore, the lack of a modeling method for the dynamic balance between topology changes, consensus convergence speed, and network entropy changes leads to a disconnect between topology optimization and the consensus process, potentially causing convergence delays or instability under high dynamic loads.

[0035] Compared to existing technologies, the advantages are as follows: By introducing an endogenous driving mechanism through enhanced evolutionary constraint functions, the topology structure is dynamically and adaptively optimized based on node states and the overall network, improving network topology evolution efficiency. Dynamically adjusting the policy by combining node potential and trust strength ensures that the local behavior of each node aligns with the overall network structure, enhancing network reliability and resilience. The policy update process considers both global structural entropy and topology evolution rate, achieving a dynamic balance between topology optimization and consensus convergence, improving convergence speed and stability under high load or dynamic environments. Mapping the complex network topology optimization problem to a differentiable enhanced evolutionary constraint function enables reinforcement learning agents to efficiently learn optimal policies, demonstrating feasibility.

[0036] Methods for characterizing the dynamic equilibrium relationship between topological evolution and consensus convergence include: Define the network topology evolution rate to measure the blockchain network at a given point in time. Overall changes in internal link weights; network topology evolution rate: ;in, Indicates the blockchain network at a certain point in time. The topological evolution rate, i.e., the rate of change of the blockchain network at a given point in time. The rate of structural change; This represents the rate of change of link weight over time; Indicates a point in time node With nodes Link weights between; This represents the total number of network edges, i.e., the total number of links; Index representing a point in time; Based on the updated topology evolution strategy parameters and combined with the network topology evolution rate, a topology-consensus balance equation is constructed to characterize the dynamic balance relationship between topology evolution and consensus convergence process.

[0037] The topological consensus equilibrium equation is: ;in, Indicates a point in time The consensus convergence rate reflects the degree of consistency in reaching a consensus among nodes; This represents the rate of change of the consensus convergence rate; This represents the topology enhancement coefficient, indicating the strength of the impact of topological compactness on consensus acceleration; This represents the entropy suppression coefficient, indicating the degree to which network disorder suppresses consensus stability; Indicates a point in time The rate of change of global structural entropy; Indicates a point in time The global structural entropy.

[0038] The following technical problems of existing technologies are solved: the evolution of network topology usually depends on static rules or manually set node connection strategies, lacking dynamic coupling with node behavior feedback and global consensus state, making it difficult for the topology reconstruction process to adapt and adjust; the consensus convergence process is independent of topology changes and cannot reflect the dynamic cooperative relationship between nodes, and the stability and convergence speed of the system are easily compromised when there are network disturbances or node failures; existing methods cannot effectively describe the impact of topology changes on consensus dynamics, thus making it difficult to achieve system-level optimization control.

[0039] Compared to existing technologies, the beneficial effects are as follows: Through the topology-consensus balance equation, the network can dynamically adjust its topology and consensus strategy, enabling them to work synergistically and improve the overall convergence efficiency. The network topology evolution rate and global structural entropy provide precise and quantifiable data for policy optimization, improving the accuracy of network management and optimization. The dynamic balance mechanism between topology evolution and consensus convergence effectively suppresses convergence delays and instabilities caused by high disorder, improving the network's resilience to disturbances. Incorporating the topology evolution rate and global structural entropy into state features enables reinforcement learning agents to efficiently learn optimal policies, ensuring the network's adaptability in complex environments.

[0040] Methods for obtaining topology evolution state parameters include: The topology-consensus balance equation under continuous time is discretized, and the network topology evolution rate is iteratively calculated within discrete time steps. In each iteration period, the parameters of the topology-consensus balance equation are corrected according to the changes in the topology evolution rate, consensus convergence rate, and global structural entropy. When the iteration reaches the preset convergence condition, the parameters of the topology-consensus balance equation and the network topology evolution rate are output as topology evolution state parameters.

[0041] The preset convergence conditions include the change in topological evolution rate being less than a preset threshold for the change in topological evolution rate, the change in consensus convergence rate being less than a preset threshold for the change in consensus convergence rate, and the change in global structural entropy being less than a preset threshold for the change in global structural entropy.

[0042] Methods for achieving trusted verification of the topology-consensus co-evolution process driven by reinforcement learning include: The acquired topology evolution state parameters are encrypted to generate digital signatures. The encrypted topology evolution state parameters are broadcast and stored through the transaction generation and on-chain mechanism of the blockchain network. After each node receives the transaction, it uses the public key corresponding to the digital signature to verify the consistency of the digital signature, thereby verifying the authenticity and integrity of the topology evolution state parameters and realizing the trusted verification of the topology-consensus co-evolution process driven by reinforcement learning.

[0043] The preset threshold for the change in topology evolution rate is set by staff based on historical data analysis results. This historical analysis process includes the system collecting multiple changes in topology evolution rate and calculating their average value as a reference to obtain the preset threshold for the change in topology evolution rate. Similarly, the preset threshold for the change in consensus convergence rate and the preset threshold for the change in global structure entropy are also set by staff based on the system's historical operating data and the specific application scenario requirements.

[0044] This embodiment introduces an endogenous driving mechanism by reinforcing the evolutionary constraint function, enabling dynamic adaptive optimization of the topology based on node states and the overall network, thus improving network topology evolution efficiency. Dynamically adjusting the policy by combining node potential and trust strength ensures that each node's local behavior aligns with the overall network structure, enhancing network reliability and resilience. The policy update process considers both global structural entropy and topology evolution rate, achieving a dynamic balance between topology optimization and consensus convergence, improving convergence speed and stability under high load or dynamic environments. Mapping the complex network topology optimization problem to a differentiable reinforcement evolutionary constraint function allows reinforcement learning agents to efficiently learn optimal policies, demonstrating feasibility.

[0045] Through the topology-consensus balancing equation, the network can dynamically adjust its topology and consensus strategy, enabling them to work synergistically and improve overall network convergence efficiency. The network topology evolution rate and global structural entropy provide precise and quantifiable data for policy optimization, enhancing the accuracy of network management and optimization. The dynamic balancing mechanism between topology evolution and consensus convergence effectively suppresses convergence delays and instabilities caused by high disorder, improving the network's resilience to disturbances. Incorporating the topology evolution rate and global structural entropy into state features enables reinforcement learning agents to efficiently learn optimal policies, ensuring the network's adaptability in complex environments.

[0046] Example 2

[0047] Please see Figure 2 As shown, parts not described in detail in this embodiment are described in Embodiment 1. A reinforcement learning-based blockchain topology-consensus co-evolution system is provided, including: The node state awareness module collects the state information of each node in the blockchain network, standardizes and extracts multi-dimensional features from the state information of each node, maps it into a node state feature vector that can be used for reinforcement learning, and forms a node state code. The topology evolution module constructs a reinforcement learning policy space based on node state encoding, and dynamically generates topology evolution policies using policy iteration methods to achieve adaptive topology evolution of the blockchain network. The evolution constraint module is strengthened by introducing a structural dynamic constraint mechanism during the reinforcement learning process to drive the endogenous evolution of the topology. The dynamic difference between the potential energy change and the global structural entropy among the blockchain network nodes is calculated to establish an evolution constraint function and dynamically update the parameters of the topology evolution strategy. The topology-consensus coupling balancing module constructs a topology-consensus balancing equation based on the updated topology evolution strategy parameters, characterizing the dynamic balance relationship between topology evolution and consensus convergence; and solves the balancing equation to obtain the topology evolution state parameters. The trusted verification module records the topology evolution state parameters to the blockchain ledger in an encrypted manner, thereby enabling trusted verification of the topology-consensus co-evolution process driven by reinforcement learning.

[0048] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters and thresholds in the formulas are set by those skilled in the art according to the actual situation.

[0049] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should also be considered within the scope of protection of the present invention.

Claims

1. A reinforcement learning-based blockchain topology-consensus co-evolution method, characterized in that, include: S1. Collect the state information of each node in the blockchain network, standardize the state information of each node and extract multi-dimensional features, map it into a node state feature vector that can be used for reinforcement learning, and form a node state code. S2. Construct a reinforcement learning policy space based on node state encoding, and dynamically generate topology evolution policies using policy iteration methods to achieve topology adaptive evolution of the blockchain network. S3. Introduce structural dynamic constraint mechanisms during reinforcement learning to drive endogenous topology evolution, including: In the reinforcement learning process, a structural dynamic constraint mechanism is introduced to drive the endogenous evolution of topology. The structural dynamic constraint mechanism constrains the connection weights, interaction frequencies, and local clustering of nodes by embedding dynamic feedback quantities of the network structure into the state-action space of the reinforcement learning agent. During the training iteration process, reinforcement learning agents adjust and reconstruct the node connection relationships based on the dynamic state of the current network structure, forming a self-regulating closed loop of structure. This enables the network topology to spontaneously reorganize when there are external disturbances or internal energy imbalances, realizing the endogenous driving force of the topology shape to evolve with the structural dynamics. The dynamic difference between the potential energy change and the global structural entropy among blockchain network nodes is calculated, a reinforcement evolution constraint function is established, and the parameters of the topology evolution strategy are dynamically updated. S4. Based on the updated topology evolution strategy parameters, construct the topology-consensus balance equation to characterize the dynamic balance relationship between topology evolution and consensus convergence process; and solve the balance equation to obtain the topology evolution state parameters. S5. Record the topology evolution state parameters in a cryptographic manner to the blockchain ledger to achieve trusted verification of the topology-consensus co-evolution process driven by reinforcement learning.

2. The reinforcement learning-based blockchain topology-consensus co-evolution method according to claim 1, characterized in that, The status information of each node in the blockchain network includes computing resource parameter information, storage resource parameter information, communication characteristic parameter information, behavioral characteristic parameter information, reputation and security characteristic information, and topology characteristic information.

3. The reinforcement learning-based blockchain topology-consensus co-evolution method according to claim 2, characterized in that, The node state encoding includes: The state information of each node in the blockchain network is periodically collected according to a preset sampling frequency, and node identifiers and timestamps for traceability are added; the collected state information of each node is preprocessed and then normalized to obtain node state data. Basic and derived features are extracted from the node state data, and then concatenated in a unified format for feature vector mapping to obtain node state feature vectors. Time series encoding is then performed on the node state feature vectors to form node state codes for reinforcement learning input.

4. The reinforcement learning-based blockchain topology-consensus co-evolution method according to claim 3, characterized in that, The implementation of topology adaptive evolution of the blockchain network includes: The node state encoding is used as the input to the reinforcement learning environment. The scope of the topology evolution policy is defined based on the node state encoding, and the set of topology evolution actions is constructed based on the scope of the topology evolution policy. The node state encoding and the set of topology evolution actions are used as the input to policy iteration to perform an alternating policy evaluation and policy improvement process. The expected cumulative reward is calculated based on the results of multiple executions of the current strategy driven by node state encoding. The topology evolution strategy is then updated based on the expected cumulative reward during the strategy improvement process. By continuously iterating, the set of topology evolution actions gradually approaches the optimal value, thereby obtaining the topology evolution strategy. The topology evolution strategy is then written back into the blockchain network structure to drive the adaptive adjustment of node connection relationships and topology structure during operation, thus forming a topology adaptive evolution of the blockchain network based on reinforcement learning.

5. The reinforcement learning-based blockchain topology-consensus co-evolution method according to claim 4, characterized in that, The dynamic updating of the topology evolution strategy parameters includes: In the reinforcement learning training process of the blockchain network, a reinforcement evolution constraint function is established to calculate the dynamic difference between the potential energy change and the global structural entropy among the blockchain network nodes; based on the reinforcement evolution constraint function, the parameters of the topology evolution strategy are dynamically updated.

6. The reinforcement learning-based blockchain topology-consensus co-evolution method according to claim 5, characterized in that, The dynamic balance between topological evolution and consensus convergence process is described as follows: Define the network topology evolution rate to measure the blockchain network at a given point in time. The rate of change of link weights; based on the updated topology evolution strategy parameters and combined with the network topology evolution rate, a topology-consensus balance equation is constructed to characterize the dynamic balance relationship between topology evolution and consensus convergence process.

7. The reinforcement learning-based blockchain topology-consensus co-evolution method according to claim 6, characterized in that, The trusted verification of the topology-consensus co-evolution process driven by reinforcement learning includes: The acquired topology evolution state parameters are encrypted to generate digital signatures. The encrypted topology evolution state parameters are broadcast and stored through the transaction generation and on-chain mechanism of the blockchain network. After each node receives the transaction, it uses the public key corresponding to the digital signature to verify the consistency of the digital signature, thereby verifying the authenticity and integrity of the topology evolution state parameters and realizing the trusted verification of the topology-consensus co-evolution process driven by reinforcement learning.

8. A reinforcement learning-based blockchain topology-consensus co-evolution system, used to implement the reinforcement learning-based blockchain topology-consensus co-evolution method as described in any one of claims 1 to 7, characterized in that, include: The node state awareness module collects the state information of each node in the blockchain network, standardizes and extracts multi-dimensional features from the state information of each node, maps it into a node state feature vector that can be used for reinforcement learning, and forms a node state code. The topology evolution module constructs a reinforcement learning policy space based on node state encoding, and dynamically generates topology evolution policies using policy iteration methods to achieve adaptive topology evolution of the blockchain network. The reinforcement evolution constraint module introduces a structural dynamic constraint mechanism during the reinforcement learning process to drive the endogenous evolution of topology. Specifically, the structural dynamic constraint mechanism is introduced during the reinforcement learning process to drive the endogenous evolution of topology. The structural dynamic constraint mechanism constrains the connection weights, interaction frequencies, and local clustering of nodes by embedding dynamic feedback quantities of the network structure into the state-action space of the reinforcement learning agent. During the training iteration process, reinforcement learning agents adjust and reconstruct the node connection relationships based on the dynamic state of the current network structure, forming a self-regulating closed loop of structure. This enables the network topology to spontaneously reorganize when there are external disturbances or internal energy imbalances, realizing the endogenous driving force of the topology shape to evolve with the structural dynamics. The dynamic difference between the potential energy change and the global structural entropy among blockchain network nodes is calculated, a reinforcement evolution constraint function is established, and the parameters of the topology evolution strategy are dynamically updated. The topology-consensus coupling balancing module constructs a topology-consensus balancing equation based on the updated topology evolution strategy parameters, characterizing the dynamic balance relationship between topology evolution and consensus convergence; and solves the balancing equation to obtain the topology evolution state parameters. The trusted verification module records the topology evolution state parameters to the blockchain ledger in an encrypted manner, thereby enabling trusted verification of the topology-consensus co-evolution process driven by reinforcement learning.

Citation Information

Patent Citations

  • Block chain consensus layer parameter adaptive method and system based on reinforcement learning

    CN118784657A

  • Network topology intelligent generation method and system based on deep learning and topology analysis

    CN120416056A