Blockchain network generation method, device, computer device and storage medium

By generating node operation virtual environment and information, the deployment process of blockchain nodes is simplified, the generation efficiency of blockchain network and node communication efficiency are improved, and the problem of low deployment efficiency in the existing technology is solved.

CN115550381BActive Publication Date: 2025-07-08KINGDEE SOFTWARE(CHINA) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211143082.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-20
Publication Date
2025-07-08
Estimated Expiration
2042-09-20

AI Technical Summary

Technical Problem

During deployment, the existing blockchain network is inefficient in deployment, and the process is complicated and time-consuming.

Method used

By obtaining the environment configuration information of the node to be deployed, generating node operation information and virtual environment information, establishing a node operation virtual environment, and running node information in the virtual environment, obtaining blockchain virtual nodes, and finally building a blockchain virtual network.

Benefits of technology

The deployment process of blockchain nodes is simplified, the generation efficiency of blockchain network is improved, and the communication efficiency between nodes is optimized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115550381B_ABST
    Figure CN115550381B_ABST
Patent Text Reader

Abstract

The present application relates to a method, device, and computer device for generating a blockchain network. The method includes: obtaining the environmental configuration information of each node to be deployed; generating the running information of each node and the virtual environment information of each node's operation based on the environmental configuration information of each node to be deployed; establishing a virtual environment for each node's operation based on the virtual environment information of each node's operation, and sending the running information of each node to the corresponding virtual environment for the node's operation; obtaining the corresponding running information of each node in the virtual environment for each node's operation, and running the running information of the node to obtain each blockchain virtual node; and obtaining a blockchain virtual network based on each blockchain virtual node. Using this method can improve the efficiency of generating a blockchain network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of blockchain technology, and in particular, to a method, apparatus, computer device, storage medium, and computer program product for generating a blockchain network. Background Art

[0002] With the development of information technology, as a shared database, the data or information stored in the blockchain has characteristics such as non-forgery, openness and transparency, and traceability. Therefore, the blockchain is widely used in various industries. At present, a blockchain network usually includes a large number of blockchain nodes. When deploying a blockchain network, it usually requires the joint participation of each blockchain node in the deployment. However, the process of deploying blockchain nodes is cumbersome and complex, and the joint deployment of a large number of blockchain nodes takes a long time, resulting in low deployment efficiency of the blockchain network. Summary of the Invention

[0003] Based on this, in view of the above technical problems, it is necessary to provide a method, apparatus, computer device, computer-readable storage medium, and computer program product for generating a blockchain network that can improve the deployment efficiency of nodes in the blockchain network.

[0004] In a first aspect, the present application provides a method for generating a blockchain network. The method includes:

[0005] Obtaining the environment configuration information of each node to be deployed;

[0006] Generating the running information of each node and the virtual environment information of each node running based on the environment configuration information of each node to be deployed;

[0007] Establishing a virtual environment for each node to run based on the virtual environment information of each node to run, and sending the running information of each node to the corresponding virtual environment for node operation;

[0008] Obtaining the corresponding node running information in each virtual environment for node operation, and running the node running information to obtain each blockchain virtual node;

[0009] Obtaining a blockchain virtual network based on each blockchain virtual node.

[0010] In a second aspect, the present application further provides a device for generating a blockchain network. The device includes:

[0011] An obtaining module, configured to obtain the environment configuration information of each node to be deployed;

[0012] A node module, configured to generate the running information of each node and the virtual environment information of each node running based on the environment configuration information of each node to be deployed;

[0013] A sending module, configured to establish a virtual environment for each node to run based on the virtual environment information of each node running, and send the running information of each node to the corresponding virtual environment for the node to run;

[0014] An operating module, configured to obtain the corresponding node running information in the virtual environment for each node to run, and operate the node running information to obtain each blockchain virtual node;

[0015] A building module, configured to obtain a blockchain virtual network based on each blockchain virtual node.

[0016] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, the following steps are implemented:

[0017] Obtain the environment configuration information of each node to be deployed;

[0018] Generate the running information of each node and the virtual environment information of each node running based on the environment configuration information of each node to be deployed;

[0019] Establish a virtual environment for each node to run based on the virtual environment information of each node running, and send the running information of each node to the corresponding virtual environment for the node to run;

[0020] Obtain the corresponding node running information in the virtual environment for each node to run, and operate the node running information to obtain each blockchain virtual node;

[0021] Obtain a blockchain virtual network based on each blockchain virtual node.

[0022] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the following steps are implemented:

[0023] Obtain the environment configuration information of each node to be deployed;

[0024] Generate the running information of each node and the virtual environment information of each node running based on the environment configuration information of each node to be deployed;

[0025] Establish a virtual environment for each node to run based on the virtual environment information of each node running, and send the running information of each node to the corresponding virtual environment for the node to run;

[0026] Obtain the corresponding node running information in the virtual environment for each node to run, and operate the node running information to obtain each blockchain virtual node;

[0027] Obtain a blockchain virtual network based on each blockchain virtual node.

