Blockchain peer-to-peer network link identification method and system
Patent Information
- Application Number
- CN202610845014.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-11
- Publication Date
- 2026-10-16
AI Technical Summary
[0004]基于此,有必要针对现有技术中无法量化节点感染与链路失效双向耦合演化过程中链路对全局感染贡献程度的技术问题,提出了一种区块链对等网络的链路识别方法及系统
[0009]本申请实施方式提供的区块链对等网络的链路识别方法,通过获取拓扑结构、初始节点感染状态、初始链路失效状态及动力学参数,并对描述节点感染与链路失效双向耦合的动力学模型进行求解,得到每个节点的感染状态轨迹和每条链路的失效概率轨迹,使链路重要性分析能够基于动态演化过程而非静态拓扑快照。在此基础上,根据节点感染轨迹确定全局感染变化量,并将每条链路的失效概率轨迹与该变化量进行加权累积,得到链路的重要性度量值,该度量值直接反映了链路在感染加速阶段对全局感染进程的实际贡献程度。由此,区块链对等网络的链路识别方法量化了双向耦合演化过程中链路对全局感染的贡献程度,使识别结果与攻击传播过程语义一致,克服了现有技术中因忽视动态反馈导致的过程关键链路漏报和结构突出链路误报的问题,提升了区块链对等网络关键链路识别的动态适应性和准确性。
Smart Images

