CN111464393A - Method and device for monitoring running state of block chain and storage medium - Google Patents

Method and device for monitoring running state of block chain and storage medium Download PDF

Info

Publication number
CN111464393A
CN111464393A CN202010247714.8A CN202010247714A CN111464393A CN 111464393 A CN111464393 A CN 111464393A CN 202010247714 A CN202010247714 A CN 202010247714A CN 111464393 A CN111464393 A CN 111464393A
Authority
CN
China
Prior art keywords
block chain
target
node device
blockchain
data
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
CN202010247714.8A
Other languages
Chinese (zh)
Other versions
CN111464393B (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 CN202010247714.8A priority Critical patent/CN111464393B/en
Publication of CN111464393A publication Critical patent/CN111464393A/en
Application granted granted Critical
Publication of CN111464393B publication Critical patent/CN111464393B/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
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/16Threshold monitoring
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the application discloses a method, a device and a storage medium for monitoring the running state of a block chain, wherein the method comprises the following steps: the target node device in the block chain network can perform data access on the block chain process corresponding to the target block chain through the proxy process, receive the first characteristic parameter of the target block chain returned by the block chain process for the data access, further obtain the second characteristic parameter of the target block chain on other node devices in the associated node device, generate state indicating data of the target block chain according to the first characteristic parameter and the second characteristic parameter, and return the state indicating data of the target block chain to the block chain management platform. By adopting the mode, the running state of the target block chain can be efficiently monitored, and the running state can be reported to the block chain management platform in time.

Description

Method and device for monitoring running state of block chain and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for monitoring a running state of a block chain, and a storage medium.
Background
With the rapid development of the block chain technology, each user can select parameters such as required node types and node numbers through a block chain management interface provided by a block chain management platform so as to build a block chain network of the user. And after the building of each block chain network is completed, the block chain maintained by each block chain network is managed by the block chain management platform. Among them, it is particularly important to manage the operation state of the blockchain. Therefore, how to monitor the operation status of the block chain becomes a problem to be solved.
Content of application
The embodiment of the application provides a method and a device for monitoring the running state of a block chain and a storage medium, which can efficiently monitor the running state of a target block chain.
In a first aspect, an embodiment of the present application provides a method for monitoring a blockchain operation state, where the method is applied to a target node device in a blockchain network, where the target node device runs an agent process of a blockchain management platform, and the method includes:
performing data access on a block chain process corresponding to a target block chain through the agent process, wherein the target block chain is any one of at least one block chain running on the target node device, and the target node device is any one of node devices associated with the target block chain;
receiving a first characteristic parameter of the target block chain returned by the block chain process for the data access, wherein the first characteristic parameter comprises a block height;
acquiring a second characteristic parameter of the target block chain on other node equipment in the associated node equipment, wherein the second characteristic parameter comprises a block height;
and generating state indicating data of the target block chain according to the first characteristic parameter and the second characteristic parameter, and returning the state indicating data of the target block chain to the block chain management platform, wherein the state indicating data is used for indicating that the target block chain runs normally or abnormally on the target node equipment.
In a second aspect, an embodiment of the present application provides an apparatus for monitoring a blockchain operation state, where the target node device configured in a blockchain network runs an agent process of a blockchain management platform on the target node device, and the apparatus includes:
a data access module, configured to perform data access on a blockchain process corresponding to a target blockchain through the proxy process, where the target blockchain is any one of at least one blockchain running on the target node device, and the target node device is any one of node devices associated with the target blockchain;
the data access module is further configured to receive a first characteristic parameter of the target block chain returned by the block chain process for the data access, where the first characteristic parameter includes a block height;
a processing module, configured to obtain a second characteristic parameter of the target block chain on another node device in the associated node device, where the second characteristic parameter includes a block height;
the processing module is further configured to generate state indication data of the target block chain according to the first characteristic parameter and the second characteristic parameter;
and the communication module is used for returning the state indicating data of the target block chain to the block chain management platform, wherein the state indicating data is used for indicating that the target block chain runs normally or abnormally on the target node equipment.
In a third aspect, an embodiment of the present application provides a node device in a blockchain network, where the node device includes a processor and a storage device, where the storage device is used to store a computer program, and the computer program includes program instructions, and the processor is configured to call the program instructions to perform the method for monitoring a running state of a blockchain according to the first aspect.
In a fourth aspect, an embodiment of the present application provides another method for monitoring an operation state of a blockchain, where the method is applied to a blockchain management platform, and the method includes:
receiving status indication data sent by each node device, wherein the status indication data is used for indicating whether the target block chain normally operates on each node device;
determining target node equipment from the node equipment according to the state indicating data, wherein the target block chain runs abnormally on the target node equipment;
generating a block chain state warning message, and sending the block chain state warning message to a terminal device corresponding to a target user, where the block chain state warning message includes an identifier of the target block chain and an identifier of the target node, and the target user is a user corresponding to the target block chain.
In a fifth aspect, an embodiment of the present application provides another apparatus for monitoring an operation state of a blockchain, where the apparatus is configured on a blockchain management platform, and the apparatus includes:
a communication module, configured to receive status indication data sent by each node device, where the status indication data is used to indicate whether the target block chain operates normally on each node device;
a processing module, configured to determine a target node device from the node devices according to the status indication data, where the target block chain runs abnormally on the target node device;
the processing module is further configured to generate a block chain state alarm message, where the block chain state alarm message includes an identifier of the target block chain and an identifier of the target node;
the communication module is further configured to send the block chain state warning message to a terminal device corresponding to a target user, where the target user is a user corresponding to the target block chain.
In a sixth aspect, an embodiment of the present application provides a blockchain management platform, where the blockchain management platform includes a processor and a storage device, where the storage device is used to store a computer program, and the computer program includes program instructions, and the processor is configured to call the program instructions to perform the method for monitoring the running state of the blockchain according to the fourth aspect.
In a seventh aspect, an embodiment of the present application provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are executed on a computer, the computer is caused to perform the method for monitoring the operation state of the blockchain according to the first aspect or the fourth aspect.
By adopting the embodiment of the application, the target node device in the block chain network can perform data access on the block chain process corresponding to the target block chain through the proxy process, receive the first characteristic parameter of the target block chain returned by the block chain process aiming at the data access, further obtain the second characteristic parameter of the target block chain on other node devices in the associated node device, generate the state indicating data of the target block chain according to the first characteristic parameter and the second characteristic parameter, and return the state indicating data of the target block chain to the block chain management platform.
Drawings
In order to more clearly illustrate the embodiments of the present application 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 application, 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 block chain according to an embodiment of the present invention;
fig. 2a is a schematic diagram of a block chain operation status monitoring system according to an embodiment of the present invention;
fig. 2b is a block chain management platform according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating a method for monitoring a blockchain operation status according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating another exemplary method for monitoring the operation status of a blockchain according to the present invention;
FIG. 5 is a flowchart illustrating another method for monitoring a blockchain operation status according to an embodiment of the present invention;
FIG. 6 is a block chain management platform interface diagram according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a device for monitoring an operation state of a block chain according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a node device in a blockchain network according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of another block chain operation status monitoring apparatus according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a block chain management platform according to an embodiment of the present application.
Detailed Description
The Block Chain (Block Chain) is a Chain data structure which combines data blocks in a sequential connection mode according to a time sequence and is a distributed book which is cryptographically used for ensuring that the data cannot be tampered and forged. Multiple independent distributed nodes (i.e., block-linked node devices) maintain the same record. The blockchain technology realizes decentralization and becomes a foundation for credible digital asset storage, transfer and transaction.
Taking the block chain structure diagram shown in fig. 1 as an example, when new data needs to be written into the block chain, the data is collected into a block (block) and added to the end of the existing block chain, and the newly added block of each node is ensured to be identical through a consensus algorithm. A plurality of transaction records are recorded in each block, and the transaction records also comprise the hash (hash) value of the previous block, and all blocks store the hash value of the previous block in the way and are connected in sequence to form a block chain. The hash value of the previous block is stored in the block head of the next block in the block chain, and when the transaction data in the current block changes, the hash value of the block is changed, so that the transaction data uploaded to the block chain network is difficult to tamper, the transaction is carried out on the block chain, the transaction process is transparent, and the reliability of the transaction data is improved.
In order to better understand the method for monitoring the operation state of the block chain disclosed in the embodiment of the present invention, a system for monitoring the operation state of the block chain to which the embodiment of the present invention is applied is first described below.
Referring to fig. 2a, fig. 2a is a schematic diagram of a monitoring system for a block chain operation state according to an embodiment of the present invention. As shown in fig. 2a, the monitoring system for the operation state of the Block chain includes a Block chain network 10, a Block chain as a service (bass) management platform 11 and a terminal device 12, where the bass management platform 11 is an example of the Block chain management platform, and the bass management platform 11 may provide a visual Block chain management interface for a user to build the Block chain network 10 (i.e., create a Block chain of the user), and manage each node device 101 in the Block chain network 10 and/or the Block chain running on the node device 101, including state monitoring, parameter configuration, and the like;
a user (terminal device 12) 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 11, so as to build the own blockchain network 10.
In one embodiment, an agent process of the blockchain management platform is run in each node device in the blockchain network built by the blockchain management platform, and each agent process can be uniformly managed through an agent console of the blockchain management platform. For example, referring to fig. 2b, it is assumed that the blockchain management platform is a BaaS management platform, the BaaS management platform includes an agent console 20, the blockchain network managed by the BaaS management platform includes a blockchain network 21 and a blockchain network 22, each of the blockchain network 21 and the blockchain network 22 includes at least one node device 220, and an agent process 2201 of the blockchain management platform runs on each node device 220.
In an embodiment, each node device may run a plurality of blockchains, and a target blockchain may be any one of the plurality of blockchains, in this embodiment, a node device running a target blockchain may be referred to as a node device associated with the target blockchain, and a target node device is any one of the node devices associated with the target blockchain. The target node device may perform data access on a blockchain process corresponding to the target blockchain through a self proxy process, receive a first characteristic parameter of the target blockchain returned by the blockchain process for the data access, further, obtain a second characteristic parameter of the target blockchain on other node devices in the associated node device, generate state indicating data of the target blockchain according to the first characteristic parameter and the second characteristic parameter, and return the state indicating data of the target blockchain to the blockchain management platform, where the state indicating data is used to indicate that the target blockchain operates normally or abnormally on the target node device. After receiving the state indicating data of the target block chain, the block chain management platform may send an alarm message to a terminal device corresponding to a target user to which the target block chain belongs, if it is determined that the target block chain operates abnormally on the target node device based on the state indicating data of the target block chain, where the alarm message is used to prompt the target user that the target block chain operates abnormally on the target node device.
Or, if the blockchain management platform determines that the target blockchain normally operates in the target node device based on the state indication data of the target blockchain, a state prompt message may also be sent to a terminal device corresponding to a target user to which the target blockchain belongs, where the state prompt message is used to prompt the target user that the target blockchain normally operates in the target node device.
It can be understood that the monitoring system of the block chain operation state and the BaaS management platform described in the embodiment of the present invention are for more clearly illustrating the technical solution of the embodiment of the present invention, and do not constitute a limitation to the technical solution provided in the embodiment of the present invention, and as a person having ordinary skill in the art knows that along with the evolution of the system architecture and the appearance of a new service scenario, the technical solution provided in the embodiment of the present invention is also applicable to similar technical problems.
Referring to fig. 3, it is a schematic flow chart of a method for monitoring a block chain running state according to an embodiment of the present invention, where the method according to the embodiment of the present invention may be executed by a target node device in a block chain network, and an agent process of a block chain management platform is run on the program punctuation device. The method of an embodiment of the present invention includes the following steps.
S301: and performing data access on the block chain process corresponding to the target block chain through the proxy process. The target block chain is any one of at least one block chain running on the target node device, and the target node device is any one of node devices associated with the target block chain.
In one embodiment, at least one blockchain may run on one target node device, each blockchain corresponds to one blockchain process, and each blockchain process is configured to process data read and write of the corresponding blockchain. The target node device reads data (such as the current block height and the write time of the latest block) and writes data (such as certain transaction data) to the target blockchain through the blockchain process corresponding to the target blockchain.
In one embodiment, each blockchain process may provide a data read-write interface for data access by the node device. In this case, the target node device may call, through the proxy process, the data read-write interface corresponding to the block chain process of the target block chain, and perform data access on the block chain process of the target block chain.
In an embodiment, the step of the target node device performing data access to the blockchain process corresponding to the target blockchain through the proxy process may be periodically performed by the target node device through the proxy process according to a time interval, where the time interval may be preset based on implementation of measurement and calculation data. Illustratively, the time interval may be 1 minute, for example, and the target node device may perform data access to the blockchain process corresponding to the target blockchain through the proxy process every 1 minute.
S302: and receiving the first characteristic parameter of the target block chain returned by the block chain process aiming at the data access, and acquiring the second characteristic parameter of the target block chain on other node equipment in the associated node equipment. The first characteristic parameter and the second characteristic parameter both include block heights, the block height included by the first characteristic parameter is a block height of a target block chain acquired from a target node device, and the block height included by the second characteristic parameter is a block height acquired from other node devices.
In one embodiment, specific data for data access between the proxy process and the blockchain process of the target blockchain may be agreed in advance, and the specific data may be, for example, the current block height of the target blockchain, the write time of the latest block, and the like. In this case, after the target node device performs data access to the blockchain process corresponding to the target blockchain through the proxy process, if response data returned by the blockchain process for the data access is received, it may be directly determined that the operating state of the target blockchain in the target node device is normal. On the contrary, if the target node device does not receive response data returned by the blockchain process for data access, that is, the blockchain process does not respond, it may be determined that the running state of the target blockchain at the target node device is abnormal running.
In an embodiment, a waiting duration for data access may be preset, and if the target node device receives response data returned by the blockchain process for data access within the waiting duration, it may be directly determined that the operating state of the target blockchain in the target node device is normal operation. Otherwise, it may be determined that the operation state of the target blockchain in the target node device is abnormal operation.
Or, in an embodiment, after receiving response data returned by the block chain process for data access, the target node device may perform data analysis on the response data, and if it is determined based on the analysis result that the response data is not empty, it may be determined that the operating state of the target block chain on the target node device is normal operation; on the contrary, if the response data is determined to be null based on the analysis result, it may be determined that the operation state of the target block chain on the target node device is abnormal operation.
S303: and generating state indicating data of the target block chain matched with the running state according to the first characteristic parameter and the second characteristic parameter, and returning the state indicating data of the target block chain to the block chain management platform. The state indicating data is used for indicating that the target block chain runs normally or abnormally on the target node equipment.
In one embodiment, the target node device may generate status indication data of the target blockchain matching the running status, and upload the status indication data of the target blockchain to the blockchain management platform through its own proxy process. Further, the blockchain management platform may determine, based on the state indication data of the target blockchain, whether the target blockchain normally operates in the target node device, and send a prompt message for the target blockchain to a terminal device corresponding to a target user to which the target blockchain belongs, where the prompt message may be used to prompt the target user whether the target blockchain normally operates in the target node device.
It can be understood that a plurality of block chains may run on the target node device, and the target node device may perform loop monitoring on each block chain running on the target node device through the same process as the above steps S301 to S303, generate state indication data of each block chain, and report the state indication data of each block chain to the block chain management platform.
In the embodiment of the present invention, a target node device in a blockchain network may perform data access on a blockchain process corresponding to a target blockchain through a proxy process, and receive a first characteristic parameter of the target blockchain returned by the blockchain process for data access, further, may obtain a second characteristic parameter of the target blockchain on other node devices in the associated node device, generate state indication data of the target blockchain according to the first characteristic parameter and the second characteristic parameter, and return the state indication data of the target blockchain to a blockchain management platform. By adopting the mode, the running state of the target block chain can be efficiently monitored, and the running state can be reported to the block chain management platform in time.
Referring to fig. 4, a flow chart of another method for monitoring a blockchain operation state according to an embodiment of the present invention is shown, where the method according to the embodiment of the present invention may be executed by a target node device in a blockchain network, and the target node device runs an agent process of a blockchain management platform. The method of an embodiment of the present invention includes the following steps.
S401: and performing data access on the block chain process corresponding to the target block chain through the proxy process. For a specific implementation of step S401, reference may be made to the related description of step S301 in the foregoing embodiment, and details are not described here again.
S402: and receiving the first characteristic parameter of the target block chain returned by the block chain process aiming at the data access, acquiring the second characteristic parameter of the target block chain on other node equipment in the associated node equipment, and generating the state indicating data of the target block chain matched with the running state according to the first characteristic parameter and the second characteristic parameter.
In an embodiment, the first characteristic parameter and the second characteristic parameter both include a block height, and a specific implementation manner of the target node device generating the operation state indicating data of the target block chain according to the first characteristic parameter and the second characteristic parameter may be: acquiring a difference value between the block height of a target block chain on each node device in other node devices and the block height of the target block chain on the target node device, judging whether the difference value corresponding to each node device is smaller than or equal to a difference value threshold value, if so, generating state indicating data for indicating that the target block chain runs normally on the target node device, and if not, generating state indicating data for indicating that the target block chain runs abnormally on the target node device. The difference threshold is preset based on experimental measurement data, and may be an integer greater than 0.
It can be understood that, since the process of block synchronization in the blockchain takes a certain time, there may be a case that the heights of the corresponding blocks of the target blockchain on the target node device and other node devices are not consistent. If the difference corresponding to each node device is judged to be less than or equal to the difference threshold, it can be shown that the difference between the block heights of the target block chain on each associated node device is not large, the target block chain can operate normally on the target node device, and accordingly, state indicating data for indicating that the target block chain operates normally on the target node device can be generated. If the difference corresponding to any one node device is judged to be smaller than or equal to the difference threshold, it can be shown that the block heights of the target block chain on each associated node device have large differences, the target block chain runs abnormally on the target node device, and accordingly, state indicating data for indicating that the target block chain runs abnormally on the target node device can be generated.
Before the target node device generates the state indicating data for indicating that the target block chain runs normally on the target node device, the timestamp of the latest block can be acquired, the target duration of the time indicated by the timestamp from the current time is acquired, and if the target duration is less than or equal to the duration threshold, the step of generating the state indicating data for indicating that the target block chain runs normally on the target node device is triggered and executed.
Or if the target duration is greater than the duration threshold, generating state indicating data for indicating that the target block chain runs abnormally on the target node device. The duration threshold is determined based on experimental data, for example, may be one week, and in this way, the running state of the target block chain itself may be determined based on whether a new block is added to the target block chain within a certain time range.
In an embodiment, the target node device determines whether the difference value corresponding to each node device is smaller than or equal to a difference threshold value, if not, the number of the node devices corresponding to the difference value larger than the difference threshold value may be obtained, and if the number reaches a percentage threshold value of the total number of the node devices associated with the target block chain, state indication data for indicating that the target block chain operates abnormally on the target node device may be generated. Illustratively, assuming that the total number of node devices associated with the target block chain is 100 and the percentage threshold is 0.5%, the target node device determines that the number of corresponding node devices whose difference is greater than the difference threshold is 6 and is greater than the percentage of the total number. In this case, the target node device may determine that the target block chain runs abnormally on the target node device, and accordingly, may generate status indication data indicating that the target block chain runs abnormally on the target node device.
Or, if the target node device determines that the number of the node devices corresponding to the difference value larger than the difference value threshold is 3 and is smaller than the percentage of the total number, in this case, the target node device may determine that the target block chain operates normally on the target node device, and operate abnormally on the 3 node devices corresponding to the difference value larger than the difference value threshold.
S403: and acquiring a secret key agreed with the block chain management platform.
S404: and encrypting the state indicating data of the target block chain based on the secret key, and returning the encrypted state indicating data of the target block chain to the block chain management platform.
In one embodiment, a public key pair is agreed between the blockchain management platform and the node device, and the key pair is kept by the node device. After the node device generates the state indicating data of the target block chain matched with the running state, a secret key agreed with the block chain management platform can be obtained, the state indicating data of the target block chain is encrypted based on the secret key, and the encrypted state indicating data of the target block chain is returned to the block chain management platform. After receiving the encrypted state indicating data, the block chain management platform may decrypt the state indicating data based on the public key, determine whether the target block chain operates normally in the node device based on the decrypted state indicating data, and send a prompt message for the target block chain to a terminal device corresponding to a target user to which the target block chain belongs, where the prompt message may be used to prompt the target user whether the target block chain operates normally in the node device.
In the embodiment of the present invention, a target node device in a blockchain network may perform data access on a blockchain process corresponding to a target blockchain through a proxy process, and receive a first characteristic parameter of the target blockchain returned by the blockchain process for data access, further, may obtain a second characteristic parameter of the target blockchain on other node devices in the associated node device, generate state indication data of the target blockchain according to the first characteristic parameter and the second characteristic parameter, and return the state indication data of the target blockchain to a blockchain management platform. In this way, the security of the state indicating data in the transmission process is increased.
Referring to fig. 5, a flow chart of another method for monitoring a blockchain operating state according to an embodiment of the present invention is shown, where the method according to the embodiment of the present invention can be executed by a blockchain management platform. The method of an embodiment of the present invention includes the following steps.
S501: and receiving status indication data sent by each node device, wherein the status indication data is used for indicating whether the target block chain normally operates on each node device.
In an embodiment, as shown in fig. 6, the blockchain management platform may provide a visual blockchain management interface, so that a user may build a blockchain network (i.e., create a own blockchain), and manage the blockchains running on each node in the blockchain network, including state monitoring, parameter configuration, and the like. After the building of each blockchain network is completed, the blockchain management platform may receive status indication data sent by each node device in each blockchain network, where the status indication data is used to indicate whether each blockchain running on each node device is running normally. How each node device monitors the operation state of each block chain running on itself, and generates and reports state indication data can refer to the above description of the embodiments corresponding to fig. 3 and fig. 4, and details are not described here.
S502: and determining target node equipment from the node equipment according to the state indicating data, wherein the target block chain runs abnormally on the target node equipment.
S503: and generating a block chain state warning message, and sending the block chain state warning message to terminal equipment corresponding to a target user, wherein the block chain state warning message comprises an identifier of a target block chain and an identifier of target node equipment, and the target user is a user corresponding to the target block chain.
In an embodiment, the status indication data sent by each node device includes a node identifier of the node device itself and an identifier of the monitored block chain, where the status indication data indicates an operation status of the monitored target block chain of the node device during operation of the node device itself, that is, whether the monitored target block chain operates normally at the node device. In this case, the block chain management platform may analyze the status indication data sent by each node device to determine whether the target block chain monitored by each node device at this time is operating normally. If it is determined that the target block chain runs abnormally on any node device based on the state indicating data, it may be determined that the target block chain runs abnormally, and further, it may be determined that any node device is a target node device, and an identifier of the target block chain and an identifier of the target node device may be obtained.
Further, the block chain management platform may generate a block chain state alarm message based on the identifier of the target block chain and the identifier of the target node device, and send the block chain state alarm message to the terminal device corresponding to the target user, where the block chain state alarm message is used to prompt the target user that the target block chain runs abnormally on the target node device. The block chain state alarm message comprises an identifier of a target block chain and an identifier of target node equipment, and the target user is a user corresponding to the target block chain.
It is to be understood that each blockchain is created by a user through the blockchain management platform, and the target user may be understood as a user creating a target blockchain.
In the embodiment of the invention, the block chain management platform can receive the state indicating data sent by each node device, determine the target node device from each node device according to the state indicating data, generate the block chain state warning message and send the block chain state warning message to the terminal device corresponding to the target user. By adopting the mode, the block chain management platform can efficiently monitor the block chains running on each node device, and output the block chain state alarm message of the target block chain with abnormal running state to the user, so that the user can conveniently master the running state of the target block chain in time.
The embodiment of the present application further provides a computer storage medium, in which program instructions are stored, and when the program instructions are executed, the computer storage medium is used for implementing the corresponding method described in the above embodiment.
Referring to fig. 7, it is a schematic structural diagram of a device for monitoring a block chain running state according to an embodiment of the present application, where the device for monitoring a block chain running state according to the embodiment of the present application may be disposed in a target node device of a block chain network, and an agent process of a block chain management platform is run on the target node device.
In one implementation of the apparatus of the embodiment of the present application, the apparatus includes the following structure.
A data access module 70, configured to perform data access on a blockchain process corresponding to a target blockchain through the proxy process, where the target blockchain is any one of at least one blockchain running on the target node device, and the target node device is any one of node devices associated with the target blockchain;
the data access module 70 is further configured to receive a first characteristic parameter of the target block chain returned by the block chain process for the data access, where the first characteristic parameter includes a block height;
a processing module 71, configured to obtain a second characteristic parameter of the target block chain on another node device in the associated node device, where the second characteristic parameter includes a block height;
the processing module 71 is configured to generate status indication data of the target block chain according to the first characteristic parameter and the second characteristic parameter;
a communication module 72, configured to return status indication data of the target blockchain to the blockchain management platform, where the status indication data is used to indicate that the target blockchain runs normally or abnormally on the target node device.
In an embodiment, the processing module 71 is specifically configured to obtain a difference between a block height of the target block chain on each node device in the other node devices and a block height of the target block chain on the target node device; judging whether the difference value corresponding to each node device is smaller than or equal to a difference value threshold value; if yes, generating state indicating data for indicating that the target block chain runs normally on the target node equipment; and if not, generating state indicating data for indicating that the target block chain runs abnormally on the target node equipment.
In one embodiment, the processing module 71 is further configured to obtain a timestamp of the latest block; acquiring a target time length between the time indicated by the timestamp and the current time; and if the target duration is less than or equal to a duration threshold, triggering and executing the step of generating state indication data for indicating that the target block chain runs normally on the target node equipment.
In an embodiment, the processing module 71 is further configured to generate status indication data for indicating that the target block chain runs abnormally on the target node device if the target duration is greater than the duration threshold.
In an embodiment, the processing module 71 is further configured to obtain the number of node devices corresponding to the difference value greater than the difference value threshold; and if the number reaches a percentage threshold of the total number of the node devices associated with the target block chain, triggering and executing the step of generating state indicating data for indicating that the target block chain runs abnormally on the target node device.
In an embodiment, the communication module 72 is specifically configured to obtain a key agreed with the blockchain management platform, and encrypt the state indication data of the target blockchain based on the key; and returning the encrypted state indicating data of the target block chain to the block chain management platform.
In the embodiment of the present application, reference may be made to the description of relevant contents in the embodiments corresponding to the foregoing drawings for specific implementations of the foregoing modules.
Referring to fig. 8 again, it is a schematic structural diagram of a node device in a blockchain network according to an embodiment of the present application, where an agent process of a blockchain management platform runs on the node device according to the embodiment of the present application, and includes structures such as a power supply module, and includes a processor 801, a storage device 802, and a communication interface 803. The processor 801, the storage device 802 and the communication interface 803 may exchange data with each other, and the processor 801 may perform a function of monitoring the operation status of the corresponding block chain.
The storage device 802 may include a volatile memory (volatile memory), such as a random-access memory (RAM); the storage device 802 may also include a non-volatile memory (non-volatile memory), such as a flash memory (flash memory), a solid-state drive (SSD), or the like; the storage means 802 may also comprise a combination of memories of the kind described above.
The processor 801 may be a Central Processing Unit (CPU) 801. In one embodiment, the processor 801 may also be a Graphics Processing Unit (GPU) 801. The processor 801 may also be a combination of a CPU and a GPU. In the terminal device, a plurality of CPUs and GPUs may be included as necessary to perform monitoring of the operating state of the corresponding blockchain. In one embodiment, the storage 802 is used to store program instructions. The processor 801 may invoke the program instructions to implement the various methods as described above in the embodiments of the present application.
In a first possible implementation, the processor 801 of the terminal device invokes a program instruction stored in the storage device 802, so as to perform data access on a blockchain process corresponding to a target blockchain through the proxy process, where the target blockchain is any one of at least one blockchain running on the target node device, and the target node device is any one of node devices associated with the target blockchain; receiving a first characteristic parameter of the target block chain returned by the block chain process for the data access, wherein the first characteristic parameter comprises a block height; acquiring a second characteristic parameter of the target block chain on other node equipment in the associated node equipment, wherein the second characteristic parameter comprises a block height; and generating state indicating data of the target block chain according to the first characteristic parameter and the second characteristic parameter, and returning the state indicating data of the target block chain to the block chain management platform through a communication interface 803.
In an embodiment, the processor 801 is specifically configured to obtain a difference between a block height of the target block chain on each node device in the other node devices and a block height of the target block chain on the target node device; judging whether the difference value corresponding to each node device is smaller than or equal to a difference value threshold value; if yes, generating state indicating data for indicating that the target block chain runs normally on the target node equipment; and if not, generating state indicating data for indicating that the target block chain runs abnormally on the target node equipment.
In one embodiment, the processor 801 is further configured to obtain a timestamp of the latest block; acquiring a target time length between the time indicated by the timestamp and the current time; and if the target duration is less than or equal to a duration threshold, triggering and executing the step of generating state indication data for indicating that the target block chain runs normally on the target node equipment.
In an embodiment, the processor 801 is further configured to generate status indication data for indicating that the target block chain runs abnormally on the target node device if the target duration is greater than the duration threshold.
In an embodiment, the processor 801 is further configured to obtain the number of node devices corresponding to the difference value greater than the difference value threshold; and if the number reaches a percentage threshold of the total number of the node devices associated with the target block chain, triggering and executing the step of generating state indicating data for indicating that the target block chain runs abnormally on the target node device.
In an embodiment, the processor 801 is specifically configured to obtain a key agreed with the blockchain management platform, and encrypt the state indication data of the target blockchain based on the key; and returns the encrypted status indication data of the target blockchain to the blockchain management platform through the communication interface 803.
In the embodiment of the present application, the specific implementation of the processor 801 may refer to the description of relevant contents in the embodiments corresponding to the foregoing drawings.
Referring to fig. 9 again, it is a schematic structural diagram of another block chain operation state monitoring device according to an embodiment of the present disclosure, where the block chain operation state monitoring device according to the embodiment of the present disclosure may be configured with a block chain management platform, and the block chain management platform may refer to a server and a server group for providing a block chain management service.
In one implementation of the apparatus of the embodiment of the present application, the apparatus includes the following structure.
A communication module 90, configured to receive status indication data sent by each node device, where the status indication data is used to indicate that the target block chain is on each node device;
a processing module 91, configured to determine a target node device from the node devices according to the status indication data, where the target block chain runs abnormally on the target node device;
the processing module 91 is further configured to generate a block chain state alarm message, where the block chain state alarm message includes an identifier of the target block chain and an identifier of the target node device;
the communication module 90 is further configured to send the block chain state warning message to a terminal device corresponding to a target user, where the target user is a user corresponding to the target block chain.
In the embodiment of the present application, reference may be made to the description of relevant contents in the embodiments corresponding to the foregoing drawings for specific implementations of the foregoing modules.
Referring to fig. 10, it is a schematic structural diagram of a block chain management platform according to an embodiment of the present application, including structures such as a power supply module, and including a processor 110, a storage device 111, and a communication interface 112. The processor 110, the storage device 111 and the communication interface 112 can exchange data, and the processor 110 implements a function of monitoring the operation status of the corresponding block chain.
The storage device 111 may include a volatile memory (volatile memory), such as a random-access memory (RAM); the storage device 111 may also include a non-volatile memory (non-volatile memory), such as a flash memory (flash memory), a solid-state drive (SSD), or the like; the storage means 111 may also comprise a combination of memories of the kind described above.
The processor 110 may be a Central Processing Unit (CPU) 110. In one embodiment, the processor 110 may also be a Graphics Processing Unit (GPU) 110. The processor 110 may also be a combination of a CPU and a GPU. In the terminal device, a plurality of CPUs and GPUs may be included as necessary to perform monitoring of the operating state of the corresponding blockchain. In one embodiment, the storage 111 is used to store program instructions. The processor 110 may invoke the program instructions to implement the various methods as described above in the embodiments of the present application.
In a first possible implementation manner, the processor 110 of the terminal device calls a program instruction stored in the storage device 111, and is configured to receive, through the communication interface 112, status indication data sent by each node device, where the status indication data is used to indicate whether the target block chain operates normally on each node device, and determine, according to the status indication data, a target node device from the node devices, where the target block chain operates abnormally on the target node device; generating a block chain state alarm message, and sending the block chain state alarm message to a terminal device corresponding to a target user through a communication interface 112, where the block chain state alarm message includes an identifier of the target block chain and an identifier of the target node, and the target user is a user corresponding to the target block chain.
In the embodiment of the present application, the specific implementation of the processor 110 may refer to the description of relevant contents in the embodiments corresponding to the foregoing drawings.
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 present disclosure has been described with reference to a particular embodiment, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present disclosure.

Claims (10)

1. A method for monitoring a block chain running state is applied to a target node device in a block chain network, wherein an agent process of a block chain management platform runs on the target node device, and the method comprises the following steps:
performing data access on a block chain process corresponding to a target block chain through the agent process, wherein the target block chain is any one of at least one block chain running on the target node device, and the target node device is any one of node devices associated with the target block chain;
receiving a first characteristic parameter of the target block chain returned by the block chain process for the data access, wherein the first characteristic parameter comprises a block height;
acquiring a second characteristic parameter of the target block chain on other node equipment in the associated node equipment, wherein the second characteristic parameter comprises a block height;
and generating state indicating data of the target block chain according to the first characteristic parameter and the second characteristic parameter, and returning the state indicating data of the target block chain to the block chain management platform, wherein the state indicating data is used for indicating that the target block chain runs normally or abnormally on the target node equipment.
2. The method according to claim 1, wherein the generating of the operation state indication data of the target block chain according to the first characteristic parameter and the second characteristic parameter comprises:
obtaining a difference value between the block height of the target block chain on each node device in the other node devices and the block height of the target block chain on the target node device;
judging whether the difference value corresponding to each node device is smaller than or equal to a difference value threshold value;
if yes, generating state indicating data for indicating that the target block chain runs normally on the target node equipment;
and if not, generating state indicating data for indicating that the target block chain runs abnormally on the target node equipment.
3. The method of claim 2, wherein prior to generating the status indication data indicating that the target blockchain is functioning properly on the target node device, the method further comprises:
acquiring a timestamp of the latest block;
acquiring a target time length between the time indicated by the timestamp and the current time;
and if the target duration is less than or equal to a duration threshold, triggering and executing the step of generating state indication data for indicating that the target block chain runs normally on the target node equipment.
4. The method of claim 3, further comprising:
and if the target duration is greater than the duration threshold, generating state indicating data for indicating that the target block chain runs abnormally on the target node equipment.
5. The method of claim 2, wherein prior to generating the status indication data indicating that the target blockchain is running an exception on the target node device, the method further comprises:
acquiring the number of the corresponding node devices of which the difference values are larger than the difference value threshold;
and if the number reaches a percentage threshold of the total number of the node devices associated with the target block chain, triggering and executing the step of generating state indicating data for indicating that the target block chain runs abnormally on the target node device.
6. The method according to any of claims 1-5, wherein said returning status indication data of the target blockchain to the blockchain management platform comprises:
acquiring a secret key agreed with the block chain management platform, and encrypting the state indication data of the target block chain based on the secret key;
and returning the encrypted state indicating data of the target block chain to the block chain management platform.
7. A method for monitoring the running state of a block chain is applied to a block chain management platform, and comprises the following steps:
receiving status indication data sent by each node device, wherein the status indication data is used for indicating whether the target block chain normally operates on each node device;
determining target node equipment from the node equipment according to the state indicating data, wherein the target block chain runs abnormally on the target node equipment;
generating a block chain state warning message, and sending the block chain state warning message to a terminal device corresponding to a target user, where the block chain state warning message includes an identifier of the target block chain and an identifier of the target node device, and the target user is a user corresponding to the target block chain.
8. An apparatus for monitoring operation status of a blockchain, the apparatus being configured to a target node device in a blockchain network, the target node device having an agent process of a blockchain management platform running thereon, the apparatus comprising:
a data access module, configured to perform data access on a blockchain process corresponding to a target blockchain through the proxy process, where the target blockchain is any one of at least one blockchain running on the target node device, and the target node device is any one of node devices associated with the target blockchain;
the data access module is further configured to receive a first characteristic parameter of the target block chain returned by the block chain process for the data access, where the first characteristic parameter includes a block height;
a processing module, configured to obtain a second characteristic parameter of the target block chain on another node device in the associated node device, where the second characteristic parameter includes a block height;
the processing module is further configured to generate state indication data of the target block chain according to the first characteristic parameter and the second characteristic parameter;
and the communication module is used for returning the state indicating data of the target block chain to the block chain management platform, wherein the state indicating data is used for indicating that the target block chain runs normally or abnormally on the target node equipment.
9. An apparatus for monitoring operation status of a blockchain, the apparatus being configured on a blockchain management platform, the apparatus comprising:
a communication module, configured to receive status indication data sent by each node device, where the status indication data is used to indicate whether the target block chain operates normally on each node device;
a processing module, configured to determine a target node device from the node devices according to the status indication data, where the target block chain runs abnormally on the target node device;
the processing module is further configured to generate a block chain state alarm message, where the block chain state alarm message includes an identifier of the target block chain and an identifier of the target node;
the communication module is further configured to send the block chain state warning message to a terminal device corresponding to a target user, where the target user is a user corresponding to the target block chain.
10. A computer storage medium having stored thereon program instructions for implementing a method according to any one of claims 1 to 7 when executed.
CN202010247714.8A 2020-03-31 2020-03-31 Block chain running state monitoring method, device and storage medium Active CN111464393B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010247714.8A CN111464393B (en) 2020-03-31 2020-03-31 Block chain running state monitoring method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010247714.8A CN111464393B (en) 2020-03-31 2020-03-31 Block chain running state monitoring method, device and storage medium

Publications (2)

Publication Number Publication Date
CN111464393A true CN111464393A (en) 2020-07-28
CN111464393B CN111464393B (en) 2023-08-18

Family

ID=71680986

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010247714.8A Active CN111464393B (en) 2020-03-31 2020-03-31 Block chain running state monitoring method, device and storage medium

Country Status (1)

Country Link
CN (1) CN111464393B (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
WO2022116761A1 (en) * 2020-12-02 2022-06-09 International Business Machines Corporation Self auditing blockchain

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109167699A (en) * 2018-08-20 2019-01-08 众安信息技术服务有限公司 The method and apparatus for handling the state of the node of block chain
CN109274768A (en) * 2018-11-02 2019-01-25 陕西科技大学 A kind of power battery state monitoring apparatus and method based on block chain
WO2019062304A1 (en) * 2017-09-26 2019-04-04 上海点融信息科技有限责任公司 Method, device and system for managing computing resources of block chain node
WO2019227337A1 (en) * 2018-05-30 2019-12-05 重庆小雨点小额贷款有限公司 Security management method based on block chain, related device, and storage medium
CN110569305A (en) * 2019-08-27 2019-12-13 网易(杭州)网络有限公司 Block synchronization method, device, medium and computing equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019062304A1 (en) * 2017-09-26 2019-04-04 上海点融信息科技有限责任公司 Method, device and system for managing computing resources of block chain node
WO2019227337A1 (en) * 2018-05-30 2019-12-05 重庆小雨点小额贷款有限公司 Security management method based on block chain, related device, and storage medium
CN109167699A (en) * 2018-08-20 2019-01-08 众安信息技术服务有限公司 The method and apparatus for handling the state of the node of block chain
CN109274768A (en) * 2018-11-02 2019-01-25 陕西科技大学 A kind of power battery state monitoring apparatus and method based on block chain
CN110569305A (en) * 2019-08-27 2019-12-13 网易(杭州)网络有限公司 Block synchronization method, device, medium and computing equipment

Cited By (4)

* 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
WO2022116761A1 (en) * 2020-12-02 2022-06-09 International Business Machines Corporation Self auditing blockchain
US11575499B2 (en) 2020-12-02 2023-02-07 International Business Machines Corporation Self auditing blockchain
GB2616790A (en) * 2020-12-02 2023-09-20 Ibm Self auditing blockchain

Also Published As

Publication number Publication date
CN111464393B (en) 2023-08-18

Similar Documents

Publication Publication Date Title
CN110908812B (en) Service data processing method, device, readable storage medium and computer equipment
CN111464393B (en) Block chain running state monitoring method, device and storage medium
CN113507480B (en) Network equipment, gateway equipment and system and inter-network data transmission and reporting method
WO2020133963A1 (en) Blockchain-based data storage method, related device and storage medium
CN110866261A (en) Data processing method and device based on block chain and storage medium
CN115114305A (en) Lock management method, device, equipment and storage medium for distributed database
CN108845916A (en) Platform monitoring and alarm method, device, equipment and computer readable storage medium
CN105553743A (en) Log obtaining method, system, first network device and third network device
CN113489149B (en) Power grid monitoring system service master node selection method based on real-time state sensing
CN112559236B (en) Fault detection method and device for encryption operation processor chip
CN116319080B (en) Safe operation method and device for electric power nano relay
CN111552746B (en) Data synchronization method, device, electronic equipment and storage medium
US11930292B2 (en) Device state monitoring method and apparatus
CN113507691B (en) Information pushing system and method based on power distribution network cross-region service
CN114189515B (en) SGX-based server cluster log acquisition method and device
CN105554134A (en) Information synchronization and device
CN111258860B (en) Data alarm method, device, computer equipment and storage medium
CN115981956A (en) SPDK service process monitoring method, device, equipment, storage medium and program product
CN111342932B (en) Data transmission method, device, equipment and computer readable storage medium
CN110928564B (en) Method for safely updating application, service server, cluster and storage medium
CN113221151A (en) Data processing method and device based on block chain and storage medium
CN113014545A (en) Data processing method and device, computer equipment and storage medium
CN112468454A (en) Remote file management system and remote file management method thereof
CN117077227B (en) Abnormality monitoring method and system based on USB level signal
CN116226064B (en) Method, system, terminal and storage medium for sharing operation and maintenance data of power grid

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