[0028] In a fifth aspect, the present application also provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0029] Obtain the environmental configuration information of each node to be deployed;

[0030] Generate the operation information of each node and the virtual environment information of each node operation based on the environmental configuration information of each node to be deployed;

[0031] Establish a virtual environment for each node operation based on the virtual environment information of each node operation, and send the operation information of each node to the corresponding virtual environment for node operation;

[0032] Obtain the corresponding node operation information in the virtual environment for each node operation, and run the node operation information to obtain each blockchain virtual node;

[0033] Obtain a blockchain virtual network based on each blockchain virtual node.

[0034] The above blockchain network generation method, device, computer device, storage medium, and computer program product can generate the operation information of each node and the virtual environment information of each node operation according to the environmental configuration information of the node to be deployed, and then establish a virtual environment for each node operation according to the virtual environment information of each node operation, so as to establish a virtual environment for node operation corresponding to the node to be deployed and obtain the operation information of each node to be deployed. Send the operation information of each node to the corresponding virtual environment for node operation, run the node operation information in the virtual environment for node operation corresponding to the node to be deployed to obtain blockchain virtual nodes, and then obtain a blockchain virtual network according to each blockchain virtual node. By deploying blockchain virtual nodes in the virtual environment for node operation, the deployment process of blockchain nodes is simplified, thereby improving the generation efficiency of the blockchain network. Description of the Drawings

[0035] Figure 1 It is an application environment diagram of the blockchain network generation method in an embodiment;

[0036] Figure 2 It is a flowchart of the blockchain network generation method in an embodiment;

[0037] Figure 3 It is a flowchart of generating node information in an embodiment;

[0038] Figure 4 It is a flowchart of generating a heterogeneous blockchain network in an embodiment;

[0039] Figure 5Schematic diagram of the certificate system of different consortium blockchain frameworks in an embodiment;

[0040] Figure 6 Schematic diagram of the process for generating a blockchain network in an embodiment;

[0041] Figure 7 Block diagram of the structure of a blockchain network generation device in an embodiment;

[0042] Figure 8 Internal structure diagram of a computer device in an embodiment. Detailed implementation manners

[0043] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0044] The blockchain network generation method provided by the embodiments of the present application can be applied to an application environment as shown in Figure 1 wherein, the terminal 102 communicates with the server 104 through a network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or can be placed in the cloud or other network servers. The server 104 can obtain the environment configuration information of each node to be deployed through the terminal 102; the server 104 generates the operation information of each node and the virtual environment information of each node operation based on the environment configuration information of each node to be deployed; the server 104 establishes the virtual environment of each node operation based on the virtual environment information of each node operation, and sends the operation information of each node to the corresponding virtual environment of the node operation; the server 104 obtains the corresponding node operation information in the virtual environment of each node operation, and runs the node operation information to obtain each blockchain virtual node; the server 104 obtains a blockchain virtual network based on each blockchain virtual node. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptop computers, tablet computers, etc. The server 104 can be implemented by an independent server or a server cluster composed of multiple servers.

[0045] In one embodiment, as shown in Figure 2 a blockchain network generation method is provided. Taking the method applied to the server in Figure 1 as an example, the method includes the following steps:

[0046] Step 202, obtain the environment configuration information of each node to be deployed.

[0047] Among them, the node to be deployed refers to the blockchain node to be deployed. A blockchain node refers to a blockchain participating object that needs to be connected to the blockchain. A blockchain node can connect to the network and has storage space. The environment configuration information of the node to be deployed refers to the configuration information that meets the operating environment of the node to be deployed.

[0048] Specifically, in response to the blockchain node deployment request sent by the user terminal, the server receives the environment configuration information of the node to be deployed sent by the user terminal. The server can also send multiple candidate environment configuration information of the node to be deployed to the user terminal, so that the user can select the target environment configuration information of the node to be deployed through the user terminal, and send the selected target environment configuration information of the node to be deployed to the server through the user terminal. The server determines the environment configuration information of the node to be deployed corresponding to the node to be deployed that the user needs to deploy according to the blockchain node deployment request.

[0049] Step 204, generate respective node operation information and respective node operation virtual environment information based on each piece of environment configuration information of the node to be deployed.

[0050] Among them, the node operation information refers to the configuration information required when the node to be deployed is running. The node operation virtual environment information refers to the configuration information of the virtual environment that meets the operation of the node to be deployed, and is used to establish the virtual environment for the node to run.

[0051] Specifically, the server obtains the environment configuration information of the node to be deployed sent by each user terminal, and generates the node operation information corresponding to the node to be deployed and the environment configuration information of the virtual operation environment where the node to be deployed is located according to the node information and the environment information corresponding to the node in the environment configuration information of the node to be deployed, so as to obtain the node operation information and the node operation virtual environment information corresponding to each node to be deployed. The server can preset the node identifier corresponding to each node to be deployed. Different nodes to be deployed correspond to different node identifiers. The node identifier can include the blockchain identifier, and the blockchain identifiers in the node identifiers of the nodes to be deployed participating in the same blockchain are the same. Then the server establishes an association relationship between the node identifier and the node operation information.