Figure CN122933052A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of blockchain peer-to-peer network technology, and in particular to a link identification method and system for blockchain peer-to-peer networks. Background Technology
[0002] Link importance identification in blockchain peer-to-peer (P2P) overlay networks plays a crucial role in security monitoring and attack surface compression. Existing technical approaches typically score links based on static topological centrality metrics (such as edge betweenness centrality), or map shallow statistics (such as latency and packet loss rate) from a single snapshot to edge weights. Some methods also utilize graph neural networks for link prediction or anomaly detection. These methods often treat the network as a static or quasi-static structure during analysis, and their evaluation results depend on aggregated topology or isolated statistical characteristics at a given moment, failing to consider the dynamic interaction between node infection status and link failure probability during attack propagation.
[0003] In real-world attack scenarios, the compromise of a node drives the degradation of adjacent links, which in turn inhibits the spread of infection along that link, forming a bidirectional, coupled feedback loop. Existing methods, lacking modeling of this dynamic evolution, cannot identify links that remain at high risk of failure during the infection acceleration phase. This can easily lead to missed detections of critical links with inconspicuous structures, or false positives of structurally significant links with low contribution to the process. Summary of the Invention
[0004] Based on this, it is necessary to address the technical problem that existing technologies cannot quantify the contribution of links to global infection during the bidirectional coupling evolution of node infection and link failure. Therefore, a link identification method and system for blockchain peer-to-peer networks is proposed.
[0005] Firstly, a link identification method for a blockchain peer-to-peer network is provided. The method includes: acquiring the topology of the blockchain peer-to-peer network, the initial node infection state and initial link failure state of the blockchain peer-to-peer network under an attack scenario, and preset dynamic parameters; solving a dynamic model describing the bidirectional coupling relationship between node infection state and link failure probability based on the topology, the initial node infection state, the initial link failure state, and the dynamic parameters to obtain the infection state trajectory of each node within an observation time window and the failure probability trajectory of each link within the observation time window; determining the change in the global infection state within the observation time window based on the infection state trajectory of each node within the observation time window; determining the importance metric value of each link based on the link failure probability trajectory and the change in the global infection state; and determining the link identification result of the blockchain peer-to-peer network based on the importance metric value of each link.
[0006] Secondly, a link identification system for a blockchain peer-to-peer network is provided. The system includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the link identification method for the blockchain peer-to-peer network described above.
[0007] Thirdly, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the aforementioned link identification method for a blockchain peer-to-peer network.
[0008] Fourthly, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-described link identification method for blockchain peer-to-peer networks.
[0009] The link identification method for blockchain peer-to-peer networks provided in this application acquires the topology, initial node infection state, initial link failure state, and dynamic parameters. It then solves a dynamic model describing the bidirectional coupling between node infection and link failure, obtaining the infection state trajectory of each node and the failure probability trajectory of each link. This allows link importance analysis to be based on a dynamic evolution process rather than a static topology snapshot. Based on this, the global infection change is determined according to the node infection trajectory, and the failure probability trajectory of each link is weighted and accumulated with this change to obtain a link importance metric. This metric directly reflects the actual contribution of the link to the global infection process during the infection acceleration phase. Therefore, the link identification method for blockchain peer-to-peer networks quantifies the contribution of links to the global infection during the bidirectional coupling evolution process, ensuring that the identification results are semantically consistent with the attack propagation process. This overcomes the problems of missed detection of critical links and false detection of structurally prominent links caused by neglecting dynamic feedback in existing technologies, improving the dynamic adaptability and accuracy of critical link identification in blockchain peer-to-peer networks. Attached Figure Description
[0010] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] in: Figure 1 This is a flowchart of a link identification method for a blockchain peer-to-peer network in one embodiment; Figure 2 This is a schematic diagram of the structure of a link identification system for a blockchain peer-to-peer network in one embodiment; Figure 3 This is a schematic diagram of the workflow for accumulating link importance in one embodiment; Figure 4 This is a schematic diagram illustrating the aggregation of multiple scenarios, the construction, evolution, and output control of the line graph Hamiltonian in one embodiment. Figure 5 This is a flowchart of a link identification method for a blockchain peer-to-peer network in one embodiment; Figure 6 This is a structural block diagram of a computer device in one embodiment; Figure 7 This is a structural block diagram of a computer device in one embodiment. Detailed Implementation
[0012] 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, not all, of the embodiments of the present invention. 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.
[0013] Please see Figure 1 As shown, Figure 1 A flowchart illustrating a link identification method for a blockchain peer-to-peer network provided in an embodiment of the present invention includes the following steps: Step 01: Obtain the topology of the blockchain peer-to-peer network, the initial node infection state and initial link failure state of the blockchain peer-to-peer network under the attack scenario, and the preset dynamic parameters; Step 02: Based on the topology, initial node infection state, initial link failure state, and dynamic parameters, solve the dynamic model describing the bidirectional coupling relationship between node infection state and link failure probability to obtain the infection state trajectory of each node within the observation time window and the failure probability trajectory of each link within the observation time window. Step 03: Based on the infection status trajectory of each node within the observation time window, determine the change in the global infection status within the observation time window; Step 04: For each link, determine the importance metric based on the link's failure probability trajectory and the change in the global infection status; Step 05: Determine the link identification results of the blockchain peer-to-peer network based on the importance metric of each link.
[0014] Specifically, in step 01, the topology can be a connection graph between all nodes in a blockchain peer-to-peer network. For example, each node represents a peer entity participating in consensus or block propagation, and each edge represents a logical communication link between two nodes. The initial node infection state can be the degree of infection of each node at the start of the attack; for example, zero represents completely healthy, and one represents completely compromised. The initial link failure state can be the degradation probability of each link at the start; for example, zero represents a completely normal link, and one represents a completely failed link. The dynamic parameters can be a set of values that control the infection propagation and link degradation process, such as infection rate, recovery rate, base rate of failure propagation, distance decay coefficient, link recovery rate, and coupling strength between nodes and links.
[0015] In step 01, the node list and edge list of the blockchain peer-to-peer network are parsed to generate an adjacency matrix and a line graph adjacency relationship. Then, according to the preset attack strategy, each node is assigned an initial infection value between zero and one, and each link is assigned an initial failure probability value between zero and one. The attack strategy can be to randomly select nodes or select nodes according to node degree. Then, values such as infection rate, recovery rate, failure propagation base rate, distance attenuation coefficient, link recovery rate, node link coupling strength, observation time window length, and time deviation length are read from the configuration file.
[0016] In step 02, the dynamic model can be a set of equations describing how the node infection state and link failure probability co-evolve over time. The increase in the node infection state is jointly affected by the infection state of neighboring nodes and the availability of links, and the increase in the link failure probability is jointly affected by the failure state of neighboring links and the infection state of endpoint nodes. The solution results can be the complete change curve of the infection degree of each node within the observation time window and the complete change curve of the failure probability of each link within the same time window.
[0017] In step 02, the node infection change equation and the link failure change equation are combined into a two-way coupled set of ordinary differential equations. The fourth-order Runge-Kutta method is used to calculate step by step within the observation time window with a fixed time step. After each time step is completed, the infection value of each node and the failure probability value of each link are clipped to keep the infection value of each node and the failure probability value of each link within a reasonable range of zero to one. This yields the values of all nodes and all links at each discrete time point, which are stored in chronological order as infection state trajectory and failure probability trajectory.
[0018] In step 03, the change in the global infection status can be obtained by adding the infection levels of all nodes to get the global infection value, and then calculating the difference between the global infection values at different time points. The difference reflects the acceleration or deceleration trend of the entire network infection process.
[0019] In step 03, the infection values of all nodes at each discrete time point are summed to obtain the global infection value at each discrete time point. Then, the difference between the global infection values of two adjacent discrete time points is calculated, and the difference is the change in global infection within that time interval.
[0020] In step 04, the importance metric can be a single value obtained by multiplying the failure probability curve of each link by the difference in global infection change over the corresponding time period and then summing them up. The higher the value, the more transmission pressure or degradation risk the link bears during the infection acceleration phase.
[0021] In step 04, each link is traversed. For each discrete time point, the failure probability value of the link and the global infection change within the corresponding time interval are extracted. The failure probability value and the global infection change are multiplied and then the product of all time points is accumulated. The accumulated result is the importance metric value of the link.
[0022] In step 05, the link identification result can be a list of links arranged in descending order of importance metric, or a set of critical links composed of the first few links.
[0023] In step 05, all links are sorted in descending order of importance metric value, and the top few links are selected as the key link set according to the preset output quantity, or a complete link sorting table is output.
[0024] The beneficial effect of the implementation method of this application is that, firstly, the attack propagation process is abstracted into a continuous evolution in which node infection and link failure interact with each other. By solving the change law of the two variables simultaneously, the subsequent analysis no longer depends on static network snapshots, thereby making up for the shortcomings of traditional methods in handling the two-way feedback of infection and degradation.
[0025] By using global infection variation to time-weight the link failure trajectory, connections with high degradation during the period of fastest infection spread receive higher evaluation scores. This scoring mechanism directly corresponds to the actual hindering or boosting role of the link in the entire epidemic spread, avoiding misjudgments caused by simply relying on structural centrality.
[0026] The output link ranking results are highly consistent with the actual dynamic process of the attack, and can accurately identify those links that are in a high-risk state during the propagation acceleration period, while excluding links that are important in the topology but do not contribute much to the spread of infection. This solves the problem of missing key propagation links and falsely reporting important static links in the existing technology, and improves the credibility and practicality of link identification in blockchain peer-to-peer networks under dynamic attacks.
[0027] Please see Figure 2As shown in the diagram, in one embodiment, a schematic diagram of a link identification system for a blockchain peer-to-peer network is provided. This system can be deployed on cloud platform instances, blockchain operation and maintenance monitoring nodes, enterprise security operation platforms, scientific research testbed control nodes, or other computing devices with processors, memory, and network interfaces.
[0028] This invention represents the blockchain overlay as an undirected graph within the analysis time window. The adjacency matrix is Each node Having an infectious state Each link Has failure probability The global infection status is defined as follows: .
[0029] The link identification system of a blockchain peer-to-peer network can include Layer 1 (data and configuration layer). The data and configuration layer is responsible for acquiring raw data, defining scenarios, and configuring parameters. It can acquire the topology of the blockchain peer-to-peer network, the initial node infection status and initial link failure status of the blockchain peer-to-peer network under attack scenarios, as well as preset dynamic parameters.
[0030] The data acquisition and alignment module (100) can represent the blockchain overlay as an undirected graph within the analysis time window. And collect or align the node adjacency matrix. This module generates node identifiers and edge tables, records timestamp alignment information, and outputs an adjacency matrix and edge index table for dynamic solution. It provides the topological foundation for subsequent node infection and link failure subsystems.
[0031] The module includes node identifiers and an edge table, records timestamp alignment information, and outputs an adjacency matrix and edge index table for dynamics solutions. This module provides the topological foundation for subsequent node infection and link failure subsystems.
[0032] The attack scenario and initial value construction module (110) constructs an initial node infection state vector I(0) and an initial link failure state vector C(0) according to the configured attack strategy (e.g., random selection, degree-driven selection, or betweenness-driven selection). The initial infection state Ii(0) of each node ∈ [0,1], and the initial failure probability Cl(0) of each link ∈ [0,1]. This module also records the scenario identifier and budget parameters (e.g., the initial number of infected nodes k), and ensures that the random strategy uses a reproducible random number generator and seed to meet the requirements of subsequent multi-scenario aggregation and auditability.
[0033] The kinetic parameter and time configuration module (120) manages all preset kinetic parameters, which directly correspond to coefficients in the differential equations on the nodal and line graph sides. The parameters involved in this invention can be preset by the kinetic parameter and time configuration module (120), including infection rate. Recovery rate Basic propagation rate of link failure Distance attenuation coefficient Link recovery rate Node-link coupling strength Observation time window Time step Quantum walk evolution time Line graph coupling constant Top- Budget Multi-scenario weights And the random seeds, approximate parameters, and index types used in offline comparative evaluations, etc.
[0034] In some embodiments, step 02 above includes: Based on the topology, initial node infection state, initial link failure state, and dynamic parameters, construct the differential equations for the node infection subsystem and the link failure subsystem. The differential equations of the node infection subsystem and the link failure subsystem are combined to form a bidirectional coupled differential dynamic system, and numerical integration is performed within the observation time window with a preset time step. After each integration step, the infection status of each node and the failure probability of each link are clipped to a preset physical value range to obtain the infection status of each node at each discrete time point and the failure probability of each link at each discrete time point, and recorded as infection status trajectory and failure probability trajectory.
[0035] Specifically, the differential equation of the node infection subsystem can be a mathematical expression describing the rate of change of the infection level of each node over time. The rate of increase in infection level is jointly affected by the infection level of neighboring nodes and the availability of neighboring links, while the rate of decrease in infection level is proportional to the current infection level.
[0036] The differential equation of the link failure subsystem can be a mathematical expression describing the rate of change of the failure probability of each link over time. The rate of increase of the failure probability is affected by the propagation of the failure state of the adjacent links that share the same endpoint and is driven by the degree of infection of the nodes at the two endpoints. The rate of decrease of the failure probability is proportional to the current failure probability.
[0037] The differential equations of the node infection subsystem and the link failure subsystem are combined into a bidirectional coupled differential dynamical system, and numerical integration is performed within the observation time window with a fixed time discrete step size. After each integration step, the infection state value of each node and the failure probability value of each link are restricted to a valid interval between zero and one, thus obtaining the infection state value of each node and the failure probability value of each link at each discrete time point, which are stored in chronological order as infection state change trajectory and failure probability change trajectory.
[0038] The beneficial effect of this application's implementation method lies in the fact that by constructing and solving the differential equations of the node infection subsystem and the link failure subsystem simultaneously, the node infection state and the link failure probability are coupled on the same time axis. An increase in the infection degree directly drives an increase in the failure probability of adjacent links, while an increase in the link failure probability weakens the propagation intensity of the infection along that link. This bidirectional feedback mechanism achieves, for the first time, a complete simulation of the mutual influence between attack propagation and link degradation in link importance analysis. Boundary pruning is performed after each integration step to ensure that all state variables remain within a reasonable physical range, preventing divergence caused by the accumulation of numerical calculation errors.
[0039] In some implementations, differential equations for the node infection subsystem and the link failure subsystem are constructed based on the topology, initial node infection state, initial link failure state, and dynamic parameters, including: Based on the topology, construct the node adjacency matrix and the line graph adjacency relationships; Based on the initial infection status of each node, set an initial value for the infection status; Based on the initial link failure status, set an initial value for the failure probability for each link; Based on the dynamic parameters, the infection rate, recovery rate, failure propagation base rate, distance attenuation coefficient, link recovery rate, and node-link coupling strength are extracted. Based on the node adjacency matrix, infection rate, recovery rate, and failure probability of each link, a differential equation for the node infection subsystem is constructed. Based on the adjacency relationship of the line graph, the basic rate of failure propagation, the distance attenuation coefficient, the link recovery rate, and the infection status of each node, a differential equation for the link failure subsystem is constructed.
[0040] Specifically, the differential equation of the node infection subsystem can be described by the following formula: in, For infection rate, For recovery rate, For the edge The corresponding link failure probability. Factor Used to modulate infection transmission strength: the more severe the link degradation, the less effective it is as a transmission channel.
[0041] System Online Diagram The above describes the cascading process of link failures: two edges from the original graph are adjacent in the linear graph if and only if they share a common endpoint. For each link... The system updates its failure probability using the following formula: in, For link A set of links sharing a common endpoint; For link recovery rate; The node-link coupling strength; For the failure propagation rate, Based on the base rate, This is the distance attenuation coefficient. For line graph distances, common-end neighbors can be taken as... .
[0042] in, For link A set of links that share a common endpoint (i.e., first-order neighbors in the line graph). Let N(l) be the failure propagation rate. ,in For distance attenuation coefficient, in a simplified embodiment of this application, we take... =λ0; For non-first-order neighbors, their contribution is negligible. exp is an exponential function.
[0043] In some implementations, the differential equations of the node infection subsystem and the link failure subsystem are combined to form a bidirectionally coupled differential dynamical system, and numerical integration is performed within the observation time window at a preset time step, including: By combining the differential equations of the node infection subsystem and the link failure subsystem, a differential dynamical system describing the bidirectional coupling between the node infection state and the link failure probability is formed. With a preset time step, the fourth-order Runge-Kutta method is used to numerically integrate the differential dynamical system within the observation time window, obtaining the numerical solution for each node and each link at each intermediate step of the integration.
[0044] Specifically, numerical integration within the observation time window with a preset time step can be achieved using the fourth-order Runge-Kutta method (RK4).
[0045] The node infection subsystem and the link failure subsystem are combined into a high-dimensional system of ordinary differential equations. Starting from the initial time step, the state at each discrete time point is calculated step by step with a fixed step size Δt. Within each time step, the RK4 method calculates four slopes (k1, k2, k3, k4) based on the current state, and then calculates a weighted average to obtain the node infection state and link failure probability at the next time step. The local truncation error at each step is O(Δt5), which can achieve high numerical accuracy while ensuring computational efficiency.
[0046] Integral intermediate steps refer to the intermediate estimation points (usually t) used in the fourth-order Runge-Kutta method (RK4) within each time step Δt to calculate the final state. k +Δt\2 and t k (Approximate state values corresponding to +Δt). These intermediate numerical solutions are not the final output, but they are necessary steps inherent in the RK4 algorithm to improve integration accuracy.
[0047] After each integration substep is completed, boundary checks can be performed on the infection state Ii(t) of all nodes and the failure probability Cl(t) of all links: if the value is less than 0, it is set to 0; if it is greater than 1, it is set to 1.
[0048] The pruning operation can effectively suppress non-physical states caused by numerical drift (such as negative or higher-than-1 infection states), ensuring that subsequent calculations are always performed within a reasonable probability range. The pruned states are recorded as infection state trajectories and failure probability trajectories, providing a reliable data foundation for link importance measurement.
[0049] In some embodiments, step 03 above includes: For each discrete time point, based on the infection status trajectory of each node, the infection status of all nodes is summed to obtain the global infection status at the discrete time point. Based on the difference in global infection status between adjacent discrete time points, the change in global infection status at each discrete time point within the observation time window is obtained; or Based on the rate of change of the global infection status over time, the change in the global infection status over continuous time within the observation time window is obtained.
[0050] Specifically, from the stored node infection status trajectories, the infection status values of all nodes at each discrete time point are sequentially retrieved, and these values are accumulated to obtain the global infection status at that time point. For the discrete difference implementation, the system calculates the difference between the global infection state at the next time point and the previous time point. If the difference is positive, it indicates that the global infection level is increasing within that time interval; if it is negative, it indicates a decrease. The absolute value of the difference reflects the rate of infection change. For the continuous derivative implementation, the system numerically differentiates the global infection state function I(t) (e.g., using difference approximation or derivative of a fitting function) to obtain the infection change rate at each instant. Regardless of the method used, the calculated global infection state change is cached and used in subsequent steps to couple it with the failure probability trajectory of each link to calculate the link importance metric.
[0051] In some implementations, step 04 above includes: At multiple discrete time points within the observation time window, the failure probability value in the failure probability trajectory of each link is obtained; The importance metric of a link is determined based on the link failure probability value and the change in global infection status at the corresponding discrete time points.
[0052] Specifically, in continuous-time form, the importance metric is equal to the integral of the product of the link failure probability curve and the global infection state change rate curve over the observation time window. Within the observation time window, the system defines the link... The importance metric is: dt In the discrete-time approximation, the importance metric is equal to the sum of the products of the link failure probability at each discrete time point and the global infection state increment within the corresponding time interval. In the discrete-time approximation, let... The time grid is The system calculates using the following formula: The beneficial effect of this application's implementation method lies in the fact that by coupling and integrating the link failure probability curve and the global infection rate change curve on the time axis, the obtained importance metric simultaneously reflects two key attributes of the link during the infection propagation process: first, the degree of link degradation over time; and second, the degree of temporal overlap between this degradation and the infection acceleration phase. Within the time window of rapid infection spread, if the link remains at a high risk of failure, the integral value will accumulate significantly, resulting in a higher importance score; conversely, if the link only degrades during the stable infection phase, or if the degree of degradation is low during the infection acceleration phase, the integral value will be lower.
[0053] like Figure 2As shown, the link identification system of the blockchain peer-to-peer network may include Layer 2 (dynamic solution layer), wherein the bidirectional coupled dynamic RK4 solution module (130) performs numerical integration on the differential equation system of the node infection subsystem and the link failure subsystem to obtain the infection state trajectory of each node and the failure probability trajectory of each link; then, the physical domain pruning and trajectory caching module (140) prunes and stores the intermediate results in the [0,1] interval; then, the link importance measurement calculation module (150) calculates the importance measurement value of each link according to the discrete integral formula (the cumulative sum of the product of the failure probability and the global infection change).
[0054] Figure 3 This is a schematic diagram illustrating the workflow of link importance accumulation in one embodiment. For example... Figure 3 As shown, Layer 1 (original diagram and node propagation dynamics): (100-120) shows the evolution equation of the node infection state, that is, the rate of change of the infection state of each node ii over time consists of an infection term and a recovery term, wherein the infection term is affected by the probability of failure of adjacent links, and the recovery term is proportional to the current infection degree.
[0055] Layer 2 (Link-level Dynamics) (200-220): Describes the evolution equation of the failure probability of each link. Its rate of change is affected by three parts: the propagation of adjacent link failures, the recovery of the link itself, and the infection state of the endpoint nodes.
[0056] Layer 3 (Numerical Solution and Trajectory Caching) (300-330): The fourth-order Runge-Kutta method (RK4) is used to numerically integrate the above simultaneous differential equations. After each substep, the state variables are pruned to ensure numerical stability, and the node infection status and link failure probability at each discrete time point are cached as a trajectory sequence.
[0057] Layer 4 (Link Importance Cumulative) (400-410): Utilizing the cached trajectory, the importance metric for each link is calculated using a discrete cumulative formula, where represents the change in the global infection state. This formula is equivalent to a continuous form, achieving a weighted coupling between the link failure probability and the global infection acceleration phase.
[0058] Figure 4 This is a schematic diagram illustrating the aggregation of multiple scenarios, the construction, evolution, and output control of line graph Hamiltonians in one embodiment.
[0059] like Figure 4 As shown, in some embodiments, the method further includes: For multiple different attack scenarios, the initial node infection status, initial link failure status and dynamic parameters corresponding to each attack scenario are obtained respectively. For each attack scenario, based on the topology, the initial node infection state, the initial link failure state, and the dynamic parameters, the global infection state change and the importance metric of each link in the attack scenario are determined. Based on the preset scenario weight for each attack scenario, the importance metric values of the same link under each attack scenario are weighted and summed to obtain the aggregate importance metric value of each link. Use the aggregated importance metric as the importance metric for the link.
[0060] Specifically, suppose there are S attack scenarios, and scenario s has a weight w. For scenario s, the importance metric for each link is calculated. The importance metric after aggregation is: and with As a subsequent input sequence, the aggregated value integrates the evaluation results under different attack modes and serves as the final importance metric for the link, participating in subsequent ranking or quantum walk enhancement.
[0061] The beneficial effect of this implementation method is that by introducing a multi-scenario weighted aggregation mechanism, the importance assessment of links no longer depends on a single initial attack condition. In actual network operation and maintenance, attackers' strategies are often unknown and variable, and a critical link identified in a single scenario may not be prominent in another attack mode. This method pre-sets multiple representative attack scenarios (such as random infection, central node infection, etc.), calculates the importance of links in each scenario, and then aggregates them according to weights. The resulting aggregated importance metric reflects the average or weighted contribution of links under multiple potential attack modes.
[0062] like Figure 2 As shown, if multiple scenarios are enabled, the multi-scenario weighted aggregation module (160) sums the weights of each scenario to obtain the aggregated importance metric. The importance metric calculated by this layer is sent to Layer 3 (ranking evaluation layer) via "K update" (403).
[0063] In some implementations, the method further includes: The importance metric value of each link is normalized and used as the diagonal element of the Hamiltonian of the line graph; Based on the adjacency relationship of the line graph generated by the topology, the preset coupling constant is used as the off-diagonal element of the corresponding adjacent link in the line graph Hamiltonian, and the off-diagonal element of the non-adjacent link is set to zero. Using the uniform superposition state of each link with equal amplitude as the initial state, the continuous-time quantum walk evolution is performed using the line graph Hamiltonian to the preset quantum evolution time, and the measurement probability of each link is measured. The links are reordered based on the measured probability of each link, and the identification result is determined based on the reordered result.
[0064] Specifically, the importance metric for each link is normalized by calculating the maximum absolute value of all link importance metrics. If the value is 0, then revert to static structural indicators or uniform random truncation according to preset rules (alarm logs should be recorded); otherwise, calculate... .
[0065] A line graph is generated based on the original topology: each node in the line graph corresponds to an edge in the original graph. If two edges in the original graph share a common endpoint, they are adjacent in the line graph. A preset coupling constant λc is used as the off-diagonal element of the Hamiltonian corresponding to adjacent links in the line graph; the off-diagonal elements of non-adjacent links are set to zero. The constructed line graph Hamiltonian H is a square matrix, whose diagonal elements are the normalized values of the importance metric, and whose off-diagonal elements are λc (if the corresponding line graph nodes are adjacent) or 0 (if they are not adjacent).
[0066] calculate Probability of each link measurement , and according to Output in descending order (Top-) Alternatively, it can output a full sort table and runtime log.
[0067] Evolution yields the final state For each link, a projection measurement is performed on the ground state, with the measurement probability being: Based on the measured probability Sort the links in descending order and select the first m links as the critical link set.
[0068] in, It is an initial uniform superposition state, indicating that all links have the same quantum amplitude at the start of the quantum walk (i.e., each link has an equal probability of being "discovered"). H is the pre-constructed line graph Hamiltonian, whose diagonal elements are determined by the normalized link importance metric, and the off-diagonal elements are determined by the line graph adjacency relationship and the preset coupling constant.
[0069] CTQW evolution is an abbreviation for Continuous-Time Quantum Walk, which is a quantum algorithm for reordering links in this invention. It is a time evolution operator that takes the initial state Evolving along the timeline to , producing the final state This process simulates the coherent propagation and interference of quantum amplitude on a linear graph.
[0070] Top-m refers to selecting the top m links based on their importance metric (or the probability of the measurement enhanced by quantum walks) from highest to lowest. Here, m is a pre-defined positive integer (e.g., 10, 20, 50) representing the desired number of critical links to output. By outputting the Top-m link set, those links that contribute most to attack propagation can be prioritized within a limited hardening budget.
[0071] In some implementations, the method further includes: For each link, calculate the global network efficiency degradation caused by the removal of the link; Construct a reference edge importance sequence based on the global network efficiency degradation caused by the removal of each link; The consistency index of the link results and the reference edge importance sequence is calculated to determine the offline comparison results.
[0072] Specifically, for each link in the network topology, the network state after removing the link from the topology is simulated, and then the decrease in global network efficiency before and after removal is calculated. Global network efficiency is an indicator that measures the smoothness of information transmission in the network; the greater the decrease, the more important the link is to maintaining the overall network connectivity. This decrease is used as the reference importance value of the link, and the reference importance values of all links arranged in link order constitute the reference edge importance sequence. The construction process of this sequence is completely independent of the dynamic solution and importance measurement calculation in the main process, and therefore is a decoupled independent truth value.
[0073] The link ranking results output by the main process (i.e., a list of links sorted in descending order of importance metric) are compared with the reference edge importance sequence (i.e., a list of links sorted in descending order of global network efficiency degradation). Commonly used ranking consistency metrics include NDCG@k (Normalized Discount Cumulative Gain) and Jaccard@k (the proportion of the intersection of the first k elements). These metrics measure the similarity between the two ranking lists: the higher the metric value, the more consistent the critical links identified by the main process are with the true values based on network efficiency degradation.
[0074] When the network is large, calculating the global network efficiency after removal link by link is costly. The system can enable sampling approximations, such as breadth-first search (BFS) sampling with a fixed source, to calculate the impact of only a subset of links, while recording approximation parameters and tolerances to ensure auditability.
[0075] The system outputs comparison and evaluation results, including sorting consistency index values, parameter configuration snapshots, and random seed summaries. This step does not reverse-engineer the output critical link set or sorting table; it serves only as an independent verification and recording step to facilitate parameter tuning, version acceptance, and third-party review.
[0076] like Figure 2 As shown, Layer 3 (ranking evaluation layer) can enhance the ranking and output of importance metrics. The line graph Hamiltonian construction module (170) constructs a Hamiltonian using the normalized importance metrics as diagonal elements and the line graph adjacency relationship as the coupling constant; the CTQW evolution and Top-m selection module (180) performs continuous-time quantum walks, measures the probability of each link, and extracts the top m links in descending order of probability as the set of critical links or outputs a full ranking table; the independent truth value and offline evaluation module (190) can optionally construct a reference sequence based on the global efficiency reduction caused by unilateral removal and compare it with the main output for ranking consistency. Finally, the critical link Top-m (500), the full ranking table (501), and the evaluation report (502) are output for operation and maintenance personnel to make decisions or for automatic system hardening.
[0077] Figure 5 Here is a flowchart of a link identification method for a blockchain peer-to-peer network in one embodiment, such as... Figure 5 As shown, the method provided in this application consists of six levels from data initialization to final output, as detailed below: Layer 1 (Initialization Phase): Corresponds to steps S10 to S14. First, the topology (nodes and edges) of the blockchain peer-to-peer network is imported, and node IDs and edge table encodings are established (S11). Then, based on the attack strategy (e.g., random, degree-driven, etc.), the initial node infection state and initial link failure state are constructed (S12). Next, dynamic parameters (infection rate, recovery rate, failure propagation rate, etc.) and time discrete parameters (observation time window, step size, etc.) are read (S13). Finally, the time window is configured and the number of discrete time steps is determined (S14). This layer completes the preparation of all input data.
[0078] Layer 2 (Dynamics Calculation): Corresponding to steps S20 to S23. Within the observation time window, numerical integration is performed on the differential dynamical system with bidirectional coupling of node infection and link failure. The fourth-order Runge-Kutta method (RK4) is used to update the infection state of all nodes and the failure probability of all links at each time step (S21); after each integration step, the state is pruned to [0,1] to ensure numerical stability (S22); finally, the node infection state and link failure probability at each discrete time point are recorded as a trajectory sequence (S23).
[0079] Layer 3 (Link Importance Accumulation): Corresponds to steps S30 to S31. Utilizing the cached trajectory sequence, the importance metric for each link is calculated. Specifically, at each discrete time point, the link failure probability is multiplied by the change in global infection state within that time interval (i.e., the difference in global infection state between preceding and following time points), and the products are summed over all time points (S31).
[0080] Layer 4 (Multi-Scenario Aggregation): Corresponds to steps S40 to S42. This is an optional step. If multi-scenario aggregation is enabled, Layer 1 to Layer 3 are repeated for multiple different attack scenarios (such as different initial infection node selection strategies) to obtain the importance metric value of each link in each scenario; then, the weighted sum is performed according to the preset scenario weight (S42) to obtain the aggregated importance metric value of each link, which serves as the basis for subsequent ranking.
[0081] Layer 5 (CTQW sorting): Corresponds to steps S50 to S54. First, construct the line graph Hamiltonian: use the normalized importance metric (or aggregation value) as the diagonal element, and the line graph adjacency relationship and preset coupling constant as the off-diagonal element (S52); then perform continuous-time quantum walk (CTQW) evolution, evolving from a uniformly superimposed initial state to a preset time, and measure the probability of each link (S53); finally, output the previous link in descending order as the critical link set (Top-m), or output the full sorting table (S54).
[0082] Layer 6 (Offline Evaluation): Corresponds to steps S60 to S63. This is an optional step used to independently verify the quality of the main process's ranking results. A reference edge importance sequence is constructed (e.g., based on the global network efficiency degradation caused by unilateral edge removal), then ranking consistency metrics (e.g., NDCG@k, Jaccard@k) between the main process's output and the reference sequence are calculated (S63), and an evaluation report is output. This evaluation does not modify the main process's output in reverse.
[0083] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0084] Example 1: Single-Scenario PDKL-QW Main Process On virtualized Ethereum-like high-density topologies or cross-regional cloud deployment topologies, the system first imports a single-snapshot adjacency matrix, selects a preset number of k initially infected nodes using a betweenness centrality strategy, sets the initial link failure vector to 0, and then executes the process from S10 to S54. Specifically, S10 to S14 completes data import, initial value construction, parameter initialization, and time window configuration; S20 to S23 performs bidirectional coupled dynamics RK4 integral solving to obtain the node infection state trajectory and link failure probability trajectory; S30 to S31 calculates the importance metric value of each link; S50 to S54 constructs the line graph Hamiltonian, performs continuous-time quantum walk evolution, and obtains the measurement probability of each link.
[0085] Example 2: Uniform Weighted Aggregation in Multiple Scenarios Based on Example 1, the system runs each of the three attack strategies—random selection, degree-driven selection, and betweenness centrality selection—once to obtain the importance metric value for each link in each scenario. The aggregate importance metric value for each link is calculated, and then steps S51 to S54 are executed. This example is used to provide a robust priority list for hardening resources under unknown attack modes.
[0086] Example 3: Pure Dynamical Ordering (PDKL) without Quantum Walks In deployment environments with limited computing power or where minimizing implementation dependencies is desired, the system changes the sorting criterion in S54 from measured probability to directly extracting the top m links in descending order of importance metric. In this case, the quantum walk branch is disabled, and the entire process only includes dynamics solving, importance accumulation, and direct sorting. It still obtains a set of critical links semantically consistent with the attack propagation process, with lower computational overhead.
[0087] Example 4: Krylov approximation matrix exponent on sparse line graphs When the number of links M is large and the Hamiltonian H of the line graph is a sparse matrix, to avoid the high computational cost of dense eigenvalue decomposition, the system uses the Krylov subspace method to approximate the product of the matrix exponent and the initial state. In the implementation, parameters such as the Krylov subspace dimension (e.g., 20-50) and iteration tolerance are set, and the actual dimension used, the achieved tolerance, and the computation time are written to the runtime log. This embodiment can meet the latency target of near real-time sorting while maintaining sorting accuracy.
[0088] Example 5: Offline Comparative Evaluation Based on Global Efficiency Decrease Before acceptance testing or version release, the system executes offline comparison and evaluation steps S60 to S63. For the same set of input data, the proposed method (including PDKL or PDKL-QW) and several baseline methods (such as static edge betweenness, webpage ranking edge importance, etc.) are run. For each method, the ranking consistency index between its output link ranking result and the reference edge importance sequence is calculated. The reference sequence is constructed based on the global network efficiency degradation caused by the removal of each link, and this sequence is completely decoupled from the dynamic solution and importance measurement process of the main process. Indicators used include NDCG@k, Jaccard@k, Kendall's τ correlation coefficient, etc., calculated separately for the first few positions (e.g., k=10, 20, 50). Finally, a comparison report is saved, including the index values of each method, parameter configuration snapshots, random seed summaries, and computation time. The comparison conclusions are used to guide parameter selection and verify algorithm effectiveness, but do not participate in online closed-loop control.
[0089] In testbeds or actual deployments, the recognition effectiveness and computational performance of the above embodiments can be further verified through the following comparative experiments: comparing the differences between different methods on the NDCG@k and Jaccard@k metrics; comparing the stability of Top-m output when quantum walk branches are enabled and disabled; measuring the time consumption of single dynamic solution and matrix exponent evaluation; and analyzing the overlap of key link sets before and after multi-scenario aggregation. These experiments provide quantitative basis for method selection and parameter calibration in practical applications.
[0090] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 6 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with external clients via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a blockchain peer-to-peer network link identification method server-side.
[0091] In one embodiment, a computer device is provided, which may be a client, and its internal structure diagram may be as follows: Figure 7As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with an external server via a network connection. When executed by the processor, the computer program implements client-side functions or steps of a blockchain peer-to-peer network link identification method.
[0092] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device described above can be referred to the relevant descriptions on the server side and client side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.
[0093] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0094] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0095] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A link identification method for a blockchain peer-to-peer network, characterized in that, include: The topology of the blockchain peer-to-peer network, the initial node infection state and initial link failure state of the blockchain peer-to-peer network under the attack scenario, and the preset dynamic parameters are obtained. Based on the topology, the initial node infection state, the initial link failure state, and the dynamic parameters, the dynamic model describing the bidirectional coupling relationship between the node infection state and the link failure probability is solved to obtain the infection state trajectory of each node within the observation time window and the failure probability trajectory of each link within the observation time window. Based on the infection status trajectory of each node within the observation time window, determine the change in the global infection status within the observation time window; For each link, an importance metric is determined based on the link's failure probability trajectory and the change in the global infection status. The link identification results of the blockchain peer-to-peer network are determined based on the importance metric of each link.
2. The link identification method for a blockchain peer-to-peer network according to claim 1, characterized in that, The dynamic model describing the bidirectional coupling relationship between node infection state and link failure probability is solved based on the topology, the initial node infection state, the initial link failure state, and the dynamic parameters. This yields the infection state trajectory of each node within the observation time window and the failure probability trajectory of each link within the observation time window, including: Based on the topology, the initial node infection state, the initial link failure state, and the dynamic parameters, construct the differential equations for the node infection subsystem and the link failure subsystem. The differential equations of the node infection subsystem and the link failure subsystem are combined to form a bidirectional coupled differential dynamic system, and numerical integration is performed within the observation time window with a preset time step. After each integration step, the infection status of each node and the failure probability of each link are clipped to a preset physical value range to obtain the infection status of each node at each discrete time point and the failure probability of each link at each discrete time point, and recorded as the infection status trajectory and the failure probability trajectory.
3. The link identification method for a blockchain peer-to-peer network according to claim 2, characterized in that, The construction of differential equations for the node infection subsystem and the link failure subsystem based on the topology, the initial node infection state, the initial link failure state, and the dynamic parameters includes: Based on the aforementioned topology, construct a node adjacency matrix and a line graph adjacency relationship; Based on the initial node infection status, set an initial value for the infection status of each node; Based on the initial link failure status, set an initial value for the failure probability for each link; Based on the aforementioned dynamic parameters, the infection rate, recovery rate, failure propagation base rate, distance attenuation coefficient, link recovery rate, and node-link coupling strength are extracted. Based on the node adjacency matrix, the infection rate, the recovery rate, and the failure probability of each link, a differential equation for the node infection subsystem is constructed. Based on the adjacency relationship of the line graph, the basic rate of failure propagation, the distance attenuation coefficient, the link recovery rate, and the infection status of each node, a differential equation for the link failure subsystem is constructed.
4. The link identification method for a blockchain peer-to-peer network according to claim 2, characterized in that, The step of combining the differential equations of the node infection subsystem and the link failure subsystem to form a bidirectional coupled differential dynamical system, and then performing numerical integration within the observation time window at a preset time step, includes: The differential equations of the node infection subsystem and the link failure subsystem are combined to form a differential dynamical system describing the bidirectional coupling between the node infection state and the link failure probability. With a preset time step, the fourth-order Runge-Kutta method is used to numerically integrate the differential dynamic system within the observation time window to obtain the numerical solution for each node and each link at each intermediate step of the integration.
5. The link identification method for a blockchain peer-to-peer network according to claim 1, characterized in that, The step of determining the change in the global infection status within the observation time window based on the infection status trajectory of each node within the observation time window includes: For each discrete time point, based on the infection status trajectory of each node, the infection status of all nodes is summed to obtain the global infection status of the discrete time point. Based on the difference in global infection status between adjacent discrete time points, the change in global infection status at each discrete time point within the observation time window is obtained; or The change in global infection status over time is obtained based on the rate of change of global infection status over time within the observation time window.
6. The link identification method for a blockchain peer-to-peer network according to claim 5, characterized in that, For each link, the importance metric is determined based on the link's failure probability trajectory and the change in the global infection status, including: At multiple discrete time points within the observation time window, the failure probability value in the failure probability trajectory of each link is obtained; The importance metric of the link is determined based on the failure probability value of the link and the change in global infection status at the corresponding discrete time points.
7. The link identification method for a blockchain peer-to-peer network according to claim 1, characterized in that, The method further includes: For multiple different attack scenarios, the initial node infection state, initial link failure state and dynamic parameters corresponding to each attack scenario are obtained respectively. For each attack scenario, based on the topology, the initial node infection state, the initial link failure state, and the dynamic parameters of the attack scenario, the global infection state change and the importance metric value of each link corresponding to the attack scenario are determined. According to the preset scenario weight of each attack scenario, the importance metric value of the same link under each attack scenario is weighted and summed to obtain the aggregate importance metric value of each link. The aggregate importance metric is used as the importance metric for the link.
8. The link identification method for a blockchain peer-to-peer network according to claim 1, characterized in that, The method further includes: The importance metric value of each link is normalized and used as the diagonal element of the Hamiltonian of the line graph; Based on the adjacency relationship of the line graph generated by the topology, the preset coupling constant is used as the off-diagonal element of the corresponding adjacent link in the line graph Hamiltonian, and the off-diagonal element of the non-adjacent link is set to zero. Using the uniform superposition state of each link with equal amplitude as the initial state, the continuous-time quantum walk evolution is performed using the line graph Hamiltonian to the preset quantum evolution time, and the measurement probability of each link is measured. The links are reordered based on the measured probability of each link, and the identification result is determined based on the reordered result.
9. The link identification method for a blockchain peer-to-peer network according to claim 1, characterized in that, The method further includes: For each of the links, calculate the global network efficiency degradation caused by the removal of the link; Construct a reference edge importance sequence based on the global network efficiency degradation caused by the removal of each link; The link results and the reference edge importance sequence are sorted and a consistency index is calculated to determine the offline comparison results.
10. A link identification system for a blockchain peer-to-peer network, characterized in that, It includes a processor and a memory, the memory storing a computer program, and the processor executing the computer program to implement the link identification method for a blockchain peer-to-peer network as described in any one of claims 1 to 9.