Method and system for determining blockchain peer-to-peer network attack robustness metrics
Patent Information
- Application Number
- CN202610963830.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-30
- Publication Date
- 2026-10-20
AI Technical Summary
[0009]本申请实施方式提供的区块链点对点网络攻击鲁棒性度量的确定方法,通过利用包含自然退化、邻居耦合增强和攻击衰减的动力学模型更新每个节点的连续健康状态,并依据健康状态与预设健康阈值的比较结果动态过滤网络拓扑以确定有效拓扑结构,能够将节点从健康到失效的中间退化过程以及节点状态与网络连通结构之间的双向闭环反馈纳入同一计算框架,从而避免现有技术仅描述正常或失效离散状态所导致的评估偏离实际的问题。在此基础上,融合归一化平均健康度、有效拓扑结构中最大连通分量比例以及归一化平均度构建复合序参量,该复合序参量同时反映节点个体健康水平、拓扑连通完整性和边密度冗余度,使得多个分散指标得以统一表征,克服了现有指标相互矛盾、无法获得可解释结论的缺陷。基于复合序参量随攻击参数或时间的变化趋势识别网络从功能态向失功态过渡的临界位置并确定临界攻击参数,能够为网络距离整体功能丧失边界提供定量依据。最终结合当前攻击参数、临界攻击参数和复合序参量生成的归一化攻击鲁棒性度量值,直接反映当前攻击压力下网络保持功能的剩余能力,为工程告警、策略调整和跨环境比较提供统一且可解释的量化指标,从而提升区块链点对点网络攻击鲁棒性评估的准确性。
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This invention relates to the field of blockchain overlay network technology, and in particular to a method and system for determining the robustness metric of blockchain peer-to-peer network attacks. Background Technology
[0002] Peer-to-peer (P2P) networks are the underlying infrastructure for node discovery, transaction propagation, block synchronization, and consensus message forwarding in blockchain systems. When nodes are attacked, they typically don't go offline instantly. Instead, they undergo several intermediate stages, including decreased connection quality, gradually increasing synchronization latency, lower forwarding success rate, and continuously rising resource consumption. While these intermediate degradation states don't cause the node to completely fail, they already have a substantial impact on the network's transaction propagation efficiency, consensus message delivery rate, and overall availability.
[0003] In related technologies, whether it is graph index analysis based on static topology snapshots, fault injection simulation of node and edge deletion, or experience threshold alarms relying on operational indicators, they can only describe the discrete states of nodes that are completely normal or completely failed. They ignore the aforementioned intermediate degradation process, cannot characterize the dynamic coupling between the continuous degradation process of node health status during the attack and the effective network connectivity structure, and ignore the actual impact of intermediate degradation states such as unstable connections, increased synchronization delay, increased resource consumption, and decreased forwarding capacity on network availability. This leads to the evaluation results deviating significantly from the actual robustness level of the network. Summary of the Invention
[0004] Based on this, it is necessary to address the technical problem that existing technologies cannot accurately characterize the continuous degradation of node health status and the dynamic coupling of effective network connectivity, which leads to the deviation of robustness assessment results from reality. Therefore, a method and system for determining the robustness measurement of blockchain peer-to-peer network attacks should be proposed.
[0005] Firstly, a method for determining the robustness metric of a blockchain peer-to-peer network against attacks is provided, comprising: applying an attack input based on attack parameters; updating the health state of each node using a dynamic model including natural degradation, enhanced neighbor coupling, and attack decay; and determining an effective topology based on a comparison between the health state of each node and a preset health threshold; at each time step, calculating a composite order parameter based on the node's health state and the effective topology, wherein the composite order parameter integrates the node's normalized average health, the proportion of the largest connected component in the effective topology, and the normalized average health; identifying the critical position where the network transitions from a functional state to a disabled state based on the trend of the composite order parameter with the attack parameters or time, and determining the corresponding critical attack parameters; and generating a normalized attack robustness metric based on the attack parameters, the critical attack parameters, and the composite order parameter.
[0006] Secondly, a system for determining the robustness measure of blockchain peer-to-peer network attacks 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 method for determining the robustness measure of blockchain peer-to-peer network attacks 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 method for determining the robustness measure of blockchain peer-to-peer network attacks described above.
[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 method for determining the robustness measure of blockchain peer-to-peer network attacks described above.
[0009] The method for determining the robustness measure of blockchain peer-to-peer network attacks provided in this application updates the continuous health state of each node using a dynamic model that includes natural degradation, enhanced neighbor coupling, and attack attenuation. It dynamically filters the network topology based on the comparison between the health state and a preset health threshold to determine the effective topology. This approach incorporates the intermediate degradation process from healthy to failed nodes, as well as the bidirectional closed-loop feedback between node states and network connectivity, into a single computational framework. This avoids the problem of assessments deviating from reality caused by existing technologies that only describe discrete states of normal or failed states. Furthermore, a composite order parameter is constructed by fusing normalized average health, the proportion of the largest connected component in the effective topology, and normalized average health. This composite order parameter simultaneously reflects the individual node health level, topological connectivity integrity, and edge density redundancy, allowing multiple dispersed indicators to be uniformly represented. This overcomes the shortcomings of existing indicators that contradict each other and cannot yield interpretable conclusions. Based on the trend of the composite order parameter changing with attack parameters or time, the critical position of the network transitioning from a functional state to a disabled state is identified, and critical attack parameters are determined, providing a quantitative basis for the network's distance from the overall functional loss boundary. Finally, a normalized attack robustness metric is generated by combining the current attack parameters, critical attack parameters, and composite order parameters. This metric directly reflects the network's remaining ability to maintain functionality under current attack pressure, providing a unified and interpretable quantitative indicator for engineering alerts, policy adjustments, and cross-environment comparisons. This improves the accuracy of attack robustness assessment for 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 illustrating the method for determining the robustness metric of blockchain peer-to-peer network attacks in an embodiment of the present invention. Figure 2 This is a schematic diagram of the module of the system for determining the robustness measurement of blockchain peer-to-peer network attacks in an embodiment of the present invention; Figure 3 This is a flowchart illustrating the method for determining the robustness metric of blockchain peer-to-peer network attacks in an embodiment of the present invention. Figure 4 This is a schematic diagram of the node health dynamics and effective adjacency update process in an embodiment of the present invention; Figure 5 This is a flowchart illustrating the determination of critical threshold and applicable domain in an embodiment of the present invention; Figure 6 This is a schematic diagram of the robustness measurement output in an embodiment of the present invention; Figure 7 This is a schematic diagram of the phase transition type enhanced diagnostic process in an embodiment of the present invention; Figure 8 This is a structural block diagram of a computer device in one embodiment; Figure 9 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 method for determining the robustness metric of blockchain peer-to-peer network attacks provided in an embodiment of the present invention includes the following steps: Step 01: Apply attack input according to attack parameters, update the health status of each node using a dynamic model that includes natural degradation, enhanced neighbor coupling, and attack decay, and determine the effective topology based on the comparison between the health status of each node and the preset health threshold. Step 02: At each time step, calculate the composite order parameter based on the node's health status and effective topology. The composite order parameter integrates the node's normalized average health, the proportion of the largest connected component in the effective topology, and the normalized average degree. Step 03: Based on the trend of the composite order parameter changing with attack parameters or time, identify the critical position of the network transitioning from the functional state to the disabled state, and determine the corresponding critical attack parameters; Step 04: Generate a normalized attack robustness metric based on the attack parameters, critical attack parameters, and composite order parameters.
[0014] Specifically, in step 01, the attack parameters can be attack strength or attack scale, the natural degradation term in the dynamic model can be the self-decrease of the node health value over time, the neighbor coupling enhancement term can be the positive superposition of the health values of adjacent healthy nodes, the attack decay term can be the negative subtraction of the node health value by the attack input, the health threshold can be the numerical boundary that distinguishes whether a node maintains a valid connection, and the effective topology can be the subgraph obtained by removing nodes with health values lower than the threshold and their edges.
[0015] The set of attacked nodes and the attack input amount for each attacked node are determined based on the attack parameters; unattacked nodes receive no attack input. The change in the health state of each node over time is described by a dynamic equation, which includes a natural degradation term, a neighbor coupling enhancement term, and an attack decay term. The natural degradation term causes the health value to gradually decrease, the neighbor coupling enhancement term makes healthy neighbors have a positive effect on the current node, and the attack decay term accelerates the decline of the health value of the attacked node. By numerically solving this dynamic equation, the updated health values of all nodes are obtained at each time step. The health value of each node is compared with a preset health threshold. Nodes with health values below the threshold are considered failed nodes, and these nodes and all edges connected to them are removed from the original network topology. The remaining nodes and their edges constitute the effective topology structure for the current time step.
[0016] In step 02, the composite order parameter can be a single value obtained by fusing the normalized average health, the maximum connected component ratio, and the normalized average degree. The normalized average health can be the ratio of the average health value of all nodes to its initial average value. The maximum connected component ratio can be the ratio of the number of nodes contained in the maximum connected cluster in the effective topology to the total number of nodes. The normalized average degree can be the ratio of the average degree of nodes in the current effective topology to its initial average degree.
[0017] The average health score is calculated based on the health values of all nodes and normalized using the average health score at the initial time, resulting in a normalized average health score. Based on the effective topology, the connected component containing the most nodes is searched, and the proportion of nodes in this component to the total number of nodes in the network is calculated, resulting in the proportion of the largest connected component. The average number of edges connected to all nodes in the effective topology is calculated and normalized using the average degree at the initial time, resulting in a normalized average degree. These three normalized indices are then summed according to preset weights to obtain a composite order parameter between zero and one.
[0018] In step 03, the critical attack parameter can be the minimum attack strength or the minimum proportion of attacked nodes that causes the network to change from a functional state to a disabled state. The functional state can be the state in which the network can maintain basic functions, and the disabled state can be the state in which the network loses its global functions.
[0019] By gradually increasing the attack intensity or attack scale while maintaining a fixed attack size, and recording the composite sequence parameter value at steady state or endpoint for each attack parameter, the trajectory of the composite sequence parameter as the attack parameter increases can be observed. When the composite sequence parameter suddenly drops from a high value to a low value, the attack parameter corresponding to this turning point is the critical attack parameter. Alternatively, by recording the sequence of composite sequence parameter changes over time under fixed attack parameters, performing curvature analysis on this sequence, and identifying the position where the curve bends most sharply as the critical position in the time dimension, a critical approach can be taken.
[0020] In step 04, the normalized attack robustness metric can be a value determined by the ratio of the current composite order parameter to the initial composite order parameter and the distance of the current attack pressure relative to the critical attack parameter. In statistical physics, order parameters are used to describe the degree of order in a system. This application borrows this concept to construct a composite order parameter to quantify the overall functional level of a blockchain P2P network under attack.
[0021] Calculate the difference between the current attack parameters and the critical attack parameters. Normalize this difference and input it into the logistic function to obtain a collapse probability term between zero and one. Calculate the ratio of the current composite order parameter to the initial composite order parameter, and then multiply this ratio by one and subtract the collapse probability term to obtain a normalized attack robustness metric.
[0022] The beneficial effect of the implementation method of this application is that, through the coupling mechanism of comparing continuous health status with health threshold, the intermediate degradation process of a node from health to failure and its feedback effect on the network connection structure are incorporated into the same calculation framework, avoiding the deviation of the evaluation results from reality caused by the prior art that only distinguishes between normal or failed discrete states.
[0023] By constructing a composite order parameter that integrates normalized average health, maximum connected component ratio, and normalized average degree, information from three different dimensions—node individual health level, network connectivity integrity, and edge density redundancy—is merged into a single macro-indicator. This overcomes the shortcomings of multiple scattered evaluation indicators that contradict each other and make it difficult to draw unified and interpretable conclusions.
[0024] By identifying the critical position of the network's transition from a functional state to a disabled state based on the inflection point of the composite order parameter change, and determining the critical attack parameters, quantitative numerical evidence is provided for the network's distance from the overall functional loss boundary. By generating a normalized attack robustness metric, the metric directly expresses the network's remaining functional capacity under current attack pressure. This metric has uniform dimensions and clear meaning, facilitating horizontal comparisons across different network structures and attack scenarios, and integration into engineered monitoring and alarm systems, thereby improving the accuracy of blockchain peer-to-peer network attack robustness assessment.
[0025] Figure 2 This is a schematic diagram of the module of the system for determining the robustness measure of blockchain peer-to-peer network attacks in an embodiment of the present invention.
[0026] like Figure 2 As shown in the diagram, the overall structure of the system functional modules of the present invention may include an input and management layer, a core computing layer, an output and external system layer, and optional enhancement modules.
[0027] The input and management layer includes a topology data acquisition module (110), an interface and log collection module (120), and a topology and parameter management module (130). The topology data acquisition module (110) receives topology data or edge tables (401) from the blockchain network or operation and maintenance terminal (400) as well as data collected through remote procedure call interface, packet capture or logs (402). The interface and log collection module (120) is responsible for obtaining attack parameters or threshold configurations (403). The topology and parameter management module (130) manages topology inputs (405) and parameter configurations (404) and provides data to the lower layer.
[0028] The core computing layer includes an attack simulation and strategy module (210), a node health dynamics module (220), an update module (230), a composite order parameter calculation module (240), a critical threshold and phase transition determination module (250), an applicable domain determination module (260), and a regularized robustness measurement output module (270). The attack simulation and strategy module (210) generates an attack vector and selects the attacked node. The node health dynamics module (220) updates the node health status using the health vector and the effective adjacency matrix. The update module (230) constructs the effective adjacency matrix based on the health mask and feeds it back to the node health dynamics module. The composite order parameter calculation module (240) calculates the composite order parameter based on the node health status and the effective topology. The critical threshold and phase transition determination module (250) and the applicable domain determination module (260) identify the critical attack parameters and determine the applicable domain type, respectively. The regularized robustness measurement output module (270) generates the main output (406), which includes the robustness measurement, risk level, and applicable domain label.
[0029] The output and external system layer includes a monitoring panel (310), a policy engine (320), and a security reporting interface (330), which receive the main output and display, make decisions, or store it.
[0030] An optional enhancement module is the finite size and phase transition type enhancement diagnostic module (280), which assists in determining the phase transition type when needed.
[0031] Specifically, the topology and parameter management module (130) is used to acquire or generate blockchain peer-to-peer (P2P) network topology data. This topology data includes adjacency matrices, edge lists, node lists, node attributes, and timestamp information. Topology data can be collected from real blockchain peer-to-peer networks, Remote Procedure Call (RPC) interfaces, containerized testbeds, packet capture systems, log systems, or synthetic graph generators.
[0032] This module is also used to manage node health dynamics parameters, attack parameters, and judgment thresholds, including the natural degradation rate. Neighbor coupling coefficient Attack impact coefficient Health threshold Disturbance intensity Integral step size Simulation duration T, maximum connected component ratio threshold Average health threshold h, composite order parameter weights , , wait.
[0033] Topology data, number of nodes, initial health status, attack parameters, and decision thresholds are the basic inputs required to perform robustness metrics; natural degradation rate, neighbor coupling coefficient, attack impact coefficient, disturbance strength, integration step size, and composite order parameter weights are configurable model parameters; multiple network sizes, multiple random seeds, Binder cumulant, magnetic susceptibility, and finite-size scaling quality are only used when phase transition type enhanced diagnostics are enabled.
[0034] Attack Simulation and Strategy Module (210): Used to generate attack vectors based on attack scale score b and attack intensity a. Attack scale score b∈[0,1] represents the proportion of attacked nodes to all nodes, and attack intensity a represents the strength of the attack's impact on the attacked nodes.
[0035] The module selects the set of nodes S to be attacked in the following ways: random selection; selection based on node degree centrality; selection based on betweenness centrality; selection based on eigenvector centrality; selection based on page rank (PageRank) value; selection based on proximity centrality; selection based on clustering coefficient or other topological properties; and selection based on adaptive attack strategy or collusive attack strategy.
[0036] For node i, if i∈S, then its attack input Let be 'a' or a time-varying attack function; if 'i' does not belong to 'S', then... Set to 0 or the background disturbance intensity.
[0037] Node health dynamics integral module (220): used to update the node health vector according to the node health dynamics model. , where T represents transpose.
[0038] In one implementation, the health state of node i satisfies the differential equation: ,in Natural degradation rate, The neighbor coupling coefficient, This represents the attack impact coefficient. This is the attack input for node i. (t) represents an optional random perturbation term. (t) is Gaussian white noise with a mean of 0 and a variance of . Furthermore, the noise between different nodes is independent of each other. Its vector form is: .
[0039] Effective Adjacency Update Module (230): Used to construct an effective adjacency matrix based on the node health status. Given a health threshold... Define the health mask matrix , where I[·] is an indicator function.
[0040] In one implementation, the effective adjacency matrix is: A(0) is the initial adjacency matrix; if a time-varying topology is used, A(0) can be replaced with the current adjacency matrix A(t). When the health value of a node is lower than the health threshold, the effective connections associated with that node are no longer counted in the effective topology, so that the decline in the health status of a node can be fed back to the effective connectivity structure of the network.
[0041] Composite order parameter calculation module (240): Used to calculate the composite order parameter M(t) of the network at each time step. First, the normalized average health is calculated. ,in , >0 is a small constant to prevent the denominator from being zero; when the initial average health m(0)>0, it is taken as... =0.
[0042] Secondly, in the current effective adjacency matrix On the corresponding valid graph, calculate the proportion of the largest connected components: =| | / N, where This represents the maximum connected component in the current valid graph. Next, calculate the normalized average degree: ,in , This is the set of valid edges in the current valid graph. >0 is a small constant to prevent the initial mean from being zero; when >0 time take =0.
[0043] Finally, the composite order parameter is calculated: ,in and ; In a default implementation, take The composite order parameter M(t) can be truncated in the [0,1] interval to maintain a bounded output.
[0044] Critical threshold and phase transition determination module (250): used to estimate critical attack intensity, critical attack scale or time dimension phase transition point based on composite order parameters and network functional state determination conditions.
[0045] In one implementation, a functional state refers to a network that can still maintain basic transaction and block propagation functions, characterized by the presence of a large connected component (with a proportion not less than φ) in the effective topology and a sufficiently high average node health (not less than h); otherwise, it is a dysfunctional state.
[0046] The functional state of a network is defined as follows: at observation time T, simultaneously satisfying and If at least one of the above two conditions is not met, the network is determined to be in a disabled state. The critical attack size score is defined as: Where E represents the expected value. The critical attack strength is defined as: ,That This represents the composite order parameter under steady-state or terminal observation conditions. This is the threshold for jump variables.
[0047] For the phase transition point in the time dimension, M(t) is smoothed and numerically differentiated, and the point of curvature abrupt change or maximum second derivative amplitude is taken as the estimated phase transition point; Savitzky-Golay (SG) filtering is used for estimation. The second derivative: ,in Here, represents the filter coefficients, w is the half-window length, and r is the derivative order. The phase transition point in the time dimension is taken as: .
[0048] Applicable domain determination module (260): used to determine the applicable domain of the current network parameters and attack parameters, and to distinguish between detectable phase transition states and non-phase transition saturation states.
[0049] In one implementation, the spectral radius of the initial adjacency matrix is calculated. If satisfied Then, using the spectral bound lower bound estimation, we obtain the lower bound of the critical attack strength: .
[0050] In another implementation, let U be the set of nodes that have not been attacked. The adjacency matrix of the unattacked subgraph; if it satisfies the following conditions within the preset attack scale range b∈B. If the composite sequence parameter does not show a macroscopic decrease or jump that meets the preset threshold, it is determined to be a non-phase transition saturation state, that is, no macroscopic phase transition is detected within the preset attack budget range.
[0051] For cases where neither the lower bound condition of the spectral boundary nor the non-phase transition saturation criterion is met, a numerical master estimation method is adopted, performing grid search, binary search, or adaptive search along the attack intensity or attack scale dimension to estimate... or .
[0052] Regularized robustness metric output module (270): used to generate an attack robustness metric based on the composite order parameter and critical attack parameter.
[0053] In one implementation, a crash probability term is defined: ,in Let be the logistic function (S-shaped function), κ be the slope parameter, and z(t) be the normalized attack pressure variable. z(t) is determined based on the attack intensity, attack scale, or the combined pressure of both, for example: ,or ,or Where Δa and Δb are normalized scaling parameters, These are the weight parameters.
[0054] The robustness measure is: ,in >0 is a small constant to prevent the denominator from being zero when the initial composite order parameter is zero; when M(0)>0, it is taken as... =0. In a preferred embodiment, the critical distance to the safe side distance is also defined: ,in To prevent positive numbers with a denominator of zero; when A value greater than 0 indicates that the system is on the safe side above the critical point. A value ≤0 indicates that the system has reached or fallen below the critical state.
[0055] Further define the non-negative safety margin: And composite robustness measures: ,in This is the distance threshold.
[0056] Finite Size and Phase Transition Type Enhanced Diagnostic Module (280): This optional enhancement module is used to perform statistical diagnosis on composite order parameter samples under multiple network sizes N, multiple attack sizes b, and multiple random seeds to assist in distinguishing first-order, second-order, or cross-type phase transitions. In one implementation, the magnetic susceptibility is calculated: And Binder accumulation: , where < > represents the ensemble average.
[0057] The peak position of magnetic susceptibility is represented as: When the standard finite-size scale collapse quality is below a preset threshold or the sample distribution exhibits a bimodal shape, the output of the standard finite-size scale parameters is suppressed, and instead, the magnetic susceptibility peak position, Bind cumulative quantity, order parameter jump variable ΔM, and phase transition type label are output.
[0058] The auxiliary method for determining phase transition type is as follows: ( ) indicates the critical attack scale At that point, the jump variable of the composite order parameter M (i.e., the magnitude of the abrupt change from the functional state to the disfunctional state), if If it is, then it is determined to be a first-order degeneracy; if and If the value is greater than 0, it is determined to be second-order degradation; otherwise, it is determined to be cross-type degradation or uncertain degradation.
[0059] Based on the above-described modules, this application also provides a discrete-time implementation method that is easy to implement on a computer.
[0060] Let the time step be q = 0, 1, ..., Q, and the time interval be Δt. =q Given an initial health vector Initial adjacency matrix Attack vector and dynamic parameters , , Health threshold .
[0061] At each time step q, first construct a health mask based on the current health vector: Then construct the effective adjacency matrix: Update the node health vector using the explicit Euler method: Perform interval truncation on the health vector: ,in This restricts each component to the interval [0,1]. Then, the normalized mean health, maximum connected component ratio, normalized mean degree, and composite order parameter are calculated. .
[0062] The complete pseudo-calculation process is as follows: Input initial adjacency matrix Number of nodes N, initial health vector Attack parameters a and b, dynamic parameters , , Health threshold Maximum connected component ratio threshold φ, average health threshold h, integration step size Δt, simulation steps Q, and composite order parameter weights. , , ; Step 1: Select the set of attacked nodes S according to the attack scale score b and generate the attack vector. ; Step 2, repeat for q=0,1,…,Q-1: based on the current health vector Generate health mask ,according to and Construct an efficient adjacency matrix Update according to discrete formula ,Will Truncate to [0,1] and calculate the maximum connected component ratio on the valid graph. Calculate the normalized mean health score, normalized mean score, and composite order parameter. ; Step 3, based on the composite order parameter sequence { Estimate the phase transition point in the time dimension. ; Step 4: Search along the attack strength or attack scale dimension to estimate the critical attack strength. or critical attack scale ; Step 5: Output the applicable domain label based on the spectral radius condition and the change of the composite order parameter, including the spectral boundary usable area, the numerical master estimation area, or the non-phase transition saturation state. Step 6: Based on the composite order parameter, critical attack parameter and crash probability mapping, output robustness metric, phase transition point, critical threshold, applicable domain label and alarm information.
[0063] Steps 1 to 6 in the above discrete implementation correspond to steps such as attack input application and health status update, effective topology determination, composite order parameter calculation, critical position identification, critical attack parameter determination, and robustness metric generation. Those skilled in the art will understand that the above discretization scheme is only one specific implementation, and other numerical integration methods (such as the Runge-Kutta method) or mask construction methods (such as continuous weight functions) based on the same principle also fall within the protection scope of this application.
[0064] The method for determining the robustness measure of blockchain peer-to-peer network attacks in this invention will be described below with reference to specific implementation methods: In some embodiments, step 01 above includes: Determine the attack scale and intensity based on the attack parameters, select the set of nodes to be attacked, and configure the attack input for the nodes to be attacked. A dynamic equation for the node health state is established using the natural degradation term of each node, the coupling enhancement term of the weighted sum of health states from neighboring nodes, and the attack decay term caused by the attack input. The dynamic equation is then numerically integrated to update the node health state at each time step. Based on a preset health threshold, the health status of each node is compared with the health threshold to generate a health mask; Applying a health mask to the network topology removes nodes and their associated connections whose health status is below a health threshold, resulting in an effective topology.
[0065] Specifically, the set of attacked nodes can be a combination of nodes selected according to any one of the following methods: degree centrality, betweenness centrality, eigenvector centrality, page ranking value, proximity centrality, clustering coefficient, or adaptive attack strategy. The natural degradation term in the dynamic equation can be an exponential decay function of node health values over time; the neighbor coupling enhancement term can be a weighted sum of the health values of neighboring healthy nodes; and the attack decay term can be the product of attack strength and attack influence coefficient. Numerical integration can be any one of the following: explicit Euler method, Runge-Kutta method, or adaptive step-size integration method. The health mask can be a diagonal matrix composed of indicator vectors obtained by comparing the health value of each node with a health threshold. The effective topology can be a subgraph obtained by left-multiplying and right-multiplying the original adjacency matrix by this health mask.
[0066] The topology and parameter management module (130) provides the attack scale b and attack intensity a to the attack simulation and strategy module (210). The attack simulation and strategy module (210) determines the number of attacked nodes based on b and selects the set of attacked nodes S according to strategies such as degree centrality, betweenness centrality, and page ranking value.
[0067] The attack simulation and strategy module (210) configures attack inputs for each attacked node. The value is either 'a' or a function that changes over time; the value of the unattacked node is... =0. The node health dynamics integral module (220) receives the current health vector. and effective adjacency matrix Using differential equations Update node health status. The effective adjacency update module (230) updates the node health status based on the current health status h(t) and the preset health threshold. Generate health mask .
[0068] The effective adjacency update module (230) constructs the effective adjacency matrix. Where A(0) is the initial adjacency matrix. The effective adjacency update module (230) updates the adjacency matrix for health values below a certain threshold. Remove the nodes and their edges to obtain an effective topology.
[0069] In the discrete-time implementation, let the time steps be q = 0, ..., Q, and the step size be Δt. Given... , , And α, β, γ, θ, calculate in each step: , = Then, use explicit Euler update: = + (- + - + ), and truncate to [0,1].
[0070] In some embodiments, step 02 above includes: Calculate the average health score based on the health status of all nodes, and normalize the average health score with the initial value to obtain the normalized average health score. In an effective topology, determine the largest connected component and calculate the proportion of the number of nodes in the largest connected component to the total number of nodes, which is taken as the proportion of the largest connected component. Calculate the average degree of all nodes in the effective topology, and normalize the average degree with the initial value to obtain the normalized average degree; The normalized average health, the maximum connected component ratio, and the normalized average degree are weighted and summed according to preset weights to obtain the composite order parameter.
[0071] Specifically, the normalized average health can be the ratio of the arithmetic mean of the current health values of all nodes to the average health value at the initial time. The maximum connected component ratio can be the fraction obtained by dividing the number of nodes in the connected subgraph with the most nodes in the effective topology by the total number of nodes in the network. The normalized average degree can be the ratio of the average number of edges connected to nodes in the current effective topology by the average number of edges connected at the initial time. The preset weights can be three non-negative values that sum to 1. The weighted summation can be the operation of multiplying the three normalized indices by their respective weights and then adding them together. The composite order parameter can be a single macroscopic index obtained by performing the above weighted summation and optionally truncating it to the [0,1] interval.
[0072] The preset weight , , Adjustments can be made based on the assessment focus; increase the focus when there is a greater emphasis on the health of individual nodes. When more attention is paid to global network connectivity, increase Those skilled in the art can determine the optimal weight combination for a specific network through a small number of experiments or parameter sensitivity analysis.
[0073] The composite order parameter calculation module (240) obtains the current health status values of all nodes from the node health dynamics integration module (220) and calculates the average health. The average value is then normalized using the initial average health level m(0) to obtain the result. .
[0074] The composite order parameter calculation module (240) obtains the effective adjacency matrix corresponding to the effective topology from the effective adjacency update module (230). Run the connected component search algorithm on the valid graph to find the maximum connected component. Calculate the proportion of its node count to the total number of nodes. The composite order parameter calculation module (240) calculates the set of valid edges in the effective topology. Calculate the average degree and with the initial average degree (0) Normalization yields The composite order parameter calculation module (240) calculates parameters according to preset weights. , , Calculate the weighted sum The result is truncated to the [0,1] interval, and the composite order parameter is output.
[0075] In the discrete-time implementation, after obtaining the effective graph at each time step q, the calculation is performed. , , q, This leads to the normalized value, and finally the result is obtained. .
[0076] In some embodiments, step 03 above includes: In terms of attack intensity or attack scale, by scanning candidate attack parameters, the critical attack parameters when the network transitions from a functional state to a disabled state are determined. Under fixed attack parameters, the phase transition point in the time dimension is determined by performing curvature analysis on the time series of composite order parameters as a function of time.
[0077] Specifically, attack intensity dimension scanning can be an operation that gradually increases the attack intensity under a fixed attack scale and observes the changes in the composite order parameter. Attack scale dimension scanning can be an operation that gradually increases the proportion of attacked nodes under a fixed attack intensity. Critical attack parameters can be the attack intensity or attack scale corresponding to the decrease in the composite order parameter from the functional state value to the dysfunctional state value. Fixed attack parameters can be a setting that keeps both attack intensity and attack scale at a constant value. Curvature analysis can be a method that calculates the second derivative of the time series and finds the position where the curve bends most sharply. The time dimension phase transition point can be the moment when the network state rapidly degrades or abruptly changes.
[0078] The critical threshold and phase transition determination module (250) receives the composite sequence parameters output by the composite sequence parameter calculation module (240). In the attack intensity dimension, this module fixes the attack scale, sequentially increases the attack intensity, and records the steady-state composite sequence parameters at each intensity. When the composite sequence parameter first falls below the functional state determination threshold, the corresponding intensity is recorded as the critical attack intensity. Similarly, the critical attack scale is recorded in the attack scale dimension. Under fixed attack parameters, this module collects the composite sequence parameter time series, uses Savitzky-Gore filtering to calculate the second derivative, and takes the point where the absolute value of the second derivative is maximum as the time phase transition point.
[0079] In some implementations, the critical attack parameters for the network to transition from a functional state to a disabled state are determined by scanning candidate attack parameters in terms of attack intensity or attack scale. Set the criteria for determining the network functional state. The criteria include at least the following: at the observation time, the proportion of the largest connected component in the effective topology is not less than a preset first threshold, and the average health of all nodes is not less than a preset second threshold. The candidate attack parameters are scanned in terms of attack strength or attack scale to obtain the composite order parameters under each candidate attack parameter. When the network changes from meeting the judgment conditions to not meeting the judgment conditions under the attack parameters, the attack parameters are used as critical attack parameters. Among them, the critical attack parameter under the attack intensity dimension is the minimum attack intensity that causes the network to fail macroscopically, and the critical attack parameter under the attack scale dimension is the minimum proportion of attacked nodes that causes the network to fail macroscopically.
[0080] Specifically, the criterion for determining the functional state of a network can be the simultaneous satisfaction of two inequalities: the maximum proportion of connected components in the effective topology. The health of all nodes is not less than the preset first threshold φ, and the average health of all nodes m(T) is not less than the preset second threshold h.
[0081] The preset first threshold φ can be an empirical value or a user-defined minimum acceptable connectivity ratio, and the preset second threshold h can be a user-defined minimum average health level. Critical attack size score. It can correspond to a mathematical expression. The value of b in the equation, where E represents the mathematical expectation.
[0082] Critical attack strength It can correspond to a mathematical expression. The value of 'a' in the data, where Represents the steady-state composite order parameter. This is the threshold for the jump variable. The minimum attack strength can be the weakest attack force that causes macroscopic network failure under a fixed attack scale, and the minimum proportion of attacked nodes can be the minimum percentage of nodes that cause macroscopic network failure under a fixed attack strength.
[0083] The critical threshold and phase transition determination module (250) obtains the first threshold φ and the second threshold h from the topology and parameter management module (130).
[0084] During the attack strength dimension scan, the module fixes the attack scale b, sequentially selects candidate attack strength a, and calls the attack simulation and strategy module (210), node health dynamics integration module (220), effective adjacency update module (230), and composite order parameter calculation module (240) to run the simulation and record the maximum connected component ratio at steady state. And average health status m(T).
[0085] Formula for determining whether the functional state criteria are met simultaneously: If m(T) ≥ h, then the state is marked as functional; otherwise, it is marked as ineffective. When ineffective state occurs for the first time during the variation of a from small to large, this a is recorded as the critical attack strength. When scanning along the attack scale dimension, with a fixed attack strength 'a', candidate attack scales 'b' are selected sequentially, and similarly, based on... And m(T;b) is compared with the threshold to obtain .
[0086] In some implementations, under fixed attack parameters, determining the phase transition point in the time dimension by performing curvature analysis on the time series of the composite order parameter changing over time includes: Under fixed attack parameters, curvature analysis or mutation detection is performed on the time series of composite order parameters changing over time; The point where the magnitude of the second derivative of the composite order parameter is maximized or the point where the curvature changes abruptly is taken as the phase transition point in the time dimension. The phase transition point is used to characterize the moment when the network state undergoes rapid degradation.
[0087] Specifically, the point where the magnitude of the second derivative is maximum can be the time point when the absolute value of the second derivative of the time series reaches its global maximum, and the curvature abrupt change point can be the location where the direction or degree of curvature of the curve changes drastically. The Savitzky-Gore filter coefficients can be a set of constant sequences obtained through local polynomial fitting, used for smoothing and differentiating the time series. The half-window length can be the number of data points taken on both sides of the current fitting point, determining the size of the local fitting data window. The formula for calculating the time phase transition point can be... ,in That is, the index corresponding to the largest absolute value of the second derivative. The filter order r can be the derivative order, r=0 indicates smoothing, r=1 indicates the first derivative, and r=2 indicates the second derivative. The numerical differential formula can be... ,in Δt represents the filter coefficients for the corresponding order, and Δt represents the time step.
[0088] The critical threshold and phase transition determination module (250) receives the composite order parameter sequence. The half-window length w and filter order r are set to 2. This module uses Savitzky-Gore filter coefficients. According to the formula Calculate the second derivative at each point q. The module calculates the ||| of all q. | Find the index corresponding to the maximum value ,make This module outputs... As a phase transition point in the time dimension.
[0089] In some implementations, step 04 above includes: A normalized attack pressure variable is constructed based on the difference between the attack parameters and the critical attack parameters. The normalized attack pressure variable is input into the logistic function and mapped to the crash probability term; The normalized attack robustness metric is calculated based on the ratio of the composite order parameter to the initial composite order parameter and the collapse probability term.
[0090] Specifically, the normalized attack pressure variable can be a dimensionless value obtained by dividing the difference between the current attack parameters and the critical attack parameters by the normalization scaling parameter. The logistic function can be... Its output value is between 0 and 1. The collapse probability term can be the probability value output by the logistic function, representing the possibility of the network undergoing functional collapse under the current attack pressure. The ratio of the composite order parameter to the initial composite order parameter can be M(t) / M(0), used to characterize the proportion of the current remaining function relative to the initial state. The normalized attack robustness metric can be the value obtained by multiplying the above ratio by (1 minus the collapse probability term), and its value range is [0,1].
[0091] The regularization robustness measurement output module (270) obtains the current attack parameters a(t) or b(t) from the attack simulation and strategy module (210), and obtains the critical attack parameters from the critical threshold and phase transition determination module (250). or This module calculates the normalized attack pressure variable z(t). If attack intensity pressure is used, the formula is: If attack scale pressure is used, the formula is: If combined pressure is used, the formula is: This module takes z(t) as input to the logistic function. ( Obtain the collapse probability term κ is the slope parameter. This module obtains the current composite sequence parameter M(t) and the initial composite sequence parameter M(0) from the composite sequence parameter calculation module (240), and calculates the ratio. / ( + Finally, the robustness metric is calculated. .
[0092] In some embodiments, step 04 above further includes: Calculate the difference between the composite sequence parameter and the composite sequence parameter at the critical point, as well as the difference between the initial composite sequence parameter and the composite sequence parameter at the critical point, and use this to construct a distance metric for the safe side distance critical point. By taking a non-negative value for the distance metric, a safety margin is obtained; By combining the security margin as an adjustment factor with the attack robustness metric, a composite robustness metric is obtained, which is used to characterize the remaining security space of the network from the failure boundary.
[0093] Specifically, the composite order parameter at the critical point can be the time-dimensional phase transition point. Corresponding composite order parameter value steady-state composite order parameter value under critical attack parameters The difference between the current composite order parameter and the composite order parameter at the critical point can be... - The difference between the initial composite order parameter and the composite order parameter at the critical point can be... - The distance metric for the critical point of safe lateral distance can be... ,in It is a small positive number (e.g., 1e-6) used to prevent the denominator from being zero; a value greater than 0 indicates that the current state is on the safe side above the critical point, while a value equal to or less than 0 indicates that the critical state has been reached or fallen below it. The non-negative safety margin can be... That is, take The maximum value of 0 ensures the safety margin is non-negative. The adjustment factor can be a distance threshold offset from the safety margin. The value obtained by inputting the logistic function ( ( - )),in κ is a preset distance threshold (e.g., 0.2), and κ is the slope parameter. The composite robustness metric can be... This is used to characterize the remaining safety space of the network from the failure boundary.
[0094] In the calculation of normalized mean health, normalized mean, robustness measure, and critical distance to safe lateral distance, small constants are introduced respectively. , , and This is used to prevent numerical calculation errors caused by a denominator of zero. Among them, The initial average health score m(0) is used as the denominator for normalizing the average health score. Initial mean of the denominator used for normalized mean. (0), The initial composite order parameter M(0) in the denominator is used for robustness measurement. The difference between the initial composite order in the denominator used for safety side distance and the critical point composite order parameter. - The constant value is a positive number much less than 1, such as 10^{-6} or 10^{-8}. When the corresponding denominator is greater than zero, it can be 0. Its selection does not affect the physical meaning and comparison direction of the corresponding index.
[0095] The regularization robustness metric output module (270) obtains the composite order parameter M(t_c) at the critical point and the initial composite order parameter M(0) from the critical threshold and phase transition determination module (250), and obtains the current M(t) from the composite order parameter calculation module (240). This module calculates the distance metric. Then calculate the non-negative safety margin. Next, the adjustment factor is calculated. Finally, the composite robustness metric is calculated. .
[0096] In some implementations, under multiple network sizes and multiple random seeds, the steps of updating node health status and determining effective topology based on attack parameters, calculating composite order parameters at each time step, and identifying critical positions and determining critical attack parameters based on composite order parameters are repeatedly performed to collect composite order parameter samples under different attack parameters. Magnetic susceptibility and Bindt cumulative quantity are calculated based on the composite order parameter sample. Magnetic susceptibility is used to characterize the fluctuation range of the composite order parameter, and Bindt cumulative quantity is used to characterize the distribution pattern of the composite order parameter. When the quality of the finite-size scale is below a preset threshold or the sample distribution is bimodal, the type of degradation phase transition can be determined by the peak position of the magnetic susceptibility, the minimum value of the binde accumulation, and the jump variable of the composite order parameter at the critical point. The phase transition types include first-order degradation, second-order degradation, or cross-type degradation.
[0097] Specifically, multiple network sizes can be a set of different total number of nodes N (e.g., 100, 200, 500, 1000). Multiple random seeds can be different integers used to initialize the random number generator, used for repeated simulations to statistically average. Magnetic susceptibility can be... , where < > represents the ensemble average (the average value under multiple random seeds), used to characterize the fluctuations of the composite order parameter near the critical point. The Binder cumulant can be... Used to characterize the distribution morphology (bimodal or unimodal) of composite order parameters, its minimum value It can indicate the phase transition type.
[0098] Finite-size scaling quality can be defined as the goodness of fit of data at different N values to the same scaling function; a value below a preset threshold indicates failure of the standard finite-size scaling. A bimodal shape can be defined as the probability density function exhibiting two separate peaks. The magnetic susceptibility peak can be the value of b corresponding to the maximum value of χ(b,N) as a function of b, denoted as... The order parameter jump variable ΔM can be the difference between two values of the composite order parameter at a critical point, where the parameter abruptly changes from one value to another. First-order degradation can correspond to... (The jump is obvious), second-order degeneration can correspond to and >0 (continuously changing and with a single peak in distribution), cross-type degradation can be other cases that do not meet the above conditions.
[0099] The finite size and phase transition type enhanced diagnostic module (280) is an optional module, enabled when the user needs to distinguish degradation types. This module obtains multiple network sizes N and multiple random seed lists from the topology and parameter management module (130), and iteratively calls the attack simulation and strategy module (210), the node health dynamics integration module (220), the effective adjacency update module (230), the composite order parameter calculation module (240), and the critical threshold and phase transition determination module (250) to collect composite order parameter samples under different attack parameters. This module calculates M, M², and M for each (b,N) combination. 4 The ensemble average is then used to calculate the magnetic susceptibility χ(b,N) and the Bindt cumulant. This module identifies the location of the magnetic susceptibility peak. and the minimum value of Binder's cumulative amount and jump variables at critical points ( When the finite-size scaling quality is below a preset threshold or the sample distribution exhibits a bimodal shape, this module suppresses the output of standard finite-size scaling parameters and instead outputs... , ΔM and phase transition type label. The rule for determining the phase transition type is: if Then it is judged as a first-order degeneracy; if and If the value is greater than 0, it is classified as second-order degeneracy; otherwise, it is classified as cross-type or uncertain degeneracy.
[0100] Figure 3 This is a flowchart illustrating the method for determining the robustness measure of blockchain peer-to-peer network attacks in an embodiment of the present invention.
[0101] like Figure 3 As shown, the method flow of this invention proceeds from the start to step S10, which involves input preparation and topology instantiation, obtaining the topology A(0), the number of nodes N, the initial health vector h(0), attack parameters, dynamic parameters, judgment threshold, and simulation parameters. Then, step S20 is executed, which involves attack node selection and attack vector generation. Based on the attack scale score b and the attack strategy, the set of attacked nodes S is selected, and the attack vector a(t) is generated. Next, proceed to step S30, which involves node health dynamics integration and effective adjacency update, generating a health mask D(t), and constructing effective adjacencies. Update the health vector h(t) and perform [0,1] truncation. Step S40 generates the composite order parameter by calculating the normalized average health, the proportion of the largest connected component, and the normalized average degree to obtain the composite order parameter M(t). Step S50 detects phase transition points by smoothing and numerically differentiating or detecting transition points in the composite order parameter sequence to obtain the phase transition points in the time dimension. Step S60 involves estimating the critical attack threshold and determining the functional state. Steps S20 to S50 are repeated for candidate attack strengths or attack scales, and the critical attack strength is estimated based on the functional and failure state determinations. or critical attack scale Then, proceed to step S70, application domain determination: if there is strong coupling within the preset range and no macroscopic decrease or jump is observed, output the non-phase transition saturation state; otherwise, if the spectral boundary condition is met, output the usable spectral boundary and the lower bound of the critical attack strength; if neither is met, proceed to the numerical master estimation region. Subsequently, step S80, robustness metric synthesis and output, is executed, outputting... The process includes risk level, applicable domain labels, and strategy recommendations. Next, it determines whether enhanced diagnostics should be enabled. If not, the process ends directly; otherwise, it proceeds to step S90, phase transition type enhanced diagnostics (optional). Based on multiple node sizes, attack parameters, and a random seed, it calculates magnetic susceptibility, Bind cumulant, and finite-size scaling mass, and outputs supplementary labels for first-order, second-order, cross-type, or uncertain types. Finally, the process ends.
[0102] Specifically, the method of this invention may include multiple steps. The step numbers are only used to describe the process order and do not constitute a unique limitation on the actual execution order. Without affecting the computational logic, some steps may be executed in parallel, merged, or repeated. For the health dynamics, effective adjacency, composite order parameters, critical thresholds, applicable domains, and robustness measurement calculation rules involved in each step, please refer to the corresponding modules in the aforementioned system structure and discrete-time implementation. The specific steps are as follows: S10: Input preparation and topology instantiation: S11: Obtain blockchain P2P network topology data, including node list, edge list, adjacency matrix, node attributes, connection timestamps, peer node connection information, or log records.
[0103] S12: Convert the topology data into an initial adjacency matrix or edge list and determine the number of nodes.
[0104] S13: Obtain or configure the node's initial health vector, attack parameters, node health dynamics parameters, judgment threshold, and simulation control parameters.
[0105] S14: Optionally, perform symmetrization, self-loop removal, duplicate edge removal, abnormal connection filtering, maximum degree constraint, connectivity check, or sparse matrix storage processing on the topology.
[0106] S15: Initialize the simulation time step, attack scan range, random seed set, and result storage structure.
[0107] S20: Attack Node Selection and Attack Vector Generation: S21: Determine the number of attacked nodes based on the attack scale score.
[0108] S22: Select a set of nodes to be attacked according to a preset attack strategy. The attack strategy includes one or more of the following: random selection, degree centrality attack, betweenness centrality attack, PageRank attack, feature vector centrality attack, adaptive attack, or collusion attack.
[0109] S23: Configure attack inputs for the attacked node based on attack intensity and attack time pattern.
[0110] S24: Generate continuous attack vectors or discrete attack vectors.
[0111] S25: When it is necessary to reduce random error, set multiple random seeds or multiple attack node sets to repeatedly execute subsequent simulations.
[0112] S30: Node health dynamics integration and effective adjacency update: S31: At each time step, generate a health mask based on the current node's health vector and health threshold.
[0113] S32: Construct a valid adjacency matrix based on the health mask and the initial or current adjacency matrix.
[0114] S33: Update the node health vector according to the node health dynamics integral module rules, combining the effective adjacency matrix and the attack vector.
[0115] S34: Bounded processing is performed on the updated node health value to keep it within the preset health value range.
[0116] S35: Cache the node health status, health mask, and effective adjacency matrix of the current time step, and advance to the next time step.
[0117] S40: Generation of composite sequence parameters: S41: Calculate the average health and normalized average health based on the current node's health vector.
[0118] S42: Calculate the maximum connected component ratio on the currently active graph.
[0119] S43: Calculate the average degree and normalized average degree based on the current set of valid edges.
[0120] S44: Combine the normalized average health, the maximum connected component ratio, and the normalized average degree into a composite order parameter according to the preset weights.
[0121] S45: Save the composite sequence parameters at each time step to form a composite sequence parameter time series.
[0122] S50: Phase transition point detection: S51: Perform smoothing, outlier filtering, or normalization on the composite sequence parameter time series.
[0123] S52: Curvature features or abrupt change features are extracted using SG filtering (Savitzky-Golay), wavelet transform, change point detection, or other time series abrupt change detection methods.
[0124] S53: Determine the phase transition point in the time dimension based on the results of curvature abrupt change, peak value of second derivative amplitude, or change point detection.
[0125] S54: Optionally, perform a consistency check on the composite order parameter, the proportion of the maximum connected components, and the average health near the phase transition point.
[0126] S60: Critical Attack Threshold Estimation and Functional State Determination: S61: Set network functional state determination rules, which should include at least the maximum connected component ratio threshold and the average health threshold.
[0127] S62: Generate a set of candidate attack parameters in the attack strength dimension or attack scale dimension.
[0128] S63: Repeat the attack vector generation, health status update, effective adjacency update and compound order parameter generation for each candidate attack parameter.
[0129] S64: At the terminal moment or steady-state observation moment, determine whether the network has changed from a functional state to a disabled state based on the proportion of the maximum connected components and the average health.
[0130] S65: Estimate the critical attack intensity or critical attack scale based on the transition position between the functional state and the inactive state.
[0131] S66: When there are random perturbations or multiple random seed experiments, the results of multiple simulations are summarized to obtain a stable critical threshold estimation result.
[0132] S70: Applicability Determination S71: Calculate the spectral radius of the initial topology or the unattacked subgraph.
[0133] S72: Determine if the spectral boundary condition is met; if it is, output the usable area of the lower bound of the spectral boundary and the lower bound of the critical attack strength.
[0134] S73: Determine whether the strong coupling condition is met within the preset attack range, and whether the composite sequence parameter does not show a macroscopic decrease or jump that meets the preset threshold; if it is met, output the non-phase transition saturation state.
[0135] S74: If the above judgment conditions are not met, then enter the numerical main estimation area and use the parameter search result as the main estimation result of the critical threshold.
[0136] S75: Output applicable domain labels, including the lower bound of the spectral boundary, the numerical master estimation region, the non-phase transition saturation state, or the undetermined state.
[0137] S80: Robustness Measurement Synthesis and Output S81: Construct a normalized attack pressure variable based on the current attack intensity, attack scale and its corresponding critical parameters.
[0138] S82: Calculate the crash probability term based on the normalized attack pressure variable.
[0139] S83: Calculate the attack robustness measure based on the composite order parameter and the crash probability term.
[0140] S84: Optionally, calculate the critical distance to the safe side distance or the non-negative safety margin.
[0141] S85: Outputs main results for monitoring, alerting, and policy adjustment. The main results include robustness metrics, risk level, applicable domain labels, and alert or policy recommendations.
[0142] S86: Sends the output results to the monitoring panel, policy engine, alarm system, reporting interface, or storage system.
[0143] S90: Phase transition type enhanced diagnosis This step is a preferred enhancement step and can be enabled based on computing resources and business needs.
[0144] S91: Enable phase transition type enhanced diagnostics when it is necessary to differentiate degradation types, verify critical threshold reliability, or analyze behavior across scales.
[0145] S92: Repeatedly execute simulations under multiple node scales, multiple attack parameters, and multiple random seeds to collect composite order parameter samples.
[0146] S93: Calculate magnetic susceptibility, Binder accumulation, magnetic susceptibility peak position, order parameter jump variable, and finite size scale quality index based on the composite order parameter sample.
[0147] S94: When the quality of the finite-size scaling is below the preset threshold or the sample distribution is bimodal, suppress the output of the standard FSS (Finite-Size Scaling) parameter and use the enhanced diagnostic quantity for joint judgment.
[0148] S95: Outputs first-order, second-order, cross-type, or uncertain degradation labels and generates enhanced diagnostic reports.
[0149] Figure 4 This is a schematic diagram of the node health dynamics and effective adjacency update process in an embodiment of the present invention.
[0150] like Figure 4 As shown, stage 1 consists of the original topology and attack input. Given the original topology A(0) and the attack input a(t), the node health vector is represented as follows: Phase 2 is the node health dynamics update, where the health state of each node i is determined by the differential equation. The driving force, the equation contains a natural degradation term. Neighbor coupling enhancement terms Attack function item and optional random perturbation The example health vector shows that node health values are distributed between 0 and 1. Stage 3 involves generating health thresholds and masks, setting the health thresholds. ,like Then the node is retained, if The node fails and its valid connections are broken; health mask It is a diagonal matrix, with diagonal elements taking the values 1 or 0. Stage 4 is the effective adjacency update, effective topology. That is, by multiplying the health mask by the original adjacency matrix on the left and right, nodes below the threshold and their associated edges are removed. In the figure, solid-line nodes represent healthy nodes, light gray or hollow nodes represent low-health nodes, and dashed edges represent failed connections.
[0151] Figure 5 This is a schematic diagram of the process for determining the critical threshold and applicable domain in an embodiment of the present invention.
[0152] like Figure 5 As shown, the input parameters after starting include , , , A(0) M(t) or The attack range B and the set of candidate attack strengths or attack sizes are also considered. First, it is determined whether the condition α > βρ(A(0)) is satisfied, where ρ(A(0)) is the spectral radius of the initial adjacency matrix. If satisfied, the lower bound of the output spectral boundary is available, and the lower bound of the critical attack strength is calculated. Then, it proceeds to determine whether numerical refinement is needed. If α>βρ(A(0)) is not satisfied, it directly enters the numerical search, repeatedly performing simulations on candidate attack parameters using grid search, binary search, or adaptive search. After the numerical search, it determines whether it has entered a failure state or detected a macroscopic decrease or jump. If detected, it outputs... or The applicable region is marked as the main numerical estimation region. If no detection is detected, further determination is made as to whether the preset attack range B is satisfied. Furthermore, no macroscopic decrease or jump is observed in the composite order parameter M(t). If this condition is met, the output indicates a non-phase transition saturation state; otherwise, the output indicates that the search range is being expanded further or is currently undetermined, and the process ends.
[0153] Figure 6 This is a schematic diagram of the robustness measurement output in an embodiment of the present invention.
[0154] like Figure 6 As shown, after starting, input the composite sequence parameter M(t), the initial sequence parameter M(0), and the critical parameter. or The current attack intensity a(t) or attack size b(t), and the normalized scale Δa or Δb. Step S81 constructs the attack pressure variable z(t), which is calculated as follows: ,or or adopt a joint form Step S82 calculates the crash probability. , where σ(·) is the logistic function. κ is the slope parameter of the logistic function, used to adjust the sensitivity of the crash probability to attack pressure; its value is typically between 1 and 10, and can be set by the user according to network sensitivity requirements. Step S83: Synthesize robustness metrics. Step S84 Optional: Calculate the safety margin Step S85 outputs the calculation results, including robustness metrics. Optional information includes critical parameters, crash probability, attack pressure variables, and safety margins.
[0155] Figure 7 This is a schematic diagram of the phase transition type enhanced diagnostic process in an embodiment of the present invention.
[0156] like Figure 7 As shown, after the process starts, steps S91 to S92 are performed, where enhanced diagnostics are enabled and samples are collected. Multiple node scales N, multiple attack scales b, multiple random seeds, and composite sequence parameter samples are input. Step S93 calculates the enhanced diagnostic parameters, including magnetic susceptibility. Binder cumulative amount Peak magnetic susceptibility Finite-size scale mass Q and order parameter jump variables ( Step S94 determines whether the finite-size scaling quality is below a threshold or whether the sample distribution is bimodal. If so, it suppresses the output of standard finite-size scaling parameters and instead combines b*, If ΔM is used for diagnosis, otherwise the finite-size scale quality index is retained and combined with the above diagnostic quantities. Step S95 outputs the enhanced diagnostic results. Then the output is a first-order degenerate form, if and If the value is greater than 0, the output is a second-order degradation; otherwise, the output is a cross-type or uncertain degradation. The final output includes the phase transition type label, b*, the Bind cumulant curve, the finite-size scaling quality index, and the order parameter jump variable ΔM.
[0157] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 8As 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 server-side functions or steps for determining a method for measuring the robustness of blockchain peer-to-peer network attacks.
[0158] In one embodiment, a computer device is provided, which may be a client, and its internal structure diagram may be as follows: Figure 9 As 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 in the non-volatile storage media. The network interface is used to communicate with an external server via a network connection. When the computer program is executed by the processor, it implements client-side functions or steps for determining a method for measuring the robustness of blockchain peer-to-peer network attacks.
[0159] 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.
[0160] 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.
[0161] 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.
[0162] 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.
[0163] 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 method for determining the robustness measure of blockchain peer-to-peer network attacks, characterized in that, include: Attack input is applied based on attack parameters, the health status of each node is updated using a dynamic model that includes natural degradation, enhanced neighbor coupling, and attack decay, and an effective topology is determined based on the comparison between the health status of each node and a preset health threshold. At each time step, a composite order parameter is calculated based on the node's health status and the effective topology. The composite order parameter integrates the node's normalized average health, the proportion of the largest connected component in the effective topology, and the normalized average health. Based on the changing trend of the composite order parameter with attack parameters or time, identify the critical position of the network transitioning from a functional state to a disabled state, and determine the corresponding critical attack parameters. Based on the attack parameters, the critical attack parameters, and the composite order parameter, a normalized attack robustness metric is generated.
2. The method for determining the robustness measure of blockchain peer-to-peer network attacks according to claim 1, characterized in that, The process of applying attack input based on attack parameters, updating the health state of each node using a dynamic model that includes natural degradation, enhanced neighbor coupling, and attack attenuation, and determining an effective topology based on a comparison of the health state of each node with a preset health threshold includes: The attack scale and intensity are determined based on the attack parameters, a set of attacked nodes is selected, and attack inputs are configured for the attacked nodes. A dynamic equation for the node health state is established using the natural degradation term of each node, the coupling enhancement term of the weighted sum of health states from neighboring nodes, and the attack decay term caused by the attack input. The dynamic equation is then numerically integrated to update the node health state at each time step. Based on a preset health threshold, the health status of each node is compared with the health threshold to generate a health mask; The health mask is applied to the network topology to remove nodes and their associated connections whose health status is below the health threshold, thereby obtaining the effective topology.
3. The method for determining the robustness measure of blockchain peer-to-peer network attacks according to claim 1, characterized in that, The calculation of composite order parameters at each time step, based on the node's health status and the effective topology, includes: Calculate the average health score based on the health status of all nodes, and normalize the average health score with an initial value to obtain the normalized average health score. In the effective topology, the largest connected component is determined, and the proportion of the number of nodes in the largest connected component to the total number of nodes is calculated as the proportion of the largest connected component. Calculate the average degree of all nodes in the effective topology, and normalize the average degree with an initial value to obtain the normalized average degree; The normalized average health, the maximum connected component ratio, and the normalized average degree are weighted and summed according to preset weights to obtain the composite order parameter.
4. The method for determining the robustness measure of blockchain peer-to-peer network attacks according to claim 1, characterized in that, The step of identifying the critical position of the network transitioning from a functional state to a disabled state based on the changing trend of the composite order parameter with attack parameters or time, and determining the corresponding critical attack parameters, includes: In terms of attack intensity or attack scale, by scanning candidate attack parameters, the critical attack parameters when the network transitions from a functional state to a disabled state are determined. Under fixed attack parameters, the phase transition point in the time dimension is determined by performing curvature analysis on the time series of composite order parameters as a function of time.
5. The method for determining the robustness measure of blockchain peer-to-peer network attacks according to claim 4, characterized in that, The critical attack parameters for determining the transition from a functional state to a disabled state by scanning candidate attack parameters in terms of attack intensity or attack scale include: The network functional state is determined by setting the following criteria: at the observation time, the proportion of the maximum connected component in the effective topology is not less than a preset first threshold, and the average health of all nodes is not less than a preset second threshold. The candidate attack parameters are scanned in terms of attack strength or attack scale to obtain the composite order parameters under each candidate attack parameter. When the network changes from satisfying the judgment condition to not satisfying the judgment condition under the attack parameters, the attack parameters are used as critical attack parameters. The critical attack parameter under the attack intensity dimension is the minimum attack intensity that causes the network to fail macroscopically, and the critical attack parameter under the attack scale dimension is the minimum proportion of attacked nodes that causes the network to fail macroscopically.
6. The method for determining the robustness measure of blockchain peer-to-peer network attacks according to claim 4, characterized in that, The determination of phase transition points in the time dimension by performing curvature analysis on the time series of composite order parameters changing over time under fixed attack parameters includes: Under fixed attack parameters, curvature analysis or mutation detection is performed on the time series of composite order parameters changing over time; The point where the magnitude of the second derivative of the composite order parameter is maximized or the point where the curvature changes abruptly is taken as the phase transition point in the time dimension. The phase transition point is used to characterize the moment when the network state undergoes rapid degradation.
7. The method for determining the robustness measure of blockchain peer-to-peer network attacks according to claim 1, characterized in that, The step of generating a normalized attack robustness metric based on the attack parameters, the critical attack parameters, and the composite order parameter includes: A normalized attack pressure variable is constructed based on the difference between the attack parameters and the critical attack parameters; The normalized attack pressure variable is input into the logistic function and mapped to a crash probability term; A normalized attack robustness metric is calculated based on the ratio of the composite order parameter to the initial composite order parameter and the collapse probability term.
8. The method for determining the robustness measure of blockchain peer-to-peer network attacks according to claim 7, characterized in that, The step of generating a normalized attack robustness metric based on the attack parameters, the critical attack parameters, and the composite order parameter further includes: Calculate the difference between the composite sequence parameter and the composite sequence parameter at the critical point, as well as the difference between the initial composite sequence parameter and the composite sequence parameter at the critical point, and construct a distance metric for the safe side distance critical point based on this. The distance metric is set to a non-negative value to obtain a safety margin; The security margin is used as an adjustment factor and combined with the attack robustness metric to obtain a composite robustness metric, which is used to characterize the remaining security space of the network from the failure boundary.
9. The method for determining the robustness measure of blockchain peer-to-peer network attacks according to claim 1, characterized in that, Also includes: Under multiple network sizes and multiple random seeds, the steps of updating node health status and determining effective topology based on attack parameters, calculating composite order parameters at each time step, and identifying critical positions and determining critical attack parameters based on composite order parameters are repeatedly executed to collect composite order parameter samples under different attack parameters. The magnetic susceptibility and Bindt cumulative quantity are calculated based on the composite order parameter sample. The magnetic susceptibility is used to characterize the fluctuation range of the composite order parameter, and the Bindt cumulative quantity is used to characterize the distribution pattern of the composite order parameter. When the quality of the finite size scale is lower than the preset threshold or the sample distribution is bimodal, the type of degradation phase transition is determined by the peak position of the magnetic susceptibility, the minimum value of the Bind cumulative amount, and the jump variable of the composite order parameter at the critical point. The type of degradation includes first-order degradation, second-order degradation, or cross-type degradation.
10. A system for determining the robustness measure of blockchain peer-to-peer network attacks, characterized in that, It includes a processor and a memory, the memory storing a computer program, and the processor executing the computer program implements a method for determining the robustness metric of blockchain peer-to-peer network attacks as described in any one of claims 1 to 9.