[0052] Step 206, establish respective node operation virtual environments based on each piece of node operation virtual environment information, and send each piece of node operation information to the corresponding node operation virtual environment.

[0053] Among them, the node operation virtual environment refers to the virtual environment that meets the operation of the node to be deployed.

[0054] Specifically, the server creates a node running virtual environment corresponding to each node to be deployed based on the virtual environment information of each node running. Then, it sends the running information of each node to the corresponding node running virtual environment. In one embodiment, the server can also pre-build the virtual environment for each node to run. When receiving the blockchain node deployment requests sent by each client, it sends multiple candidate node running virtual environment identifiers to each user terminal, so that the user can determine the identifier of each target node running virtual environment through the user terminal. Then, the server generates the node running information based on the node information and environment information in the node running virtual environment corresponding to each target node running virtual environment identifier, and sends the running information of each node to the corresponding node running virtual environment.

[0055] Step 208: Obtain the corresponding node running information in each node running virtual environment, and run the node running information to obtain each blockchain virtual node.

[0056] Among them, the blockchain virtual node refers to the blockchain node running in the node running virtual environment.

[0057] Specifically, the server obtains the node running information with the same blockchain identifier in each node running virtual environment, and runs the node running information with the same blockchain identifier in each node running virtual environment to obtain each blockchain virtual node.

[0058] Step 210: Obtain the blockchain virtual network based on each blockchain virtual node.

[0059] Among them, the blockchain virtual network refers to the blockchain network established according to the blockchain virtual nodes.

[0060] Specifically, the server establishes a communication connection between each blockchain virtual node. After checking that the communication between each blockchain virtual node is successful, it determines that the establishment of the blockchain virtual network by each blockchain virtual node is completed.

[0061] In the above blockchain network generation method, by generating the running information of each node and the virtual environment information of each node running according to the environment configuration information of the node to be deployed, and then establishing the virtual environment for each node to run according to the virtual environment information of each node running, it is possible to establish the virtual environment for the node to run corresponding to the node to be deployed and obtain the running information of each node to be deployed. Sending the running information of each node to the corresponding node running virtual environment, running the node running information in the node running virtual environment corresponding to the node to be deployed to obtain the blockchain virtual node, and then obtaining the blockchain virtual network according to each blockchain virtual node. By deploying the blockchain virtual node in the node running virtual environment, the deployment process of the blockchain node is simplified, thus improving the generation efficiency of the blockchain network.

[0062] In one embodiment, as Figure 3 shown, a flowchart for generating node information is provided; step 204, generating respective node running information and respective node running virtual environment information based on the respective environment configuration information of the nodes to be deployed, including:

[0063] Step 302, obtaining respective node certificate information and respective node running configuration information from the respective environment configuration information of the nodes to be deployed;

[0064] Step 304, generating respective node startup information based on the respective node certificate information and the respective node running configuration information;

[0065] Step 306, obtaining respective node running information based on the respective node certificate information, the respective node running configuration information, and the respective node startup information;

[0066] Step 308, generating corresponding node running virtual environment information based on the respective environment configuration information of the nodes to be deployed.

[0067] Among them, the node certificate information refers to the credential of the identity of the node to be deployed, which is used for authenticating the identity of the node to be deployed and establishing communication connections between the respective nodes to be deployed. The node running configuration information refers to the node configuration information that satisfies the node running. The node startup information refers to the startup information of the node to be deployed.

[0068] Specifically, the server obtains respective node certificates and respective node running configuration information from the respective environment configuration information of the nodes to be deployed. Then, respective node startup information is generated according to the respective nodes and the respective node running configuration information, and the respective node certificates, the respective node running configuration information, and the respective node startup information are used as the respective node running information. Then, the server builds respective node running virtual environment information according to the environment variables in the respective environment configuration information of the nodes to be deployed.

[0069] In a specific embodiment, the server can pre-build a blockchain network deployment platform, which is used to establish a blockchain network. The platform includes a pre-set node running virtual environment. For example, a Kubernetes cluster (an open-source system for automatically deploying, scaling, and managing containerized applications). The server deploys the respective nodes to be deployed in a containerized form in the platform. A container refers to an executable unit of software, which encapsulates application code, its libraries, and dependencies in a general way and is a lightweight virtualization technology. The server starts the nodes to be deployed by running the containers to generate a blockchain network, and the generated blockchain network can be a consortium chain network.

[0070] The server receives blockchain node deployment requests sent by each user terminal. The blockchain node deployment request includes the virtual environment identifier for node operation selected by each user and the number of nodes to be deployed. For example, user A deploys 2 nodes in environment 1, and user B deploys 1 node each in environment 1 and environment 2. Then the number of nodes in environment 1 is 3, and the number of nodes in environment 2 is 1. The server determines the number of nodes to be deployed corresponding to each virtual environment for node operation based on the virtual environment identifier for node operation and the number of nodes to be deployed, and obtains the environment address corresponding to each virtual environment for node operation. The server generates a certificate system corresponding to the blockchain network based on the number of nodes to be deployed corresponding to each virtual environment for node operation and the environment address corresponding to each virtual environment for node operation. The certificate system is used to authenticate the identities of each node in the blockchain network. Different blockchain network frameworks correspond to different certificate systems.

