Block chain network deployment method, graphical user interface, computer equipment and medium
Through the graphical user interface, users can customize the construction of blockchain network topology and generate environment configuration files, solving the problem of complex deployment methods and inability to support customized topology in the existing technology, and achieving simple and efficient blockchain network deployment.
Patent Information
- Application Number
- CN202411765572.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-12-03
AI Technical Summary
The existing blockchain network deployment methods are complex in operation and cannot support custom blockchain network topology, and user operations are not friendly.
It provides a graphical user interface, including a toolbar area, a configuration area and a preview area. Users can build a blockchain network topology in the configuration area by dragging and dropping and clicking components. The preview area displays the topology structure in real time, generates environment configuration files and updates binary files to deploy the blockchain network.
It realizes a deployment method that is easy to operate and supports custom blockchain network topology, enhances deployment flexibility, ensures that the deployed blockchain network meets expectations, and simplifies the process through one-click deployment function.
Smart Images

Figure CN119718150A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of blockchain technology, and in particular to a blockchain network deployment method, a graphical user interface, a computer device, and a medium. Background Art
[0002] Traditional blockchain network deployment methods mainly include: manual deployment, script automation, containerized deployment, cloud services, and blockchain as a service (BaaS). Among them, for manual deployment and script automation, users need to have a deep understanding of blockchain technology. For containerized deployment and cloud services, the dynamic management and expansion of resources are relatively complex, requiring additional monitoring and tuning. For BaaS, the platform provides a form for users to fill in node configuration information, but the form cannot flexibly support the blockchain network topology in the business scenario expected by the user, and the user operation is not user-friendly.
[0003] Therefore, no effective solution has been proposed for the problem that the blockchain network deployment method in the related technology is complex to operate and cannot support customized blockchain network topology. Summary of the invention
[0004] Based on this, it is necessary to provide a blockchain network deployment method, a graphical user interface, a computer device and a medium that are easy to operate and support customized blockchain network topology to address the above technical problems.
[0005] In a first aspect, the present application provides a blockchain network deployment method, which is applied to a graphical user interface, wherein the graphical user interface includes a toolbar area, a configuration area, and a preview area, and the method includes:
[0006] In response to a first operation of a user on a target component in the toolbar area, displaying the target component in the configuration area; wherein the target component is used to represent a blockchain element;
[0007] In response to a second operation of the user on the target component in the configuration area, a connection relationship between the target components is established, and a corresponding blockchain network topology is displayed in the preview area;
[0008] Generate an environment configuration file according to the blockchain network topology structure;
[0009] The initial network environment configuration data in the binary file is updated based on the environment configuration file, and the blockchain network is deployed based on the updated binary file.
[0010] In one of the embodiments, the first operation and the second operation include dragging and / or clicking; and the connection relationship between the target components is based on geometric representation.
[0011] In one of the embodiments, in response to a first operation of a user on a target component in the toolbar area, after the configuration area displays the target component, the method further includes:
[0012] In response to a third operation of the user on the target component in the configuration area, displaying a property panel;
[0013] Based on the user's editing operation in the property panel, the properties of the target component are updated.
[0014] In one of the embodiments, before generating an environment configuration file according to the blockchain network topology structure, the method further includes:
[0015] Performing a first legitimacy check on the blockchain network topology structure; wherein the object of the first legitimacy check includes the connection relationship between each of the target components and / or the attributes of each of the target components;
[0016] If the first legitimacy check succeeds, generating an environment configuration file according to the blockchain network topology structure; or,
[0017] In the event that the first legality check fails, an error message is displayed and / or repair is performed.
[0018] In one embodiment, the graphical user interface further includes a template library, wherein the template library includes preset configuration templates of the blockchain network; generating an environment configuration file according to the blockchain network topology structure includes:
[0019] In response to a selection operation by a user in the template library, determining a target preset configuration template;
[0020] The target preset configuration template is adjusted according to the blockchain network topology structure to generate the environment configuration file.
[0021] In one embodiment, adjusting the target preset configuration template according to the blockchain network topology structure to generate the environment configuration file includes:
[0022] Mapping the user input operation corresponding to the blockchain network topology structure to the target preset configuration template;
[0023] The configuration information corresponding to the blockchain network topology structure is embedded into the target preset configuration template to generate the environment configuration file.
[0024] In one embodiment, deploying a blockchain network based on the updated binary file includes:
[0025] According to the updated binary file, deploy the contract on the target node and record the address and status of the contract;
[0026] Start services and processes to perform health checks on the deployed blockchain network.
[0027] In one of the embodiments, before responding to a first operation of a user on a target component in the toolbar area, the method further includes:
[0028] Performing a second legality check on the binary file;
[0029] In case the second legality check succeeds, providing the graphical user interface;
[0030] In the event that the second legality check fails, an error report is returned and / or the user is prompted to re-upload the binary file.
[0031] In one embodiment, performing a second validity check on the binary file includes:
[0032] Determining the file type according to the extension of the binary file; wherein the file type of the binary file includes a Docker image file or an executable file;
[0033] According to the file type of the binary file, the file content of the binary file is extracted, and an integrity check and a file structure check are performed based on the file content.
[0034] In a second aspect, the present application also provides a graphical user interface, including: a toolbar area, a configuration area, a preview area, a file generation unit, and a deployment unit; wherein,
[0035] The toolbar area includes a component library, and the component library includes a plurality of components for representing blockchain elements;
[0036] The configuration area is used to display the target components selected by the user in the toolbar area, and to establish connection relationships between the target components;
[0037] The preview area is used to display the blockchain network topology corresponding to the connection relationship between each of the target components;
[0038] The file generation unit is used to generate an environment configuration file according to the blockchain network topology structure;
[0039] The deployment unit is used to update the initial network environment configuration data in the binary file based on the environment configuration file, and deploy the blockchain network based on the updated binary file.
[0040] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method described in the first aspect when executing the computer program.
[0041] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.
[0042] The above-mentioned blockchain network deployment method, graphical user interface, computer device and medium provide a graphical user interface to support users to build and view the blockchain network topology in real time in a graphical operation mode, thereby enhancing the flexibility of deployment; generate an environment configuration file based on a customized blockchain network topology; update the binary file based on the environment configuration file to ensure that the deployed blockchain network meets expectations, and finally deploy the blockchain network with one click based on the updated binary file. Such a setting makes the blockchain network deployment operation simple and supports customized blockchain network topology. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 A hardware structure block diagram of a terminal of a blockchain network deployment method in one embodiment;
[0044] Figure 2 is a schematic diagram of a graphical user interface in one embodiment;
[0045] Figure 3 A flowchart of a blockchain network deployment method in one embodiment;
[0046] Figure 4 A graphical network configuration flow chart in one embodiment;
[0047] Figure 5 A flowchart of binary file legitimacy verification in one embodiment;
[0048] Figure 6 A flowchart of a blockchain network deployment method in another embodiment;
[0049] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with 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.
[0051] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the", "these" and the like in this application do not represent quantitative restrictions, and they can be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether directly or indirectly. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships. For example, "A and / or B" can mean: A exists alone, A and B exist at the same time, and B exists alone. Usually, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0052] The method embodiment provided in this embodiment can be executed in a terminal, a computer or a similar computing device. For example, running on a terminal, Figure 1 This is a hardware structure diagram of a terminal of a blockchain network deployment method according to an embodiment of the present application. Figure 1 As shown, the terminal may include one or more ( Figure 1 Only one is shown in the figure) processor 101 and memory 102 for storing data, wherein processor 101 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA. The above terminal may also include a transmission device 103 and an input and output device 104 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0053] The memory 102 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the blockchain network deployment method in this embodiment. The processor 101 executes various functional applications and data processing by running the computer program stored in the memory 102, that is, to implement the above method. The memory 102 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 102 may further include a memory remotely arranged relative to the processor 101, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0054] The transmission device 103 is used to receive or send data via a network. The above network includes a wireless network provided by a communication provider of the terminal. In one example, the transmission device 103 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 103 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.
[0055] Some traditional blockchain network deployment methods are complex to operate, and some cannot support custom blockchain network topology. Specifically, the platform provides a form for users to fill in node configuration information, but does not support users to select the type of blockchain to be deployed by uploading blockchain binary files (referred to as binary files), and cannot support developers' needs to verify blockchain technology solutions. Moreover, configuring nodes in the form of a form and displaying node information in the form of a list cannot reflect the blockchain network topology, especially cannot flexibly support the blockchain network topology in the business scenarios expected by users.
[0056] Based on the analysis of the above situation, in one embodiment, Figure 2 A schematic diagram of a graphical user interface is provided, which can be displayed on a terminal, a computer or a similar computing device for deploying a blockchain network. Figure 2 As shown, the graphical user interface includes: a toolbar area, a configuration area, a preview area, a file generation unit, and a deployment unit. Figure 2 What is shown is only an example. The various parts in the graphical user interface may have other combinations and may also include other functional areas, units, controls, etc. in addition to the parts shown in the figure.
[0057] Among them, the toolbar area includes a component library, which includes multiple components for representing blockchain elements; the configuration area is used to display the target component selected by the user in the toolbar area, and to build the connection relationship between each target component; the preview area is used to display the blockchain network topology corresponding to the connection relationship between each target component; the file generation unit is used to generate an environment configuration file based on the blockchain network topology; the deployment unit is used to update the initial network environment configuration data in the binary file based on the environment configuration file, and deploy the blockchain network based on the updated binary file. Among them, the file generation unit can be set to a "Confirm Configuration" button. After the user completes the network configuration, the user can view the final blockchain network topology and configuration details. After confirming that there is no error, click the "Confirm Configuration" button, and the terminal will generate the environment configuration file required for deployment according to the blockchain network topology. The deployment unit can be set to a "One-click Deployment" button. When the user clicks the "One-click Deployment" button, the terminal will read the environment configuration file to update the binary file, and automatically execute the deployment of the blockchain network according to the updated binary file.
[0058] Accordingly, Figure 3 A flowchart of a blockchain network deployment method based on the graphical user interface is provided. Figure 1 The terminal is taken as an example to illustrate, including the following steps:
[0059] Step S101, in response to a first operation of a user on a target component in a toolbar area, displaying the target component in a configuration area; wherein the target component is used to represent a blockchain element.
[0060] The first operation includes dragging and / or clicking. When the user drags the target component in the toolbar area and does not release it, the graphical user interface can display the animation effect of the target component moving with the drag operation. When the user clicks the mouse to release the drag operation, the target component stops moving and settles at a certain position in the configuration area. When the user clicks the target component in the toolbar area, the graphical user interface will display the animation effect of the target component hovering over the mouse mark and moving with the movement of the mouse. When the mouse is clicked at a certain position in the configuration area, the target component stops moving and settles at the corresponding position in the configuration area. Through this step, the drag and drop function of the target component is realized, and the user can freely arrange the target component in the configuration area. Among them, blockchain elements include but are not limited to blockchain nodes, chains, and smart contracts. Through the first operation, the user can select the desired blockchain nodes, chains and smart contracts.
[0061] In some embodiments, after the target component is displayed in the configuration area, a property panel may be displayed in response to a third operation of the user on the target component in the configuration area; based on the user's editing operation in the property panel, the properties of the target component are updated. Specifically, the user can click on the target component with the mouse, and a property panel will pop up in the configuration area. The property panel displays all configurable properties of the current target component, and the user can directly modify the properties in the property panel, thus realizing the modification of the properties of the blockchain element. Among them, the properties of the target component include but are not limited to the node type (full node, light node) and the consensus mechanism.
[0062] Step S102, in response to the user's second operation on the target component in the configuration area, a connection relationship between the target components is established, and the corresponding blockchain network topology is displayed in the preview area.
[0063] The second operation includes dragging and / or clicking, and the connection relationship between each target component can be represented based on geometric figures, such as lines and / or arrows. Specifically, the user can connect different target components by clicking and dragging the mouse to establish the relationship between blockchain nodes, and indicate the connection status through visual feedback (such as lines, arrows and other geometric figures). Moreover, the user's operations on the target component (such as dragging, connecting, modifying properties) will be immediately reflected in the preview area. This setting makes it convenient for users to view the blockchain network topology intuitively and in real time.
[0064] Step S103, generating an environment configuration file according to the blockchain network topology structure.
[0065] The environment configuration file is used to describe the expected blockchain network configuration. Specifically, after the user completes the network configuration, the user can view the final blockchain network topology and configuration details. After confirming that they are correct, click the "Confirm Configuration" button, and the system will generate the environment configuration file required for deployment based on these configurations.
[0066] Step S104, updating the initial network environment configuration data in the binary file based on the environment configuration file, and deploying the blockchain network based on the updated binary file.
[0067] Binary files are pre-compiled executable program files that contain instructions and data for starting blockchain nodes, blockchain operations (such as transaction creation, broadcasting, verification, and packaging), and blockchain networks. They are used to run blockchain nodes in computer systems and participate in related operations of blockchain networks. Binary files include but are not limited to blockchain platform files such as Ethereum, Hyperledger Fabric, and Corda (an open source blockchain platform developed by the R3 Alliance).
[0068] Considering that binary files have undergone rigorous security review and testing, it can be ensured that they will not be attacked or tampered with by malware. Moreover, in some open source blockchain projects, based on the open source characteristics of binary files, users can view and modify the source code to meet the specific needs of actual network deployment. Therefore, this step uses binary files, which are more secure, more portable, and more convenient for open source than traditional forms.
[0069] The blockchain network configuration is part of the binary file function, which corresponds to the initial network configuration data in the binary file. Since the initial network configuration data are all default settings, they cannot be used directly. Therefore, this embodiment generates an environment configuration file based on the above steps S101 to S102 to describe the expected blockchain network configuration, and replaces the initial network environment configuration data in the binary file with the environment configuration file to ensure that the deployed blockchain network is consistent with expectations. According to the updated binary file, resource allocation, network connection and service startup are automatically processed to realize the deployment of the blockchain network. Specifically, when the user clicks the "One-click Deployment" button, the terminal will read the environment configuration file to update the binary file, and automatically execute the deployment of the blockchain network according to the updated binary file.
[0070] In the above steps S101 to S104, a graphical user interface is provided to support users to build and view the blockchain network topology in real time in a graphical operation mode, thereby enhancing the flexibility of deployment; an environment configuration file is generated based on the customized blockchain network topology; the binary file is updated based on the environment configuration file to ensure that the deployed blockchain network meets expectations, and finally the blockchain network is deployed with one click based on the updated binary file. This setting makes the blockchain network deployment operation simple and supports customized blockchain network topology.
[0071] In one embodiment, before generating an environment configuration file based on the blockchain network topology structure, the method also includes: performing a first legitimacy check on the blockchain network topology structure; wherein the object of the first legitimacy check includes the connection relationship between each target component and / or the attributes of each target component; if the first legitimacy check succeeds, generating an environment configuration file based on the blockchain network topology structure; or, if the first legitimacy check fails, displaying an error prompt and / or performing repair.
[0072] In this embodiment, the terminal passes the first legitimacy check to check whether the user configuration is correct. When there is a problem with the user configuration, the terminal will display an error prompt and / or perform a repair. The legitimacy check of the connection relationship between the target components specifically refers to a logical check of the connection relationship between the nodes, such as checking whether a full node can be connected to multiple light nodes, but light nodes cannot be connected to each other. The legitimacy check of the attributes of each target component can be a check of the consensus mechanism, network type; it can also be a conflict check, such as checking whether the same smart contract is configured with different parameters on different nodes.
[0073] Specifically, when an error is detected, the terminal will give a corresponding prompt message, such as "The connection between node A and node B is not allowed. Please check the node type or adjust the connection settings." For common errors, the terminal will provide one-click repair options, such as "Automatically remove illegal connections" or "Restore to the last valid configuration." After the user completes the network configuration, the user can view the final network structure and configuration details. After confirming that there are no errors, click "Confirm Configuration" (that is, the file generation unit), and the terminal will generate the environment configuration file required for deployment based on the current configuration. This setting plays the role of automatically checking the legitimacy of user input operations, thereby reducing manual configuration errors.
[0074] In one embodiment, the graphical user interface also includes a template library, which contains preset configuration templates for the blockchain network; generating an environment configuration file according to the topological structure of the blockchain network, including: determining a target preset configuration template in response to a user's selection operation in the template library; adjusting the target preset configuration template according to the topological structure of the blockchain network to generate an environment configuration file.
[0075] Figure 4 A graphical network configuration flow chart of this embodiment is provided, such as Figure 4 As shown, the process includes the following steps:
[0076] Step S201, drag and connect target components to build a blockchain network topology structure;
[0077] Step S202, perform node connection legitimacy check; if the check is successful, execute step S203; otherwise, execute step S204;
[0078] Step S203, editing the property panel of the target component;
[0079] Step S204, return to prompt information; and go to step S201;
[0080] Step S205, perform attribute legitimacy check; if the check succeeds, execute step S206; otherwise, execute step S207;
[0081] Step S206, confirm the configuration;
[0082] Step S207, return prompt information; go to step S203;
[0083] Step S208, generate an environment configuration file; exit the process;
[0084] Step S209, determine whether to save as a configuration template; if so, execute step S210; otherwise, exit the process;
[0085] Step S210, saving the custom configuration template in the template library.
[0086] In the above steps S201 to S210, the terminal provides a preset configuration template for automatically connecting the target component, and supports adjusting the preset configuration template based on user input operations, thereby generating an environment configuration file to meet actual needs. The terminal can pre-store different types of preset configuration templates covering various blockchain platforms. The preset configuration template is scalable and supports users to customize extension components and configuration options to meet specific business needs. In actual applications, the preset configuration template can be set up in multiple versions according to different industries, such as supply chain configuration templates, voting configuration templates, identity authentication configuration templates, etc. Users can use the desired preset configuration template in a one-click selection method to achieve rapid deployment. Specifically, when the user selects the preset configuration template, the terminal will load the preset configuration template. At this time, each target component and its connection relationship will be automatically generated, and the blockchain network topology will be presented in the preview area. The user can directly use the blockchain network topology or adjust it on its basis.
[0087] Furthermore, the terminal also supports user-defined configuration templates. After completing the network configuration, the user can choose to save it as a custom configuration template. The terminal will ask the user to enter the template name through a pop-up window and store the configuration data in the database for subsequent use. This setting implements a user-friendly graphical user interface that allows users to easily create, edit and manage blockchain network topology.
[0088] In one embodiment, adjusting the target preset configuration template according to the blockchain network topology structure and generating an environment configuration file can be achieved by the following method:
[0089] Map the user input operation corresponding to the blockchain network topology structure to the target preset configuration template; embed the configuration information of the corresponding blockchain network topology structure into the target preset configuration template to generate an environment configuration file.
[0090] After generating the blockchain network topology, the terminal will collect the target components, attributes and network topology information selected by the user from the blockchain network topology, and generate an environment configuration file in combination with the target preset configuration template. Specifically, the template engine is used to map the user input operation to the preset configuration template, and the configuration information specifically set by the user is embedded into the preset configuration template through placeholder replacement to generate an environment configuration file. After the environment configuration file is generated, the basic environment configuration is determined according to the network type and node type selected by the user, and the node definition is generated according to the number of nodes, node roles, network addresses and other information, and the corresponding services are defined for each node, and the network settings are configured. For example, if a smart contract is selected, the contract deployment configuration will be automatically generated. Through these operations, the deployment configuration file (such as DockerCompose) of the corresponding environment is automatically generated. This mechanism ensures the automation of the deployment process and improves the accuracy and efficiency of the configuration.
[0091] In one embodiment, the file type of the binary file is a Docker image file or an executable file. Deploying a blockchain network based on the updated binary file can be achieved by the following method:
[0092] Based on the updated binary file, deploy the contract on the target node and record the contract address and status; start the service and process, and perform a health check on the deployed blockchain network.
[0093] In this embodiment, the user can click the "one-click deployment" button to trigger the deployment process. The terminal will record the user's deployment request and generate a unique task ID. According to the environment configuration file generated in the previous steps, the required computing resources are automatically allocated. If deployed in the cloud, the terminal will interact with the API of the cloud service provider to obtain the required resources. Taking Docker Compose as an example, the terminal will use container technology to start the containers of each node according to the generated configuration file, configure the network connection between the containers, and ensure that the nodes can communicate with each other. If the user chooses to deploy a smart contract, the terminal will automatically deploy the contract on the specified node according to the configuration file and record the contract address and status. Start all necessary services and processes to ensure the normal operation of each component of the blockchain network, and perform a health check on the blockchain network (for example, call the relevant interface through the RPC service to obtain the connection status of the node). After the deployment is completed, the system returns the node information, network status and access link of the blockchain network.
[0094] The services and processes started can be one or more of the following:
[0095] Node service: used to store complete blockchain ledgers, verify transactions and blocks, and propagate new transaction and block information;
[0096] Network services: including P2P, which is used to achieve direct communication between nodes, propagate transactions and block information, and RPC services provide an interface for external applications to interact with blockchain nodes;
[0097] Consensus service: start the corresponding consensus service process according to the selected consensus algorithm;
[0098] Encryption service: used to encrypt and decrypt transactions and blocks to ensure data security and privacy;
[0099] Database: used to store blockchain data, capable of efficiently storing and retrieving large amounts of transaction and block data.
[0100] In one embodiment, before responding to a first operation of a user on a target component in the toolbar area, the method further includes:
[0101] Perform a second validity check on the binary file; if the second validity check succeeds, provide a graphical user interface; if the second validity check fails, return an error report and / or prompt the user to re-upload the binary file.
[0102] In this embodiment, the required blockchain binary file (such as a Docker image or executable file) can be uploaded through a graphical user interface. The interface supports multiple file formats to ensure flexibility and compatibility. Further, the file type can be determined based on the extension of the binary file; wherein the file type of the binary file can be a Docker image file or an executable file; according to the file type of the binary file, the file content of the binary file is extracted, and integrity verification and file structure verification are performed based on the file content. For ease of understanding, Figure 5 A flowchart of the binary file legality check of this embodiment is provided, such as Figure 5 As shown, the process includes the following steps:
[0103] Step S301, check the file extension. The terminal will first identify the format of the uploaded binary file and determine the file type by checking the extension. If it is a Docker image, the Docker API will be used to check whether it is a valid image file.
[0104] Step S302, extract the file content. Determine the file format, if it is a compressed file, execute step S303; if it is an executable file, execute step S304.
[0105] Step S303, automatically decompress and extract content.
[0106] Step S304: parse the file header information to obtain relevant metadata (such as version number, dependent libraries, etc.).
[0107] Step S305, integrity check; if the integrity check is successful, execute step S306; otherwise, execute step S308. When performing the integrity check, a hash algorithm (such as SHA-256) can be used to calculate the extracted file content, and the hash value of the binary file can be calculated and compared with the pre-stored hash value to verify whether the file has been tampered with during the transmission process. For Docker images, the integrity check will be performed using the Digest value of the image. Exemplarily, when pulling an image from a Docker repository, the Docker client will send a request to the repository to obtain the metadata of the image, including the Digest value of the image. Docker will store the obtained image Digest value in the local image repository and associate it with the corresponding image tag. In this way, when the image is subsequently operated, its Digest value can be easily obtained for verification.
[0108] Step S306, file structure verification; if the file structure verification succeeds, execute step S307; otherwise, execute step S308. File structure verification can be based on the extracted file content, verifying the file format to verify whether the file structure meets expectations. For example, for Docker images, check the integrity of the configuration files and layers of the Docker image, and for blockchain-related executable files, check whether there are necessary dependencies and operating environments.
[0109] Step S307, return the verification success information and exit the process.
[0110] Step S308: Return an error report and prompt the user to re-upload the correct binary file.
[0111] This embodiment reduces manual intervention by automatically verifying the validity of binary files, and intervenes in the validity verification of binary files before graphical operations, thereby improving the reliability of deployment.
[0112] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0113] In one embodiment, Figure 6 A flowchart of another blockchain network deployment method is provided, such as Figure 6 As shown, the process includes the following steps:
[0114] Step S401: Upload a binary file based on a graphical user interface.
[0115] Step S402: parse and verify the binary file. Figure 4 The process shown.
[0116] Step S403: Execute graphical network configuration. Figure 3 The process shown.
[0117] Step S404: Automatically generate deployment configuration. For details, please refer to Figure 2 or Figure 3 The process shown.
[0118] Step S405: one-click deployment.
[0119] The following will introduce the above-mentioned blockchain network deployment method through specific examples.
[0120] Example 1 provides a process for deploying an Ethereum blockchain network based on the above process. The specific steps are as follows:
[0121] Step 1: Upload binary files based on the graphical user interface. Users upload a Docker image file of an Ethereum node (such as ethereum / client-go) or a packaged executable file through the graphical user interface.
[0122] Step 2: Parse and verify the binary file. The terminal checks the format and integrity of the uploaded Docker image or executable file. After verification, the terminal confirms that the binary file is a valid Ethereum node image.
[0123] Step 3: Perform graphical network configuration. Network topology selection: The user selects "Private Network" as the network type on the graphical user interface.
[0124] Node quantity setting: The user chooses to create 4 full nodes (node1, node2, node3, node4).
[0125] Consensus mechanism: users choose Proof of Stake;
[0126] Smart Contract: User chooses not to deploy any smart contract;
[0127] Template selection: The user selects the "Simple Ethereum Network" template from the template library and quickly loads the default configuration.
[0128] Step 4: Automatically generate deployment configuration. The terminal generates the corresponding Docker Compose configuration file based on the user's selection.
[0129] Step 5, one-click deployment. The user clicks the "one-click deployment" button and the terminal starts the startup process. The terminal calls the Docker command to start creating and starting containers for 4 Ethereum nodes. The terminal configures the network for each node to ensure that they can communicate with each other. Set port mapping and firewall rules to ensure that external requests can access the node. After the deployment is complete, the terminal performs a health check to ensure that the status of each node is normal (such as response time, CPU usage, etc.). If any node fails to start normally, the terminal will automatically restart the corresponding container and record an error log.
[0130] In the above example 1, the preset configuration template is used in step 3. The following example 2 is provided. Example 2 does not select the preset configuration template, but customizes the blockchain network. Example 2 provides a process for customizing the graphical configuration of the Hyperledger Fabric blockchain network based on the above process. The specific steps are as follows:
[0131] Step 1: Enter the configuration interface. The user opens the graphical configuration interface, and the terminal displays the available component library and predefined templates.
[0132] Step 2: Select components. Users drag the following elements from the component library to the configuration area:
[0133] 3 peer nodes (peer0, peer1, peer2);
[0134] 1 Orderer node (orderer);
[0135] 1 CA node (Certificate Authority).
[0136] Step 3: Configure node properties. Peer node configuration: Users click on each Peer node to enter the property editing panel and set the following properties:
[0137] Node names: peer0, peer1, peer2;
[0138] Node role: peer;
[0139] Chaincode path: / path / to / chaincode;
[0140] Port settings: 7051 (peer0), 7052 (peer1), 7053 (peer2).
[0141] Orderer node configuration. The user clicks on the Orderer node and sets the properties:
[0142] Node name: orderer;
[0143] Node role: orderer;
[0144] Port setting: 7050;
[0145] Consensus mechanism: PBFT.
[0146] CA node configuration. The user clicks on the CA node and sets the properties:
[0147] Node name: ca.example.com;
[0148] Node role: CA;
[0149] Port setting: 7054.
[0150] Step 4, configure the network relationship. The user clicks and drags the mouse to connect the Peer node and the Orderer node to indicate the communication relationship between them. The user also draws a line for the connection between the CA node and the Peer node to indicate the authentication process.
[0151] Step 5: Save the custom template. After completing the configuration, click "Save Template". A pop-up window will appear on the terminal asking the user to enter a template name. Enter "Hyperledger Fabric Network" and click OK. The terminal will save the configuration to the template library for future use.
[0152] Step 6: Generate deployment configuration. The user clicks the "One-click deployment" button, and the terminal automatically generates a Docker Compose file based on the user's graphical configuration.
[0153] Figure 5The blockchain network deployment method shown and the above two examples support users to quickly deploy different versions or types of blockchain networks in the cloud or locally by uploading binary files and simple graphical operations. Binary files include but are not limited to Ethereum, Hyperledger Fabric, Corda, etc. Graphical operations mean that users can flexibly build the target blockchain network in the graphical user interface by dragging components (such as nodes) and see the blockchain network topology in real time. The complexity is simplified through an intuitive graphical user interface, manual configuration errors are reduced by automatically verifying and generating configurations, and the flexibility of deployment is enhanced by customizing network topology, node configuration and consensus mechanism. Through one-click deployment, the terminal can automatically handle resource allocation, network connection and service startup. Therefore, the blockchain network deployment method is efficient and simple, and effectively solves the defects in the existing blockchain network deployment by simplifying complexity, reducing configuration errors, providing flexibility and rapid deployment. This model is suitable for developers, enterprises, educational institutions and other fields, especially in fast iteration and experimental projects, which can provide great convenience.
[0154] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 7 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. 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 and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a blockchain network deployment method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse.
[0155] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0156] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0157] In response to a first operation of the user on a target component in the toolbar area, displaying the target component in the configuration area; wherein the target component is used to represent a blockchain element;
[0158] In response to the user's second operation on the target component in the configuration area, a connection relationship between the target components is established, and a corresponding blockchain network topology structure is displayed in the preview area;
[0159] Generate an environment configuration file based on the blockchain network topology;
[0160] Update the initial network environment configuration data in the binary file based on the environment configuration file, and deploy the blockchain network based on the updated binary file.
[0161] In one embodiment, when the computer program is executed by a processor, the following steps are implemented: in response to a first operation of a user on a target component in the toolbar area, after the configuration area displays the target component, the method further includes:
[0162] In response to a third operation of the user on the target component in the configuration area, displaying a property panel;
[0163] Updates the properties of the target component based on the user's editing operations in the property panel.
[0164] In one embodiment, when the computer program is executed by a processor, the following steps are implemented: before generating an environment configuration file according to the blockchain network topology structure, the method further includes:
[0165] Performing a first legitimacy check on the blockchain network topology structure; wherein the object of the first legitimacy check includes the connection relationship between each target component and / or the attributes of each target component;
[0166] If the first legitimacy check is successful, an environment configuration file is generated according to the blockchain network topology; or,
[0167] In the event that the first validity check fails, an error message is displayed and / or a repair is performed.
[0168] In one embodiment, when the computer program is executed by a processor, the following steps are implemented: the graphical user interface also includes a template library, which includes preset configuration templates of the blockchain network; an environment configuration file is generated according to the topological structure of the blockchain network, including:
[0169] In response to a selection operation by a user in a template library, determining a target preset configuration template;
[0170] Adjust the target preset configuration template according to the blockchain network topology and generate an environment configuration file.
[0171] In one embodiment, when the computer program is executed by a processor, the following steps are implemented: adjusting the target preset configuration template according to the blockchain network topology structure to generate an environment configuration file, including:
[0172] Mapping user input operations corresponding to the blockchain network topology to the target preset configuration template;
[0173] The configuration information of the corresponding blockchain network topology structure is embedded into the target preset configuration template to generate an environment configuration file.
[0174] In one embodiment, when the computer program is executed by a processor, the following steps are implemented: deploying a blockchain network based on the updated binary file, including:
[0175] According to the updated binary file, deploy the contract on the target node and record the address and status of the contract;
[0176] Start services and processes to perform health checks on the deployed blockchain network.
[0177] In one embodiment, when the computer program is executed by a processor, the following steps are implemented: before responding to a first operation of a user on a target component in the toolbar area, the method further includes:
[0178] Perform a second validity check on the binary file;
[0179] In case the second legality check is successful, providing a graphical user interface;
[0180] If the second validity check fails, an error report is returned and / or the user is prompted to upload the binary file again.
[0181] In one embodiment, when the computer program is executed by a processor, the following steps are implemented: performing a second validity check on the binary file, including:
[0182] Determine the file type according to the extension of the binary file; wherein the file type of the binary file includes a Docker image file or an executable file;
[0183] According to the file type of the binary file, the file content of the binary file is extracted, and integrity verification and file structure verification are performed based on the file content.
[0184] 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 used 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.
[0185] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and 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 embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory 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 memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0186] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, 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, they should be considered to be within the scope of this specification.
[0187] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A blockchain network deployment method, characterized in that: Applied to a graphical user interface, the graphical user interface includes a toolbar area, a configuration area and a preview area, the method includes: In response to a first operation of a user on a target component in the toolbar area, displaying the target component in the configuration area; wherein the target component is used to represent a blockchain element; In response to a second operation of the user on the target component in the configuration area, a connection relationship between the target components is established, and a corresponding blockchain network topology is displayed in the preview area; Generate an environment configuration file according to the blockchain network topology structure; The initial network environment configuration data in the binary file is updated based on the environment configuration file, and the blockchain network is deployed based on the updated binary file.
2. The blockchain network deployment method according to claim 1, characterized in that: The first operation and the second operation include dragging and / or clicking; the connection relationship between the target components is based on geometric representation.
3. The blockchain network deployment method according to claim 1, characterized in that: In response to a first operation of a user on a target component in the toolbar area, after the configuration area displays the target component, the method further includes: In response to a third operation of the user on the target component in the configuration area, displaying a property panel; Based on the user's editing operation in the property panel, the properties of the target component are updated.
4. The blockchain network deployment method according to claim 1, characterized in that: Before generating an environment configuration file according to the blockchain network topology structure, the method further includes: Performing a first legitimacy check on the blockchain network topology structure; wherein the object of the first legitimacy check includes the connection relationship between each of the target components and / or the attributes of each of the target components; If the first legitimacy check succeeds, generating an environment configuration file according to the blockchain network topology structure; or, In the event that the first legality check fails, an error message is displayed and / or repair is performed.
5. The blockchain network deployment method according to claim 1, characterized in that: The graphical user interface also includes a template library, which includes preset configuration templates for the blockchain network; generating an environment configuration file according to the blockchain network topology structure, including: In response to a selection operation by a user in the template library, determining a target preset configuration template; Mapping the user input operation corresponding to the blockchain network topology structure to the target preset configuration template; The configuration information corresponding to the blockchain network topology structure is embedded into the target preset configuration template to generate the environment configuration file.
6. The blockchain network deployment method according to claim 1, characterized in that: Deploy the blockchain network based on the updated binary file, including: According to the updated binary file, deploy the contract on the target node and record the address and status of the contract; Start services and processes to perform health checks on the deployed blockchain network.
7. The blockchain network deployment method according to claim 1, characterized in that: Before responding to a first operation of a user on a target component in the toolbar area, the method further includes: Performing a second legitimacy check on the binary file; wherein the second legitimacy check includes performing an integrity check and a file structure check based on the file content of the binary file; In case the second legality check succeeds, providing the graphical user interface; In the event that the second legality check fails, an error report is returned and / or the user is prompted to re-upload the binary file.
8. A graphical user interface, characterized in that: include: Toolbar area, configuration area, preview area, file generation unit, deployment unit; among them, The toolbar area includes a component library, and the component library includes a plurality of components for representing blockchain elements; The configuration area is used to display the target components selected by the user in the toolbar area, and to establish connection relationships between the target components; The preview area is used to display the blockchain network topology corresponding to the connection relationship between each of the target components; The file generation unit is used to generate an environment configuration file according to the blockchain network topology structure; The deployment unit is used to update the initial network environment configuration data in the binary file based on the environment configuration file, and deploy the blockchain network based on the updated binary file.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
A graphical and containerized virtual network environment construction and batch deployment method
CN109725986A
Method for creating block chain network, electronic equipment and medium
CN110308903A
Block chain node deployment method and related equipment
CN110855791A
Complex network topology editing and visualizing system based on Web
CN110929201A
Decentralized platform for deploying AI models
US11494171B1