Web3.0-based blockchain network node monitoring method, device, equipment and medium
By periodically collecting and filtering blockchain network node information, identifying key nodes and monitoring their status, the problem of insufficient monitoring of key nodes in existing technologies is solved, thereby improving the security and stability of the blockchain network.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA ACADEMY OF INFORMATION & COMM
- Filing Date
- 2025-12-01
- Publication Date
- 2026-05-08
AI Technical Summary
Existing technologies lack sophisticated monitoring of key nodes in blockchain networks, making it difficult to identify performance anomalies in a timely manner and increasing system security risks.
By periodically collecting information on blockchain network nodes, candidate nodes such as consensus nodes, block-producing nodes, and seed nodes are selected. Target nodes are determined based on key information and their status is monitored. A dynamic tracking mechanism with preset time intervals is used to achieve refined monitoring of key nodes.
It enables timely detection of performance anomalies in key nodes of the blockchain network, reduces system security risks, and ensures the security, stability, and transaction efficiency of the network.
Smart Images

Figure CN121262007B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to blockchain technology, and in particular to a method, apparatus, device, and medium for monitoring blockchain network nodes based on Web3.0. Background Technology
[0002] Blockchain technology plays a crucial role in Web3.0, and the operational status of the blockchain network impacts the operation of Web3.0. As the core infrastructure of the blockchain network, the health and operational status of nodes directly determine the security, stability, and transaction processing efficiency of the blockchain network. Current node monitoring technologies primarily focus on overall macro-level network indicators such as block generation rate and transaction confirmation latency, neglecting to develop refined monitoring and status analysis mechanisms for key nodes that play a critical role in network operation. This makes it difficult for the blockchain network to identify performance anomalies in key nodes in real time, hindering timely warnings of potential risks and ultimately increasing security vulnerabilities in the blockchain system. Summary of the Invention
[0003] To address the aforementioned technical issues, this disclosure provides a method, apparatus, device, and medium for monitoring blockchain network nodes based on Web3.0.
[0004] One aspect of this disclosure provides a method for monitoring blockchain network nodes based on Web3.0, comprising: periodically collecting node information of each node in the blockchain network based on a preset time interval; for the node information collected in each period, determining at least one candidate node based on the node information of each node in the blockchain network, wherein the candidate node includes at least one of the following in the blockchain network: consensus node, block-producing node, and seed node; acquiring node data of each candidate node among the at least one candidate node; determining key information of each candidate node based on the node data, wherein the key information is used to indicate the importance of the candidate node in the blockchain network; determining at least one target node based on the key information of each candidate node; and monitoring the node status of each target node among the at least one target node to determine the status monitoring result of whether each target node is operating normally.
[0005] Another aspect of this disclosure provides a Web3.0-based blockchain network node monitoring device, comprising: a node information acquisition module, configured to periodically acquire node information of each node in the blockchain network based on a preset time interval; a first node filtering module, configured to determine at least one candidate node based on the node information of each node in the blockchain network for each periodically acquired node information, the candidate node including at least one of the following in the blockchain network: consensus node, block-producing node, and seed node; a node data acquisition module, configured to acquire node data of each candidate node among the at least one candidate node; a key information determination module, configured to determine key information of each candidate node based on the node data, the key information being used to indicate the importance of the candidate node in the blockchain network; a second node filtering module, configured to determine at least one target node based on the key information of each candidate node; and a status monitoring module, configured to monitor the node status of each target node among the at least one target node and determine the status monitoring results of whether each target node is operating normally.
[0006] In another aspect of this disclosure, an electronic device is provided, comprising: a memory for storing a computer program; and a processor for executing the computer program stored in the memory, wherein when the computer program is executed, it implements the method described above.
[0007] In another aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the method described above.
[0008] In another aspect, embodiments of this disclosure provide a computer program product including computer program instructions that, when executed by a processor, implement the method described above.
[0009] Based on the embodiments of this disclosure, a periodic data collection mechanism with preset time intervals enables dynamic tracking and continuous updating of the blockchain network node status, effectively avoiding information lag caused by changes in the blockchain network structure. Simultaneously, periodic data collection at preset time intervals can accurately identify candidate nodes such as consensus nodes, block-producing nodes, and seed nodes. Combined with key information, target nodes can be selected and their status monitored, achieving refined monitoring of key nodes (target nodes) in the blockchain network. This allows for timely detection of target node performance anomalies, effectively reducing system security risks and ensuring network security, stability, and transaction efficiency.
[0010] The technical solutions of this disclosure will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0011] The accompanying drawings, which form part of this specification, illustrate embodiments of this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0012] This disclosure will become clearer with reference to the accompanying drawings and the following detailed description, wherein:
[0013] Figure 1 This is a flowchart illustrating a Web3.0-based blockchain network node monitoring method provided in an exemplary embodiment of this disclosure;
[0014] Figure 2 This is a flowchart illustrating step S140 provided in an exemplary embodiment of this disclosure;
[0015] Figure 3 This is a flowchart illustrating step S130 provided in an exemplary embodiment of this disclosure;
[0016] Figure 4 This is a flowchart illustrating step S110 provided in an exemplary embodiment of this disclosure;
[0017] Figure 5 This is a flowchart illustrating step S150 provided in an exemplary embodiment of this disclosure;
[0018] Figure 6 This is a structural block diagram of a Web3.0-based blockchain network node monitoring device provided in an exemplary embodiment of this disclosure;
[0019] Figure 7 This is a schematic diagram of the structure of an application embodiment of the electronic device disclosed herein. Detailed Implementation
[0020] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps set forth in these embodiments do not limit the scope of the present disclosure.
[0021] Those skilled in the art will understand that the terms "first," "second," etc., in the embodiments of this disclosure are only used to distinguish different steps, devices, or modules, and do not represent any specific technical meaning, nor do they indicate a necessary logical order between them.
[0022] It should also be understood that in the embodiments disclosed herein, "a plurality of" may refer to two or more, and "at least one" may refer to one, two or more.
[0023] It should also be understood that any component, data or structure mentioned in the embodiments of this disclosure can generally be understood as one or more unless expressly defined or given to the contrary in the context.
[0024] Furthermore, the term "and / or" in this disclosure is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this disclosure generally indicates that the preceding and following related objects have an "or" relationship.
[0025] It should also be understood that the description of the various embodiments in this disclosure emphasizes the differences between the various embodiments, and the similarities or similarities can be referred to each other. For the sake of brevity, they will not be described in detail.
[0026] At the same time, it should be understood that, for ease of description, the dimensions of the various parts shown in the accompanying drawings are not drawn according to actual scale.
[0027] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit this disclosure or its application or use.
[0028] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.
[0029] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.
[0030] The embodiments disclosed herein can be applied to electronic devices such as terminal devices, computer systems, and servers, and can operate together with a wide range of other general-purpose or special-purpose computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments, and / or configurations suitable for use with electronic devices such as terminal devices, computer systems, and servers include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputer systems, mainframe computer systems, and distributed cloud computing environments including any of the above systems, etc.
[0031] Electronic devices such as terminal devices, computer systems, and servers can be described in the general context of computer system executable instructions (such as program modules) executed by a computer system. Typically, program modules can include routines, programs, object programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers can be implemented in distributed cloud computing environments, where tasks are executed by remote processing devices linked through communication networks. In distributed cloud computing environments, program modules can reside on local or remote computing system storage media, including storage devices.
[0032] In the disclosed embodiment:
[0033] In a narrow sense, blockchain technology can be defined as a chain-like data structure that combines data blocks sequentially in chronological order, creating a distributed ledger that is cryptographically guaranteed to be immutable and unforgeable. In a broader sense, blockchain technology can utilize a chain-like data structure to verify and store data, node consensus algorithms to generate and update data, cryptographic methods to ensure the security of data transmission and access, and smart contracts composed of automated script code. A node in a blockchain network typically refers to a computer within the blockchain network; that is, any computing device connected to the blockchain network (including smartphones, servers, cloud hosts, etc.) is called a node.
[0034] Web3.0 (the third generation of the Internet) is a user-centric, trustworthy value Internet built on decentralized technologies such as blockchain. Its core is that users have independent control over their data, identity, and assets, and the network architecture is decentralized, allowing value to flow freely.
[0035] Figure 1 This is a flowchart illustrating a Web3.0-based blockchain network node monitoring method provided in an exemplary embodiment of this disclosure. This embodiment can be applied to electronic devices, such as… Figure 1 As shown, this Web3.0-based blockchain network node monitoring method may include the following steps:
[0036] Step S100: Periodically collect node information of each node in the blockchain network based on a preset time interval.
[0037] The preset time interval can be set according to actual needs. For example, the preset time interval can be 24h, 48h, etc. For instance, node information can be obtained from the blockchain network every 24 hours. Steps S100 to S150 are executed for each cycle.
[0038] Node information can include each node's identifier, node category, public Internet Protocol address (IP), client version, operating system version, synchronization status, etc., in the blockchain network. The node category indicates the node's type or role in the blockchain network; for example, node categories can include consensus nodes, seed nodes, block-producing nodes, and ordinary nodes.
[0039] In one implementation, a peer-to-peer (P2P) protocol can be deployed in the blockchain network, enabling connections and communication between nodes (e.g., node detection, broadcasting information, transaction broadcast data aggregation, etc.). A monitoring platform can be deployed into the blockchain network as a full node based on the P2P protocol. This monitoring platform can be, for example, a server, cloud host, laptop, desktop computer, tablet, or smartphone. The monitoring platform can acquire configuration information, topology graphs, or messages of the blockchain network, and can obtain node information based on these information. The blockchain network topology graph refers to a structural diagram describing the connections between nodes in the blockchain network. It includes the potential paths for data (blocks, transactions) to propagate within the blockchain network and identifies the structural roles played by different nodes. For example, each node in the blockchain network corresponds to a graph node in the topology graph, which can include graph node information, edges, and topological structure features. Graph node information includes node identity and node attributes. Node identity includes the node's ID and public IP address. Node attributes include the node's type (full node, light node, validator), client version, geographical location, etc. Edges represent connections between nodes; edges are usually directed, including incoming edges (other nodes connect to this node) and outgoing edges (this node connects to other nodes). Topology features include: the total number of connections a node has (in-degree + out-degree), the number of hops required for the shortest path between two nodes, clustering coefficient, connectivity, etc. The clustering coefficient measures the degree to which a node's neighbors are also interconnected. Connectivity indicates the speed at which the network is divided into isolated parts.
[0040] Step S110: For the node information collected in each period, at least one candidate node is determined based on the node information of each node in the blockchain network.
[0041] Candidate nodes include at least one of the following: consensus nodes, block-producing nodes, and seed nodes in the blockchain network. Consensus nodes are nodes in the blockchain network that participate in the consensus process. Block-producing nodes are nodes in the blockchain network that generate new blocks. Seed nodes are pre-defined, stable, initial contact nodes in the blockchain network.
[0042] In one implementation, for each cycle, i.e. each time node information is collected, the monitoring platform can determine consensus nodes, block-producing nodes, and seed nodes based on the node categories in the node information, and determine the determined consensus nodes, block-producing nodes, and seed nodes as candidate nodes.
[0043] Step S120: Obtain node data of each candidate node in at least one candidate node.
[0044] The node data may include, for example, the transaction volume, block production rate (number of blocks per second), transaction verification rate, consensus message response latency (duration), transaction throughput, and transaction amount information of each candidate node.
[0045] For example, the monitoring platform can use a lightweight proxy or remote API call to perform second-level probing or packet capture on each candidate node to obtain its node data. Alternatively, web crawlers can be used to obtain the node data of each candidate node.
[0046] Step S130: Based on the node data, determine the key information of each candidate node.
[0047] The key information for each candidate node indicates its importance within the blockchain network. For example, the monitoring platform can obtain the block production rate and transaction amount information of each candidate node from the node data. Then, based on the transaction amount information, it can count the number of large transactions exceeding a preset value processed by each candidate node. This key information can be determined using the formula: Key Information = Block Production Rate × Preset Block Production Weight + Number of Large Transactions × Preset Transaction Weight. In this embodiment, node transaction processing can be understood as the operation of a node receiving, verifying, and forwarding transactions to other nodes from the network.
[0048] Step S140: Based on the key information of each candidate node, determine at least one target node.
[0049] The target node is an important / critical node in the blockchain network that needs to be monitored.
[0050] For example, the monitoring platform can pre-set a preset key threshold. When the key information of a candidate node is greater than the preset key threshold, the candidate node is determined to be the target node.
[0051] Step S150: Monitor the node status of each target node in at least one target node to determine the status monitoring results of whether each target node is operating normally.
[0052] The status monitoring results include whether the node is operating normally or abnormally.
[0053] In one implementation, for each target node, the monitoring platform can use system monitoring tools such as Node Exporter to collect the CPU usage, memory usage, and disk usage of the target node. The CPU usage, memory usage, and disk usage can be processed through threshold judgment, cluster analysis, or deep learning models to obtain the status monitoring results of the target node. Node Exporter is a system indicator collection component officially provided by Prometheus, which is mainly used to collect hardware and system-level indicators, such as CPU usage, memory usage, disk I / O, and network traffic.
[0054] For example, the monitoring platform can use the formula: Status Value = CPU Utilization × Preset CPU Weight Value + Memory Utilization × Preset Memory Weight Value + Disk Utilization × Preset Memory Weight Value to determine the status value of each target node. When the status value of a target node is greater than the preset status threshold, the monitoring result of the target node is determined to be an abnormal node operation. When the status value of a target node is determined to be less than or equal to the preset status threshold, the monitoring result of the target node is determined to be an abnormal node operation. When a target node is determined to be in an abnormal operation state, the monitoring platform can generate alarm information, identify the target node as an abnormal node, and update the list of target nodes to remove the target node.
[0055] In this embodiment, a periodic data collection mechanism with preset time intervals enables dynamic tracking and continuous updating of the blockchain network node status, effectively avoiding information lag caused by changes in the blockchain network structure. Simultaneously, periodic data collection at preset time intervals allows for precise identification of candidate nodes such as consensus nodes, block-producing nodes, and seed nodes. Combined with key information, target nodes are selected and their status monitored, achieving refined monitoring of key nodes (target nodes) in the blockchain network. This enables timely detection of target node performance anomalies, effectively reducing system security risks and ensuring network security, stability, and transaction efficiency.
[0056] In some optional implementations, the key information of any candidate node includes: first connectivity information, second connectivity information, transaction size information, and intermediation information. The first connectivity information of any candidate node includes the number of nodes connected to that candidate node in the blockchain network; the second connectivity information of any candidate node includes the number of other candidate nodes connected to that candidate node; the transaction size information of any candidate node includes information about the transactions processed by that candidate node; and the intermediation information of any candidate node includes information about the candidate node appearing in the communication path of node pairs in the blockchain network.
[0057] Correspondingly, Figure 2 This is a flowchart illustrating step S140 provided in an exemplary embodiment of this disclosure. In embodiments of this disclosure, as... Figure 2 As shown, step S140 may include the following steps:
[0058] Step S141: Based on the first connectivity information, second connectivity information, transaction size information, and intermediary information of each candidate node, the importance value of each candidate node is determined using a preset algorithm.
[0059] The importance value of each candidate node represents its significance within the blockchain network. Preset algorithms may employ importance value evaluation formulas or deep learning models.
[0060] For example, for each candidate node, the monitoring platform can pre-set first, second, third, and fourth preset weight values for the first connectivity information, second connectivity information, transaction size information, and mediation information, respectively. The importance value is then determined using the importance value evaluation formula: Importance Value = First Connectivity Information × First Preset Weight Value + Second Connectivity Information × Second Preset Weight Value + Transaction Size Information × Third Preset Weight Value + Mediation Information × Fourth Preset Weight Value. Alternatively, the first connectivity information, second connectivity information, transaction size information, and mediation information can be input into an importance value evaluation model, which outputs the importance value of the candidate node. This importance value evaluation model can employ a deep learning model, such as a Graph Attention Network (GAT), Convolutional Neural Network (CNN), Auto Encoder (AE), or Long Short-Term Memory (LSTM).
[0061] Step S142: Determine the target node based on the importance value of each candidate node and the preset importance threshold.
[0062] For example, the monitoring platform compares the importance value of each candidate node with a preset importance threshold. When the importance value of a candidate node is greater than the preset importance threshold, the candidate node is identified as a target node. When the importance value of a candidate node is less than or equal to the preset importance threshold, the candidate node is identified as a normal node.
[0063] In this embodiment, by comprehensively considering the connection range of candidate nodes (first connectivity information), the correlation strength with other candidate nodes (second connectivity information), transaction processing capabilities (transaction scale information), and network mediation role (mediation information), a node importance value is calculated using a preset algorithm, and target nodes are screened by combining a threshold. This achieves a multi-dimensional quantitative assessment of node importance, ensuring that the selected target nodes accurately reflect their core position in the blockchain network, providing a reliable basis for subsequent targeted monitoring, and improving the scientificity and accuracy of key node identification.
[0064] In some alternative implementations, node data includes node communication information. This node communication information includes the node identifiers of the nodes each candidate node connects to in the blockchain network. That is, the node communication information includes the node identifiers of the nodes each candidate node connects to in the blockchain network.
[0065] Correspondingly, Figure 3 This is a flowchart illustrating step S130 provided in an exemplary embodiment of this disclosure. In embodiments of this disclosure, as... Figure 3 As shown, step S130 may include the following steps:
[0066] Step S131: For each candidate node, based on the node communication information of the candidate node, determine the number of first node connections of the candidate node to other candidate nodes in the blockchain network, and the number of second node connections of the candidate node to other candidate nodes.
[0067] Specifically, the monitoring platform counts the number of node identifiers of nodes connected to the candidate node in the blockchain network and uses this number as the first node connection count; based on the node identifiers of other candidate nodes and the node identifiers of the nodes connected to the candidate node in the blockchain network, it determines the number of other candidate nodes connected to the candidate node and uses this number as the second node connection count.
[0068] Step S132: Determine the first connectivity information of the candidate node based on the number of connections of the first node.
[0069] The first connectivity information for each candidate node includes the number of its first node connections. In one implementation, the monitoring platform determines the number of first connectivity for each candidate node as its first node connection information.
[0070] Step S133: Determine the second connectivity information of the candidate node based on the number of connections to the second node.
[0071] The second connectivity information for each candidate node includes the number of second node connections for that candidate node. In one implementation, the monitoring platform determines the number of second connectivity for each candidate node as the second node connection information for that candidate node.
[0072] In some optional implementations, node data may further include communication path information for each node pair in the blockchain network. Any two nodes in the blockchain network form a node pair. The communication path information for each node pair includes the node IP / public IP and node identifier of each node in the pair, as well as the node IP / public IP and node identifier of intermediate nodes (hops in the communication path). Intermediate nodes are nodes in the blockchain network through which data / information is transmitted from one node in the node pair to the other. In one implementation, the communication path information for each node pair can be obtained from the configuration information, messages, or topology diagram of the blockchain network.
[0073] Accordingly, step S130 in this embodiment may further include: determining the mediation information of each candidate node based on the communication path information of each node pair.
[0074] The mediation information for each candidate node includes the number of times the candidate node acts as an intermediate node in the node-to-node communication path. For example, the monitoring platform can determine the number of times the candidate node acts as an intermediate node based on the candidate node's node identifier and the node identifiers of the intermediate nodes in each communication path information, and determine the mediation information of the candidate node based on this number.
[0075] In some optional implementations, the node data may further include: the number of transactions and the total transaction value for each candidate node. The number of transactions for each candidate node represents the total number of transactions processed by that candidate node, i.e., the total number of transactions that the candidate node receives, verifies, and forwards to other nodes. The total transaction value for each candidate node represents the total monetary value of the transactions processed by that candidate node.
[0076] Accordingly, step S130 in this embodiment may further include: determining the transaction scale information of each candidate node based on the number of transactions and the total transaction amount of each candidate node.
[0077] For example, the monitoring platform can pre-set the fifth preset weight value and the sixth preset weight value corresponding to the transaction quantity and the total transaction amount, respectively. For each candidate node, the transaction scale evaluation formula is used to determine the transaction scale information of each candidate node: Transaction scale information = Transaction quantity × Fifth preset weight value + Total transaction amount × Sixth preset weight value.
[0078] Figure 4This is a flowchart illustrating step S110 provided in an exemplary embodiment of this disclosure. In some alternative embodiments, such as Figure 4 As shown, step S110 may include the following steps:
[0079] Step S111: Obtain the historical target node of the blockchain network and use the historical target node as the first initial candidate node.
[0080] In this context, the historical target node refers to the target node determined in the previous cycle of the current cycle. For example, the first collection of node information from the blockchain network is the first cycle, the second collection of node information from the blockchain network at a preset time interval is the second cycle, and so on. Assuming the current cycle is the i-th cycle, the historical target node is the target node determined in the (i-1)-th cycle.
[0081] In one implementation, when node information is not acquired for the first time, i.e. when node information is acquired in a period other than the first acquisition cycle, the monitoring platform determines the target node identified in the previous cycle as the historical target node, and then determines the historical target node as the first initial candidate node.
[0082] Step S112: Based on the node information, determine the second initial candidate node among other nodes in the blockchain network.
[0083] Other nodes are nodes in the blockchain network other than the historical target nodes.
[0084] In one implementation, the monitoring platform determines consensus nodes, seed nodes, and block-producing nodes as second initial candidate nodes from among the other nodes based on the node category of each node in the node information.
[0085] Step S113: Determine candidate nodes based on the first initial candidate node and the second initial candidate node.
[0086] The monitoring platform uses the first and second initial candidate nodes as candidate nodes.
[0087] In one implementation, when obtaining node information for the first time, the monitoring platform can directly identify consensus nodes, seed nodes, and block-producing nodes as candidate nodes among the nodes in the blockchain network based on the node category of each node in the node information.
[0088] In this embodiment, historical target nodes are used as the first initial candidate nodes, and second initial candidate nodes are determined from other nodes by combining current node information. The two together constitute the final candidate nodes. This not only continues the focus on key nodes that have been verified in the past (historical target nodes), but also includes potentially emerging key nodes in the blockchain network. This makes the coverage of candidate nodes both continuous and dynamic, effectively avoiding the omission of potential important nodes and laying a comprehensive foundation that fits the actual state of the network for subsequent accurate selection of target nodes.
[0089] Figure 5 This is a flowchart illustrating step S150 provided in an exemplary embodiment of this disclosure. In some alternative embodiments, such as Figure 5 As shown, step S150 may include the following steps:
[0090] Step S151: For each target node, obtain the response rate of that target node.
[0091] For example, the monitoring platform can perform a preset number of probe operations on the target node within a preset first preset time period. The average of the initial response rates of the preset number of probe operations is used as the response rate of the target node. Each probe operation includes: sending a preset number of probe requests to the target node within a preset second time period; and obtaining the initial response rate of the probe operation by dividing the number of response messages returned by the target node in response to the probe requests by the preset number. The preset first time period is longer than the preset second time period; for example, the preset first time period is 24 hours and the second preset time period is 1 hour.
[0092] Step S152: In response to the fact that the response rate of the target node does not exceed the preset response rate threshold, the status monitoring result of the target node is determined to be node de-networking.
[0093] The status detection nodes can also include nodes that have left the network. When the status monitoring result of a target node indicates that the node has left the network, the monitoring platform can generate an alarm message and update the list of target nodes to remove the target node.
[0094] Step S153: In response to the target node's response rate exceeding a preset response rate threshold, obtain the target node's CPU usage, memory usage, and disk usage.
[0095] For example, lightweight data collection agents (such as custom scripts or open-source monitoring agents) can be pre-deployed on each node in the blockchain network. The data collection agents can directly read the local hardware resource data (CPU usage, memory usage, and disk usage) of the target node, and then transmit the data to the monitoring platform through a remote communication protocol. The remote communication protocol may include, for example, Hypertext Transfer Protocol (HTTP) or Secure Shell (SSH).
[0096] It should be noted that there is no specific order of execution between steps S152 and S153 in the embodiments of this disclosure.
[0097] Step S154: Based on the CPU usage, memory usage, and disk usage of the target node, determine the status monitoring results of the target node.
[0098] In one implementation, the monitoring platform can pre-set CPU utilization thresholds, memory utilization thresholds, and disk utilization thresholds. When the target node meets at least one of the following monitoring conditions, the monitoring result is determined to be an abnormal operation; when the target node does not meet any of the following monitoring conditions, the monitoring result is determined to be a normal operation. Monitoring conditions may include CPU utilization exceeding the CPU utilization threshold, memory utilization exceeding the memory utilization threshold, and disk utilization exceeding the disk utilization threshold.
[0099] For example, the CPU utilization threshold, memory utilization threshold, and disk utilization threshold are all 90%. When the CPU utilization of the target node is greater than 90%, the memory utilization is greater than 90%, or the disk utilization is greater than 90%, the status monitoring result of the target node is determined to be that the target node is running abnormally.
[0100] Figure 6 This is a structural block diagram of a Web3.0-based blockchain network node monitoring device provided in an exemplary embodiment of this disclosure. Figure 6 As shown, this Web3.0-based blockchain network node monitoring device includes:
[0101] The node information collection module 200 is used to periodically collect node information of each node in the blockchain network based on a preset time interval.
[0102] The first node screening module 210 is used to determine at least one candidate node based on the node information of each node in the blockchain network for the node information collected in each period. The candidate node includes at least one of the following in the blockchain network: consensus node, block producing node, and seed node.
[0103] The node data acquisition module 220 is used to acquire the node data of each candidate node among the at least one candidate node;
[0104] The key information determination module 230 is used to determine the key information of each candidate node based on the node data, wherein the key information is used to indicate the importance of the candidate node in the blockchain network;
[0105] The second node filtering module 240 is used to determine at least one target node based on the key information of each candidate node;
[0106] The status monitoring module 250 is used to monitor the node status of each target node in the at least one target node and determine the status monitoring results of whether each target node is operating normally.
[0107] In some optional examples, the key information of any candidate node in the above embodiments of this disclosure includes first connectivity information, second connectivity information, transaction size information, and intermediation information. The first connectivity information includes the number of nodes connected to the candidate node in the blockchain network. The second connectivity information includes the number of other candidate nodes connected to the candidate node. The transaction size information includes information on transactions processed by the candidate node. The intermediation information includes information on the candidate node appearing in the communication path of node pairs in the blockchain network.
[0108] The second node filtering module 240 in the above embodiments of this disclosure is specifically used to determine the importance value of each candidate node based on the first connectivity information, second connectivity information, transaction scale information and intermediary information of each candidate node, using a preset algorithm; and to determine the target node based on the importance value of each candidate node and a preset importance threshold.
[0109] In some optional examples, the node data in the above embodiments of this disclosure includes node communication information, which includes node identifiers of the nodes in the blockchain network to which each candidate node is connected;
[0110] In some optional examples, the key information determination module 230 in the above embodiments of this disclosure is specifically used to determine, for each candidate node, the first number of node connections of the candidate node to nodes in the blockchain network and the second number of node connections of the candidate node to other candidate nodes based on the node communication information; determine the first connectivity information of the candidate node based on the first node connection number; and determine the second connectivity information of the candidate node based on the second node connection number.
[0111] In some optional examples, the node data in the above embodiments of this disclosure includes communication path information of each node pair in the blockchain network;
[0112] In some optional examples, the key information determination module 230 in the above embodiments of this disclosure is specifically used to determine the mediation information of each candidate node based on the communication path information of each node pair.
[0113] In some optional examples, the node data in the above embodiments of this disclosure includes the number of transactions and the total transaction amount of each candidate node;
[0114] In some optional examples, the key information determination module 230 in the above embodiments of this disclosure is specifically used to determine the transaction scale information of each candidate node based on the number of transactions and the total transaction amount of each candidate node.
[0115] In some optional examples, the first node filtering module 210 in the above embodiments of this disclosure is specifically used to obtain the historical target node of the blockchain network and use the historical target node as the first initial candidate node; determine the second initial candidate node among other nodes in the blockchain network based on the node information; and determine the candidate node based on the first initial candidate node and the second initial candidate node.
[0116] In some optional examples, the status monitoring module 250 in the above embodiments of this disclosure is specifically used to: obtain the response rate of each target node; determine that the status monitoring result of the target node is node disconnection if the response rate does not exceed a preset response rate threshold; obtain the CPU usage, memory usage, and disk usage of the target node if the response rate exceeds the preset response rate threshold; and determine the status monitoring result of the target node based on the CPU usage, memory usage, and disk usage of the target node.
[0117] The Web3.0-based blockchain network node monitoring device disclosed herein corresponds to the embodiments of the Web3.0-based blockchain network node monitoring methods disclosed above, and the relevant contents can be referred to each other, which will not be repeated here.
[0118] The beneficial technical effects of the exemplary embodiment of the Web3.0-based blockchain network node monitoring device disclosed herein can be found in the corresponding beneficial technical effects in the exemplary method section above, and will not be repeated here.
[0119] In addition, this disclosure also provides an electronic device, including:
[0120] Memory, used to store computer programs;
[0121] A processor is configured to execute a computer program stored in the memory, wherein when the computer program is executed, it implements the Web3.0-based blockchain network node monitoring method described in any of the above embodiments of this disclosure.
[0122] Figure 7 This is a schematic diagram illustrating the structure of an application embodiment of the electronic device disclosed herein. Below, reference is made to… Figure 7 This describes an electronic device according to embodiments of the present disclosure. The electronic device may be either or both of a first device and a second device, or a standalone device independent of them, which may communicate with the first device and the second device to receive acquired input signals from them.
[0123] like Figure 7 As shown, the electronic device includes one or more processors and memory.
[0124] A processor can be a central processing unit (CPU) or other form of processing unit with data processing and / or instruction execution capabilities, and can control other components in an electronic device to perform desired functions.
[0125] The memory may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and a processor may execute the program instructions to implement the Web3.0-based blockchain network node monitoring method and / or other desired functions described in the various embodiments of this disclosure above.
[0126] In one example, the electronic device may also include input devices and output devices, which are interconnected via a bus system and / or other forms of connection mechanism (not shown).
[0127] In addition, the input device may include, for example, a keyboard, a mouse, etc.
[0128] This output device can output various information to the outside, including determined distance information, direction information, etc. The output device may include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, etc.
[0129] Of course, for the sake of simplicity, Figure 7Only some of the components of the electronic device relevant to this disclosure are shown, omitting components such as buses, input / output interfaces, etc. In addition, the electronic device may include any other suitable components depending on the specific application.
[0130] In addition to the methods and devices described above, embodiments of this disclosure may also be computer program products comprising computer program instructions that, when executed by a processor, cause the processor to perform the steps of the Web3.0-based blockchain network node monitoring method according to various embodiments of this disclosure as described in the foregoing portion of this specification.
[0131] The computer program product can be written in any combination of one or more programming languages to perform the operations of the embodiments of this disclosure. The programming languages include object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on a user's computing device, partially on a user's computing device, as a standalone software package, partially on a user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0132] Furthermore, embodiments of this disclosure may also be computer-readable storage media storing computer program instructions that, when executed by a processor, cause the processor to perform the steps in the Web3.0-based blockchain network node monitoring method according to various embodiments of this disclosure as described in the foregoing portion of this specification.
[0133] The computer-readable storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.
[0134] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as ROM, RAM, magnetic disk, or optical disk.
[0135] The basic principles of this disclosure have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this disclosure are merely examples and not limitations, and should not be considered as essential features of each embodiment of this disclosure. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the scope of this disclosure to the necessity of employing the aforementioned specific details for implementation.
[0136] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For system embodiments, since they largely correspond to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0137] The block diagrams of devices, apparatuses, devices, and systems disclosed herein are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.
[0138] The methods and apparatus of this disclosure may be implemented in many ways. For example, they may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order of steps for the methods is for illustrative purposes only, and the steps of the methods of this disclosure are not limited to the order specifically described above unless otherwise specifically stated. Furthermore, in some embodiments, this disclosure may also be implemented as a program recorded on a recording medium, the program including machine-readable instructions for implementing the methods according to this disclosure. Thus, this disclosure also covers recording media storing programs for performing the methods according to this disclosure.
[0139] It should also be noted that in the apparatus, devices, and methods of this disclosure, the components or steps can be disassembled and / or recombined. These disassemblies and / or recombinations should be considered as equivalent solutions to this disclosure.
[0140] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of this disclosure. Therefore, this disclosure is not intended to be limited to the aspects shown herein, but rather to be carried out within the widest scope consistent with the principles and novel features disclosed herein.
[0141] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this disclosure to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations therein.
Claims
1. A method for monitoring blockchain network nodes based on Web3.0, characterized in that, include: Based on a preset time interval, node information of each node in the blockchain network is periodically collected; For the node information collected in each period, at least one candidate node is determined based on the node category in the node information of each node in the blockchain network. The candidate node includes at least one of the following: consensus node, block producing node and seed node in the blockchain network. Obtain the node data of each candidate node among the at least one candidate node; Based on the node data, key information of each candidate node is determined. This key information indicates the importance of the candidate node in the blockchain network. The key information of any candidate node includes first connectivity information, second connectivity information, transaction size information, and intermediary information. The first connectivity information includes the number of nodes connected to the candidate node in the blockchain network. The second connectivity information includes the number of other candidate nodes connected to the candidate node. The transaction size information includes information about transactions processed by the candidate node. The intermediary information includes information about the candidate node appearing in the communication path of node pairs in the blockchain network. Based on the key information of each candidate node, at least one target node is determined, including: determining the importance value of each candidate node using a preset algorithm based on the first connectivity information, second connectivity information, transaction size information, and intermediary information of each candidate node; and determining the target node based on the importance value of each candidate node and a preset importance threshold. The node status of each target node in the at least one target node is monitored to determine the status monitoring results of whether each target node is operating normally.
2. The method according to claim 1, characterized in that, The node data includes node communication information, which includes the node identifiers of the nodes that each candidate node connects to in the blockchain network. The determination of key information for each candidate node based on the node data includes: For each candidate node, based on the node communication information, the number of first node connections of the candidate node to nodes in the blockchain network and the number of second node connections of the candidate node to other candidate nodes are determined. Based on the number of connections of the first node, the first connectivity information of the candidate node is determined; Based on the number of connections of the second node, the second connectivity information of the candidate node is determined.
3. The method according to claim 1, characterized in that, The node data includes communication path information for each node pair in the blockchain network; The determination of key information for each candidate node based on the node data includes: Based on the communication path information of each node pair, the mediation information of each candidate node is determined.
4. The method according to claim 1, characterized in that, The node data includes the number of transactions and the total transaction amount for each candidate node; The determination of key information for each candidate node based on the node data includes: Based on the number of transactions and the total transaction amount of each candidate node, the transaction scale information of each candidate node is determined.
5. The method according to any one of claims 1-4, characterized in that, The process of determining at least one candidate node based on the node information of each node in the blockchain network includes: Obtain the historical target node of the blockchain network and use the historical target node as the first initial candidate node; Based on the node information, a second initial candidate node is determined from other nodes in the blockchain network; The candidate nodes are determined based on the first initial candidate node and the second initial candidate node.
6. The method according to claim 1, characterized in that, The monitoring of the node status of each target node in the at least one target node to determine whether each target node is operating normally includes the following status monitoring results: For each target node, obtain the response rate of the target node; If the response rate does not exceed a preset response rate threshold, the status monitoring result of the target node is determined to be node disconnection from the network. In response to the response rate exceeding a preset response rate threshold, the CPU utilization, memory utilization, and disk utilization of the target node are obtained; Based on the CPU usage, memory usage, and disk usage of the target node, the status monitoring results of the target node are determined.
7. A blockchain network node monitoring device based on Web3.0, characterized in that, include: The node information collection module is used to periodically collect node information of each node in the blockchain network based on a preset time interval. The first node filtering module is used to determine at least one candidate node based on the node category in the node information of each node in the blockchain network for the node information collected in each period. The candidate node includes at least one of the following: consensus node, block producing node and seed node in the blockchain network. A node data acquisition module is used to acquire node data of each candidate node among the at least one candidate node; A key information determination module is used to determine key information of each candidate node based on the node data. The key information is used to indicate the importance of the candidate node in the blockchain network. The key information of any candidate node includes first connectivity information, second connectivity information, transaction size information, and intermediary information. The first connectivity information includes the number of nodes connected to the candidate node in the blockchain network. The second connectivity information includes the number of other candidate nodes connected to the candidate node. The transaction size information includes information on transactions processed by the candidate node. The intermediary information includes information on the candidate node appearing in the communication path of node pairs in the blockchain network. The second node filtering module is used to determine at least one target node based on the key information of each candidate node, including: determining the importance value of each candidate node based on the first connectivity information, second connectivity information, transaction scale information, and intermediary information of each candidate node using a preset algorithm; and determining the target node based on the importance value of each candidate node and a preset importance threshold. The status monitoring module is used to monitor the node status of each target node in the at least one target node, and determine the status monitoring results of whether each target node is operating normally.
8. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing a computer program stored in the memory, wherein when the computer program is executed, it implements the method described in any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1-6.
Citation Information
Patent Citations
Node monitor system applied to block chain
CN106506203A
Block chain transaction network node importance ranking method
CN107977340A
High throughput blockchain consensus systems and methods with low finalization time
US20200104293A1