[0071] The server extracts the node certificates from the certificate system. Then the server generates node operation configuration information corresponding to each node to be deployed based on the number of nodes to be deployed corresponding to each virtual environment for node operation and the environment address corresponding to each virtual environment for node operation. The node operation configuration information includes the parameters of the blockchain and node connection data. The node connection data can be obtained through the environment address and is used to represent the relevant nodes that the node needs to connect to when joining the blockchain. The parameters of the blockchain include the consensus algorithm, channel configuration, block configuration, etc. The channel configuration can be obtained through the number of nodes. The server takes the node certificate information and the node operation configuration information as the environment configuration information for the node to be deployed. The server can store the environment variables sent by the user terminal into the environment configuration information for the node to be deployed corresponding to the node to be deployed.

[0072] The server generates node startup information corresponding to the node to be deployed based on the node certificate and the node operation configuration information corresponding to the node to be deployed. The node startup information can be a container startup file. The node startup information can control the container process and provide the configuration information required by the process to the container. The server takes the node certificate, the node operation configuration information, and the node startup information as the node operation information of the node to be deployed, and then the server obtains the node operation information of each node to be deployed.

[0073] In this embodiment, each node startup information is generated based on each node certificate and each node operation configuration information, and the node operation information is generated through the node certificate, the node operation configuration information, and the node startup information, so that the subsequent server can send the node operation information to the corresponding virtual environment for node operation to run, thereby starting the node and generating the blockchain network, thus improving the deployment efficiency of the blockchain nodes.

[0074] In one embodiment, the node running the virtual environment includes the node running the virtual main environment and each node running the virtual sub-environment; Step 208, obtaining the corresponding node running information in each node running the virtual environment and running the node running information to obtain each blockchain virtual node, including:

[0075] Obtaining the corresponding main node running information in the virtual node running the main environment and running the main node running information to obtain the main virtual node;

[0076] Obtaining the main node communication information returned by the main virtual node, and updating the node running information in each virtual node running the sub-environment based on the main node communication information to obtain each sub-node running information;

[0077] Running the corresponding sub-node running information in each virtual node running the sub-environment to obtain each sub-virtual node, and obtaining each blockchain virtual node based on the main virtual node and each sub-virtual node.

[0078] Among them, the node running the virtual main environment refers to the environment where the nodes that are preferentially started are preset. The node running the virtual sub-environment refers to the node running the virtual environment other than the node running the virtual main environment in each node running the virtual environment. The main virtual node refers to the node to be deployed that is preferentially started and preset among each node to be deployed, and can be the main node in the consortium chain. The main node communication information refers to the communication information corresponding to the main virtual node, which is used to communicate with other nodes to be deployed. The sub-virtual node refers to the node to be deployed other than the main virtual node among each node to be deployed. The sub-node running information refers to the node running information corresponding to the updated sub-virtual node.

[0079] Specifically, the server can preset the node running the virtual main environment, obtain and run the main node running information in the node running the virtual main environment to obtain the main virtual node, and there can be at least one main virtual node. The server sends a communication information query instruction to the main virtual node and obtains the main node communication information returned by the main virtual node. The main node communication information can be the communication address of the main virtual node, and this communication address is the address for the main virtual node to communicate with the outside world. Then the server updates the node running configuration information corresponding to the node running information in each virtual node running the sub-environment according to the main node communication information, and after the update is completed, each sub-node running information is obtained. The server runs the corresponding sub-node running information in each virtual node running the sub-environment to obtain each sub-virtual node. After successful communication between the main virtual node and each sub-virtual node, the server forms a blockchain network according to the main virtual node and the sub-virtual nodes.

[0080] In this embodiment, since the communication addresses of each node change every time the blockchain breaks and reconnects, it is necessary to rescan the communication addresses of each node. When the nodes to be deployed are distributed in different node operation virtual environments, the nodes are started by environment, and the main virtual node in the main virtual environment of the node operation is preferentially started, and the addresses of the started nodes are obtained for use by other nodes to connect, thereby improving the communication efficiency between blockchain nodes.

[0081] In one embodiment, a blockchain virtual network is obtained based on each blockchain virtual node, including:

[0082] Based on the main node communication information in the sub-node operation information, establish main node communication connections between the main virtual node and each sub-virtual node;

[0083] Establish sub-node communication connections between each sub-virtual node through the main node communication connections and the sub-node communication information in the sub-node operation information;

[0084] Obtain a blockchain virtual network based on the main virtual node, each sub-virtual node, the main node communication connection, and the sub-node communication connection.

[0085] Among them, the main node communication connection refers to the communication connection established between the main virtual node and each sub-virtual node. The sub-node communication connection refers to the communication connection established between each sub-virtual node.

