CN111464394A - Node monitoring method and device and storage medium - Google Patents

Node monitoring method and device and storage medium Download PDF

Info

Publication number
CN111464394A
CN111464394A CN202010247721.8A CN202010247721A CN111464394A CN 111464394 A CN111464394 A CN 111464394A CN 202010247721 A CN202010247721 A CN 202010247721A CN 111464394 A CN111464394 A CN 111464394A
Authority
CN
China
Prior art keywords
node
blockchain
indication information
state
management platform
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010247721.8A
Other languages
Chinese (zh)
Other versions
CN111464394B (en
Inventor
冯士乘
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202010247721.8A priority Critical patent/CN111464394B/en
Publication of CN111464394A publication Critical patent/CN111464394A/en
Application granted granted Critical
Publication of CN111464394B publication Critical patent/CN111464394B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0817Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/12Network monitoring probes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention provides a node monitoring method, a node monitoring device and a storage medium, wherein the method comprises the following steps: obtaining a state parameter of each node in the plurality of nodes, wherein the state parameter comprises the number of the running block chains and the resource amount occupied by each block chain, then determining state indication information of each node according to the number of the block chains and the resource amount occupied by each block chain, wherein the state indication information is used for indicating whether the node is available, and sending the state indication information of each node to a terminal device, so that the terminal device displays the state indication information of each node to a user.

Description

Node monitoring method and device and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a node monitoring method, an apparatus, and a storage medium.
Background
At present, with the development of blockchains, a blockchain management platform constructed by blockchains and a cloud platform becomes a choice of more enterprises. Because the blockchain management directly provides the blockchain as a service on the cloud platform for users, the capabilities (such as accounting platform capability and application development capability) related to the blockchain are converted into programmable interfaces, the blockchain management platform needs to help enterprises to realize automatic configuration and deployment of blockchain applications and provide full life cycle management of the blockchain, and the nodes on the blockchain management platform are in different blockchains, so that the important role is played, and how to reliably monitor the nodes becomes a problem to be solved.
Disclosure of Invention
The embodiment of the invention provides a node monitoring method, a node monitoring device and a storage medium, which can realize reliable monitoring on a block chain management platform node.
A first aspect of an embodiment of the present invention provides a node monitoring method, which is applied to a blockchain management platform, where the blockchain management platform is configured to perform state monitoring on a plurality of nodes included in a blockchain network, and the method includes:
acquiring a state parameter of each node in the plurality of nodes, wherein the state parameter comprises the number of the running block chains and the resource amount occupied by each block chain;
determining state indication information of each node according to the number of the block chains and the amount of resources occupied by each block chain, wherein the state indication information is used for indicating whether the node is available;
and sending the state indication information of each node to a terminal device, so that the terminal device displays the state indication information of each node to a user.
A second aspect of the embodiments of the present invention provides a node monitoring method, which is applied to a blockchain network and is applied to a blockchain network, where the blockchain network includes a plurality of nodes, and an agent process of a blockchain management platform is run on each node of the plurality of nodes, where the method includes:
calling the agent process to acquire the state parameters of each node, wherein the state parameters comprise the number of the running block chains and the resource amount occupied by each block chain;
and sending the state parameter of each node to the blockchain management platform, so that the blockchain management platform determines the state indication information of each node according to the state parameter of each node, wherein the state indication information is used for indicating whether the node is available.
A third aspect of the present invention provides a node monitoring apparatus, which is applied to a blockchain management platform, where the blockchain management platform is configured to perform state monitoring on a plurality of nodes included in a blockchain network, and the node monitoring apparatus includes:
an obtaining module, configured to obtain a state parameter of each node in the multiple nodes, where the state parameter includes a number of block chains to be operated and a resource amount occupied by each block chain;
a determining module, configured to determine, according to the number of blockchains and the amount of resources occupied by each blockchain, status indication information of each node, where the status indication information is used to indicate whether a node is available;
and the sending module is used for sending the state indication information of each node to the terminal equipment so that the terminal equipment displays the state indication information of each node to a user.
A fourth aspect of the present invention provides a node monitoring apparatus, which is applied to a blockchain network and is applied to a blockchain network, where the blockchain network includes a plurality of nodes, and an agent process of a blockchain management platform is run on each node of the plurality of nodes, where the node monitoring apparatus includes:
the calling module is used for calling the proxy process to acquire the state parameters of each node, wherein the state parameters comprise the number of the running block chains and the resource amount occupied by each block chain;
a sending module, configured to send the state parameter of each node to the blockchain management platform, so that the blockchain management platform determines, according to the state parameter of each node, state indication information of each node, where the state indication information is used to indicate whether a node is available.
A fifth aspect of embodiments of the present invention provides a computer storage medium, in which program instructions are stored, and when the program instructions are executed, the computer storage medium is configured to implement the node monitoring method according to the first aspect or the node monitoring method according to the second aspect.
In the embodiment of the present invention, a blockchain management platform obtains status parameters such as the number of the running blockchains of each node in a plurality of nodes and the amount of resources occupied by each blockchain, determines status indication information of each node according to the number of the running blockchains of each node and the amount of resources occupied by each blockchain, where the status indication information indicates whether the node is available, and then sends the status indication information of each node to a terminal device, so that the terminal device displays the status indication information of each node to a user. The block chain management platform judges the node state according to the running block chain quantity of each node and the resource quantity occupied by each block chain, so that the reliable monitoring of the nodes is ensured.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a node monitoring system according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a node monitoring method according to an embodiment of the present invention;
fig. 3 is a schematic flow chart of another node monitoring provided in the embodiment of the present invention;
fig. 4 is a schematic structural diagram of a node monitoring apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of another node monitoring apparatus according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a server according to an embodiment of the present invention;
fig. 7 is a schematic diagram of a node device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
At present, with the development of the blockchain technology, a blockchain management platform is also appeared, and the blockchain management platform is composed of a blockchain service management platform and a blockchain service operation platform, and the blockchain service management platform comprises bottom layer resource management, blockchain management and platform management. Bottom layer resource management such as cloud resource management, cloud resource adapter management, and the like; the block chain management comprises block chain deployment configuration, intelligent contract management, dynamic alliance management, a block browser, chain code and chain application monitoring and the like, and the platform management mainly provides more generalized and universal management services such as account management, log management, safety protection, charging management, system resource monitoring and the like for users using the block chain system. The block chain service operation state comprises a bottom layer resource layer, a block chain base layer, a business layer and an application layer. The resource layer comprises services such as computing resources, communication resources, storage resources and the like, and provides infinite-expansion storage, high-speed network, flexible expansion and automatic fault recovery node and other blockchain resources for a blockchain system; the block chain basic layer is constructed on an open-source (Hyperleger Fabric, Corda, EEA and the like) or closed-source (TrustSql, ant block chain and the like) block chain architecture, and an enterprise-level block chain system with high safety, high reliability and high performance is provided for upper-layer application at low cost and quickly.
Referring to fig. 1, it is a schematic structural diagram of a node monitoring system according to an embodiment of the present invention, where the node monitoring system includes a blockchain network 10, a blockchain management platform 102, and a terminal device 103, where:
the blockchain management platform 102 may be a bass (backup as a Service) management platform or a TBaaS management platform. The blockchain management platform 102 may provide a visual blockchain management interface for a user to build the blockchain network 10 (i.e., create a blockchain of the user), and manage each node 101 in the blockchain network 10 and/or the blockchains running on the nodes 101, including status monitoring, parameter configuration, and the like.
For example, a user (terminal device 103) may select parameters such as a required node type and a required node number through a blockchain management interface provided by the BaaS management platform (blockchain management platform 102) to build the own blockchain network 10. That is to say, a user provides a request for creating a block chain on a BaaS management platform according to the user's own needs, the BaaS management platform provides types and number of required nodes according to the request for creating the block chain, the user selects the types and number of the nodes according to the user's own needs, then the BaaS management platform sends node configuration information (such as the number of starting block chains and the number of occupied chains) of the user to corresponding nodes, starts the corresponding number of block chains, and deploys a proxy process on block chain nodes 101, then the node calls the proxy process to collect the types of the nodes, the number of block chains operated by the nodes, resources occupied by each block chain and the like in a preset time interval and reports the parameters to the BaaS management platform, the BaaS management platform can determine state indication information according to the parameters such as the number of block chains operated by the nodes and the resources occupied by each block chain, the status indication information is used to indicate whether the node is available. And the user can check the resource condition of the node on the BaaS management platform. When a user queries the node state in the BaaS management platform, some or all node states may be displayed, including the resource amount of the node, the number of blockchains started by the node, the resource amount occupied by each chain, and the like, where the resource amount may refer to a CPU, a memory, a storage, a network bandwidth, and the like.
Optionally, the visual display interface of the blockchain management platform 102 may be displayed according to the parameters of the user selected viewing node.
In a possible embodiment, the node 101 invokes a proxy process to collect status parameters of each node, and sends the status parameters of each node to the blockchain management platform 102, where the status parameters include the number of the running blockchains and the amount of resources occupied by each blockchain. The blockchain management platform 102 determines state indication information of each node according to the state parameter of each node, where the state indication information is used to indicate whether the node is available, and then the blockchain management platform 102 sends the state indication information of each node to the terminal device 103, so that the terminal device shows the state indication information of each node to a user, thereby implementing reliable monitoring on the state of each node.
In a possible embodiment, when the state indication information is not available, the blockchain management platform 102 may modify a node configuration parameter of an unavailable node, where the node configuration parameter includes resources occupied by each blockchain, and send the modified node configuration parameter to the node 101, and then the node 101 adjusts according to the modified node configuration parameter, so that the state indication information of the node is available, that is, the node is available.
The implementation details of the technical scheme of the embodiment of the invention are explained in detail as follows:
please refer to fig. 2, which is a flowchart illustrating a node monitoring method provided by the node monitoring system shown in fig. 1 according to an embodiment of the present invention, where the node monitoring method according to the embodiment of the present invention is applied to a blockchain management platform, the blockchain management platform is used to perform state monitoring on a plurality of nodes included in a blockchain network, and the blockchain management platform may specifically be a BaaS management platform, a TBaaS management platform, and the like, and the node monitoring method includes the following steps:
201. and acquiring the state parameters of each node in the plurality of nodes, wherein the state parameters comprise the number of the running block chains and the resource amount occupied by each block chain.
The resource amount occupied by each blockchain may refer to resource amounts of a node CPU, a memory, a storage, a network bandwidth, and the like occupied by each chain, and the resource amounts occupied by each blockchain may be the same or different.
Specifically, each node is of a different type, and a blockchain of a different type, such as a federation chain or a private chain, is also deployed on each node. The blockchain management platform may obtain a status parameter of each node of the plurality of nodes, where the status parameter includes a number of blockchains running on the node and an amount of resources occupied by each chain.
In a possible embodiment, each node runs an agent process of the blockchain management platform, and the obtaining of the state parameter of each node in the plurality of nodes by the blockchain management platform may be by receiving the state parameter of each node sent by the agent process on each node, where the state parameter is collected by the agent process at a preset time interval. The preset time interval may be 1 minute or other time intervals, and may be modified on the block chain management platform according to a requirement.
In one possible embodiment, the blockchain management platform may send a monitoring request to the node, where the monitoring request is used to instruct the node to invoke a proxy process to monitor the status of each of the plurality of nodes. That is, the blockchain platform may send a monitoring request to notify the node to perform node status monitoring, and indicate the status parameter of the monitoring node. For example, the node of the blockchain management platform sends a monitoring request, where the monitoring request instructs the target node to invoke the proxy process to monitor the state parameter of the node, where the state parameter may be the number of blockchains running on the node and the amount of resources occupied by each chain.
In a possible embodiment, the blockchain management platform generates a node configuration parameter for each node before acquiring a state parameter of each node in the plurality of nodes, where the node configuration parameter includes the number of blockchains and the amount of resources occupied by each blockchain. The configuration parameters for generating each node may be generated according to user requirements, or may be generated by the blockchain management platform according to application evaluation submitted by a user.
202. And determining the state indication information of each node according to the number of the block chains and the resource amount occupied by each block chain, wherein the state indication information is used for indicating whether the node is available.
Specifically, the blockchain management platform determines the state indication information of each node according to the number of started blockchains of each node and the amount of resources occupied by each blockchain, and judges whether each node is in an available state according to the state indication information of each node.
Optionally, the blockchain management platform may determine the status indication information of each node comprehensively according to the number of started blockchains of each node and the amount of resources occupied by each blockchain, that is, when both the number of started blockchains of each node and the amount of resources occupied by each blockchain do not satisfy configuration parameters of the node, determine that the status indication information of each node is unavailable, that is, the node is unavailable. Or, the blockchain management platform may determine the state of each node according to the number of started blockchains of each node or the amount of resources occupied by each blockchain, that is, when one of the number of blockchains and the amount of resources occupied by each blockchain does not satisfy the configuration parameter of the node, it determines that the state indication information of each node is unavailable, that is, the node is unavailable.
In a possible embodiment, when the blockchain management platform detects that a first node of the plurality of nodes writes data into the blockchain, the blockchain management platform determines whether an amount of resources occupied by writing data into the blockchain exceeds an available amount of resources of the first node, and if so, determines that the status indication information of the first node is unavailable. The resource amount occupied by the write data and the available resource amount of the first node refer to memory resources, network bandwidth and the like capable of storing data. That is to say, if the resource amount here is a memory resource, when the blockchain management platform detects that a certain node (first node) writes data into the blockchain, it is determined whether the memory resource occupied by the written data exceeds the available memory resource of the node (first node), and if the memory resource occupied by the written data exceeds the available memory resource of the node, the blockchain management platform determines that the state indication information of the node is unavailable, that is, the state of the node is unavailable; if the memory resource of the written data does not exceed the available memory resource of the node, the blockchain management platform judges that the state indication information of the node is available, namely the state of the node is available. For example, when the blockchain management platform detects that a first node of the plurality of nodes writes data into the blockchain, the written data needs to occupy the memory resource 2G, the available memory resource of the node is 1G, and the memory resource (2G) occupied by the written data exceeds the available memory resource (1G) of the node, the blockchain management platform determines that the state indication information of the node is unavailable, that is, the state of the node is unavailable. For another example, assuming that the amount of resources occupied by each link refers to network bandwidth, when the blockchain management platform detects that the first node sends data to the blockchain, the blockchain management platform determines whether the network bandwidth required for sending the data exceeds the network bandwidth of the node, and if so, the blockchain management platform determines that the status indication information of the node is unavailable.
It should be noted that, when data is written, the determination is performed according to the resource amount of the node, and the resource amount may refer to factors such as network bandwidth, CPU, memory resource, and the like, so that it may be determined whether the resource amount occupied by writing data into the block chain exceeds the available resource amount of the first node, whether data writing is possible, whether status indication information is available, that is, whether the first node is available, by considering a plurality of factors of the resource amount.
In a possible embodiment, after determining the status indication information of each node according to the number of blockchains and the amount of resources occupied by each blockchain, if the status indication information of a second node in the plurality of nodes is unavailable, the blockchain management platform adjusts the number of blockchains in the node configuration parameter of the second node and/or the amount of resources occupied by each blockchain, and sends the adjusted node configuration parameter to the second node, so that the second node adjusts the number of running blockchains and/or the amount of resources occupied by each blockchain according to the adjusted node configuration parameter. The configuration parameters of the second node which is unavailable in the plurality of nodes are automatically adjusted by the block chain management platform, the number of the block chains of the nodes or the amount of resources occupied by each block chain in the nodes can be adjusted, the number of the block chains of the nodes and the amount of resources occupied by each block chain can be adjusted, and the specific adjustment of the configuration parameters of the nodes can be automatically adjusted according to the state feedback of the nodes.
Optionally, if the status indication information of the second node in the plurality of nodes is unavailable, the hard disk is mounted on the second node, and the blockchain management platform copies all blockchain data in the second node to the hard disk, so as to increase the hard disk resources of the nodes. Certainly, the state indication information of the second node is unavailable, that is, the node is unavailable, because the hard disk resources of the node are insufficient, a hard disk mounting mode can be adopted, because the whole data in the block chain data is stored in one directory, all the block chain data needs to be copied to the block chain data in the new hard disk to have significance, the data of the block chain on the node is firstly backed up, then the whole data of the block chain is copied to the new hard disk, the copying is completed, and the path of the block chain stored data is changed, so that the hard disk resources of the node are sufficient, and the node is in an available state.
In a possible embodiment, the blockchain management platform determines an unavailable third node from the plurality of nodes according to the status indication information of each node, and sends an alarm message to the terminal device, wherein the alarm message is used for prompting that the third node is unavailable. The blockchain management platform judges an unavailable third node for the plurality of nodes according to the state indication information of each node, and the third node can be understood as an unavailable node or a plurality of unavailable nodes judged by the blockchain management platform, that is, only if the unavailable nodes are judged in the plurality of nodes, alarm information is sent to the terminal equipment to prompt a user which nodes are unavailable, so that the user can timely solve the condition that the nodes are unavailable.
203. And sending the state indication information of each node to the terminal equipment, so that the terminal equipment shows the state indication information of each node to a user.
Specifically, the block chain management platform acquires the state indication information of each node, and sends the state information of each node to the terminal device, so that the terminal device can display the state indication information of each node.
Alternatively, the blockchain management platform may send other information including the status indication information to the terminal device, for example, the blockchain management platform sends the status indication information of each node, the number of blockchains started by each node, the amount of resources occupied by each blockchain, and the like, and sends information related to the node according to the user requirement.
In a possible embodiment, the blockchain management platform receives a request sent by the terminal device, where the request may instruct the blockchain management platform to send status indication information of a target node in the plurality of nodes to the terminal device, or instruct the blockchain management platform to send some nodes in the plurality of nodes to the terminal device, and then the blockchain management platform sends a corresponding target node to the terminal device, so that the terminal device displays the status indication information of the target node to a user.
For example, when a user clicks a target node on a terminal device, the terminal device sends a request for checking the target node, the blockchain management platform obtains state indication information of the target node according to the request, then sends the state indication information to the terminal device, and the terminal device can show the state indication information to the user.
In the embodiment of the present invention, a blockchain management platform obtains a state parameter of each node in a plurality of nodes, where the state parameter includes the number of running blockchains and the amount of resources occupied by each blockchain, and determines state indication information of each node according to the number of blockchains and the amount of resources occupied by each blockchain, where the state indication information is used to indicate whether a node is available, and then sends the state indication information of each node to a terminal device, so that the terminal device displays the state indication information of each node to a user, thereby implementing reliable monitoring on the node.
Please refer to fig. 3, which is a flowchart illustrating another node monitoring method provided by the node monitoring system shown in fig. 1 according to an embodiment of the present invention, where the node monitoring method in the embodiment of the present invention is mainly described from a side of a blockchain network, and the node monitoring method is applied to the blockchain network, where the blockchain network includes a plurality of nodes, and each node in the plurality of nodes runs an agent process of a blockchain management platform, and the node monitoring method includes the following steps:
301. and calling the proxy process to acquire the state parameters of each node, wherein the state parameters comprise the number of the running block chains and the resource amount occupied by each block chain.
The resource amount occupied by each blockchain may refer to resource amounts of a node CPU, a memory, a storage, a network bandwidth, and the like occupied by each chain.
Specifically, the node calls the proxy process to acquire state parameters such as the number of the block chains operated by each node and the amount of resources occupied by each block chain. The agent process is deployed on each node by the blockchain management platform, and is used for monitoring state parameters of the node, including the number of the running blockchains and the amount of resources occupied by each blockchain, and also monitoring other conditions of the node.
In a possible embodiment, before the proxy process is invoked to collect the state parameters of each node, the node receives the node configuration parameters sent by the blockchain management platform, and initializes according to the node configuration parameters, that is, the number of blockchains started by the node and the amount of resources occupied by each chain are allocated according to the node configuration parameters. When a node starts a blockchain, the minimum requirement for starting the blockchain needs to be met, wherein the minimum starting requirement is determined by a node configuration parameter sent by a blockchain management platform.
302. And sending the state parameter of each node to the blockchain management platform, so that the blockchain management platform determines the state indication information of each node according to the state parameter of each node, wherein the state indication information is used for indicating whether the node is available or not.
Specifically, the node sends each node state parameter to the blockchain management platform, and the blockchain management platform determines whether the state indication information of each node is available according to the received state parameter of each node, and can judge the node state according to whether the state indication information is available.
In a possible embodiment, the node may send the state parameter of each node to the blockchain management platform through a set secure channel, where the secure channel may refer to a network channel in which the node sends the state parameter of each node in a specific setting, that is, only the node may be allowed to send the state parameter to the blockchain management platform, or may be a channel in which the node and the blockchain send other information, so as to ensure the security of data transmission.
In a possible embodiment, when the blockchain management platform determines that the status indication information is not available, the blockchain management platform may adjust the number of blockchains in the node configuration parameters of the unavailable node and/or the amount of resources occupied by each blockchain, the node receives the adjusted node configuration parameters, and then the node adjusts parameters such as the number of blockchains in which the node operates and the amount of resources occupied by each blockchain according to the adjusted node configuration parameters. Of course, here, the number of the blockchains running in the node configuration parameters and the amount of resources occupied by each blockchain may be adjusted to adjust one of the parameters, or may be adjusted to adjust all the parameters so as to make the node in an available state.
For example, when a terminal device provides a request to a blockchain management platform, a blockchain is created, the blockchain management platform provides a node for the terminal device to select, then a node configuration parameter is generated according to the initialization of the selected node (for example, the number of blockchains is 2, each blockchain occupies 2G resources), then the node configuration parameter is sent to the node, the node creates 2 blockchains according to the node configuration parameter and allocates the 2G resources to each blockchain, and then a proxy process collects the state parameters such as the number of operational blockchains of the node and the occupied resources of each blockchain and reports the state parameters to the blockchain management platform. And the block chain management platform determines the state indication information according to the state parameters, and then the state indication information is sent to the terminal equipment.
In the embodiment of the invention, a node calls a proxy process to acquire the state parameters of each node, wherein the state parameters comprise the number of the running block chains and the resource amount occupied by each block chain, and then the state parameters of each node are sent to a block chain management platform, so that the block chain management platform determines the state indication information of each node according to the state parameters of each node, and the state indication information is used for indicating whether the node is available so as to effectively acquire the state parameters of the node, thereby realizing the safety monitoring of the node.
Fig. 4 is a schematic structural diagram of a node monitoring apparatus according to an embodiment of the present invention. The node monitoring apparatus described in this embodiment is applied to a blockchain management platform, where the blockchain management platform is configured to perform state monitoring on a plurality of nodes included in a blockchain network, and includes:
an obtaining module 401, configured to obtain a state parameter of each node in the multiple nodes, where the state parameter includes a number of running block chains and a resource amount occupied by each block chain;
a determining module 402, configured to determine, according to the number of blockchains and the amount of resources occupied by each blockchain, status indication information of each node, where the status indication information is used to indicate whether a node is available;
a sending module 403, configured to send the status indication information of each node to a terminal device, so that the terminal device displays the status indication information of each node to a user.
Optionally, the apparatus further comprises: a generation module 404, wherein:
the generating module 404 is configured to generate a node configuration parameter of each node, where the node configuration parameter includes the number of blockchains and the amount of resources occupied by each blockchain;
the sending module 403 is further configured to send a corresponding node configuration parameter to each node, so that each node starts a corresponding number of block chains according to the node configuration parameter.
Optionally, the apparatus further comprises: a processing module 405, wherein:
the processing module 405 is configured to, when it is detected that a first node of the plurality of nodes writes data into a blockchain, determine whether an amount of resources occupied by writing data into the blockchain exceeds an available amount of resources of the first node;
the determining module 402 is configured to determine that the status indication information of the first node is unavailable if the status indication information of the first node is available.
Optionally, the processing module 405 is specifically configured to:
if the status indication information of a second node in the plurality of nodes is unavailable, adjusting the number of block chains in the node configuration parameters of the second node and/or the amount of resources occupied by each block chain;
and sending the adjusted node configuration parameters to the second node, so that the second node adjusts the number of the running block chains and/or the amount of resources occupied by each block chain according to the adjusted node configuration parameters.
Optionally, the processing module 405 is specifically configured to:
and receiving the state parameters of each node sent by the agent process on each node, wherein the state parameters are acquired by the agent process according to a preset time interval.
Optionally, the determining module 402 is specifically configured to:
determining an unavailable third node from the plurality of nodes according to the status indication information of each node;
and sending an alarm message to the terminal equipment, wherein the alarm message is used for prompting that the third node is unavailable.
In this embodiment of the present invention, the obtaining module 401 obtains a status parameter of each node in the plurality of nodes, where the status parameter includes a number of running block chains and an amount of resources occupied by each block chain, then the determining module 402 determines status indication information of each node according to the number of block chains and the amount of resources occupied by each block chain, where the status indication information is used to indicate whether the node is available, and the sending module 403 sends the status indication information of each node to the terminal device, so that the terminal device displays the status indication information of each node to a user, thereby implementing reliable and effective monitoring on the node.
It can be understood that the functions of each module of the node monitoring apparatus in this embodiment may be specifically implemented according to the method in fig. 2 in the foregoing embodiment, and the specific implementation process may refer to the description related to the method embodiment in fig. 2, which is not described herein again.
Fig. 5 is a schematic structural diagram of another node monitoring apparatus according to an embodiment of the present invention. The node monitoring apparatus described in this embodiment is applied to a blockchain network, where the blockchain network includes a plurality of nodes, and each node in the plurality of nodes runs an agent process of a blockchain management platform, including:
a calling module 501, configured to call the proxy process to acquire a state parameter of each node, where the state parameter includes the number of running block chains and the amount of resources occupied by each block chain;
a sending module 502, configured to send the state parameter of each node to the blockchain management platform, so that the blockchain management platform determines, according to the state parameter of each node, state indication information of each node, where the state indication information is used to indicate whether a node is available.
It can be understood that the functions of each module of the node monitoring apparatus in this embodiment may be specifically implemented according to the method in fig. 3 in the foregoing embodiment, and the specific implementation process may refer to the description related to the method embodiment in fig. 3, which is not described herein again.
Fig. 6 is a schematic structural diagram of a server according to an embodiment of the present invention. The server described in this embodiment is applied to a blockchain management platform, where the blockchain management platform is configured to perform state monitoring on a plurality of nodes included in a blockchain network, and includes: a processor 601, a network interface 602, and a memory 603. The processor 601, the network interface 602, and the memory 603 may be connected by a bus or other means, and the embodiment of the present invention is exemplified by being connected by a bus.
The network interface 602 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI, mobile communication interface, etc.), and is controlled by the processor 601 to transmit and receive data, the Memory 603(Memory) is a Memory device of the server and is used for storing programs and data, it is understood that the Memory 603 may be a high-speed RAM Memory, a non-volatile Memory (e.g., at least one disk Memory), and optionally at least one storage device located away from the processor 601, the Memory 603 provides a storage space storing an operating system and executable program codes of the server, which may include, but is not limited to, a Windows system (an operating system), an L inux system, and the like, and the present invention is not limited thereto.
In the embodiment of the present invention, the processor 601 executes the executable program code in the memory 603 to perform the following operations:
acquiring a state parameter of each node in the plurality of nodes, wherein the state parameter comprises the number of the running block chains and the resource amount occupied by each block chain;
determining state indication information of each node according to the number of the block chains and the amount of resources occupied by each block chain, wherein the state indication information is used for indicating whether the node is available;
and sending the state indication information of each node to a terminal device, so that the terminal device displays the state indication information of each node to a user.
Optionally, the processor 601 is further configured to:
generating a node configuration parameter of each node, wherein the node configuration parameter comprises the number of block chains and the resource amount occupied by each block chain;
and sending the corresponding node configuration parameters to each node, so that each node starts the corresponding number of block chains according to the node configuration parameters.
Optionally, the specific implementation manner of determining, by the processor 601, the state indication information of each node according to the number of blockchains and the amount of resources occupied by each blockchain is as follows:
when detecting that a first node in the plurality of nodes writes data into a blockchain, judging whether the resource amount occupied by writing data into the blockchain exceeds the available resource amount of the first node;
and if so, determining that the state indication information of the first node is unavailable.
Optionally, the processor 601 is further configured to:
if the status indication information of a second node in the plurality of nodes is unavailable, adjusting the number of block chains in the node configuration parameters of the second node and/or the amount of resources occupied by each block chain;
and sending the adjusted node configuration parameters to the second node, so that the second node adjusts the number of the running block chains and/or the amount of resources occupied by each block chain according to the adjusted node configuration parameters.
Optionally, an agent process of the blockchain management platform runs on each node, and a specific implementation manner of the processor 601 obtaining the state parameter of each node of the plurality of nodes is as follows:
and receiving the state parameters of each node sent by the agent process on each node, wherein the state parameters are acquired by the agent process according to a preset time interval.
Optionally, the processor 601 is further configured to:
determining an unavailable third node from the plurality of nodes according to the status indication information of each node;
and sending an alarm message to the terminal equipment, wherein the alarm message is used for prompting that the third node is unavailable.
In a specific implementation, the processor 601, the network interface 602, and the memory 603 described in this embodiment of the present invention may execute the implementation described in the flow of the node monitoring method provided in fig. 2 in this embodiment of the present invention, and may also execute the implementation described in the node monitoring apparatus provided in fig. 4 in this embodiment of the present invention, which is not described herein again.
In the embodiment of the present invention, the processor 601 obtains a state parameter of each node in the plurality of nodes, where the state parameter includes the number of the running block chains and the amount of resources occupied by each block chain, then determines state indication information of each node according to the number of the block chains and the amount of resources occupied by each block chain, where the state indication information is used to indicate whether the node is available, and sends the state indication information of each node to the terminal device, so that the terminal device displays the state indication information of each node to a user, thereby implementing reliable and stable monitoring on the node.
Fig. 7 is a schematic structural diagram of a node device according to an embodiment of the present invention. The node device described in this embodiment is applied to a blockchain network, where the blockchain network includes a plurality of nodes, and each node in the plurality of nodes runs an agent process of a blockchain management platform, including: a processor 701, a network interface 702, and a memory 703. The processor 701, the network interface 702, and the memory 703 may be connected by a bus or other means, and the embodiment of the present invention is exemplified by being connected by a bus.
The network interface 702 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI, mobile communication interface, etc.), and is controlled by the processor 701 to transmit and receive data, the Memory 703(Memory) is a Memory device of the server and is used for storing programs and data, it is understood that the Memory 703 may be a high-speed RAM Memory, a non-volatile Memory (non-volatile Memory) such as at least one disk Memory, and optionally at least one storage device located away from the processor 701, the Memory 703 provides a storage space storing an operating system and executable program codes of the server, which may include, but is not limited to, a Windows system (an operating system), an L inux system, and the like, and the present invention is not limited thereto.
In the embodiment of the present invention, the processor 701 executes the executable program code in the memory 703 to perform the following operations: the processor 701 calls the agent process to acquire the state parameter of each node, where the state parameter includes the number of the operated blockchains and the amount of resources occupied by each blockchain, and sends the state parameter of each node to the blockchain management platform, so that the blockchain management platform determines the state indication information of each node according to the state parameter of each node, where the state indication information is used to indicate whether a node is available.
In a specific implementation, the processor 701, the network interface 702, and the memory 703 described in this embodiment of the present invention may execute the implementation described in the flow of the node monitoring method in fig. 3 in this embodiment of the present invention, or may execute the implementation described in the node monitoring apparatus in fig. 5 in this embodiment of the present invention, which is not described herein again.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored, where the computer program includes program instructions, and when the program instructions are executed by a processor, the steps performed in the foregoing node monitoring embodiment may be performed.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
While the invention has been described with reference to a preferred embodiment, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A node monitoring method is applied to a blockchain management platform, and the blockchain management platform is used for monitoring the states of a plurality of nodes included in a blockchain network, and the method comprises the following steps:
acquiring a state parameter of each node in the plurality of nodes, wherein the state parameter comprises the number of the running block chains and the resource amount occupied by each block chain;
determining state indication information of each node according to the number of the block chains and the amount of resources occupied by each block chain, wherein the state indication information is used for indicating whether the node is available;
and sending the state indication information of each node to a terminal device, so that the terminal device displays the state indication information of each node to a user.
2. The method of claim 1, wherein prior to obtaining the state parameters for each of the plurality of nodes, the method further comprises:
generating a node configuration parameter of each node, wherein the node configuration parameter comprises the number of block chains and the resource amount occupied by each block chain;
and sending the corresponding node configuration parameters to each node, so that each node starts the corresponding number of block chains according to the node configuration parameters.
3. The method according to claim 1 or 2, wherein said determining the status indication information of each node according to the number of blockchains and the amount of resources occupied by each blockchain comprises:
when detecting that a first node in the plurality of nodes writes data into a blockchain, judging whether the resource amount occupied by writing data into the blockchain exceeds the available resource amount of the first node;
and if so, determining that the state indication information of the first node is unavailable.
4. The method according to claim 1 or 2, wherein after determining the status indication information of each node according to the number of blockchains and the amount of resources occupied by each blockchain, the method further comprises:
if the status indication information of a second node in the plurality of nodes is unavailable, adjusting the number of block chains in the node configuration parameters of the second node and/or the amount of resources occupied by each block chain;
and sending the adjusted node configuration parameters to the second node, so that the second node adjusts the number of the running block chains and/or the amount of resources occupied by each block chain according to the adjusted node configuration parameters.
5. The method of claim 1, wherein the step of running an agent process of the blockchain management platform on each node, and the step of obtaining the status parameter of each node of the plurality of nodes comprises:
and receiving the state parameters of each node sent by the agent process on each node, wherein the state parameters are acquired by the agent process according to a preset time interval.
6. The method according to claim 1, wherein after determining the status indication information of each node according to the number of blockchains and the amount of resources occupied by each blockchain, the method further comprises:
determining an unavailable third node from the plurality of nodes according to the status indication information of each node;
and sending an alarm message to the terminal equipment, wherein the alarm message is used for prompting that the third node is unavailable.
7. A node monitoring method applied to a blockchain network, the blockchain network comprising a plurality of nodes, each of the plurality of nodes having an agent process of a blockchain management platform running thereon, the method comprising:
calling the agent process to acquire the state parameters of each node, wherein the state parameters comprise the number of the running block chains and the resource amount occupied by each block chain;
and sending the state parameter of each node to the blockchain management platform, so that the blockchain management platform determines the state indication information of each node according to the state parameter of each node, wherein the state indication information is used for indicating whether the node is available.
8. A node monitoring apparatus, applied to a blockchain management platform, the blockchain management platform configured to perform state monitoring on a plurality of nodes included in a blockchain network, the apparatus comprising:
an obtaining module, configured to obtain a state parameter of each node in the multiple nodes, where the state parameter includes a number of block chains to be operated and a resource amount occupied by each block chain;
a determining module, configured to determine, according to the number of blockchains and the amount of resources occupied by each blockchain, status indication information of each node, where the status indication information is used to indicate whether a node is available;
and the sending module is used for sending the state indication information of each node to the terminal equipment so that the terminal equipment displays the state indication information of each node to a user.
9. A node monitoring apparatus, applied to a blockchain network including a plurality of nodes, each of the plurality of nodes having an agent process of a blockchain management platform running thereon, the apparatus comprising:
the calling module is used for calling the proxy process to acquire the state parameters of each node, wherein the state parameters comprise the number of the running block chains and the resource amount occupied by each block chain;
a sending module, configured to send the state parameter of each node to the blockchain management platform, so that the blockchain management platform determines, according to the state parameter of each node, state indication information of each node, where the state indication information is used to indicate whether a node is available.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program comprising program instructions that, when executed by a processor, cause the processor to carry out the method according to any one of claims 1-7.
CN202010247721.8A 2020-03-31 2020-03-31 Node monitoring method and device and storage medium Active CN111464394B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010247721.8A CN111464394B (en) 2020-03-31 2020-03-31 Node monitoring method and device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010247721.8A CN111464394B (en) 2020-03-31 2020-03-31 Node monitoring method and device and storage medium

