Blockchain network creation method, apparatus, device, and storage medium
By using a visual interface and automating the execution of instructions during the blockchain network creation process, the inefficiency caused by manual input is solved, enabling efficient blockchain network creation and deployment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- PEOPLE'S INSURANCE COMPANY OF CHINA
- Filing Date
- 2023-11-28
- Publication Date
- 2026-06-09
AI Technical Summary
In existing technologies, creating a blockchain network through manual input is cumbersome and inefficient.
An automated approach based on a visual interface is adopted. By receiving organizational and alliance information input by users, a mapping relationship is established, and a set of instructions is automatically executed to create a blockchain network.
It enables automated deployment of blockchain networks, improves creation efficiency, and provides a user-friendly interface that intuitively displays the creation process.
Smart Images

Figure CN117640420B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of blockchain technology, and in particular to a method, apparatus, device, and storage medium for creating a blockchain network. Background Technology
[0002] In providing financial transaction services to clients, financial institutions use blockchain technology to create blockchain networks to enhance the security of financial transaction data generated during the process.
[0003] In existing technologies, based on manual processing, users input a script for the blockchain network creation process. When executing each step of the blockchain network creation process, they need to manually input execution commands to run the corresponding execution code and complete the creation of the blockchain network.
[0004] However, the above methods rely on manual input, which is cumbersome and reduces the efficiency of creating blockchain networks. Summary of the Invention
[0005] This application provides a method, apparatus, device, and storage medium for creating a blockchain network, in order to solve the problem of low efficiency in creating a blockchain network due to manual input.
[0006] Firstly, this application provides a method for creating a blockchain network, the method comprising:
[0007] The system receives organization information and consortium information input by the user; wherein, the organization information is the information of network nodes in the blockchain network, and the network nodes are used to process financial transaction data; the consortium information represents the information of consortium chains in the blockchain network; the consortium chains are used to store the financial transaction data processed by the network nodes;
[0008] Establish a mapping relationship between the consortium blockchain in the consortium information and the network nodes in the organization information;
[0009] In response to the user's input creation instruction, a set of instruction information is determined; wherein, the creation instruction is used to instruct the creation of a blockchain network; the set of instruction information includes at least one instruction information; the instruction information represents the execution code of the network creation process; the instruction information has an execution sequence number, which is the execution sequence number of the execution code represented by the instruction information;
[0010] Based on a visual interface, a blockchain network is created according to the instruction information set, the organization information, and the alliance information; wherein, the blockchain network is used to process financial transaction data.
[0011] Secondly, this application provides a device for creating a blockchain network, the device comprising:
[0012] A receiving unit is configured to receive organization information and consortium information input by a user; wherein, the organization information is information about network nodes in the blockchain network, and the network nodes are used to process financial transaction data; the consortium information represents information about consortium blockchains in the blockchain network; the consortium blockchain is used to store the financial transaction data processed by the network nodes;
[0013] A setup unit is used to establish a mapping relationship between the consortium chain in the consortium information and the network nodes in the organization information;
[0014] A determining unit is configured to determine a set of instruction information in response to a creation instruction input by the user; wherein the creation instruction is used to instruct the creation of a blockchain network; the set of instruction information includes at least one set of instruction information; the instruction information represents the execution code of the network creation process; the instruction information has an execution sequence number, which is the execution sequence number of the execution code represented by the instruction information;
[0015] A creation unit is used to create a blockchain network based on a visual interface, according to the instruction information set, the organization information, and the alliance information; wherein, the blockchain network is used to process financial transaction data.
[0016] Thirdly, this application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;
[0017] The memory stores computer-executed instructions;
[0018] The processor executes computer execution instructions stored in the memory to implement the method described in the first aspect.
[0019] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method described in the first aspect.
[0020] Fifthly, this application provides a computer program product comprising: a computer program stored in a readable storage medium, wherein at least one processor of an electronic device can read the computer program from the readable storage medium, and the at least one processor executes the computer program to cause the electronic device to perform the method described in the first aspect.
[0021] The blockchain network creation method, apparatus, device, and storage medium provided in this application can automate the deployment of consortium blockchain networks by automatically executing each network creation task corresponding to the instruction information set based on a visual interface, and provide a user-friendly interactive interface to intuitively display the execution process of blockchain network creation. Attached Figure Description
[0022] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0023] Figure 1 A flowchart illustrating a method for creating a blockchain network as provided in this application embodiment;
[0024] Figure 2 A schematic diagram of the structure of a blockchain network creation system provided in this application embodiment;
[0025] Figure 3 A flowchart illustrating another method for creating a blockchain network provided in this application embodiment;
[0026] Figure 4 A schematic diagram of the structure of a blockchain network creation device provided in an embodiment of this application;
[0027] Figure 5 A schematic diagram of the structure of another blockchain network creation apparatus provided in an embodiment of this application;
[0028] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;
[0029] Figure 7 This is a block diagram illustrating an electronic device according to an exemplary embodiment.
[0030] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0031] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0032] In providing financial transaction services to clients, financial institutions use blockchain technology to create blockchain networks to enhance the security of financial transaction data generated during the process.
[0033] In one example, based on manual processing, the user inputs a script for the blockchain network creation process. At each step of the blockchain network creation process, the user needs to manually input the execution command to run the corresponding execution code and complete the creation of the blockchain network.
[0034] However, the above methods rely on manual input, which is cumbersome and reduces the efficiency of creating blockchain networks.
[0035] The method, apparatus, device, and storage medium for creating a blockchain network provided in this application are intended to solve the aforementioned technical problems of the prior art.
[0036] It should be noted that the financial transaction data (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with relevant laws, regulations and standards, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0037] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0038] Figure 1 A flowchart illustrating a method for creating a blockchain network provided in this application embodiment is shown below. Figure 1 As shown, the method includes:
[0039] S101. Receive organization information and consortium information input by the user; wherein, the organization information is the information of network nodes in the blockchain network, and the network nodes are used to process financial transaction data; the consortium information represents the information of the consortium chain in the blockchain network; the consortium chain is used to store the financial transaction data processed by the network nodes.
[0040] For example, the execution subject of this embodiment can be an electronic device. First, Figure 2 This is a schematic diagram of the structure of a blockchain network creation system provided in an embodiment of this application, such as... Figure 2As shown, the blockchain network creation system deployed in the electronic device as a service (BaaS) includes a visual interface layer, a basic management layer, and a blockchain underlying layer. Users transmit automated blockchain network creation instructions to the basic management layer through the visual interface. The basic management layer service initializes the process task sequence, sequentially passing the instructions to the node agent service at the blockchain underlying layer. The blockchain underlying layer consists of the node agent service, Docker container technology service, transaction peer nodes, and orderer nodes. The node agent service performs relevant operations according to the instructions. To create a blockchain network, users input information through a user-friendly interface provided by the visualization layer. This visualization interface provides visual configuration entry points for servers, organizations, nodes, consortia, and organization members. It receives user-inputted information about network nodes (organizational information) and consortium blockchains (consortium information). Organizational information includes the network node name (organization name, abbreviation, domain name), number of peer nodes, and number of user device users (UESRs). Consortium information includes the consortium name, abbreviation, domain name, number of ordering nodes (orderer nodes), designated leader organization (main network node), and the user-preset Internet Protocol (IP) address for each orderer node. Furthermore, each consortium blockchain corresponding to the user-inputted information is used to store the financial transaction data processed by the network nodes.
[0041] S102. Establish the mapping relationship between the consortium chain in the consortium information and the network nodes in the organization information.
[0042] For example, based on the visual interface, for each consortium chain in the consortium information, in response to the user's input operation on the visual interface, the organization determined by the user, i.e. the network node, is selected from the organization information created by the user and added to the consortium chain, thereby establishing a mapping relationship between each consortium chain and each network node in the organization information.
[0043] S103. In response to the user-inputted creation instruction, determine the instruction information set; wherein, the creation instruction is used to instruct the creation of a blockchain network; the instruction information set includes at least one instruction information; the instruction information represents the execution code of the network creation process; the instruction information has an execution sequence number, which is the execution sequence number of the execution code represented by the instruction information.
[0044] For example, the basic management layer provides consortium blockchain management functions such as server management, organization management, node management, alliance management, member management, and network creation / publishing. After adding alliance members, users can initiate the network creation process through a visual interface. That is, users input creation instructions through the visual interface to instruct the creation of a blockchain network. Based on the visual interface, the system responds to the user's input creation instructions and sends the instructions to the basic management layer. After receiving the network creation instructions, the basic management layer initializes the network creation process and feeds back to the visual interface layer. Users can see the execution process of the network creation process initialization in the visual interface layer. After initializing the network creation process, the basic management layer collects a set of instruction information from the database. This set of instruction information includes at least one instruction, which represents the execution code of the network creation process. The instruction has an execution sequence number, which is the execution sequence number of the execution code represented by the instruction, such as the server sequence of the instruction execution, instruction parameters, and process execution sequence order.
[0045] S104. Based on a visual interface, a blockchain network is created according to the instruction information set, organization information, and alliance information; wherein, the blockchain network is used to process financial transaction data.
[0046] For example, the basic management layer, according to the process execution sequence in the instruction information set, sequentially sends network creation tasks to the node agent services of each consortium blockchain at the underlying blockchain layer. The node agent services provide a set of consortium blockchain network deployment service interface methods, integrating key technologies such as Java, scripts, commands, Docker container technology, and Fabric ontology. Upon receiving the blockchain network creation instructions from the basic management layer, the node agent services execute the blockchain network creation process on their local servers based on the organization and consortium information. Once the execution process is complete, the blockchain network is created. During the automated execution of blockchain network creation, a visual interface layer allows for efficient and intuitive completion of the creation process.
[0047] This embodiment provides a method for creating a blockchain network. Based on a visual interface, it automatically executes each network creation task corresponding to the instruction information set, which can realize the automation of consortium blockchain network deployment and provide a user-friendly interactive interface to intuitively display the execution process of blockchain network creation.
[0048] Figure 3 A flowchart illustrating another method for creating a blockchain network provided in this application embodiment is shown below. Figure 3 As shown, the method includes:
[0049] S201. Receive organization information and consortium information input by the user; wherein, the organization information is the information of network nodes in the blockchain network, and the network nodes are used to process financial transaction data; the consortium information represents the information of the consortium chain in the blockchain network; the consortium chain includes at least one network node, and the network nodes in the consortium chain communicate with each other.
[0050] For example, this step can be referred to step 101, and will not be repeated here.
[0051] S202. Determine the set of node information corresponding to the organization information; wherein, the set of node information includes the node information corresponding to each network node in the organization information, and the node information includes the server address, port number and anchor node identifier of the network node.
[0052] For example, through a visual interface, the network nodes such as peer nodes in the organization information that has been initialized and created are mapped to their corresponding server IPs, and a port number is assigned to each peer node and an anchor node flag is set, thus obtaining the node information corresponding to each network node.
[0053] S203. Store the organization information, alliance information, and node information in a preset database.
[0054] For example, after creating organization information and alliance information through a visual interface, the created organization information and alliance information are stored in a preset database through the basic management layer service interface.
[0055] S204. In response to a query command input by the user, determine network nodes that meet the preset admission criteria of the consortium blockchain from the organization information, and designate them as target network nodes of the consortium blockchain; wherein, the query command is used to instruct the query network node, and the query command includes the preset admission criteria of the consortium blockchain in the consortium information.
[0056] For example, for each consortium blockchain in the consortium information, the user enters a query command through a visual interface, specifying the network nodes that meet the predefined admission criteria for that consortium blockchain. Based on the visual interface, after receiving the user's query command for each consortium blockchain, the system determines the network nodes that meet the predefined admission criteria from the organization information, which are then identified as the target network nodes for that consortium blockchain. This process retrieves a list of organizations that meet the consortium joining criteria.
[0057] S205. Establish a mapping relationship between the alliance chain in the alliance information and the target network node in the organization information.
[0058] For example, through a visual interface, users can select target network nodes from the organization information for each consortium chain to join that consortium chain, establish a mapping relationship between each consortium chain in the consortium information and the organization, i.e., the target network node of each consortium chain, and store the collected information in the database through the basic management layer service interface.
[0059] In one example, the consortium blockchain has consortium blockchain nodes, which are used to sort financial transaction data processed by network nodes in the consortium blockchain; step S205 includes: establishing a mapping relationship between the consortium blockchain nodes and the target network nodes of the consortium blockchain.
[0060] For example, each consortium blockchain created based on the visual interface has a corresponding consortium blockchain node, which is used to sort the financial transaction data processed by the corresponding network node in the consortium blockchain. Through the visual interface, users can select the target network node in the organization information to join the consortium blockchain for each consortium blockchain, and establish a mapping relationship between the consortium blockchain node of each consortium blockchain in the consortium information and the target network node corresponding to each consortium blockchain in the organization information. The collected information is stored in the database through the basic management layer service interface.
[0061] S206. In response to the user-inputted creation instruction, determine an instruction information set; wherein, the creation instruction is used to instruct the creation of a blockchain network; the instruction information set includes at least one instruction information; the instruction information represents the execution code of the network creation process; the instruction information has an execution sequence number, which is the execution sequence number of the execution code represented by the instruction information.
[0062] For example, this step can be referred to as step 103, and will not be repeated here.
[0063] S207. Based on the organization information, generate a certificate information set corresponding to the organization information; wherein, the certificate information set includes certificate information corresponding to each network node in the organization information, and the certificate information represents the identity of the network node in the consortium blockchain; and send the certificate information to the server of the consortium blockchain corresponding to the certificate information.
[0064] For example, based on the instruction information for blockchain network creation received by the basic management layer, the basic management layer collects user-configured consortium organization member information (i.e., organization information) from the database, calls the `cryptogen generate` command to process the organization information, and creates certificates for the organization members. These certificates represent the identity of each network node in the organization information, thus identifying the network node's identity within the consortium blockchain. After completing the organization member certificates, the basic management layer, according to the consortium organization plan collected from the database, calls the blockchain's underlying node proxy service's distribution interface to distribute the organization member certificate files to the corresponding servers designated by each consortium organization, based on the relationship between the consortium blockchain and each network node in the organization information.
[0065] S208. Genesis block file of consortium blockchain is generated according to the creation instructions and consortium information in the instruction information.
[0066] In one example, the instruction set includes a genesis block creation instruction, a network configuration instruction, and a network startup instruction; the genesis block creation instruction is used to instruct the creation of a genesis block file for the consortium blockchain, which represents the initially created network block in the consortium blockchain; the network configuration instruction is used to instruct the configuration of the network for the consortium blockchain; and the network startup instruction is used to instruct the startup of the network configured for the consortium blockchain.
[0067] For example, the node agent service based on the underlying blockchain receives instruction information on blockchain network creation sent by the basic management layer, including instructions to create genesis block, network configuration, and network start; the instructions to create genesis block are used to instruct the creation of genesis block file for the consortium blockchain, the genesis block file representing the initially created network block in the consortium blockchain; the instructions to configure the network for the consortium blockchain are used to instruct the network to be started; and the instructions to start the network are used to instruct the network configured for the consortium blockchain to be started.
[0068] For example, after the basic management layer completes the issuance of organization certificates, according to the information of each consortium chain in the consortium information stored in the database, the blockchain node agent service receives the instruction to create a genesis block, calls the blockchain underlying node agent service to create a genesis block interface, calls preset commands, processes the information of each consortium chain in the consortium information, and generates a genesis.block file, that is, the genesis block file of each consortium chain.
[0069] In one example, step S208 includes the following steps:
[0070] The first step of step S208 is to determine the leader node of each consortium chain in the consortium information according to the creation of the genesis block instruction; wherein, the leader node is the network node in the consortium chain used to process other network nodes.
[0071] The second step of step S208 is to generate a configuration file for the consortium blockchain based on the consortium blockchain's leader node; wherein, the configuration file is the configuration file for the consortium blockchain's channel transactions.
[0072] The third step of step S208 is to generate the genesis block file of the consortium blockchain according to the configuration file of the consortium blockchain.
[0073] For example, after the basic management layer completes the issuance of organizational certificates, it calls the blockchain underlying node proxy service to create a genesis block interface. After receiving the genesis block creation instruction, the blockchain node proxy service, according to the consortium information collected in the database, determines the network node in each consortium chain that is used to process other network nodes in that consortium chain, which is the leader node. According to the proxy service's genesis block creation interface, it processes the information of the leader node of the consortium chain, generates a configuration file for the channel transactions of that consortium chain, such as the configtx.yam file, and calls the configtxgen-profile command to process the configuration file, such as the configtx.yam file, to generate a genesis block file, such as the genesis.block file.
[0074] S209. Based on the network configuration instructions and organization information in the instruction information, generate the system file corresponding to the organization information; wherein, the system file includes the consortium chain nodes of the consortium chain, the network nodes in the consortium chain, and the mapping relationship between the servers to which the consortium chain belongs.
[0075] For example, after the basic management layer completes the creation of the genesis block, the database collects information on the network nodes corresponding to each consortium chain in the organization information, calls the network configuration interface of the blockchain underlying node proxy service, and after receiving the network configuration instruction, the blockchain underlying node proxy service generates a system file corresponding to the organization information. The system file includes the consortium chain nodes of each consortium chain, the network nodes in each consortium chain, and the mapping relationship between the servers to which each consortium chain belongs. For example, the mapping relationship between the domain names of network nodes such as peer nodes and orderer nodes in each consortium chain and the server IPs is written into the hosts file of the local server.
[0076] S210. Based on the network startup instruction and organization information in the instruction information, generate and execute the startup file set corresponding to the organization information to obtain the blockchain network; wherein, the startup file set includes the running code corresponding to each network node in the organization information, and the running code of the consortium blockchain node corresponding to each network node in the organization information.
[0077] For example, after the basic management layer completes the network configuration, the underlying blockchain node agent service receives the network start instruction and calls the network start interface of the underlying blockchain node agent service. It processes the organization information and consortium information stored in the preset database to generate a set of startup files. These files include the running code corresponding to each network node in the organization information and the running code of the consortium chain node corresponding to each network node in the organization information, such as the Docker startup files for each orderer node and each peer node. Then, using the docker-compose command, it executes the network startup configured for each consortium chain in the startup file set in sequence and synchronizes the execution process to the visualization interface layer. Based on the visualization interface, it monitors the execution process of the blockchain network creation process and displays the results visually.
[0078] S211. Based on a visual interface, display the execution information set corresponding to the instruction information set, and store the execution information set in a preset database; wherein, the execution information set includes the execution information corresponding to each instruction information in the instruction information set, and the execution information indicates whether the execution code represented by the instruction information has been executed successfully.
[0079] For example, during the automated execution of blockchain network creation, users can call the basic management layer task query interface through task polling to listen to the execution process of the blockchain network creation process. This allows them to obtain the execution information corresponding to each instruction in the instruction information set, indicating whether the execution code represented by the instruction information has been successfully executed. The results represented by each execution information are then visualized, and the results represented by each execution information are recorded in a local preset database such as an SQLite database. In this way, the blockchain network creation process can be completed efficiently.
[0080] In this embodiment, based on the above embodiments, on the one hand, the creation process of the blockchain network is displayed intuitively through visualization; on the other hand, the blockchain network creation process is automatically executed based on the instruction information set, which reduces the implementation difficulty and complexity of creating a visualized blockchain network and improves the implementation efficiency of creating a blockchain network.
[0081] Figure 4 A schematic diagram of the structure of a blockchain network creation device provided in this application embodiment is shown below. Figure 4 As shown, the device 300 includes:
[0082] The receiving unit 301 is used to receive organization information and consortium information input by the user; wherein, the organization information is the information of network nodes in the blockchain network, and the network nodes are used to process financial transaction data; the consortium information represents the information of the consortium chain in the blockchain network; the consortium chain is used to store the financial transaction data processed by the network nodes.
[0083] Establishment unit 302 is used to establish the mapping relationship between the alliance chain in the alliance information and the network nodes in the organization information.
[0084] The determining unit 303 is used to determine a set of instruction information in response to a creation instruction input by the user; wherein the creation instruction is used to instruct the creation of a blockchain network; the set of instruction information includes at least one instruction information; the instruction information represents the execution code of the network creation process; the instruction information has an execution sequence number, which is the execution sequence number of the execution code represented by the instruction information.
[0085] Creation unit 304 is used to create a blockchain network based on a visual interface and according to the instruction information set, organization information, and alliance information; wherein, the blockchain network is used to process financial transaction data.
[0086] The apparatus in this embodiment can execute the technical solutions in the above method. Its specific implementation process and technical principles are the same, and will not be repeated here.
[0087] Figure 5 A schematic diagram of the structure of another blockchain network creation apparatus provided in this application embodiment is shown below. Figure 5 As shown, the device 400 includes:
[0088] The receiving unit 401 is used to receive organization information and consortium information input by the user; wherein, the organization information is the information of network nodes in the blockchain network, and the network nodes are used to process financial transaction data; the consortium information represents the information of the consortium chain in the blockchain network; the consortium chain is used to store the financial transaction data processed by the network nodes.
[0089] Establishment unit 402 is used to establish the mapping relationship between the consortium chain in the consortium information and the network nodes in the organization information.
[0090] The first determining unit 403 is used to determine a set of instruction information in response to a creation instruction input by a user; wherein the creation instruction is used to instruct the creation of a blockchain network; the set of instruction information includes at least one instruction information; the instruction information represents the execution code of the network creation process; the instruction information has an execution sequence number, which is the execution sequence number of the execution code represented by the instruction information.
[0091] Creation unit 404 is used to create a blockchain network based on a visual interface and according to the instruction information set, organization information, and alliance information; wherein, the blockchain network is used to process financial transaction data.
[0092] In one example, unit 402 is constructed, including:
[0093] The determination module 4021 is used to determine, in response to a query command input by the user, a network node that meets the preset admission criteria of the consortium blockchain from the organization information, and is the target network node of the consortium blockchain; wherein, the query command is used to instruct the query network node, and the query command includes the preset admission criteria of the consortium blockchain in the consortium information.
[0094] Module 4022 is used to establish the mapping relationship between the consortium chain in the consortium information and the target network node in the organization information.
[0095] In one example, a consortium blockchain has consortium blockchain nodes, which are used to sort the financial transaction data processed by the network nodes in the consortium blockchain; module 4022 is specifically used for:
[0096] Establish a mapping relationship between the consortium blockchain nodes and the target network nodes of the consortium blockchain.
[0097] In one example, the instruction set includes a genesis block creation instruction, a network configuration instruction, and a network startup instruction; the genesis block creation instruction is used to instruct the creation of a genesis block file for the consortium blockchain, which represents the initially created network block in the consortium blockchain; the network configuration instruction is used to instruct the configuration of the network for the consortium blockchain; and the network startup instruction is used to instruct the startup of the network configured for the consortium blockchain.
[0098] Create cell 404, including:
[0099] The first generation module 4041 is used to generate a set of certificate information corresponding to the organization information based on the organization information; wherein, the set of certificate information includes certificate information corresponding to each network node in the organization information, and the certificate information represents the identity of the network node in the consortium blockchain; and send the certificate information to the server of the consortium blockchain corresponding to the certificate information.
[0100] The second generation module 4042 is used to generate the genesis block file of the consortium blockchain based on the genesis block creation instruction and consortium information in the instruction information.
[0101] The third generation module 4043 is used to generate a system file corresponding to the organization information based on the network configuration instructions and organization information in the instruction information; wherein, the system file includes the mapping relationship between the consortium chain nodes, the network nodes in the consortium chain, and the servers to which the consortium chain belongs.
[0102] The fourth generation module 4044 is used to generate and execute the set of startup files corresponding to the organization information according to the network startup instructions and organization information in the instruction information, so as to obtain the blockchain network; wherein, the set of startup files includes the running code corresponding to each network node in the organization information, and the running code of the consortium chain node corresponding to each network node in the organization information.
[0103] In one example, the second generation module 4042 is specifically used for:
[0104] Based on the instructions for creating the genesis block, the leader node of each consortium chain in the consortium information is determined; the leader node is the network node in the consortium chain used to process other network nodes.
[0105] Based on the consortium blockchain's leader node, a configuration file for the consortium blockchain is generated; this configuration file contains the configuration files for the consortium blockchain's channel transactions.
[0106] Genesis block file of consortium blockchain is generated based on the consortium blockchain's configuration file.
[0107] In one example, device 400 also includes:
[0108] The display unit 405 is used to display the execution information set corresponding to the instruction information set based on a visual interface, and to store the execution information set in a preset database; wherein, the execution information set includes the execution information corresponding to each instruction information in the instruction information set, and the execution information indicates whether the execution code represented by the instruction information has been executed successfully.
[0109] In one example, device 400 also includes:
[0110] The second determining unit 406 is used to determine the node information set corresponding to the organization information; wherein, the node information set includes node information corresponding to each network node in the organization information, and the node information includes the server address, port number and anchor node identifier of the network node.
[0111] Storage unit 407 is used to store organizational information, alliance information and node information in a preset database.
[0112] The apparatus in this embodiment can execute the technical solutions in the above method. Its specific implementation process and technical principles are the same, and will not be repeated here.
[0113] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application, such as... Figure 6 As shown, the electronic device 500 includes: a memory 501 and a processor 502; the memory 501 is a memory for storing executable instructions of the processor 502.
[0114] The processor 502 is configured to perform the method provided in the above embodiments.
[0115] The electronic device 500 also includes a receiver 503 and a transmitter 504. The receiver 503 is used to receive instructions and data sent by other devices, and the transmitter 504 is used to send instructions and data to external devices.
[0116] Figure 7 This is a block diagram illustrating an electronic device 800 according to an exemplary embodiment. The electronic device 800 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.
[0117] Electronic device 800 may include one or more of the following components: processing component 802, memory 804, power supply component 806, multimedia component 808, audio component 810, input / output interface 812, sensor component 814, and communication component 816.
[0118] Processing component 802 typically controls the overall operation of electronic device 800, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the methods described above. Furthermore, processing component 802 may include one or more modules to facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.
[0119] Memory 804 is configured to store various types of data to support the operation of electronic device 800. Examples of this data include instructions for any application or method operating on electronic device 800, contact data, phonebook data, messages, pictures, videos, etc. Memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory, electrically erasable programmable read-only memory, erasable programmable read-only memory, programmable read-only memory, read-only memory, magnetic storage, flash memory, magnetic disk, or optical disk.
[0120] Power supply component 806 provides power to various components of electronic device 800. Power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 800.
[0121] Multimedia component 808 includes a screen that provides an output interface between electronic device 800 and user. In some embodiments, the screen may include a liquid crystal display and a touch panel. If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 808 includes a front-facing camera and / or a rear-facing camera. When electronic device 800 is in an operating mode, such as a shooting mode or video mode, the front-facing camera and / or rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0122] Audio component 810 is configured to output and / or input audio signals. For example, audio component 810 includes a microphone configured to receive external audio signals when electronic device 800 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 804 or transmitted via communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
[0123] Input / output interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0124] Sensor assembly 814 includes one or more sensors for providing status information for various aspects of electronic device 800. For example, sensor assembly 814 can detect the on / off state of electronic device 800, the relative positioning of components such as the display and keypad of electronic device 800, changes in position of electronic device 800 or a component of electronic device 800, the presence or absence of user contact with electronic device 800, orientation or acceleration / deceleration of electronic device 800, and temperature changes of electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 814 may also include a light sensor for use in imaging applications. In some embodiments, sensor assembly 814 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.
[0125] Communication component 816 is configured to facilitate wired or wireless communication between electronic device 800 and other devices. Electronic device 800 can access wireless networks based on communication standards. In one exemplary embodiment, communication component 816 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 816 also includes a near-field communication module to facilitate short-range communication. For example, the near-field communication module may be implemented based on radio frequency identification (RFID), infrared data association (IRA) technology, ultra-wideband (UWB) technology, Bluetooth technology, and other technologies.
[0126] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits, digital signal processors, digital signal processing devices, programmable logic devices, field-programmable gate arrays, controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.
[0127] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, which can be executed by a processor 820 of an electronic device 800 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a random access memory, magnetic tape, floppy disk, or optical data storage device, etc.
[0128] This application also provides a non-transitory computer-readable storage medium, which, when the instructions in the storage medium are executed by the processor of an electronic device, enables the electronic device to perform the above-described method.
[0129] According to an embodiment of this application, this application also provides a computer program product, which includes: a computer program stored in a readable storage medium, at least one processor of an electronic device can read the computer program from the readable storage medium, and the at least one processor executes the computer program to cause the electronic device to perform the solution provided in any of the above embodiments.
[0130] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0131] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A method for creating a blockchain network, characterized in that, The method includes: The system receives organization information and consortium information input by the user; wherein, the organization information is the information of network nodes in the blockchain network, and the network nodes are used to process financial transaction data; the consortium information represents the information of consortium chains in the blockchain network; the consortium chains are used to store the financial transaction data processed by the network nodes; Establish a mapping relationship between the consortium blockchain in the consortium information and the network nodes in the organization information; In response to the user's input creation instruction, a set of instruction information is determined; wherein, the creation instruction is used to instruct the creation of a blockchain network; the set of instruction information includes at least one instruction information; the instruction information represents the execution code of the network creation process; the instruction information has an execution sequence number, which is the execution sequence number of the execution code represented by the instruction information; The instruction information set includes a genesis block creation instruction, a network configuration instruction, and a network startup instruction; the genesis block creation instruction is used to instruct the creation of a genesis block file for the consortium blockchain, the genesis block file representing the initially created network block in the consortium blockchain; the network configuration instruction is used to instruct the configuration of the network for the consortium blockchain; the network startup instruction is used to instruct the startup of the network configured for the consortium blockchain. Based on a visual interface, a blockchain network is created according to the instruction information set, the organization information, and the alliance information, including: Based on the organization information, a certificate information set corresponding to the organization information is generated; wherein, the certificate information set includes certificate information corresponding to each network node in the organization information, and the certificate information represents the identity of the network node in the consortium blockchain; and the certificate information is sent to the server of the consortium blockchain corresponding to the certificate information. Genesis block file of the consortium blockchain is generated based on the creation instruction for the genesis block in the instruction information and the consortium information; Based on the network configuration instructions and organization information in the instruction information, a system file corresponding to the organization information is generated; wherein, the system file includes the mapping relationship between the consortium blockchain nodes, the network nodes in the consortium blockchain, and the servers to which the consortium blockchain belongs; the consortium blockchain nodes are used to sort the financial transaction data processed by the network nodes in the consortium blockchain; Based on the network startup instruction in the instruction information and the organization information, a set of startup files corresponding to the organization information is generated and executed to obtain the blockchain network; wherein, the set of startup files includes the running code corresponding to each network node in the organization information, and the running code of the consortium blockchain node corresponding to each network node in the organization information; wherein, the blockchain network is used to process financial transaction data.
2. The method according to claim 1, characterized in that, Establishing a mapping relationship between the consortium blockchain in the consortium information and the network nodes in the organization information includes: In response to the query command input by the user, network nodes that meet the preset admission criteria of the consortium blockchain are determined from the organization information and are designated as target network nodes of the consortium blockchain; wherein, the query command is used to instruct the query network node, and the query command includes the preset admission criteria of the consortium blockchain in the consortium information; Establish a mapping relationship between the consortium chain in the consortium information and the target network node in the organization information.
3. The method according to claim 2, characterized in that, The consortium blockchain has consortium blockchain nodes; establishing a mapping relationship between the consortium blockchain in the consortium information and the target network nodes in the organization information includes: Establish a mapping relationship between the consortium blockchain nodes and the target network nodes of the consortium blockchain.
4. The method according to claim 1, characterized in that, Based on the genesis block creation instruction in the instruction information and the consortium information, the genesis block file of the consortium blockchain is generated, including: Based on the creation of the genesis block instruction, the leader node of each consortium chain in the consortium information is determined; wherein, the leader node is a network node in the consortium chain used to process other network nodes; Based on the leader node of the consortium blockchain, a configuration file for the consortium blockchain is generated; wherein, the configuration file is a configuration file for the consortium blockchain's channel transactions; The genesis block file of the consortium blockchain is generated based on the consortium blockchain's configuration file.
5. The method according to claim 1, characterized in that, The method further includes: Based on the visualization interface, the execution information set corresponding to the instruction information set is displayed, and the execution information set is stored in a preset database; wherein, the execution information set includes execution information corresponding to each instruction information in the instruction information set, and the execution information indicates whether the execution code represented by the instruction information has been executed successfully.
6. The method according to any one of claims 1-5, characterized in that, The method further includes: Determine the set of node information corresponding to the organization information; wherein, the set of node information includes node information corresponding to each network node in the organization information, and the node information includes the server address, port number and anchor node identifier of the network node; The organization information, the alliance information, and the node information are stored in a preset database.
7. A device for creating a blockchain network, characterized in that, The device includes: A receiving unit is configured to receive organization information and consortium information input by a user; wherein, the organization information is information about network nodes in the blockchain network, and the network nodes are used to process financial transaction data; the consortium information represents information about consortium blockchains in the blockchain network; the consortium blockchain is used to store the financial transaction data processed by the network nodes; A setup unit is used to establish a mapping relationship between the consortium chain in the consortium information and the network nodes in the organization information; A determining unit is configured to determine a set of instruction information in response to a creation instruction input by the user; wherein the creation instruction is used to instruct the creation of a blockchain network; the set of instruction information includes at least one set of instruction information; the instruction information represents the execution code of the network creation process; the instruction information has an execution sequence number, which is the execution sequence number of the execution code represented by the instruction information; the set of instruction information includes a genesis block creation instruction, a network configuration instruction, and a network start instruction; the genesis block creation instruction is used to instruct the creation of a genesis block file for the consortium blockchain, the genesis block file representing the initially created network block in the consortium blockchain; the network configuration instruction is used to instruct the configuration of the network for the consortium blockchain; and the network start instruction is used to instruct the start of the network configured for the consortium blockchain. A creation unit, used to create a blockchain network based on a visual interface and according to the instruction information set, the organization information, and the alliance information, includes: Based on the organization information, a certificate information set corresponding to the organization information is generated; wherein, the certificate information set includes certificate information corresponding to each network node in the organization information, and the certificate information represents the identity of the network node in the consortium blockchain; and the certificate information is sent to the server of the consortium blockchain corresponding to the certificate information. Genesis block file of the consortium blockchain is generated based on the creation instruction for the genesis block in the instruction information and the consortium information; Based on the network configuration instructions and organization information in the instruction information, a system file corresponding to the organization information is generated; wherein, the system file includes the mapping relationship between the consortium blockchain nodes, the network nodes in the consortium blockchain, and the servers to which the consortium blockchain belongs; the consortium blockchain nodes are used to sort the financial transaction data processed by the network nodes in the consortium blockchain; Based on the network startup instruction in the instruction information and the organization information, a set of startup files corresponding to the organization information is generated and executed to obtain the blockchain network; wherein, the set of startup files includes the running code corresponding to each network node in the organization information, and the running code of the consortium blockchain node corresponding to each network node in the organization information; wherein, the blockchain network is used to process financial transaction data.
8. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 6.