[0086] Specifically, after the server runs the sub-node operation information in each node operation virtual sub-environment, sub-virtual nodes are obtained, and at this time, each sub-virtual node has completed startup. Each sub-virtual node communicates with the main virtual node according to the updated main node communication information in the node operation configuration information to obtain the main node communication connection between each sub-virtual node and the main virtual node.

[0087] The main virtual node obtains the communication information corresponding to each sub-virtual node through the main node communication connection with each sub-virtual node, and then the main virtual node broadcasts the communication information corresponding to each sub-virtual node to each sub-virtual node, so that each sub-virtual node receives the communication information corresponding to other sub-virtual nodes, and establishes a communication connection with other sub-virtual nodes according to the received communication information to obtain the sub-node communication connection between each sub-virtual node. The server forms a blockchain network according to the main virtual node, each sub-virtual node, the main node communication, and the sub-node communication.

[0088] In this embodiment, each sub-virtual node establishes a communication connection with the main virtual node according to the main node communication information, realizing node communication between different node operation virtual environments, thereby improving the communication efficiency between blockchain nodes.

[0089] In one embodiment, each node runs a virtual environment, including the target node's running virtual environment, which includes at least two blockchain virtual nodes; Step 210, obtaining a blockchain virtual network based on each blockchain virtual node, including:

[0090] Obtain the communication service information corresponding to each blockchain virtual node in the target node's running virtual environment, parse the communication service information, and obtain the communication information corresponding to each blockchain virtual node in the target node's running virtual environment;

[0091] Establish communication connections between each blockchain virtual node in the target node's running virtual environment based on the communication information corresponding to each blockchain virtual node in the target node's running virtual environment;

[0092] Obtain a blockchain virtual network based on each blockchain virtual node and the communication connections between each blockchain virtual node in the target node's running virtual environment.

[0093] Wherein, the target node's running virtual environment refers to a node running virtual environment that includes at least two blockchain nodes. The communication service information refers to the service information that assists in communication between each blockchain node.

[0094] Specifically, when the server detects that all blockchain virtual nodes are deployed in the same node running virtual environment, this node running virtual environment serves as the target node's running virtual environment. The server can generate a communication list of other blockchain virtual nodes and write it into the communication address of the blockchain virtual node in the form of a service name, obtaining the communication service information corresponding to each blockchain virtual node. The communication service information is, for example, peer0.org1.example.com:7051, indicating the address of node peer0 of block alliance member org1. When communication occurs between each blockchain virtual node, the server obtains the communication server information corresponding to each blockchain virtual node in the target node's running virtual environment and parses the communication server information corresponding to each blockchain virtual node to obtain the communication information corresponding to each blockchain virtual node.

[0095] Each blockchain virtual node communicates with other blockchain virtual nodes respectively according to the parsed communication information, obtaining the communication connections between each blockchain virtual node. The server forms a blockchain network based on the communication connections between each blockchain virtual machine node and each blockchain virtual node.

[0096] In this embodiment, when all nodes to be deployed are deployed in the same node running virtual environment, by writing the list of other nodes into the communication address of the node in the form of a service name, the communication efficiency between nodes can be improved.

[0097] In one embodiment, as Figure 4 shown, a flowchart of a process for generating a heterogeneous blockchain network is provided; after obtaining a blockchain virtual network based on each blockchain virtual node, the method further includes:

[0098] Step 402, obtaining heterogeneous blockchain network architecture information, and obtaining corresponding configuration information of each heterogeneous network environment based on the heterogeneous blockchain network architecture information;

[0099] Step 404, generating operation information of each heterogeneous network node based on the configuration information of each heterogeneous network environment;

[0100] Step 406, sending the operation information of each heterogeneous network node to the corresponding node operation virtual environment based on the configuration information of each heterogeneous network environment;

[0101] Step 408, obtaining the corresponding operation information of the heterogeneous network node in each node operation virtual environment, and running the operation information of the heterogeneous network node to obtain each heterogeneous blockchain virtual node;

[0102] Step 410, obtaining a heterogeneous blockchain virtual network based on each heterogeneous blockchain virtual node.

[0103] Among them, a heterogeneous blockchain network refers to a blockchain network composed of different blockchain frameworks. The heterogeneous blockchain network architecture information refers to the architecture information corresponding to the heterogeneous blockchain network, including the certificate system and environment information of the heterogeneous blockchain network. The heterogeneous network environment configuration information refers to the configuration information of the environment that satisfies the operation of the blockchain nodes in the heterogeneous blockchain network. The heterogeneous network node operation information refers to the configuration information that satisfies the operation of the blockchain nodes in the heterogeneous blockchain network. The heterogeneous blockchain virtual node refers to the blockchain node of the heterogeneous blockchain network that runs in the node operation virtual environment. The heterogeneous blockchain virtual network refers to a blockchain network composed of heterogeneous blockchain virtual nodes.

[0104] Specifically, after the server generates a blockchain virtual network in the blockchain network deployment platform, in response to a heterogeneous blockchain network deployment instruction, the server obtains heterogeneous blockchain network architecture information, and obtains corresponding configuration information of each heterogeneous network environment based on the heterogeneous blockchain network architecture information, including node certificate information and node operation configuration information corresponding to each node to be deployed in the heterogeneous blockchain network. The node certificate information corresponding to each node to be deployed is extracted from the certificate system in the heterogeneous blockchain network architecture information. The node operation configuration information corresponding to each node to be deployed includes the environment address corresponding to each node to be deployed.

[0105] The server generates startup information for each node based on the certificate information of each node and the running configuration information of each node. The startup information for each node can be the startup files of the containers corresponding to each blockchain node in the heterogeneous blockchain network. Each blockchain node in the heterogeneous blockchain network is deployed in the form of a container, and each blockchain node in the heterogeneous blockchain network is started by running the container. The server uses the certificate information of each node, the running configuration information of each node, and the startup information of each node as the node running information corresponding to each blockchain in the heterogeneous blockchain network. Then, the node running information corresponding to each blockchain is sent to the corresponding node running virtual environment, and the node running information is run in each node running virtual environment to obtain each heterogeneous blockchain virtual node, and a communication connection is established between each heterogeneous blockchain virtual node. A heterogeneous blockchain virtual network is generated based on each heterogeneous blockchain virtual node and the communication connection between each heterogeneous blockchain virtual node.

[0106] In a specific embodiment, a node deployment agent program is deployed on the blockchain network deployment platform in the server. The server obtains the operation permission for node deployment corresponding to the user terminal through the node deployment agent program to perform node deployment work, and the node deployment agent program can communicate with the server. The server can display an installation guidance interface to each user terminal. The user inputs the alliance information of the consortium chain through the user terminal on the installation guidance interface, including the information of each organization in the consortium chain. For example, enterprise A wants to deploy two nodes. Then the user selects the environment for node deployment or adds a new environment for node deployment through the installation guidance interface, and determines the underlying framework of the consortium chain, such as the Hyperledger Fabric framework (an open-source permissioned blockchain framework), the FISCO BCOS framework (an open-source permissioned blockchain framework), etc.

[0107] The server determines the environment addresses and the number of nodes corresponding to each node to be deployed according to the alliance information returned by the terminal. The server generates a certificate system corresponding to the consortium chain network according to the environment addresses, the number of nodes, and the underlying architecture of the consortium chain selected by the user. The server uses the certificate systems corresponding to different consortium chain networks and each environment address as the heterogeneous blockchain network architecture information, and generates corresponding node identifiers for each node to be deployed, so that each node to be deployed can be connected to relevant nodes according to the consortium chain identifier in the node identifier.

[0108] The server extracts the certificate of each node from the certificate system corresponding to the consortium chain, and generates the running configuration information corresponding to each blockchain node according to the environment address and the number of nodes. The running configuration information of each node and the certificate of each node are used as the configuration information of each heterogeneous network environment.

[0109] The server generates node startup information according to the node certificate and different environment addresses. The node startup information can be the configuration file for container startup, such as docker-compose-node1.yaml, docker-compose-node2.yaml, docker-compose-node3.yaml, which respectively represent the configuration files for container startup corresponding to nodes 1, 2, and 3.

[0110] In this embodiment, by generating the corresponding certificate system according to different consortium blockchain frameworks, and then generating node startup information according to the certificate systems of different consortium blockchains, and containerizing the nodes of the consortium blockchain for deployment, it is possible to support different consortium blockchain frameworks to be deployed into a virtual environment, realizing the unified process of consortium blockchain deployment, reducing the difficulty of consortium blockchain deployment, and thus improving the efficiency of consortium blockchain generation.

[0111] In a specific embodiment, as Figure 5 shown, a schematic diagram of the certificate system for different consortium blockchain frameworks is provided; Figure 5 -A represents the organizational node certificate system of the Hyperledger Fabric framework, including the orderer organization certificate directory and the peer node organization certificate directory. Under each organization, a ca root certificate, an msp identity certificate, a node certificate, a tls communication certificate, and user information are respectively constructed. Among them, orderOrganizations represents the main node organization tree, and peerOrganizations represents the node organization tree. Figure 5 -B represents the organizational node certificate system of the FISCO BCOS framework, including the CA root certificate of the blockchain, the institutional certificate, and the node certificates under each institution.

[0112] In a specific embodiment, as Figure 6 shown, a schematic diagram of the process for generating a blockchain network is provided; The server determines the node operation virtual environment to which the node to be deployed is to be deployed, that is, determines the corresponding relationship between the node to be deployed and the node operation virtual environment. Then the server generates certificates and node operation configuration information for each node to be deployed according to the number of nodes and environment addresses corresponding to different node operation virtual environments. The server generates a container startup file corresponding to the node to be deployed according to the certificate and node operation configuration information of the node. The server sends the certificate, node operation configuration information, and container startup file of the node to be deployed to the node operation virtual environment corresponding to the node to be deployed. Start the nodes in different environments, and update the node operation configuration information of the nodes to be deployed in subsequent environments, and then start the nodes on all environments.

