CN111464393B - Block chain running state monitoring method, device and storage medium - Google Patents

Block chain running state monitoring method, device and storage medium Download PDF

Info

Publication number
CN111464393B
CN111464393B CN202010247714.8A CN202010247714A CN111464393B CN 111464393 B CN111464393 B CN 111464393B CN 202010247714 A CN202010247714 A CN 202010247714A CN 111464393 B CN111464393 B CN 111464393B
Authority
CN
China
Prior art keywords
blockchain
target
data
node device
state
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.)
Active
Application number
CN202010247714.8A
Other languages
Chinese (zh)
Other versions
CN111464393A (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

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 and a device for monitoring a block chain running state and a storage medium, wherein the method comprises the following steps: the target node equipment in the blockchain network can access data to the blockchain process corresponding to the target blockchain through the proxy process, and receive the first characteristic parameter of the target blockchain returned by the blockchain process for the data access, further, the second characteristic parameter of the target blockchain on other node equipment in the associated node equipment can be obtained, the state indication data of the target blockchain is generated according to the first characteristic parameter and the second characteristic parameter, and the state indication data of the target blockchain is returned to the blockchain management platform. By adopting the mode, the monitoring of the running state of the target block chain can be efficiently realized, and the block chain management platform can be timely reported.

Description

Block chain running state monitoring method, device and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and apparatus for monitoring a blockchain operating state, and a storage medium.
Background
With the rapid development of the blockchain technology, each user can select parameters such as the required node types, the node number and the like through a blockchain management interface provided by a blockchain management platform so as to build a blockchain network of the user. After the construction of each block chain network is completed, the block chain management platform manages the block chains maintained by each block chain network. Among other things, management of blockchain operating states is particularly important. Therefore, how to monitor the running state of the blockchain is a urgent problem to be solved.
Disclosure of Invention
The embodiment of the application provides a method, a device and a storage medium for monitoring the running state of a block chain, which are used for efficiently monitoring 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, and a proxy process of a blockchain management platform is running on the target node device, and the method includes:
performing data access on a blockchain process corresponding to a target blockchain through the proxy process, wherein the target blockchain is any one of at least one blockchain running on target node equipment, and the target node equipment is any one of node equipment associated with the target blockchain;
receiving a first characteristic parameter of the target blockchain returned by the blockchain process for the data access, wherein the first characteristic parameter comprises a block height;
acquiring second characteristic parameters of the target block chain on other node devices in the associated node device, wherein the second characteristic parameters comprise block heights;
and generating state indicating data of the target blockchain according to the first characteristic parameter and the second characteristic parameter, and returning the state indicating data of the target blockchain to the blockchain management platform, wherein the state indicating data is used for indicating that the target blockchain runs normally or abnormally on the target node equipment.
In a second aspect, an embodiment of the present application provides a device for monitoring a blockchain operation state, where the device is configured in a target node device in a blockchain network, and a proxy process of a blockchain management platform is running on the target node device, and the device includes:
the data access module is used for performing data access on a blockchain process corresponding to a target blockchain through the proxy process, wherein the target blockchain is any one of at least one blockchain running on target node equipment, and the target node equipment is any one of node equipment associated with the target blockchain;
the data access module is further configured to receive a first characteristic parameter of the target blockchain returned by the blockchain process for the data access, where the first characteristic parameter includes a block height;
the processing module is used for acquiring second characteristic parameters of the target block chain on other node equipment in the associated node equipment, wherein the second characteristic parameters comprise block heights;
the processing module is further used for generating 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 state indicating data of the target blockchain to the blockchain management platform, wherein the state indicating data is used for indicating that the target blockchain is normal or abnormal in operation 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 configured to store a computer program, where the computer program includes program instructions, and where the processor is configured to invoke the program instructions to execute the method for monitoring a blockchain running state according to the first aspect.
In a fourth aspect, an embodiment of the present application provides another method for monitoring a blockchain operation state, where the method is applied to a blockchain management platform, and the method includes:
receiving state indication data sent by each node device, wherein the state indication data is used for indicating whether the target blockchain normally operates on each node device;
determining target node equipment from the node equipment according to the state indication data, wherein the target blockchain runs abnormally on the target node equipment;
Generating a blockchain state alarm message, and sending the blockchain state alarm message to terminal equipment corresponding to a target user, wherein the blockchain state alarm message comprises an identifier of the target blockchain and an identifier of the target node, and the target user is a user corresponding to the target blockchain.
In a fifth aspect, an embodiment of the present application provides another apparatus for monitoring a blockchain operation status, where the apparatus is configured on a blockchain management platform, and the apparatus includes:
the communication module is used for receiving state indication data sent by each node device, wherein the state indication data is used for indicating whether the target blockchain normally operates on each node device or not;
the processing module is used for determining target node equipment from the node equipment according to the state indication data, and the target blockchain runs abnormally on the target node equipment;
the processing module is further configured to generate a blockchain status alert message, where the blockchain status alert message includes an identifier of the target blockchain and an identifier of the target node;
the communication module is further configured to send the blockchain status alert message to a terminal device corresponding to a target user, where the target user is a user corresponding to the target blockchain.
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 configured to store a computer program, and the computer program includes program instructions, and the processor is configured to invoke the program instructions to execute the blockchain running state monitoring method in the fourth aspect.
In a seventh aspect, an embodiment of the present application provides a computer readable storage medium, where instructions are stored, when the computer readable storage medium runs on a computer, to cause the computer to execute the method for monitoring a blockchain operation state according to the first aspect or the fourth aspect.
By adopting the embodiment of the application, the target node equipment in the blockchain network can perform data access to the blockchain process corresponding to the target blockchain through the proxy process, and receive the first characteristic parameter of the target blockchain returned by the blockchain process aiming at the data access, further, the second characteristic parameter of the target blockchain on other node equipment in the associated node equipment can be obtained, the state indication data of the target blockchain is generated according to the first characteristic parameter and the second characteristic parameter, and the state indication data of the target blockchain is returned to the blockchain management platform.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a block chain architecture diagram according to an embodiment of the present application;
FIG. 2a is a schematic diagram of a system for monitoring a blockchain operation status according to an embodiment of the present application;
FIG. 2b is a schematic diagram of a block chain management platform according to an embodiment of the present application;
FIG. 3 is a flow chart of a method for monitoring a blockchain operation status according to an embodiment of the present application;
FIG. 4 is a flowchart illustrating another exemplary method for monitoring a blockchain operating status according to an embodiment of the present application;
FIG. 5 is a flow chart of a method for monitoring a blockchain operating state in accordance with an embodiment of the present application;
FIG. 6 is an interface diagram of a blockchain management platform in accordance with embodiments of the present application;
FIG. 7 is a schematic diagram of a block chain operation status monitoring device according to an embodiment of the present application;
FIG. 8 is a schematic diagram of a node device in a blockchain network in accordance with an embodiment of the present application;
FIG. 9 is a schematic diagram of another exemplary embodiment of a blockchain operation status monitoring device;
FIG. 10 is a block chain management platform according to an embodiment of the present application.
Detailed Description
A blockchain (blockchain) is a chained data structure in which data blocks are sequentially connected in time sequence, and cryptographically guarantees that the data is not tamperable and counterfeit. Multiple independent distributed nodes (i.e., blockchain node devices) maintain the same record. Blockchain technology enables decentralization, becoming a cornerstone for trusted digital asset storage, transfer, and transactions.
Taking the block chain structure shown in fig. 1 as an example, whenever new data needs to be written into the block chain, the data is summarized into a block (block), and is added at the end of the existing block chain, and the newly added block of each node is ensured to be identical through a consensus algorithm. Each block records a plurality of transaction records, and the transaction records contain the hash value of the previous block, and all the blocks are sequentially connected to form a block chain by storing the hash value in the previous block in the way. The hash value of the previous block is stored in the block head of the next block in the blockchain, and when the transaction data in the previous block changes, the hash value of the current block also changes, so that the transaction data uploaded to the blockchain network is difficult to tamper, the transaction process is disclosed and transparent in the blockchain, and the reliability of the transaction data is improved.
In order to better understand the method for monitoring the running state of the blockchain disclosed by the embodiment of the invention, a description is first given below of a system for monitoring the running state of the blockchain, which is applicable to the embodiment of the invention.
Referring to fig. 2a, fig. 2a is a schematic diagram of a system for monitoring a blockchain operation status according to an embodiment of the invention. As shown in fig. 2a, the system for monitoring the running state of the blockchain includes a blockchain network 10, a blockchain as a service (Block chain as a Servic, baaS) management platform 11 and a terminal device 12, where the BaaS management platform 11 is an example of a blockchain management platform, and the BaaS management platform 11 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 the blockchains running on each node device 101 and/or node device 101 in the blockchain network 10, including state monitoring, parameter configuration, and the like;
the user (terminal device 12) can select parameters such as a required node type, a required node number and the like through the blockchain management interface provided by the BaaS management platform 11 so as to build the blockchain network 10.
In one embodiment, a proxy process of the blockchain management platform is operated in each node device in the blockchain network built through the blockchain management platform, and each proxy process can be managed in a unified manner through a proxy console of the blockchain management platform. For example, referring to fig. 2b, assume that the blockchain management platform is a BaaS management platform, the BaaS management platform includes an agent console 20, a blockchain network managed by the BaaS management platform includes a blockchain network 21 and a blockchain network 22, and at least one node device 220 is included in the blockchain network 21 and the blockchain network 22, and an agent process 2201 of the blockchain management platform runs on each node device 220.
In one embodiment, each node device may run multiple blockchains, the target blockchain may be any one of the multiple blockchains, and in the embodiment of the present application, the node device running the target blockchain may be referred to as a node device associated with the target blockchain, and the target node device is any one of the node devices associated with the target blockchain. The target node device can perform data access on the corresponding blockchain process of the target blockchain through the proxy process of the target node device, and receive the first characteristic parameter of the target blockchain returned by the blockchain process aiming at the data access, further, can acquire the 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 the blockchain management platform, wherein the state indication data is used for indicating that the target blockchain runs normally or abnormally on the target node device. After receiving the state indication data of the target blockchain, if it is determined that the target blockchain is abnormal in operation of the target node device based on the state indication data of the target blockchain, the blockchain management platform may send an alarm message to a terminal device corresponding to a target user to which the target blockchain belongs, where the alarm message is used to prompt the target user that the target blockchain is abnormal in operation of the target node device.
Or if the blockchain management platform determines that the target blockchain operates normally at the target node device based on the state indication data of the target blockchain, the blockchain management platform may also send a state prompt message 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 operates normally at the target node device.
It can be understood that the blockchain operation state monitoring system and the BaaS management platform described in the embodiments of the present invention are for more clearly describing the technical solution of the embodiments of the present invention, and are not limited to the technical solution provided by the embodiments of the present invention, and those skilled in the art can know that, with the evolution of the system architecture and the appearance of a new service scenario, the technical solution provided by the embodiments of the present invention is equally applicable to similar technical problems.
Referring to fig. 3 again, a flowchart of a method for monitoring a blockchain operation state according to an embodiment of the present invention may be implemented by a target node device in a blockchain network, where a proxy process of a blockchain management platform is running on a program punctuation device. The method of the embodiment of the invention comprises the following steps.
S301: and accessing data to the block chain process corresponding to the target block chain through the proxy process. The target blockchain is any one of at least one blockchain running on target node equipment, and the target node equipment is any one of node equipment associated with the target blockchain.
In one embodiment, at least one blockchain may be running on a target node device, one for each blockchain process, each for processing data reads and writes of the corresponding blockchain. The target node device reads data (such as the current block height and the writing 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 invoke the data read-write interface corresponding to the blockchain process of the target blockchain through the proxy process, and perform data access on the blockchain process of the target blockchain.
In one embodiment, the step of the target node device accessing data to the blockchain process corresponding to the target blockchain through the proxy process may be that the target node device periodically performs the step according to a time interval through the proxy process, where the time interval may be preset based on implementation of measuring and calculating data. Illustratively, the time interval may be, for example, 1 minute, 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 a first characteristic parameter of a target blockchain returned by the blockchain process aiming at the data access, and acquiring a second characteristic parameter of the target blockchain on other node devices in the associated node device. The first characteristic parameter and the second characteristic parameter both comprise block heights, the block heights included in the first characteristic parameter are block heights of target block chains acquired from target node equipment, the block heights included in the second characteristic parameter are block heights acquired from other node equipment, and due to the fact that a certain time is consumed in a block synchronization process in the block chains, the situation that the corresponding block heights of the target block chains on the target node equipment and the other node equipment are inconsistent may exist.
In one embodiment, specific data for data access between the proxy process and the blockchain process of the target blockchain may be pre-agreed, such as the current blockheight of the target blockchain, the write time of the latest block, etc. In this case, after the target node device accesses the data of the blockchain process corresponding to the target blockchain through the proxy process, if the response data returned by the blockchain process for the data access is received, the running state of the target blockchain on the target node device can be directly determined to be normal running. Otherwise, if the target node device does not receive the response data returned by the blockchain process for the 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 one 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 running state of the target blockchain device is normal running. Otherwise, the running state of the target blockchain on the target node equipment can be determined to be abnormal running.
Or in one embodiment, after receiving the response data returned by the blockchain process for data access, the target node device may perform data analysis on the response data, and if it is determined that the response data is not null based on the analysis result, it may be determined that the running state of the target blockchain on the target node device is normal running; otherwise, if the response data is determined to be empty based on the analysis result, the running state of the target blockchain on the target node device can be determined to be abnormal running.
S303: and generating state indicating data of the target blockchain 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 blockchain to the blockchain management platform. The status indication data is used to indicate whether the target blockchain is operating normally or abnormally on the target node device.
In one embodiment, the target node device may generate state indication data for the target blockchain that matches the running state and upload the state indication data for the target blockchain to the blockchain management platform through its own proxy process. Further, the blockchain management platform may determine whether the target blockchain is operating normally at the target node device based on the state indication data of the target blockchain, 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 is operating normally at the target node device.
It can be understood that the target node device may run multiple blockchains, and the target node device may perform cycle monitoring on each blockchain running on its own through the same flow as the steps S301 to S303, and generate status indication data of each blockchain, so as to report the status indication data of each blockchain to the blockchain management platform.
In the embodiment of the invention, the target node equipment in the blockchain network can access data to the blockchain process corresponding to the target blockchain through the proxy process, and receive the first characteristic parameter of the target blockchain returned by the blockchain process aiming at the data access, further, the second characteristic parameter of the target blockchain on other node equipment in the associated node equipment can be obtained, the state indication data of the target blockchain is generated according to the first characteristic parameter and the second characteristic parameter, and the state indication data of the target blockchain is returned to the blockchain management platform. By adopting the mode, the monitoring of the running state of the target block chain can be efficiently realized, and the block chain management platform can be timely reported.
Referring to fig. 4, a flowchart of another method for monitoring a blockchain operation status according to an embodiment of the present invention may be performed by a target node device in a blockchain network, where a proxy process of a blockchain management platform is running on the target node device. The method of the embodiment of the invention comprises the following steps.
S401: and accessing data to the block chain process corresponding to the target block chain through the proxy process. For the specific implementation of step S401, reference may be made to the description related to step S301 in the above embodiment, which is not repeated here.
S402: and receiving a first characteristic parameter of a target block chain returned by the block chain process aiming at data access, acquiring a second characteristic parameter of the target block chain on other node equipment in the associated node equipment, and generating state indication data of the target block chain matched with the running state according to the first characteristic parameter and the second characteristic parameter.
In one embodiment, the first characteristic parameter and the second characteristic parameter each include a block height, and a specific implementation manner of generating, by the target node device, the running state indication data of the target blockchain according to the first characteristic parameter and the second characteristic parameter may be: obtaining a difference value between the block height of the target block chain on each node device and the block height of the target block chain on the target node device in other node devices, 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 operates normally on the target node device, and if not, generating state indicating data for indicating that the target block chain operates abnormally on the target node device. The difference threshold is preset based on experimental measurement data and can be an integer greater than 0.
It will be appreciated that because the process of block synchronization in a blockchain takes some time, there may be situations where the corresponding block heights of the target blockchain on the target node device and other node devices are not uniform. If the difference value corresponding to each node device is less than or equal to the difference value threshold value, the fact that the difference between the block heights of the target blockchain on each associated node device is not large can be indicated, the target blockchain can normally operate on the target node device, and accordingly state indication data for indicating that the target blockchain normally operates on the target node device can be generated. If the difference value corresponding to any node device is less than or equal to the difference value threshold, a large difference exists between the block heights of the target blockchain on each associated node device, the target blockchain operates abnormally on the target node device, and accordingly, state indicating data for indicating that the target blockchain operates abnormally on the target node device can be generated.
Before the target node device generates the status indication data for indicating that the target blockchain is running normally on the target node device, the target node device may further acquire a timestamp of the latest block, acquire a target duration of the time indicated by the timestamp from the current time, and trigger to execute the step of generating the status indication data for indicating that the target blockchain is running normally on the target node device if the target duration is less than or equal to a duration threshold.
Or if the target time length is greater than the time length threshold, generating state indicating data for indicating that the target blockchain is abnormally operated on the target node equipment. The time length threshold is determined based on experimental measurement data, for example, the time length threshold can be one week, and in this way, whether a new block is added in a certain time range by the target block chain can be used as a detection basis, so that the running state of the target block chain in the target block chain can be determined.
In one embodiment, the target node device determines whether the difference value corresponding to each node device is less than or equal to a difference threshold, if not, the number of node devices corresponding to the difference value greater than the difference threshold may be obtained, and if the number reaches a percentage threshold of the total number of node devices associated with the target blockchain, status indication data for indicating that the target blockchain is abnormal in operation on the target node device may be generated. Illustratively, assuming that the total number of node devices associated with the target blockchain is 100, the percentage threshold is 0.5%, the target node device determines that the number of corresponding node devices having a difference greater than the difference threshold is 6, which is greater than the percentage of the total number. In this case, the target node device may determine that the target blockchain is operating abnormally on the target node device, and accordingly, status indication data for indicating that the target blockchain is operating abnormally on the target node device may be generated.
Or if the target node device determines that the number of the corresponding node devices with the difference value greater than the difference value threshold is 3 and is smaller than the percentage of the total number, the target node device may determine that the target blockchain operates normally on the target node device, and operate abnormally on 3 node devices with the difference value greater than the difference value threshold.
S403: and acquiring a secret key agreed with the blockchain management platform.
S404: 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 itself. After the node device generates the state indicating data of the target blockchain matched with the running state, a secret key agreed with the blockchain management platform can be obtained, the state indicating data of the target blockchain is encrypted based on the secret key, and the encrypted state indicating data of the target blockchain is returned to the blockchain management platform. After receiving the encrypted state indication data, the blockchain management platform can decrypt the state indication data based on the public key, further determine whether the target blockchain operates normally on the node device based on the decrypted state indication data, and send prompt information for the target blockchain to terminal devices corresponding to target users to which the target blockchain belongs, wherein the prompt information can be used for prompting whether the target blockchain of the target users operates normally on the node device.
In the embodiment of the invention, the target node equipment in the blockchain network can access data to the blockchain process corresponding to the target blockchain through the proxy process, and receive the first characteristic parameter of the target blockchain returned by the blockchain process aiming at the data access, further, the second characteristic parameter of the target blockchain on other node equipment in the associated node equipment can be obtained, the state indication data of the target blockchain is generated according to the first characteristic parameter and the second characteristic parameter, and the state indication data of the target blockchain is returned to the blockchain management platform. In this way, it is advantageous to increase the security of the status indication data during transmission.
Referring to fig. 5, a flowchart of a method for monitoring a blockchain operation status according to an embodiment of the present invention is shown, which may be performed by a blockchain management platform. The method of the embodiment of the invention comprises the following steps.
S501: and receiving state indication data sent by each node device, wherein the state indication data is used for indicating whether the target blockchain normally operates on each node device.
In one embodiment, the blockchain management platform may provide a visual blockchain management interface as shown in fig. 6, for a user to build a blockchain network (i.e., create own blockchains) and manage blockchains running on each node in the blockchain network, including status monitoring, parameter configuration, and the like. After the completion of the establishment of each blockchain network, 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. The generation and reporting of the status indication data can be referred to the related description of the corresponding embodiments of fig. 3 and fig. 4, and will not be repeated here.
S502: and determining target node equipment from the node equipment according to the state indicating data, wherein the target blockchain runs abnormally on the target node equipment.
S503: generating a blockchain state alarm message, and sending the blockchain state alarm message to terminal equipment corresponding to a target user, wherein the blockchain state alarm message comprises an identifier of a target blockchain and an identifier of target node equipment, and the target user is a user corresponding to the target blockchain.
In one embodiment, the status indication data sent by each node device includes a node identifier of the node device and an identifier of the current monitored blockchain, where the status indication data indicates an operation status of the current monitored target blockchain of the node device when the current monitored target blockchain runs on the node device, that is, whether the current monitored target blockchain runs normally on the node device. In this case, the blockchain management platform may analyze the status indication data sent by each node device to determine whether the target blockchain monitored by each node device is operating normally. If it is determined that the target blockchain is abnormal in running on any node device based on the state indication data, the abnormal running of the target blockchain can be determined, further, any node device can be determined to be the target node device, and the identification of the target blockchain and the identification of the target node device can be obtained.
Further, the blockchain management platform may generate a blockchain status alarm message based on the identifier of the target blockchain and the identifier of the target node device, and send the blockchain status alarm message to the terminal device corresponding to the target user, where the blockchain status alarm message is used to prompt the target user that the target blockchain operates abnormally on the target node device. The blockchain status warning message includes an identifier of a target blockchain and an identifier of a target node device, and the target user is a user corresponding to the target blockchain.
It will be appreciated that each blockchain is created by a user through the blockchain management platform, and that the target user may be understood as the user who created the target blockchain.
In the embodiment of the invention, the blockchain management platform can receive the state indication data sent by each node device, determine the target node device from each node device according to the state indication data, generate the blockchain state alarm message and send the blockchain state alarm message to the terminal device corresponding to the target user. By adopting the mode, the blockchain management platform can efficiently monitor the blockchains running on each node device, and output the blockchain state warning message aiming at the target blockchain with abnormal running state to the user, so that the user can conveniently and timely master the running state of the target blockchain.
The embodiment of the present application also provides a computer storage medium having stored therein program instructions for implementing the corresponding method described in the above embodiment when executed.
Referring to fig. 7 again, a schematic structural diagram of a device for monitoring a blockchain running state according to an embodiment of the present application may be provided in a target node device of a blockchain network, where a proxy process of a blockchain management platform runs on the target node device.
In one implementation manner of the device according to the embodiment of the application, the device comprises the following structure.
A data access module 70, configured to perform data access to 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 blockchain returned by the blockchain process for the data access, where the first characteristic parameter includes a blockheight;
A processing module 71, configured to obtain second characteristic parameters of the target blockchain on other node devices in the associated node device, where the second characteristic parameters include a block height;
the processing module 71 is configured to generate status indication data of the target blockchain according to the first feature parameter and the second feature parameter;
a communication module 72 for returning status indication data of the target blockchain to the blockchain management platform, the status indication data being used to indicate whether the target blockchain is operating normally or abnormally on the target node device.
In one embodiment, the processing module 71 is specifically configured to obtain a difference between the block height of the target blockchain on each of the other node devices and the block height of the target blockchain 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 indication data for indicating that the target blockchain normally operates on the target node equipment; if not, generating state indicating data for indicating that the target blockchain is abnormal to run on the target node device.
In one embodiment, the processing module 71 is further configured to obtain a timestamp of the latest block; acquiring a target duration of the time indicated by the timestamp from the current time; and if the target duration is less than or equal to the duration threshold, triggering and executing the step of generating state indicating data for indicating that the target blockchain runs normally on the target node equipment.
In one embodiment, the processing module 71 is further configured to generate status indication data for indicating that the target blockchain is abnormally running on the target node device if the target time period is greater than the time period threshold.
In one embodiment, the processing module 71 is further configured to obtain the number of node devices corresponding to the difference value being greater than the difference threshold; and triggering the step of generating state indicating data for indicating that the target blockchain is abnormal in operation on the target node device if the number reaches a percentage threshold of the total number of node devices associated with the target blockchain.
In one 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 blockchain to the blockchain management platform.
In the embodiment of the present application, the specific implementation of each module may refer to the description of the related content in the embodiment corresponding to each drawing.
Referring to fig. 8 again, a schematic structural diagram of a node device in a blockchain network according to an embodiment of the present application is shown, where a proxy process of a blockchain management platform is running on the node device according to an embodiment of the present application, including a power supply module and other structures, 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 can exchange data, and the processor 801 realizes a function of monitoring the running state of the corresponding blockchain.
The storage device 802 may include volatile memory (RAM), such as 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), etc.; the storage device 802 may also include a combination of the types of memory described above.
The processor 801 may be a central processing unit 801 (central processing unit, CPU). In one embodiment, the processor 801 may also be a graphics processor 801 (Graphics Processing Unit, GPU). The processor 801 may also be a combination of a CPU and a GPU. In the terminal equipment, a plurality of CPUs and GPUs can be included according to requirements to monitor the corresponding blockchain running states. In one embodiment, the storage device 802 is configured to store program instructions. The processor 801 may invoke the program instructions to implement the various methods as referred to above in embodiments of the present application.
In a first possible implementation manner, the processor 801 of the terminal device invokes the program instruction stored in the storage 802, to perform data access, by using the proxy process, to a blockchain process corresponding to a target blockchain, 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 blockchain returned by the blockchain process for the data access, wherein the first characteristic parameter comprises a block height; acquiring second characteristic parameters of the target block chain on other node devices in the associated node device, wherein the second characteristic parameters comprise block heights; and generating state indicating data of the target blockchain according to the first characteristic parameter and the second characteristic parameter, and returning the state indicating data of the target blockchain to the blockchain management platform through a communication interface 803.
In one embodiment, the processor 801 is specifically configured to obtain a difference between a block height of the target blockchain on each of the other node devices and a block height of the target blockchain 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 indication data for indicating that the target blockchain normally operates on the target node equipment; if not, generating state indicating data for indicating that the target blockchain is abnormal to run on the target node device.
In one embodiment, the processor 801 is further configured to obtain a timestamp of the latest block; acquiring a target duration of the time indicated by the timestamp from the current time; and if the target duration is less than or equal to the duration threshold, triggering and executing the step of generating state indicating data for indicating that the target blockchain runs normally on the target node equipment.
In one embodiment, the processor 801 is further configured to generate status indication data for indicating that the target blockchain is abnormally operated on the target node device if the target time period is greater than the time period threshold.
In one embodiment, the processor 801 is further configured to obtain a number of node devices corresponding to the difference value being greater than the difference threshold; and triggering the step of generating state indicating data for indicating that the target blockchain is abnormal in operation on the target node device if the number reaches a percentage threshold of the total number of node devices associated with the target blockchain.
In one 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 state 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 the related content in the embodiment corresponding to the foregoing drawings.
Referring to fig. 9, a schematic structural diagram of another blockchain operation status monitoring device according to an embodiment of the present application may be provided with a blockchain management platform, where the blockchain management platform may refer to a server and a server group for providing a blockchain management service.
In one implementation manner of the device according to the embodiment of the application, the device comprises 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 blockchain 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 blockchain is abnormal in operation;
the processing module 91 is further configured to generate a blockchain status alert message, where the blockchain status alert message includes an identifier of the target blockchain and an identifier of the target node device;
The communication module 90 is further configured to send the blockchain status alert message to a terminal device corresponding to a target user, where the target user is a user corresponding to the target blockchain.
In the embodiment of the present application, the specific implementation of each module may refer to the description of the related content in the embodiment corresponding to each drawing.
Referring to fig. 10 again, a schematic structural diagram of a blockchain management platform according to an embodiment of the application includes a power module and other structures, and includes a processor 110, a storage device 111, and a communication interface 112. The processor 110, the storage device 111 and the communication interface 112 may exchange data, and the processor 110 may implement a function of monitoring the running state of the corresponding blockchain.
The storage 111 may include a volatile memory (RAM), such as a random-access memory (RAM); the storage device 111 may also include a nonvolatile memory (non-volatile memory), such as a flash memory (flash memory), a Solid State Drive (SSD), and 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 110 (central processing unit, CPU). In one embodiment, the processor 110 may also be a graphics processor 110 (Graphics Processing Unit, GPU). The processor 110 may also be a combination of a CPU and a GPU. In the terminal equipment, a plurality of CPUs and GPUs can be included according to requirements to monitor the corresponding blockchain running states. In one embodiment, the storage device 111 is configured to store program instructions. The processor 110 may invoke the program instructions to implement the various methods as referred to above in embodiments of the present application.
In a first possible implementation manner, the processor 110 of the terminal device invokes program instructions stored in the storage 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 blockchain is operating normally on the each node device, and determine, according to the status indication data, a target node device from the each node device, where the target blockchain is operating abnormally; generating a blockchain state warning message, and sending the blockchain state warning message to a terminal device corresponding to a target user through a communication interface 112, wherein the blockchain state warning message comprises an identifier of the target blockchain and an identifier of the target node, and the target user is a user corresponding to the target blockchain.
In the embodiment of the present application, the specific implementation of the processor 110 may refer to the description of the related content in the embodiment corresponding to the foregoing drawings.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored on a computer readable storage medium, which when executed may comprise the steps 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 (Random Access Memory, RAM), or the like.
The above disclosure is only a few examples of the present application, and it is not intended to limit the scope of the claims, and those skilled in the art will understand that all or a portion of the above embodiments may be implemented and equivalents may be modified according to the claims of the present application.

Claims (10)

1. A method for monitoring a blockchain operation state, the method being applied to a target node device in a blockchain network, the target node device running a proxy process of a blockchain management platform, the method comprising:
performing data access on a blockchain process corresponding to a target blockchain through the proxy process, wherein the target blockchain is any one of at least one blockchain running on target node equipment, and the target node equipment is any one of node equipment associated with the target blockchain;
receiving a first characteristic parameter of the target blockchain returned by the blockchain process for the data access, wherein the first characteristic parameter comprises a block height;
acquiring second characteristic parameters of the target block chain on other node devices in the associated node device, wherein the second characteristic parameters comprise block heights;
And generating state indicating data of the target blockchain according to the first characteristic parameter and the second characteristic parameter, and returning the state indicating data of the target blockchain to the blockchain management platform, wherein the state indicating data is used for indicating that the target blockchain runs normally or abnormally on the target node equipment.
2. The method of claim 1, wherein the generating the operational status indication data of the target blockchain from the first and second characteristic parameters comprises:
acquiring a difference value between the block height of the target block chain on each of 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 indication data for indicating that the target blockchain normally operates on the target node equipment;
if not, generating state indicating data for indicating that the target blockchain is abnormal to run on the target node device.
3. The method of claim 2, wherein prior to generating status indication data for indicating that the target blockchain is operating properly on the target node device, the method further comprises:
Acquiring a time stamp of the latest block;
acquiring a target duration of the time indicated by the timestamp from the current time;
and if the target duration is less than or equal to the duration threshold, triggering and executing the step of generating state indicating data for indicating that the target blockchain runs normally on the target node equipment.
4. A method according to claim 3, characterized in that the method further comprises:
and if the target time length is greater than the time length threshold, generating state indicating data for indicating that the target blockchain is abnormally operated 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 abnormally on the target node device, the method further comprises:
acquiring the number of corresponding node devices with the difference value larger than the difference value threshold;
and triggering the step of generating state indicating data for indicating that the target blockchain is abnormal in operation on the target node device if the number reaches a percentage threshold of the total number of node devices associated with the target blockchain.
6. The method of any of claims 1-5, wherein the returning status indication data of the target blockchain to the blockchain management platform comprises:
acquiring a secret key agreed with the blockchain management platform, and encrypting the state indication data of the target blockchain based on the secret key;
and returning the encrypted state indicating data of the target blockchain to the blockchain management platform.
7. A method for monitoring a blockchain operation state, wherein the method is applied to a blockchain management platform, and the method comprises:
receiving state indication data sent by each node device, wherein the state indication data are used for indicating whether a target blockchain normally operates on each node device, the state indication data are generated by the node device according to first characteristic parameters and second characteristic parameters of the target blockchain, the first characteristic parameters are obtained by the node device through data access of a blockchain process corresponding to the target blockchain by a proxy process, the first characteristic parameters comprise block heights, and the second characteristic parameters comprise the block heights of the target blockchain on other node devices associated with the target blockchain;
Determining target node equipment from the node equipment according to the state indication data, wherein the target blockchain runs abnormally on the target node equipment;
generating a blockchain state alarm message, and sending the blockchain state alarm message to terminal equipment corresponding to a target user, wherein the blockchain state alarm message comprises an identifier of the target blockchain and an identifier of the target node equipment, and the target user is the user corresponding to the target blockchain.
8. A device for monitoring a blockchain operation state, the device being configured in a target node device in a blockchain network, the target node device running a proxy process of a blockchain management platform, the device comprising:
the data access module is used for performing data access on a blockchain process corresponding to a target blockchain through the proxy process, wherein the target blockchain is any one of at least one blockchain running on target node equipment, and the target node equipment is any one of node equipment associated with the target blockchain;
the data access module is further configured to receive a first characteristic parameter of the target blockchain returned by the blockchain process for the data access, where the first characteristic parameter includes a block height;
The processing module is used for acquiring second characteristic parameters of the target block chain on other node equipment in the associated node equipment, wherein the second characteristic parameters comprise block heights;
the processing module is further used for generating 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 state indicating data of the target blockchain to the blockchain management platform, wherein the state indicating data is used for indicating that the target blockchain is normal or abnormal in operation on the target node equipment.
9. A device for monitoring a state of operation of a blockchain, the device being configured on a blockchain management platform, the device comprising:
the communication module is used for receiving state indication data sent by each node device, wherein the state indication data are used for indicating whether a target blockchain normally operates on each node device, the state indication data are generated by the node device according to first characteristic parameters and second characteristic parameters of the target blockchain, the first characteristic parameters are obtained by the node device through data access of a blockchain process corresponding to the target blockchain by a proxy process, the first characteristic parameters comprise the block heights, and the second characteristic parameters comprise the block heights of the target blockchain on other node devices related to the target blockchain;
The processing module is used for determining target node equipment from the node equipment according to the state indication data, and the target blockchain runs abnormally on the target node equipment;
the processing module is further configured to generate a blockchain status alert message, where the blockchain status alert message includes an identifier of the target blockchain and an identifier of the target node;
the communication module is further configured to send the blockchain status alert message to a terminal device corresponding to a target user, where the target user is a user corresponding to the target blockchain.
10. A computer storage medium having stored therein program instructions which, when executed, are adapted to carry out the method of any one of claims 1-7.
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 CN111464393A (en) 2020-07-28
CN111464393B true 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)