Publications (2)

Publication Number Publication Date
CN111464394A true CN111464394A (en) 2020-07-28
CN111464394B CN111464394B (en) 2022-04-15

Family

ID=71680991

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010247721.8A Active CN111464394B (en) 2020-03-31 2020-03-31 Node monitoring method and device and storage medium

Country Status (1)

Country Link
CN (1) CN111464394B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112350889A (en) * 2020-10-26 2021-02-09 成都商通时代数字科技有限公司 System and method for monitoring running state of block link point
CN112804087A (en) * 2020-12-31 2021-05-14 北京百度网讯科技有限公司 Operation implementation method, device, equipment and storage medium of alliance network

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106506203A (en) * 2016-10-25 2017-03-15 杭州云象网络技术有限公司 A kind of monitoring nodes system for being applied to block chain
CN107317730A (en) * 2017-08-21 2017-11-03 上海点融信息科技有限责任公司 Method, apparatus and system for monitoring block chain link dotted state
CN107832139A (en) * 2017-09-26 2018-03-23 上海点融信息科技有限责任公司 For the method, apparatus and system for the computing resource for managing block chain link point
GB201820008D0 (en) * 2018-12-07 2019-01-23 Dragon Infosec Ltd A node testing method and apparatus for a blockchain system
CN110138586A (en) * 2019-04-04 2019-08-16 平安科技(深圳)有限公司 Block chain node administration method, electronic device, system and readable storage medium storing program for executing

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106506203A (en) * 2016-10-25 2017-03-15 杭州云象网络技术有限公司 A kind of monitoring nodes system for being applied to block chain
CN107317730A (en) * 2017-08-21 2017-11-03 上海点融信息科技有限责任公司 Method, apparatus and system for monitoring block chain link dotted state
CN107832139A (en) * 2017-09-26 2018-03-23 上海点融信息科技有限责任公司 For the method, apparatus and system for the computing resource for managing block chain link point
GB201820008D0 (en) * 2018-12-07 2019-01-23 Dragon Infosec Ltd A node testing method and apparatus for a blockchain system
CN110138586A (en) * 2019-04-04 2019-08-16 平安科技(深圳)有限公司 Block chain node administration method, electronic device, system and readable storage medium storing program for executing

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112350889A (en) * 2020-10-26 2021-02-09 成都商通时代数字科技有限公司 System and method for monitoring running state of block link point
CN112804087A (en) * 2020-12-31 2021-05-14 北京百度网讯科技有限公司 Operation implementation method, device, equipment and storage medium of alliance network