[0113] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are sequentially shown according to the indications of the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same moment, but can be executed at different moments. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.

[0114] Based on the same inventive concept, an embodiment of the present application further provides a blockchain network generation device for implementing the above-mentioned blockchain network generation method. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the blockchain network generation device provided below can refer to the limitations on the blockchain network generation method in the above text, and will not be repeated here.

[0115] In one embodiment, as Figure 7 shown, a blockchain network generation device 700 is provided, including: an acquisition module 702, a node module 704, a sending module 706, a running module 708, and a building module 710, where:

[0116] The acquisition module 702 is used to acquire the environment configuration information of each node to be deployed;

[0117] The node module 704 is used to generate the running information of each node and the virtual environment information of each node running based on the environment configuration information of each node to be deployed;

[0118] The sending module 706 is used to establish the virtual environment of each node running based on the virtual environment information of each node running, and send the running information of each node to the corresponding virtual environment of the node running;

[0119] The running module 708 is used to obtain the corresponding node running information in the virtual environment of each node running, and run the node running information to obtain each blockchain virtual node;

[0120] The building module 710 is used to obtain the blockchain virtual network based on each blockchain virtual node.

[0121] In one embodiment, the node module 704 includes:

[0122] A node startup information unit is used to obtain each node certificate information and each node running configuration information from the environment configuration information of each node to be deployed; generate each node startup information based on each node certificate information and each node running configuration information; obtain each node running information based on each node certificate information, each node running configuration information, and each node startup information; and generate corresponding node running virtual environment information based on the environment configuration information of each node to be deployed.

[0123] In one embodiment, the running module 708 includes:

[0124] An environment-based startup unit is used to obtain the corresponding main node running information in the node running virtual main environment, run the main node running information to obtain the main virtual node; obtain the main node communication information returned by the main virtual node, and update the node running information in each node running virtual sub-environment based on the main node communication information to obtain each sub-node running information; run the corresponding sub-node running information in each virtual node running sub-environment to obtain each sub-virtual node, and obtain each blockchain virtual node based on the main virtual node and each sub-virtual node.

[0125] In one embodiment, the running module 708 includes:

[0126] A communication connection unit is used to establish a main node communication connection between the main virtual node and each sub-virtual node respectively based on the main node communication information in the sub-node running information; establish a sub-node communication connection between each sub-virtual node through the main node communication connection and the sub-node communication information in the sub-node running information; and obtain a blockchain virtual network based on the main virtual node, each sub-virtual node, the main node communication connection, and the sub-node communication connection.

[0127] In one embodiment, the establishment module 710 includes:

[0128] A single-environment startup unit is used to obtain the communication service information corresponding to each blockchain virtual node in the target node running virtual environment, parse the communication service information to obtain the communication information corresponding to each blockchain virtual node in the target node running virtual environment; establish a communication connection between each blockchain virtual node in the target node running virtual environment based on the communication information corresponding to each blockchain virtual node in the target node running virtual environment; and obtain a blockchain virtual network based on each blockchain virtual node and the communication connection between each blockchain virtual node in the target node running virtual environment.

[0129] In one embodiment, the blockchain network generation device 700 further includes:

[0130] A heterogeneous network generation unit is configured to obtain heterogeneous blockchain network architecture information, and based on the heterogeneous blockchain network architecture information, obtain corresponding heterogeneous network environment configuration information for each; generate operation information of each heterogeneous network node based on the heterogeneous network environment configuration information for each; send the operation information of each heterogeneous network node to the corresponding node operation virtual environment based on the heterogeneous network environment configuration information for each; obtain the corresponding heterogeneous network node operation information in each node operation virtual environment, and run the heterogeneous network node operation information to obtain each heterogeneous blockchain virtual node; and obtain a heterogeneous blockchain virtual network based on each heterogeneous blockchain virtual node.

[0131] Each module in the above blockchain network generation device can be implemented in whole or in part by software, hardware, and their combination. Each of the above modules can be embedded in or independent of a processor in a computer device in the form of hardware, or stored in a memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0132] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as Figure 8 shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data of node environment configuration information to be deployed. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements a blockchain network generation method.

[0133] Those skilled in the art can understand that Figure 8 the structure shown in

[0134] In one embodiment, a computer device is further provided, which includes a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps in the foregoing method embodiments are implemented.

[0135] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the foregoing method embodiments are implemented.

[0136] In one embodiment, a computer program product is provided, which includes a computer program. When the computer program is executed by a processor, the steps in the foregoing method embodiments are implemented.

[0137] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. And the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards of relevant countries and regions.

[0138] Those of ordinary skill in the art can understand that all or part of the processes in the above-described method embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the method embodiments as described above. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memories can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memories can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.

[0139] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.