Families Citing this family (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
US11575499B2 (en) * 2020-12-02 2023-02-07 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

Also Published As

Publication number Publication date
CN111464393A (en) 2020-07-28

Similar Documents

Publication Publication Date Title
CN111464393B (en) Block chain running state monitoring method, device and storage medium
JP2019009772A (en) Use of block chain to track information for devices on network
CN107145802A (en) A kind of BIOS integrity measurement methods, baseboard management controller and system
CN110908812B (en) Service data processing method, device, readable storage medium and computer equipment
CN113507480B (en) Network equipment, gateway equipment and system and inter-network data transmission and reporting method
CN108845916A (en) Platform monitoring and alarm method, device, equipment and computer readable storage medium
CN116305290A (en) System log security detection method and device, electronic equipment and storage medium
CN110086789B (en) Data transmission method, device, equipment and medium
CN115459919A (en) Internet of things universal terminal security authentication system, method and device and Internet of things communication terminal
CN112559236B (en) Fault detection method and device for encryption operation processor chip
CN113938483A (en) Node identity verification method and system of distributed AI (Artificial Intelligence) collaborative computing system
CN116319080B (en) Safe operation method and device for electric power nano relay
CN110519287B (en) Information management method and related equipment
CN113507691B (en) Information pushing system and method based on power distribution network cross-region service
CN117033421A (en) Vehicle fault analysis method, device, equipment, medium and product
CN115981956A (en) SPDK service process monitoring method, device, equipment, storage medium and program product
CN114189515B (en) SGX-based server cluster log acquisition method and device
CN105554134A (en) Information synchronization and device
CN110928564B (en) Method for safely updating application, service server, cluster and storage medium
CN114065301A (en) Clock environment credibility verification method, device, equipment and storage medium
CN111258860B (en) Data alarm method, device, computer equipment and storage medium
CN112468454A (en) Remote file management system and remote file management method thereof
CN113221151A (en) Data processing method and device based on block chain and storage medium
CN103684868B (en) Data guard method and device
CN110888663A (en) Application updating method, service server, transfer server, cluster and storage medium

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