Also Published As

Publication number Publication date
CN111464394B (en) 2022-04-15

Similar Documents

Publication Publication Date Title
CN106844137B (en) Server monitoring method and device
CN108370341B (en) Resource allocation method, virtual network function manager and network element management system
CN108769124B (en) Application deployment method, device, server and storage medium of PaaS platform
CN110365762B (en) Service processing method, device, equipment and storage medium
CN111464394B (en) Node monitoring method and device and storage medium
CN109981405B (en) Node management method, node management device and computer-readable storage medium
US10404568B2 (en) Agent manager for distributed transaction monitoring system
CN109753301A (en) Application system dispositions method, device, storage medium and electronic equipment
US11438249B2 (en) Cluster management method, apparatus and system
US9935853B2 (en) Application centric network experience monitoring
CN110677475A (en) Micro-service processing method, device, equipment and storage medium
KR101028298B1 (en) Method and system for distributing data processing units in a communication network
CN110138753B (en) Distributed message service system, method, apparatus, and computer-readable storage medium
CN113672336A (en) K8S container cluster deployment method, device, equipment and readable storage medium
US20150277892A1 (en) Multi-phase software delivery
CN113419818A (en) Basic component deployment method, device, server and storage medium
CN104639356A (en) Failure recovery method and device
CN109284275B (en) Cloud platform virtual machine file system monitoring method and device
CN113824595B (en) Link switching control method and device and gateway equipment
JP2006285453A (en) Information processor, information processing method, and information processing program
CN105827567B (en) Service management and control method and capability opening platform
CN110795109A (en) Function expansion method and device and electronic equipment
CN104657152A (en) Data transmission management method and electronic equipment
KR100981381B1 (en) Device manegement agent and method
CN113126922B (en) Dynamic storage class management method and device based on Kubernetes

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant