CN110324174B - Block chain environment detection method, equipment, device and storage medium - Google Patents

Block chain environment detection method, equipment, device and storage medium Download PDF

Info

Publication number
CN110324174B
CN110324174B CN201910438264.8A CN201910438264A CN110324174B CN 110324174 B CN110324174 B CN 110324174B CN 201910438264 A CN201910438264 A CN 201910438264A CN 110324174 B CN110324174 B CN 110324174B
Authority
CN
China
Prior art keywords
deployment
node
configuration information
network
detection
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
CN201910438264.8A
Other languages
Chinese (zh)
Other versions
CN110324174A (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.)
OneConnect Financial Technology Co Ltd Shanghai
Original Assignee
OneConnect Financial Technology Co Ltd Shanghai
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 OneConnect Financial Technology Co Ltd Shanghai filed Critical OneConnect Financial Technology Co Ltd Shanghai
Priority to CN201910438264.8A priority Critical patent/CN110324174B/en
Publication of CN110324174A publication Critical patent/CN110324174A/en
Priority to PCT/CN2019/122013 priority patent/WO2020233073A1/en
Application granted granted Critical
Publication of CN110324174B publication Critical patent/CN110324174B/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
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0889Techniques to speed-up the configuration process
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Landscapes

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

Abstract

The invention relates to the technical field of block chains, and discloses a block chain environment detection method, equipment, a device and a storage medium. The method comprises the steps of firstly, acquiring node configuration information of all network nodes in a block chain network to be constructed; inquiring in a preset deployment mechanism table to obtain a deployment detection standard corresponding to the node configuration information of each network node; finally, judging whether all the node configuration information meets the deployment detection standard corresponding to each node configuration information; when all the node configuration information conforms to the deployment detection standard corresponding to each node, generating deployment normal information; and when the node configuration information is detected to be not in accordance with the corresponding deployment detection standard, generating deployment abnormal information. According to the invention, the building condition of the block chain environment is detected, the block chain network is prevented from being redeployed due to the abnormal environment, and the deployment efficiency of the block chain network is further improved.

Description

Block chain environment detection method, equipment, device and storage medium
Technical Field
The present invention relates to the field of blockchain technologies, and in particular, to a method, an apparatus, a device, and a storage medium for detecting a blockchain environment.
Background
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism and an encryption algorithm. The method is essentially a decentralized database, all nodes from a network to a block chain network are associated by a string of cryptography methods to generate data blocks in a decentralized and distrust-removing mode, each data block contains all information exchange data of the current block chain network, and the next data block is connected in a network routing mode.
In the blockchain technology, each user represents a network node, and before the blockchain technology is utilized, a blockchain network environment needs to be deployed according to the condition of each network node so as to meet the operation requirement of the blockchain network. However, the number of network nodes in the blockchain network is large, and each node is distributed in different network environments, if the blockchain environment is deployed abnormally, links between nodes are not opened, network nodes are abnormal, and message middleware is abnormal, and the blockchain environment needs to be rebuilt, so that the deployment efficiency of the blockchain network is reduced.
Disclosure of Invention
The invention mainly aims to provide a block chain environment detection method, equipment, a device and a storage medium, and aims to solve the technical problem that the deployment efficiency of a block chain network is too low in the prior art.
In order to achieve the above object, the present invention provides a block link environment detecting method, including the steps of:
acquiring node configuration information of all network nodes in a block chain network to be constructed;
inquiring deployment detection standards corresponding to the node configuration information of each network node in a preset deployment mechanism table;
judging whether all the node configuration information meets the deployment detection standards corresponding to the node configuration information;
when all the node configuration information conforms to the deployment detection standard corresponding to each node, generating deployment normal information;
and when detecting that the node configuration information does not accord with the corresponding deployment detection standard, generating deployment abnormal information.
Optionally, the step of querying, in the preset deployment mechanism table, a deployment detection standard corresponding to the node configuration information of each network node includes:
determining node types of all network nodes according to the node configuration information, and inquiring deployment detection standards corresponding to the node types in a preset deployment mechanism table;
the step of judging whether all the node configuration information conforms to the deployment detection standard corresponding to each node configuration information comprises the following steps:
if the network node is an endorsement node, judging whether a mirror image file in a node configuration file of the endorsement node is a Fabric mirror image;
the step of generating deployment exception information when it is detected that the existing node configuration information does not meet the deployment detection standard corresponding thereto includes:
and when the image file is not a Fabric image, generating abnormal image information.
Optionally, the step of determining whether all the node configuration information conforms to the deployment detection standard corresponding to each node configuration information further includes:
running a secret-free detection script to verify the secret-free login state of all network nodes;
the step of generating deployment exception information when it is detected that the existing node configuration information does not meet the deployment detection standard corresponding thereto includes:
and when the password-free state information is that the password-free login is not activated, generating password-free function abnormal information.
Optionally, the step of determining whether all the node configuration information conforms to the deployment detection standard corresponding to each node configuration information further includes:
sending communication test signals to all network nodes to detect the network connection states of all the network nodes;
the step of generating deployment exception information when it is detected that the existing node configuration information does not meet the deployment detection standard corresponding thereto includes:
when there is network congestion of at least one network node, network anomaly information is generated.
Optionally, the step of determining whether all the node configuration information conforms to the deployment detection standard corresponding to each node configuration information further includes:
acquiring system versions in all node configuration information, and judging whether the system versions meet corresponding deployment detection standards;
the step of generating deployment exception information when it is detected that the existing node configuration information does not meet the deployment detection standard corresponding thereto includes:
and when the system version of at least one network node is lower than Linux 7.0, generating version exception information.
Optionally, the step of determining whether all the node configuration information conforms to the deployment detection standard corresponding to each node configuration information further includes:
sending a channel detection instruction to a to-be-constructed block chain network to detect whether the block chain network can create a message channel or not, and receiving a corresponding detection result;
the step of generating deployment exception information when it is detected that the existing node configuration information does not meet the deployment detection standard corresponding thereto includes:
and when the detection result is that the establishment fails, generating channel abnormal information.
Optionally, the step of sending a channel detection instruction to the to-be-constructed blockchain network to detect whether the blockchain network can create a message channel, and receiving a corresponding detection result includes:
sending a channel detection instruction to a block chain network to be constructed so as to select any network node to link Kafka service and control the network node to create a corresponding message queue;
and sending a detection signal to the Kafka service to detect whether the message queue created by the network node is stored in the Kafka service, and receiving a corresponding detection result.
In addition, to achieve the above object, the present invention also provides a block chain environment detecting apparatus, including: the system comprises a first acquisition module, a second acquisition module and an environment detection module;
the first acquisition module is used for acquiring node configuration information of all network nodes in a block chain network to be constructed;
the second obtaining module is used for inquiring deployment detection standards corresponding to the node configuration information of each network node in a preset deployment mechanism table;
the environment detection module is used for judging whether all the node configuration information meets the deployment detection standard corresponding to each node configuration information;
the environment detection module is further configured to generate deployment normal information when all the node configuration information conforms to the deployment detection standard corresponding to each node configuration information;
the environment detection module is further configured to generate deployment exception information when it is detected that the node configuration information does not meet the deployment detection standard corresponding thereto.
In addition, to achieve the above object, the present invention further provides a tile link environment detecting apparatus, including: a memory, a processor and a blockchain environment detection program stored on the memory and executable on the processor, the blockchain environment detection program being configured to implement the steps of the blockchain environment detection method as described above.
In addition, to achieve the above object, the present invention further provides a storage medium having a blockchain environment detection program stored thereon, wherein the blockchain environment detection program, when executed by a processor, implements the steps of the blockchain environment detection method as described above.
The invention provides a block chain environment detection method, which comprises the steps of firstly, acquiring node configuration information of all network nodes in a block chain network to be constructed; and then, inquiring in a preset deployment mechanism table to obtain a deployment detection standard corresponding to each node configuration information, and then judging whether all the node configuration information accords with the respective corresponding deployment detection standard to decide whether to generate normal deployment information or abnormal deployment information. According to the method, before the block chain network is formally operated, the environmental deployment of the block chain is detected, so that the situation that the deployment of the whole block chain network is interrupted or needs to be redeployed due to the abnormal block chain environment is avoided, and the deployment efficiency of the block chain network is improved; in addition, the node configuration information of each network node corresponds to different deployment detection standards, so that the accuracy of the environment deployment detection result is further improved.
Drawings
FIG. 1 is a schematic diagram of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for environment detection of tiles according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a method for environmental testing of tiles according to another embodiment of the present invention;
FIG. 4 is a flowchart illustrating a method for environmental testing of tiles according to another embodiment of the present invention;
fig. 5 is a detailed flowchart of the steps of sending a channel detection command to a blockchain network to be constructed in the blockchain environment detection method according to the present invention;
fig. 6 is a block diagram of a block-link environment detecting apparatus according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a device for detecting a blockchain environment of a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the apparatus may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the configuration shown in fig. 1 is not intended to be limiting of the devices described above and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, the memory 1005, which is a storage medium, may include therein an operating system, a data storage module, a network communication module, a user interface module, and a blockchain context detection program.
In the apparatus shown in fig. 1, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 of the apparatus according to the present invention may be disposed in the apparatus, and the apparatus calls the blockchain environment detection program stored in the memory 1005 through the processor 1001 and executes the blockchain environment detection method provided by the embodiment of the present invention.
Referring to fig. 2, fig. 2 is a flowchart illustrating an exemplary embodiment of a method for testing a chain environment of a block according to the present invention.
In this embodiment, the method includes the steps of:
step S10, acquiring node configuration information of all network nodes in a block chain network to be constructed;
in the block chain network, a plurality of network nodes are included, and one network node represents one participating member, in this embodiment, after the block chain network environment is built and before the block chain network is formally operated, node configuration information of all network nodes in the block chain network to be built is obtained, and it is easy to understand that the node configuration information of the network nodes includes a node type, a node address and a node identifier of a current network node. A node type for classifying the network nodes according to the role of the network nodes; a node address for locating a network node for facilitating data transmission in a block chain; and the node identifier is used for distinguishing each network node.
Step S20, inquiring deployment detection standards corresponding to the node configuration information of each network node in a preset deployment mechanism table;
in this embodiment, a deployment mechanism table is preset, a mapping relationship between the node configuration information and the deployment detection standards is stored in the deployment mechanism table, and the node configuration information of each network node is queried in the preset deployment mechanism table to obtain a plurality of deployment detection standards. It should be understood that each network node plays a different role in the whole blockchain, and the corresponding node configuration information is also different, and the node configuration information at least includes the system version, the application registry and the image file of the current node. In addition, different deployment detection standards are preset for different network nodes, so that the accuracy of the block chain environment detection is improved, and the subsequent abnormal application of the block chain technology caused by the reason that the block chain environment deployment detection is not in place is avoided.
Step S30, judging whether all the node configuration information accords with the deployment detection standard corresponding to each node configuration information;
after obtaining a plurality of deployment detection standards, matching the node configuration information of all network nodes with the respective corresponding deployment detection standards, and judging whether the environment configuration of the network nodes meets a preset rule, wherein the deployment detection standards at least comprise a system version standard, an application software standard and a mirror image file standard. In order to ensure normal operation of the blockchain network, the environment configuration of all network nodes needs to be detected, so as to improve the accuracy of environment deployment detection.
Step S40, generating normal deployment information when all the node configuration information conforms to the deployment detection standard corresponding to each node configuration information;
in this embodiment, when all the network node configuration information conforms to the deployment detection standard corresponding to each network node configuration information, the environment deployment representing the block chain conforms to the predetermined acceptance standard, and in this environment, the block chain can be used by the participating user normally or for further function development, so that deployment normal information is generated to remind the developer to enter the next stage of development. It is noted that, since the block chain is a distributed book in nature, it has a decentralization feature, that is, all participants can become centers, and therefore, only if all network nodes in the block chain meet the deployment detection standard, other components can be deployed or directly operated on the block chain.
Step S50, when detecting that the node configuration information does not accord with the corresponding deployment detection standard, generating deployment abnormity information.
In this embodiment, when it is detected that the node configuration information of the network node does not meet the corresponding deployment detection standard, it indicates that the environmental deployment of the network node is abnormal, and if the environment is not reestablished, the operation of the whole blockchain network is affected. At the moment, deployment abnormity information is generated, the deployment abnormity information records the reason of the deployment abnormity and the position of the network node with the deployment abnormity, and the deployment abnormity information is fed back, so that developers can build the block chain environment again according to the deployment abnormity information, and the deployment efficiency of the block chain network is improved.
The embodiment provides a block link environment detection method, which includes acquiring node configuration information of all network nodes in a block link network to be constructed, querying in a preset deployment mechanism table to obtain deployment detection standards corresponding to the node configuration information, and then determining whether all the node configuration information meets the respective deployment detection standards to determine whether normal deployment information or abnormal deployment information is generated. According to the method and the device, before the block chain is deployed comprehensively, the environment building of the block chain is detected, the situation that the deployment of the whole block chain network is interrupted or needs to be redeployed due to the abnormal block chain environment is avoided, and therefore the deployment efficiency of the block chain network is improved.
Further, referring to fig. 3, fig. 3 is a flowchart illustrating a block-link environment detection method according to another embodiment of the present invention, wherein the step of querying the deployment detection criteria corresponding to the node configuration information of each network node in the preset deployment mechanism table includes:
step S21, determining the node types of all network nodes according to the node configuration information, and inquiring the deployment detection standard corresponding to the node types in a preset deployment mechanism table;
in this embodiment, since the node configuration information includes the node types, the node types of all the network nodes can be determined, and the network nodes can be divided into a consensus node for performing consensus processing on a transaction, an endorsement node for performing endorsement processing on an initiated transaction, and a transaction node for converting an external request into a blockchain transaction request according to different roles of the network nodes in a blockchain. It should be understood that the node types of the network nodes are not limited to the above 3 kinds of nodes. Similarly, the node configuration information corresponds to the node type, and the node configuration information of the nodes belonging to the same type is also consistent. In addition, a deployment mechanism table is preset in this embodiment, and the deployment mechanism table reflects a mapping relationship between the node configuration information and the deployment detection standard, so that the deployment detection standard corresponding to the node configuration information can be obtained by querying in the preset deployment mechanism table in a manner of determining the node type.
In this embodiment, node configuration information of a network node is obtained first, where the node configuration information includes a node type, and since configuration information of network nodes of the same node type is consistent, the node type of the network node may be determined, and then a deployment detection standard corresponding to the type is obtained from a preset deployment mechanism table. By the aid of the method, detection accuracy of block-link environment deployment is improved.
The step of judging whether all the node configuration information conforms to the deployment detection standard corresponding to each node configuration information comprises the following steps:
step S31, if the network node is an endorsement node, judging whether the mirror image file in the node configuration file of the endorsement node is a Fabric mirror image;
particularly, after the node type of the network node is determined, if the network node is an endorsement node, the image file in the node configuration information of the endorsement node is obtained, it is easily understood that the image file is all basic images currently installed by the network node, and whether the obtained image file includes a Fabric-peer image, a Fabric-ccenv image and a Fabric-baseos image is judged, and the aggregate of the three images is the Fabric image.
The step of generating deployment exception information when it is detected that the existing node configuration information does not meet the deployment detection standard corresponding thereto includes:
and step S41, when the image file is not the Fabric image, generating image exception information.
When the image file in the endorsement node does not comprise the Fabric image, the abnormal image information is generated if the abnormal image file indicates that the environment configuration of the endorsement node is abnormal, the abnormal image information comprises the reason of the abnormal environment deployment and the node address of the fault node, and developers can conveniently rebuild the block chain environment according to the abnormal image information, so that the redeployment of the whole block chain caused by the abnormal environment of the block chain in the follow-up process is avoided, and the block chain deployment efficiency is improved.
Further, the step of determining whether all the node configuration information meets the deployment detection standard corresponding to each node configuration information further includes:
step S32, operating a secret-free detection script to verify the secret-free login state of all network nodes;
in this embodiment, a developer edits the secret-free detection script in advance, and after acquiring the node deployment information of all the network nodes, runs the secret-free detection script to detect whether all the network nodes start the secret-free login function. After the network node starts the secret-free login function, the network node can participate in the block chain through the node address or the node name, the identity of the network node does not need to be verified in a verification key mode through the block chain, and the efficiency of data transmission of the block chain is improved through starting the secret-free login function through the block chain network.
The secret-free login function is used as a commonly used technical means in the block chain technology, and the building condition of the block chain environment is evaluated according to the opening state of the secret-free login function, so that the comprehensiveness of environment deployment is ensured, and the comprehensive deployment or direct operation of a subsequent block chain network is further ensured.
The step of generating deployment exception information when it is detected that the existing node configuration information does not meet the deployment detection standard corresponding thereto includes:
step S52, when the secret-free status information is that the secret-free login is not activated, generating secret-free abnormal function information.
When the secret-free login function of at least one network node is not started, secret-free state information with the content of secret-free login inactivated is generated, the fact that the network node with the secret-free login function not started exists in the current environment of the block chain is proved to be inconsistent with the block chain environment pre-imagined by developers, the operation of the block chain is affected, and then secret-free function abnormal information is fed back, so that the developers can adjust the block chain environment in time.
It can be understood that when the secret login free function of all network nodes is in an open state, the secret login free function represents that all network nodes in the blockchain participate in a secret login free state, and the condition accords with the blockchain environment pre-assumed by developers.
Further, the step of determining whether all the node configuration information meets the deployment detection standard corresponding to each node configuration information further includes:
step S33, sending communication test signals to all network nodes to detect the network connection state of all network nodes;
in this embodiment, after the node configuration information of all network nodes is acquired, a communication test signal is sent to all network nodes to detect a network connection state between each network node.
Specifically, the communication test signal may be a signal related to sending an ICMP protocol, and whether an IP address of each network node is correct is tested by sending the ICMP protocol to each network node; the communication test signal can also be a relevant signal for sending a DNS protocol, and whether the domain name of each network node is correct or not is tested by sending the DNS protocol to each network node; the communication test signal can also be a routing instruction, and the network connection state of the network node is determined in a route tracking mode by sending the routing instruction to all the network nodes.
It is easy to understand that the server address and the network port of each network node in the blockchain are normally connected, which is the basis for the network node to perform information interaction in the blockchain. In this embodiment, the network connection state of the network node is detected in the above manner, and the carrying condition of the blockchain environment is evaluated, so that the deployment efficiency of the blockchain is improved.
The step of generating deployment exception information when it is detected that the existing node configuration information does not meet the deployment detection standard corresponding thereto includes:
and step S53, when the network of at least one network node is blocked, generating network abnormal information.
When at least one network node cannot feed back a corresponding network state according to the communication test signal, it is proved that the network node which cannot perform communication interaction exists in the block chain, and the block chain environment which is not supposed by a developer in advance is not met, so that the operation of the block chain is influenced. And feeding back the network abnormal information so that a developer can timely overhaul the network condition of the block chain according to the network abnormal information.
It can be deduced that when the network connections of all network nodes are smooth, it is proved that the communication between all network nodes in the block chain can be realized, and at this time, the block chain environment assumed by developers in advance is met.
Further, the step of determining whether all the node configuration information meets the deployment detection standard corresponding to each node configuration information further includes:
step S34, obtaining system versions in all node configuration information, and judging whether the system versions meet corresponding deployment detection standards;
and acquiring the system version in the node configuration information of each network node, and judging whether the system version meets the corresponding deployment detection standard or not in a mode of acquiring the system version. Of course, the present embodiment does not limit the determination of the system version only by the system version number.
The step of generating deployment exception information when it is detected that the existing node configuration information does not meet the deployment detection standard corresponding thereto includes:
and step S54, when the system version of at least one network node is lower than Linux 7.0, generating version abnormal information.
Specifically, in order to enable each network node to participate in the blockchain network, the system version installed on each network node needs to be more than a Centos Linux 7.0 version, and when the system version of at least one network node does not meet the requirement, version exception information is generated so that a developer can update the system version of the failed node according to the version exception information.
Optionally, in addition to the requirement that the system version of the network node in this embodiment conforms to the deployment detection standard, the application software installed in each network node also conforms to the deployment detection standard, and all network nodes also need to install two third party software, i.e., Docker complex and Python3, to conform to the requirement of building the blockchain environment.
It is easy to understand that if a network node wants to participate in a blockchain, the system and application software configured for the network node need to meet the environment deployment standard of the blockchain.
Further, referring to fig. 4, fig. 4 is a schematic flowchart illustrating a block link environment detection method according to another embodiment of the present invention, wherein the step of determining whether all node configuration information meets the deployment detection criteria further includes:
step S35, sending a channel detection instruction to a to-be-constructed blockchain network to detect whether the blockchain network can create a message channel, and receiving a corresponding detection result;
it should be understood that if the blockchain environment is not deployed in place, normal communication between network nodes is not possible, which may cause an exception to message middleware as a communication carrier in the blockchain. Therefore, to enable the blockchain to operate normally, it is further required to detect whether channels of each network node in the blockchain network are normal, and in the blockchain, the network node generally includes a system channel, an application channel, and a message channel.
In the method of detecting the system channel and the application channel, the access right of each network node needs to be detected first, whether the access right of each network node meets the preset requirement is judged, and the storage space of the hard disk used for storing node data of each network node is detected.
In this embodiment, whether a channel of a network node in a blockchain network is abnormal is determined by detecting whether a blockchain can create a message channel, and then the building condition of a blockchain environment is evaluated, so that the deployment efficiency of the blockchain is improved. When the blockchain can create the message channel, the received content is a detection result of successful creation, and when the blockchain can not create the message channel, the received content is a detection result of failed creation.
The step of generating deployment exception information when it is detected that the existing node configuration information does not meet the deployment detection standard corresponding thereto includes:
and step S55, when the detection result is that the creation is failed, generating channel abnormal information.
And when the received detection result is that the creation fails, namely the received detection result represents that the block chain network cannot create the message channel, and each network node cannot process messages with each other, generating corresponding channel abnormal information so that a developer modifies the message middleware in the block chain network according to the channel abnormal information to perfect the block chain environment.
It is easy to understand that when the received detection result is that the creation is successful, that is, the blockchain network can normally create the message channel on behalf of the blockchain network, and data communication between the network nodes is realized.
Further, referring to fig. 5, fig. 5 is a detailed schematic view of a flow of the step of sending the channel detection instruction to the to-be-constructed blockchain network in the blockchain environment detection method of the present invention, where the step of sending the channel detection instruction to the to-be-constructed blockchain network to detect whether the blockchain network can create the message channel and receive the corresponding detection result includes:
step S351, sending a channel detection instruction to a block chain network to be constructed so as to select any network node to link Kafka service and control the network node to create a corresponding message queue;
it should be understood that, in this embodiment, a specific way for detecting whether the blockchain network can create the message channel is to send a channel detection instruction to the blockchain network to be constructed, and select any network node to link the Kafka service according to the channel detection instruction. Kafka is an open source stream processing platform developed by the Apache software foundation, written in Scala and Java. Kafka is a high-throughput distributed publish-subscribe messaging system that can handle all the action flow data in a consumer-scale website. The Kafka message middleware mainly comprises a producer, an agent and a consumer, wherein the producer issues a message, the agent forwards the message from the producer to the consumer, and the consumer receives and processes the message. The selected network node in the embodiment is equivalent to a publisher, the created message is stored in the linked Kafka in a queue form, and whether the block chain can normally create the message channel is detected by testing the message queue in the Kafka. The scheme is a supplementary detection mode for the block chain environment, and the block chain environment is comprehensively detected, so that the situation that the block chain is interrupted in the deployment process due to environmental abnormality is avoided.
Step S352 sends a detection signal to the Kafka service to detect whether the message queue created by the network node is stored in the Kafka service, and receives a corresponding detection result.
In this embodiment, after the selected network node is linked to the Kafka service, a detection signal is sent to the Kafka service to detect whether the Kafka stores a message queue sent by the network node, and a corresponding detection result is received to evaluate whether the blockchain message middleware is in an abnormal state.
When the Kafka is not tested to store the message queue sent by the selected network node, that is, the network node cannot generate the message in the block chain is represented, and the message channel in the block chain environment has an exception.
Further, when it is tested that the Kafka stores the message queue sent by the selected network node, the message channel in the block chain environment can be normally created.
Referring to fig. 6, fig. 6 is a block diagram illustrating an exemplary environment detection apparatus according to the present invention.
As shown in fig. 6, the block link environment detecting apparatus according to the embodiment of the present invention further includes: a first obtaining module 601, a second obtaining module 602, and an environment detecting module 603;
the first obtaining module 601 is configured to obtain node configuration information of all network nodes in a block chain network to be constructed;
the second obtaining module 602 is configured to query, in a preset deployment mechanism table, deployment detection criteria corresponding to node configuration information of each network node;
the environment detection module 603 is configured to determine whether all the node configuration information meets respective deployment detection standards;
the environment detection module 603 is further configured to generate deployment normal information when all the node configuration information conforms to the deployment detection standard corresponding to each node configuration information;
the environment detecting module 603 is further configured to generate deployment exception information when detecting that the node configuration information does not meet the deployment detection standard corresponding thereto.
The method comprises the steps of firstly, acquiring node configuration information of all network nodes in a block chain network to be constructed; inquiring in a preset deployment mechanism table to obtain a deployment detection standard corresponding to the node configuration information of each network node; finally, judging whether all the node configuration information meets the deployment detection standard corresponding to each node configuration information; when all the node configuration information conforms to the deployment detection standard corresponding to each node, generating deployment normal information; and when the node configuration information is detected to be not in accordance with the corresponding deployment detection standard, generating deployment abnormal information. By the method, before the block chain network is formally operated, the environment deployment of the block chain is detected, and the block chain network is prevented from being redeployed due to environment abnormity, so that the deployment efficiency of the block chain network is improved.
Other embodiments or specific implementations of the environment detection device of the invention may refer to the above method embodiments, and are not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (9)

1. A method for environment detection in a block, the method comprising:
acquiring node configuration information of all network nodes in a block chain network to be constructed;
inquiring deployment detection standards corresponding to the node configuration information of each network node in a preset deployment mechanism table;
judging whether all the node configuration information meets the deployment detection standards corresponding to the node configuration information;
when all the node configuration information conforms to the deployment detection standard corresponding to each node, generating deployment normal information;
when detecting that the node configuration information does not accord with the corresponding deployment detection standard, generating deployment abnormal information;
the node configuration information includes a node type, and the step of querying the deployment detection standard corresponding to the node configuration information of each network node in the preset deployment mechanism table includes:
determining node types of all network nodes according to the node configuration information, and inquiring deployment detection standards corresponding to the node types in a preset deployment mechanism table;
the step of judging whether all the node configuration information conforms to the deployment detection standard corresponding to each node configuration information comprises the following steps:
if the network node is an endorsement node, judging whether a mirror image file in a node configuration file of the endorsement node is a Fabric mirror image;
the step of generating deployment exception information when it is detected that the existing node configuration information does not meet the deployment detection standard corresponding thereto includes:
and when the image file is not a Fabric image, generating abnormal image information.
2. The method of claim 1, wherein the step of determining whether all of the node configuration information meets the deployment detection criteria further comprises:
running a secret-free detection script to verify the secret-free login state of all network nodes;
the step of generating deployment exception information when it is detected that the existing node configuration information does not meet the deployment detection standard corresponding thereto includes:
and when the password-free state information is that the password-free login is not activated, generating password-free function abnormal information.
3. The method according to claim 1 or 2, wherein the step of determining whether all the node configuration information conforms to the deployment detection criteria further comprises:
sending communication test signals to all network nodes to detect the network connection states of all the network nodes;
the step of generating deployment exception information when it is detected that the existing node configuration information does not meet the deployment detection standard corresponding thereto includes:
when there is network congestion of at least one network node, network anomaly information is generated.
4. The method according to claim 1 or 2, wherein the step of determining whether all the node configuration information conforms to the deployment detection criteria further comprises:
acquiring system versions in all node configuration information, and judging whether the system versions meet corresponding deployment detection standards;
the step of generating deployment exception information when it is detected that the existing node configuration information does not meet the deployment detection standard corresponding thereto includes:
and when the system version of at least one network node is lower than Linux 7.0, generating version exception information.
5. The method according to claim 1 or 2, wherein the step of determining whether all the node configuration information conforms to the deployment detection criteria further comprises:
sending a channel detection instruction to a to-be-constructed block chain network to detect whether the block chain network can create a message channel or not, and receiving a corresponding detection result;
the step of generating deployment exception information when it is detected that the existing node configuration information does not meet the deployment detection standard corresponding thereto includes:
and when the detection result is that the establishment fails, generating channel abnormal information.
6. The method according to claim 5, wherein the step of sending a channel detection command to the blockchain network to be constructed to detect whether the blockchain network can create a message channel and receiving a corresponding detection result comprises:
sending a channel detection instruction to a block chain network to be constructed so as to select any network node to link Kafka service and control the network node to create a corresponding message queue;
and sending a detection signal to the Kafka service to detect whether the message queue created by the network node is stored in the Kafka service, and receiving a corresponding detection result.
7. A block-chain environment detecting apparatus, characterized in that the apparatus comprises: the system comprises a first acquisition module, a second acquisition module and an environment detection module;
the first acquisition module is used for acquiring node configuration information of all network nodes in a block chain network to be constructed;
the second obtaining module is used for inquiring deployment detection standards corresponding to the node configuration information of each network node in a preset deployment mechanism table;
the environment detection module is used for judging whether all the node configuration information meets the deployment detection standard corresponding to each node configuration information;
the environment detection module is further configured to generate deployment normal information when all the node configuration information conforms to the deployment detection standard corresponding to each node configuration information;
the environment detection module is further used for generating deployment abnormal information when detecting that the node configuration information does not accord with the deployment detection standard corresponding to the node configuration information;
the second obtaining module is further configured to determine node types of all network nodes according to the node configuration information, and query a deployment detection standard corresponding to the node type in a preset deployment mechanism table;
the environment detection module is further configured to determine whether an image file in a node configuration file of the endorsement node is a Fabric image if the network node is the endorsement node;
the environment detection module is further configured to generate mirror image exception information when the mirror image file is not a Fabric mirror image.
8. A blockchain environment detection apparatus, comprising: memory, a processor and a block-by-block environment detection program stored on the memory and executable on the processor, the block-by-block environment detection program being configured to implement the steps of the block-by-block environment detection method as claimed in any one of claims 1 to 6.
9. A storage medium having a block link environment detection program stored thereon, wherein the block link environment detection program when executed by a processor implements the steps of the block link environment detection method according to any one of claims 1 to 6.
CN201910438264.8A 2019-05-23 2019-05-23 Block chain environment detection method, equipment, device and storage medium Active CN110324174B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910438264.8A CN110324174B (en) 2019-05-23 2019-05-23 Block chain environment detection method, equipment, device and storage medium
PCT/CN2019/122013 WO2020233073A1 (en) 2019-05-23 2019-11-29 Blockchain environment test method, device and apparatus, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910438264.8A CN110324174B (en) 2019-05-23 2019-05-23 Block chain environment detection method, equipment, device and storage medium

Publications (2)

Publication Number Publication Date
CN110324174A CN110324174A (en) 2019-10-11
CN110324174B true CN110324174B (en) 2022-04-22

Family

ID=68119053

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910438264.8A Active CN110324174B (en) 2019-05-23 2019-05-23 Block chain environment detection method, equipment, device and storage medium

Country Status (2)

Country Link
CN (1) CN110324174B (en)
WO (1) WO2020233073A1 (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110324174B (en) * 2019-05-23 2022-04-22 深圳壹账通智能科技有限公司 Block chain environment detection method, equipment, device and storage medium
CN110825776B (en) * 2019-11-07 2023-04-18 腾讯云计算(北京)有限责任公司 Air quality detection report processing method and device, computing equipment and storage medium
CN110855565B (en) 2019-11-22 2021-07-20 广州大学 Verifiable inter-domain route verification method based on block chain
CN113867735A (en) * 2021-09-03 2021-12-31 中国人民解放军军事科学院战争研究院 Automatic deployment method and device for information system
CN113904894B (en) * 2021-09-29 2023-05-30 智新科技股份有限公司 CAN network data security monitoring method, device, equipment and readable storage medium
CN114553917B (en) * 2021-12-30 2024-01-26 北京天成通链科技有限公司 Block chain-based network intelligent treatment method
CN116010118A (en) * 2022-12-05 2023-04-25 杭州趣链科技有限公司 Deployment method and device of blockchain nodes and terminal equipment
CN116893977B (en) * 2023-09-08 2024-01-16 中国空气动力研究与发展中心计算空气动力研究所 Automatic deployment method, device, equipment and medium for distributed simulation test environment
CN117792476A (en) * 2023-12-29 2024-03-29 深圳市安信达存储技术有限公司 Automatic BLOCK detection and processing method based on satellite environment data in space

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106789920A (en) * 2016-11-25 2017-05-31 深圳前海微众银行股份有限公司 The joint connecting method and device of block chain
WO2018125989A2 (en) * 2016-12-30 2018-07-05 Intel Corporation The internet of things
CN109194506A (en) * 2018-08-16 2019-01-11 北京京东尚科信息技术有限公司 Block chain network dispositions method, platform and computer storage medium
CN109240900A (en) * 2018-08-16 2019-01-18 北京京东尚科信息技术有限公司 Block chain network service platform and its intelligent contract detection method, storage medium
CN109542767A (en) * 2018-10-25 2019-03-29 平安科技(深圳)有限公司 Automated testing method, device, computer equipment and storage medium based on block chain

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11176519B2 (en) * 2016-11-11 2021-11-16 International Business Machines Corporation Smart contract admission check and fault tolerance in a blockchain
CN108416589A (en) * 2018-03-08 2018-08-17 深圳前海微众银行股份有限公司 Connection method, system and the computer readable storage medium of block chain node
CN109462508B (en) * 2018-11-30 2021-06-01 北京百度网讯科技有限公司 Node deployment method, device and storage medium
CN110324174B (en) * 2019-05-23 2022-04-22 深圳壹账通智能科技有限公司 Block chain environment detection method, equipment, device and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106789920A (en) * 2016-11-25 2017-05-31 深圳前海微众银行股份有限公司 The joint connecting method and device of block chain
WO2018125989A2 (en) * 2016-12-30 2018-07-05 Intel Corporation The internet of things
CN109194506A (en) * 2018-08-16 2019-01-11 北京京东尚科信息技术有限公司 Block chain network dispositions method, platform and computer storage medium
CN109240900A (en) * 2018-08-16 2019-01-18 北京京东尚科信息技术有限公司 Block chain network service platform and its intelligent contract detection method, storage medium
CN109542767A (en) * 2018-10-25 2019-03-29 平安科技(深圳)有限公司 Automated testing method, device, computer equipment and storage medium based on block chain

Also Published As

Publication number Publication date
CN110324174A (en) 2019-10-11
WO2020233073A1 (en) 2020-11-26

Similar Documents

Publication Publication Date Title
CN110324174B (en) Block chain environment detection method, equipment, device and storage medium
WO2018209853A1 (en) Pos machine, pos machine wireless communication module firmware upgrade method and computer readable storage medium
CN107241315B (en) Access method and device of bank gateway interface and computer readable storage medium
US20080168425A1 (en) Software testing techniques for stack-based environments
CN109257254B (en) Network connectivity checking method, device, computer equipment and storage medium
US11636016B2 (en) Cloud simulation and validation system
CN104717282A (en) Method, device and system for controlling intelligent terminals with Android operating system
JP5198154B2 (en) Fault monitoring system, device, monitoring apparatus, and fault monitoring method
CN112148315A (en) Software deployment method, device, server and storage medium
CN111770174A (en) Cloud platform deployment method, device, equipment and readable storage medium
US20190149400A1 (en) Configurable device status
CN112241311A (en) Firmware simulation method and device, electronic equipment and readable storage medium
CN112463281A (en) Remote assistance method, device, system, electronic equipment and storage medium
CN113645314B (en) Private cloud deployment method and server
CN113190371A (en) Task compensation method and device, electronic equipment and readable storage medium
CN113986270B (en) Distributed application deployment method and device, storage medium and electronic equipment
CN113419818A (en) Basic component deployment method, device, server and storage medium
CN113079059A (en) Network state monitoring method and device, electronic equipment and readable storage medium
CN110620695B (en) Data processing method and related equipment
CN111404897A (en) Message distribution method and device, storage medium and electronic equipment
JP2006113754A (en) Software update device and method
US8676923B2 (en) Use of discovery scanning and method of IP only communication to identify owners and administrators of network attached devices
CN113608932B (en) Database drilling method, device, equipment and storage medium
CN114116448A (en) Pressure testing method and device of application program, storage medium and computer equipment
CN112328267A (en) Multi-server installation method and device, terminal 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