[0140] The above-described embodiments merely represent several implementation manners of the present application. The description is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. A method for generating a blockchain network, characterized in that, The method includes: Obtaining the environment configuration information of each node to be deployed; Obtaining the node certificate information and the node running configuration information from the environment configuration information of each node to be deployed; the node certificate information is extracted from the certificate system corresponding to the corresponding blockchain network framework; Generating the startup information of each node based on the node certificate information and the node running configuration information of each node; Obtaining the running information of each node based on the node certificate information, the node running configuration information, and the startup information of each node; Generating the running virtual environment information of each node based on the environment variables in the environment configuration information of each node to be deployed; Establishing the running virtual environment of each node based on the running virtual environment information of each node, and sending the running information of each node to the corresponding running virtual environment of the node; Obtaining the corresponding node running information in the running virtual environment of each node, and running the node running information to obtain each blockchain virtual node; Obtaining the blockchain virtual network corresponding to the blockchain network framework based on each blockchain virtual node.

2. The method according to claim 1, characterized in that, The obtaining the corresponding node running information in the running virtual environment of each node, and running the node running information to obtain each blockchain virtual node includes: Obtaining the node running information with the same blockchain identifier in the running virtual environment of each node, and running the node running information with the same blockchain identifier to obtain each blockchain virtual node.

3. The method according to claim 1, wherein The running virtual environment of the node includes a running virtual main environment and each running virtual sub-environment of the node; the obtaining the corresponding node running information in the running virtual environment of each node, and running the node running information to obtain each blockchain virtual node includes: Obtaining the corresponding main node running information in the running virtual main environment of the node, and running the main node running information to obtain the main virtual node; Obtaining the main node communication information returned by the main virtual node, and updating the node running information in each running virtual sub-environment of the node based on the main node communication information to obtain the running information of each sub-node; Running the corresponding running information of each sub-node in each running virtual sub-environment of the node to obtain each sub-virtual node, and obtaining each blockchain virtual node based on the main virtual node and each sub-virtual node.

4. The method according to claim 3, characterized in that, The obtaining the blockchain virtual network corresponding to the blockchain network framework based on each blockchain virtual node includes: Establishing the main node communication connection between the main virtual node and each sub-virtual node respectively based on the main node communication information in the running information of each sub-node; Establishing the sub-node communication connection between each sub-virtual node through the main node communication connection and the sub-node communication information in the running information of each sub-node; Obtaining the blockchain virtual network corresponding to the blockchain network framework based on the main virtual node, each sub-virtual node, the main node communication connection, and the sub-node communication connection.

5. The method according to claim 1, characterized in that, Each of the nodes runs a virtual environment, including the virtual environment for the target node, and the virtual environment for the target node includes at least two blockchain virtual nodes; obtaining the blockchain virtual network corresponding to the blockchain network framework based on each of the blockchain virtual nodes includes: Obtaining communication service information corresponding to each blockchain virtual node in the virtual environment for the target node, and parsing the communication service information to obtain communication information corresponding to each blockchain virtual node in the virtual environment for the target node; Establishing communication connections between the blockchain virtual nodes in the virtual environment for the target node based on the communication information corresponding to each blockchain virtual node in the virtual environment for the target node; Obtaining the blockchain virtual network corresponding to the blockchain network framework based on each of the blockchain virtual nodes and the communication connections between the blockchain virtual nodes in the virtual environment for the target node.

6. The method according to claim 1, wherein After obtaining the blockchain virtual network corresponding to the blockchain network framework based on each of the blockchain virtual nodes, it further includes: Obtaining heterogeneous blockchain network architecture information, and obtaining corresponding configuration information for each heterogeneous network environment based on the heterogeneous blockchain network architecture information; Generating operation information for each heterogeneous network node based on the configuration information for each heterogeneous network environment; Sending the operation information for each heterogeneous network node to the corresponding node running virtual environment based on the configuration information for each heterogeneous network environment; Obtaining the corresponding operation information for the heterogeneous network node in the node running virtual environment corresponding to the operation information for each heterogeneous network node, and running the operation information for the heterogeneous network node to obtain each heterogeneous blockchain virtual node; Obtaining a heterogeneous blockchain virtual network based on each of the heterogeneous blockchain virtual nodes.

7. A blockchain network generation device, characterized in that, The apparatus includes: An obtaining module, configured to obtain configuration information for each node to be deployed; A node module, configured to obtain each node certificate information and each node operation configuration information from the configuration information for each node to be deployed; the node certificate information is extracted from the certificate system corresponding to the corresponding blockchain network framework; generating each node startup information based on each node certificate information and each node operation configuration information; obtaining each node operation information based on each node certificate information, each node operation configuration information, and each node startup information; generating each node running virtual environment information based on the environment variables in the configuration information for each node to be deployed; A sending module, configured to establish each node running virtual environment based on each node running virtual environment information, and send each node operation information to the corresponding node running virtual environment; A running module, configured to obtain the corresponding node operation information in each node running virtual environment, and run the node operation information to obtain each blockchain virtual node; A establishing module, configured to obtain the blockchain virtual network corresponding to the blockchain network framework based on each of the blockchain virtual nodes.

8. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Methods and systems for automatic blockchain deployment based on cloud platform

    CN111133733A