Blockchain deployment method, device, equipment and storage medium

Through the visual interactive interface, obtain and process blockchain deployment information, generate contract code and deploy it, the problem of difficult development of blockchain smart contracts and weak scalability is solved, and smart contract applications are easily deployed and expanded.

CN114817403BActive Publication Date: 2025-08-15PINGAN INT SMART CITY TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210449969.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-27
Publication Date
2025-08-15
Estimated Expiration
2042-04-27

AI Technical Summary

Technical Problem

The development of existing blockchain smart contract applications is difficult, and ordinary users cannot develop them, and the scalability of relying on basic smart contracts is weak.

Method used

The deployment information of business functions is obtained through the visual interactive interface, the business logic information, method body and basic operation atoms are extracted, data parameters are entered, contract code is generated, and deployment is carried out using pre-set integrated development tools.

Benefits of technology

It reduces the difficulty of blockchain deployment, reduces the entry threshold for developers, improves the use of blockchain, enhances the scalability of smart contracts, and reduces the number of contracts and deployment costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114817403B_ABST
    Figure CN114817403B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of blockchain and discloses a blockchain deployment method, apparatus, device, and storage medium. The method comprises: obtaining deployment information corresponding to a business function of a blockchain to be deployed, input through a visual interactive interface, and extracting business logic information, method bodies, multiple basic operation atoms, and data parameters required for each basic operation atom from the deployment information; inserting each basic operation atom into the method body according to the business logic information, and entering each data parameter into the corresponding basic operation atom in the method body to obtain a smart contract; generating contract code corresponding to the blockchain to be deployed based on the smart contract, and deploying the blockchain to be deployed using a pre-installed integrated development tool based on the contract code. This invention reduces the difficulty of blockchain deployment and the entry threshold for developers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of blockchain, and in particular to a blockchain deployment method, apparatus, device, and storage medium. Background Art

[0002] Existing blockchain smart contract application development usually requires professional smart contract developers to develop it. Ordinary users, especially those without programming skills, are unable to develop the smart contract applications they want.

[0003] There are two main approaches to developing smart contract applications. One is to directly edit the contract source code, which requires developers to have advanced programming skills and a solid understanding of blockchain principles. These developers must write the smart contract source code in languages like Java, Golang, NodeJS, and Solidity, compile it using specialized software or programs, and deploy it on the blockchain network. This approach has a long development cycle and requires a high level of developer expertise, as the smart contract logic must be understood through code review.

[0004] Another approach involves developing smart contract applications based on basic smart contracts and smart contract templates. A professional smart contract developer or team provides several standard smart contracts with basic logic. The smart contract developer then uses visualization or code to connect the required smart contracts to meet application requirements. This approach relies on basic smart contracts, resulting in limited application scalability. Functional expansion requires smart contract programming skills, and application deployment requires the deployment of the underlying smart contracts. In summary, existing blockchain deployment methods present significant challenges. Summary of the Invention

[0005] The main purpose of this invention is to solve the technical problems that are difficult to solve in existing blockchain deployment methods.

[0006] A first aspect of the present invention provides a blockchain deployment method, comprising: obtaining deployment information of a business function corresponding to a blockchain to be deployed input through a visual interactive interface, and extracting business logic information, a method body, multiple basic operation atoms, and data parameters required for each of the basic operation atoms in the deployment information; according to the business logic information, inserting each of the basic operation atoms into the method body, and entering each of the data parameters into the corresponding basic operation atoms in the method body to obtain a smart contract; generating a contract code corresponding to the blockchain to be deployed according to the smart contract, and deploying the blockchain to be deployed using a preset integrated development tool based on the contract code.

[0007] Optionally, in a first implementation method of the first aspect of the present invention, the deployment information of the business function corresponding to the blockchain to be deployed inputted through the visual interactive interface is obtained, including: generating the method body in the deployment information of the business function corresponding to the blockchain in response to the method name field, input field, and output field inputted through the visual interactive interface; generating the business logic information, multiple basic operation atoms, and data parameters required for each of the basic operation atoms in the deployment information of the business function corresponding to the blockchain in response to the logic statements and operation statements inputted through the visual interactive interface.

[0008] Optionally, in a second implementation manner of the first aspect of the present invention, deploying the blockchain to be deployed based on the contract code using a preset integrated development tool includes: based on the input fields and the output field corresponding codes in the contract code, using a preset integrated development tool to determine the calling logic relationship between the method bodies corresponding to each business function of the blockchain; according to the calling logic relationship, deploying the contract code corresponding to each business function to the corresponding position in the blockchain to be deployed through the integrated development tool.

[0009] Optionally, in a third implementation manner of the first aspect of the present invention, generating the contract code corresponding to the blockchain to be deployed based on the smart contract includes: sorting the statements of the smart contract in response to the code generation instruction input through the visual interactive interface; and sequentially compiling the smart contract after the statements are sorted to obtain the contract code corresponding to the blockchain.

[0010] Optionally, in a fourth implementation manner of the first aspect of the present invention, before obtaining the deployment information of the business function corresponding to the blockchain to be deployed input in the visual interactive interface, it also includes: obtaining the registration information of the basic operation atom to be registered, and encapsulating the registration information into a visual component; generating a URI access address corresponding to the visual component, and dynamically registering a visual URI resource for the URI access address; registering and activating the visual component containing the URI access address in the component management container to obtain the corresponding basic operation atom.

[0011] Optionally, in the fifth implementation manner of the first aspect of the present invention, before obtaining the deployment information of the business function corresponding to the blockchain to be deployed input by the visual interactive interface, it also includes: responding to the drag instruction of the visual component of the visual interactive interface, when it is detected that the visual component is dragged to the preset area of the visual interactive interface, displaying the dragged visual component in the preset area; extracting the configuration information and location information of the visual component and storing it in a preset database, setting the page configuration parameters corresponding to the configuration information and location information; and adding the page configuration parameters to the URI access address corresponding to the basic operation atom of the corresponding visual component.

[0012] Optionally, in a sixth implementation of the first aspect of the present invention, entering each of the data parameters into the corresponding basic operation atoms in the method body to obtain a smart contract includes: determining the data parameters input into the URI access address corresponding to the basic operation atoms of the method body in the visual interactive interface, and entering each of the data parameters into the corresponding basic operation atoms to obtain a smart contract.

[0013] The second aspect of the present invention provides a blockchain deployment device, including: an extraction module for obtaining deployment information of the business function corresponding to the blockchain to be deployed input in a visual interactive interface, and extracting the business logic information, method body, multiple basic operation atoms and data parameters required for each basic operation atom in the deployment information; an insertion module for inserting each basic operation atom into the method body according to the business logic information, and entering each data parameter into the corresponding basic operation atom in the method body to obtain a smart contract; a deployment module for generating a contract code corresponding to the blockchain to be deployed according to the smart contract, and deploying the blockchain to be deployed based on the contract code using a preset integrated development tool.

[0014] Optionally, in a first implementation manner of the second aspect of the present invention, the extraction module includes: a method body generation unit, which is used to generate a method body in the deployment information of the business function corresponding to the blockchain in response to the method name field, input field and output field input through the visual interactive interface; an atom generation unit, which is used to generate business logic information, multiple basic operation atoms and data parameters required for each of the basic operation atoms in the deployment information of the business function corresponding to the blockchain in response to the logical statements and operation statements input through the visual interactive interface.

[0015] Optionally, in a second implementation of the second aspect of the present invention, the deployment module includes: a determination unit, used to determine the calling logical relationship between the method bodies corresponding to each business function of the blockchain based on the input field and the output field corresponding code in the contract code, using a preset integrated development tool; and a deployment unit, used to deploy the contract code corresponding to each business function to the corresponding position in the blockchain to be deployed through the integrated development tool according to the calling logical relationship.

[0016] Optionally, in a third implementation of the second aspect of the present invention, the deployment module further includes: a sorting unit, configured to sort statements of the smart contract in response to a code generation instruction input through a visual interactive interface; and a compilation unit, configured to sequentially compile the smart contract after statement sorting to obtain the contract code corresponding to the blockchain.

[0017] Optionally, in a fourth implementation manner of the second aspect of the present invention, the blockchain deployment device also includes a registration module, which is used to: obtain registration information of the basic operation atom to be registered, and encapsulate the registration information into a visualization component; generate a URI access address corresponding to the visualization component, and dynamically register a URI resource for visualization of the URI access address; register and activate the visualization component containing the URI access address in the component management container to obtain the corresponding basic operation atom.

[0018] Optionally, in a fifth implementation of the second aspect of the present invention, the blockchain deployment device also includes a visualization processing module, which is used to: respond to a drag instruction of a visualization component of the visualization interaction interface, and when it is detected that the visualization component is dragged to a preset area of the visualization interaction interface, display the dragged visualization component in the preset area; extract the configuration information and location information of the visualization component and store them in a preset database, and set page configuration parameters corresponding to the configuration information and location information; and add the page configuration parameters to the URI access address corresponding to the basic operation atom of the corresponding visualization component.

[0019] Optionally, in a sixth implementation of the second aspect of the present invention, the insertion module is also used to: determine the data parameters inputted into the URI access address corresponding to the basic operation atom of the method body in the visual interactive interface, and enter each of the data parameters into the corresponding basic operation atom to obtain a smart contract.

[0020] The third aspect of the present invention provides a blockchain deployment device, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory so that the blockchain deployment device executes the above-mentioned blockchain deployment method.

[0021] A fourth aspect of the present invention provides a computer-readable storage medium, which stores instructions that, when executed on a computer, enable the computer to execute the above-mentioned blockchain deployment method.

[0022] In the technical solution provided by the present invention, the difficulty of developing smart contract applications is reduced through a visual approach. Users only need to master simple programming concepts. After sorting out the business logic, they can construct the smart contract logic by dynamically adding method bodies, business logic information, basic operation atoms and corresponding data parameters. At the same time, there is no need to train contract developers in blockchain professional technical knowledge, which lowers the entry threshold for blockchain smart contract application development and greatly improves the implementation rate of blockchain. Furthermore, the minimum control is split into the level of basic operation atoms such as reading, writing, and conditional judgment. Users can write a complete smart contract in one smart contract, which improves the scalability of the smart contract. At the same time, there is no need to rely on other basic smart contracts, reducing the number of contracts required for smart contract applications and reducing the cost of smart contract deployment. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 This is a schematic diagram of a first embodiment of a blockchain deployment method according to an embodiment of the present invention;

[0024] Figure 2 Schematic diagram of a second embodiment of a blockchain deployment method according to an embodiment of the present invention;

[0025] Figure 3 Schematic diagram of an embodiment of a blockchain deployment device in an embodiment of the present invention;

[0026] Figure 4 This is a schematic diagram of another embodiment of a blockchain deployment device according to an embodiment of the present invention;

[0027] Figure 5 This is a schematic diagram of an embodiment of a blockchain deployment device in an embodiment of the present invention. DETAILED DESCRIPTION

[0028] Embodiments of the present invention provide a blockchain deployment method, apparatus, device, and storage medium. These methods obtain deployment information corresponding to the business functions of the blockchain to be deployed, input through a visual interactive interface, and extract the business logic information, method body, multiple basic operation atoms, and data parameters required for each basic operation atom from the deployment information. Based on the business logic information, each basic operation atom is inserted into the method body, and each data parameter is entered into the corresponding basic operation atom in the method body to obtain a smart contract. Based on the smart contract, contract code corresponding to the blockchain to be deployed is generated. Based on the contract code, the blockchain to be deployed is deployed using a pre-installed integrated development tool. This invention reduces the difficulty of blockchain deployment and the entry threshold for developers.

[0029] The terms "first," "second," "third," "fourth," and the like (if any) in the description and claims of the present invention and in the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to these processes, methods, products, or apparatus.

[0030] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 The first embodiment of the blockchain deployment method in the embodiment of the present invention includes:

[0031] 101. Obtain deployment information of the business function corresponding to the blockchain to be deployed inputted in the visual interactive interface, and extract the business logic information, method body, multiple basic operation atoms, and data parameters required by each of the basic operation atoms in the deployment information;

[0032] It is understood that the execution subject of the present invention can be a blockchain deployment device, or a terminal or server, and the specific implementation is not limited here. The embodiment of the present invention is described by taking the server as the execution subject as an example.

[0033] In this embodiment, the method body refers to the modular representation of standardized code for implementing the business functions deployed on the blockchain; the basic operation atom refers to the modular representation of standardized code for implementing the logic and operation statements of the business functions; the data parameter is the specific content written by the user in the basic operation atom; and the business logic information refers to the relationship between multiple method bodies and the relationship between the basic operation atoms.

[0034] Specifically, for example, the business function of "writing code" has a standardized code of "function writeCode{}", and the method body is represented by "writeCode"; for example, the basic operation atom of "reading data" has a standardized code of "A=select B", and the basic operation atom is "read data A=B"; for example, in the aforementioned basic operation atom of "reading data", "A" can be written as "param1", and "B" can be written as "name, age, code"; for example, the forward and backward calling relationship between multiple method bodies and the forward and backward calling relationship between each basic operation atom are business logic information.

[0035] In this example, developers summarize standardized logic and operation statements such as parameter definition, data writing, data reading, conditional judgment, and loop bodies from one or more target blockchain smart contract applications, and abstractly process them into basic operation atoms corresponding to each statement. For example, each basic operation atom used to perform parameter definition, data writing, data reading, conditional judgment, or loop bodies can be directly represented by the corresponding statement name. Combined with development tools such as automatic code generators and contract IDEs, the blockchain can be visually deployed at the fine-grained level by simply selecting the required basic operation atom and entering the corresponding data parameters in the displayed input box.

[0036] Specifically, for each blockchain to be deployed, users will organize the business logic of the smart contract based on the business functions they need to implement. Then, using the visual interactive interface, users will sequentially input the required business logic information, method bodies, basic operation atoms, and required data parameters to generate deployment information and transmit it to the server. The method body includes writeCode, which executes the code writing business function, and readCode, which executes the code reading business function. Basic operation atoms include parameter definitions, data writing, data reading, conditional judgments, and loop bodies.

[0037] 102. Insert each of the basic operation atoms into the method body according to the business logic information, and enter each of the data parameters into the corresponding basic operation atoms in the method body to obtain a smart contract;

[0038] In this embodiment, in a new blockchain smart contract to be deployed, the business logic information defines the location of each basic operation atom in the method body. Specifically, after the user enters a basic operation atom in the method body selected in the visual interactive interface, the business logic information is automatically generated. Based on this business logic information, the basic operation atom is inserted into the corresponding position in the method body. Here, the basic operation atom defines a logical sum operation statement. Based on the data parameters entered by the user in the input box corresponding to each basic operation atom in the visual interactive interface, the backend automatically fills the data parameters into the logical sum operation statement corresponding to the basic operation atom, thus creating a complete smart contract.

[0039] Specifically, for example, in the "writeCode" method body, which includes basic operation atoms such as "define parameters", "calculate", "read data", "data filter conditions", and "write data", each basic operation atom is inserted into the method body according to the business logic information, including the front-to-back call relationship between the basic operation atoms. For example, the front-to-back call relationship here is in the following order: define parameters → calculate → read data → data filter conditions → write data;

[0040] Specifically, if the data parameters of "define parameters" are "param1, param2", the data parameters of "operation" are "param1=((args1+args2)*args3-1024) / 36", the data parameters of "read data" are "param2=name, age, code", the data parameters of "data screening conditions" are "(15>age>12)&&(code>90)", and the data parameters of "write data" are "name=args1; age=args2, code=param1", then each data parameter is entered into the position corresponding to each basic operation atom in the method body to form a complete smart contract.

[0041] 103. Generate contract code corresponding to the blockchain to be deployed according to the smart contract, and deploy the blockchain to be deployed based on the contract code using a pre-installed integrated development tool.

[0042] In this embodiment, the smart contract still exists in the form of basic operation atoms. For blockchain deployment, the smart contract containing multiple basic operation atoms needs to be converted into a conventional code-based contract, namely the contract code. During the development phase, the code of the operations and logic statements is abstracted to obtain the basic operation atoms, which are displayed by name in the visual interactive interface for selection. Here, the method bodies and basic operation atoms in the smart contract can be converted back to the code of the corresponding operations and logic statements.

[0043] Specifically, for example, if the method body is "writeCode", the corresponding contract code is "functionwriteCode(){}"; the input parameters "args1, args2, args3" are directly written into the () of the method body's corresponding contract code; the output parameter "param1" corresponds to the contract code: "return param1" and is written into the {} of the write method body's corresponding contract code.

[0044] In this embodiment, after obtaining the contract code, the blockchain to be deployed is deployed using an integrated development tool such as IDEA, Visual Studio Code, SwitchHosts, FinalShell, or Navicat Premium. A blockchain can include multiple business functions. For each business function, a corresponding method body can be added to generate the corresponding contract code. Then, based on the relationships between the business functions, the corresponding contract codes are spliced together to deploy a blockchain containing the corresponding business functions.

[0045] In the embodiments of the present invention, the difficulty of developing smart contract applications is reduced through a visual approach. Users only need to master simple programming concepts. After sorting out the business logic, they can construct the smart contract logic by dynamically adding method bodies, business logic information, basic operation atoms and corresponding data parameters. At the same time, there is no need to train contract developers in blockchain professional technical knowledge, which lowers the entry threshold for blockchain smart contract application development and greatly improves the implementation rate of blockchain.

[0046] See also Figure 2 The second embodiment of the blockchain deployment method in the embodiment of the present invention includes:

[0047] 201. Obtain registration information of the basic operation atom to be registered, and encapsulate the registration information into a visual component;

[0048] 202. Generate a URI access address corresponding to the visualization component, and dynamically register a visualization URI resource for the URI access address;

[0049] 203. Register and activate the visualization component containing the URI access address in the component management container to obtain the corresponding basic operation atom;

[0050] In this embodiment, for different logic and operation statements, corresponding programming statements such as parameter definition, writing data, reading data, conditional judgment, loop body, etc. are abstractly extracted, and then for each basic operation atom, the corresponding logic and operation statement is used to initiate registration information and register in this server.

[0051] Specifically, after the visualization components are encapsulated, the URI access address corresponding to each visualization component is automatically generated. A Java factory class can also be used to dynamically register the visualization URI resource for the visualization component's URI access address. Through dynamic registration of component resources, the program instance class corresponding to the visualization component can be registered in the context of a running visualization platform, such as a container platform. Each visualization component is then registered to the component management container in a hot deployment manner, and the relevant visualization component is activated. The hot deployment method allows the registration and activation processes to occur without downtime, thereby improving efficiency.

[0052] After registering and activating the visualization component and obtaining the basic operation atoms, when performing blockchain visualization deployment, it is necessary to update the URI access address of the basic operation atoms to provide unique access and differentiation for the blockchain to be registered. The specific execution process is as follows:

[0053] 1) In response to a drag instruction of a visual component of the visual interaction interface, when detecting that the visual component is dragged to a preset area of the visual interaction interface, displaying the dragged visual component in the preset area;

[0054] 2) extracting the configuration information and location information of the visualization component and storing them in a preset database, and setting page configuration parameters corresponding to the configuration information and location information;

[0055] 3) Add the page configuration parameters to the URI access address corresponding to the basic operation atom of the corresponding visualization component.

[0056] In this embodiment, the registered basic operation atoms obtained after activation are nested within the IFrame framework of the visual interactive interface according to the user's selection during the visual deployment of the blockchain. In the visual interactive interface, the visual component corresponding to the basic operation atom will move in response to the drag command. When it is placed in the preset area for deployment, the basic operation atom is determined to be the basic operation atom currently used to deploy the blockchain. The front-end visual assembly of the multiple basic operation atoms dragged into the preset area is then performed, and the user enters the corresponding data parameters. The dragging and assembly can be implemented using technologies such as Vue / LayUI. Unique page configuration parameters are then added for the blockchain deployed here to identify the unique basic operation atom obtained this time.

[0057] 204. In response to the method name field, input field, and output field inputted in the visual interactive interface, generate a method body in the deployment information of the corresponding business function of the blockchain;

[0058] 205. In response to the logic statements and operation statements inputted in the visual interactive interface, generate business logic information, multiple basic operation atoms, and data parameters required for each of the basic operation atoms in the deployment information of the corresponding business function of the blockchain;

[0059] In this example, users can add a method body by clicking the [Method Body] button in the visual interactive interface. This method body requires users to fill in three fields: "Method Name Field, Input Field, and Output Field." For example, the method name field is "writeCode," the input fields are "args1, args2, args3," and the output field is "param1."

[0060] In this embodiment, after successfully adding the method body, the user can add corresponding parameters, operations, conditional judgments, loop bodies, data reading, data writing and other logical and operation statements in the method body according to the design of the business process, and fill in the corresponding data parameters in each statement. For example, in the "writeCode" method body, add:

[0061] Define the basic operation atoms of parameters and the corresponding data parameters, "parameters: param1, param2";

[0062] Add the basic operation atoms and corresponding data parameters of the operation, "Operation: param1 = ((args1 + args2) * args3 - 1024) / 36";

[0063] Add the basic operation atoms and corresponding data parameters for conditional judgment, "Data filtering condition: (15>age>12)&&(code>90)";

[0064] Add the basic operation atom of writing data and the corresponding data parameters, "write data: name = args1, age = args2, code = param1".

[0065] 206. Extracting business logic information, method body, multiple basic operation atoms, and data parameters required by each of the basic operation atoms from the deployment information;

[0066] 207. Insert each of the basic operation atoms into the method body according to the business logic information, and enter each of the data parameters into the corresponding basic operation atoms in the method body to obtain a smart contract;

[0067] In this embodiment, when entering data parameters into basic operation atoms, since they are entered at the position corresponding to the basic operation atoms displayed in the visual interactive interface, each URI access address adjusted for this blockchain deployment can be associated with the input data parameters. According to the association relationship, the data parameters are entered into the corresponding basic operation atoms in the background, that is, the data parameters entered into the URI access address corresponding to the basic operation atoms of the method body in the visual interactive interface are determined, and each of the data parameters is entered into the corresponding basic operation atoms to obtain a smart contract.

[0068] 208. In response to the code generation instruction inputted through the visual interactive interface, sort the statements of the smart contract;

[0069] 209. Sequentially compile the smart contract after the statements are sorted to obtain the contract code corresponding to the blockchain;

[0070] In this embodiment, after writing a smart contract, the user can click a button such as "Generate Contract Code" on the visual interactive interface to initiate a code generation instruction to the system. Based on the generated smart contract, the statements are reordered, and the code corresponding to each statement is compiled to generate the contract code. The content of "writeCode" in the aforementioned smart contract can be represented by the following contract code:

[0071] Method body and input fields: Function writeCode(args1, args2, args3) {};

[0072] Define parameters: Let param1, param2;

[0073] Operation: param1 = ((args1 + args2) * args3 - 1024) / 36;

[0074] Read data and data filtering conditions: Param2 = select name, age, code from ledger where age < 15 && age > 12 && code > 90;

[0075] Write data: WriteToledger({name: args1, age: args2, code: param1});

[0076] Output field: Return param1;

[0077] 210. Based on the input fields and the codes corresponding to the output fields in the contract code, use the pre-installed integrated development tool to determine the calling logic relationship between the method bodies corresponding to the business functions of the blockchain;

[0078] 211. Based on the calling logic relationship, deploy the contract code corresponding to each business function to the corresponding location in the blockchain to be deployed through the integrated development tool.

[0079] In this embodiment, the calling relationship between the input and output in the method body corresponding to each business function can be associated according to the business logic to form a calling logical relationship. For example, the code corresponding to the output field of the method body of one business function is "Return param1", and the code corresponding to the input field of the method body of another business function is "unsigned char cc; cc = scan(param1)", where param1 can be stored in a register for calling by the other method body.

[0080] In the embodiment of the present invention, the minimum control is split into the atomic level of basic operations such as reading, writing, and conditional judgment. Users can write a complete smart contract in one smart contract, which improves the scalability of the smart contract. At the same time, there is no need to rely on other basic smart contracts, which reduces the number of contracts required for smart contract applications and reduces the cost of smart contract deployment.

[0081] The above describes the deployment method of the blockchain in the embodiment of the present invention. The following describes the deployment device of the blockchain in the embodiment of the present invention. Figure 3 In one embodiment of the present invention, a blockchain deployment device includes:

[0082] Extraction module 301 is used to obtain deployment information of the business function corresponding to the blockchain to be deployed inputted in the visual interactive interface, and extract the business logic information, method body, multiple basic operation atoms and data parameters required by each of the basic operation atoms in the deployment information;

[0083] Insertion module 302, configured to insert each of the basic operation atoms into the method body according to the business logic information, and enter each of the data parameters into the corresponding basic operation atoms in the method body to obtain a smart contract;

[0084] The deployment module 303 is used to generate the contract code corresponding to the blockchain to be deployed according to the smart contract, and deploy the blockchain to be deployed based on the contract code using a preset integrated development tool.

[0085] In the embodiments of the present invention, the difficulty of developing smart contract applications is reduced through a visual approach. Users only need to master simple programming concepts. After sorting out the business logic, they can construct the smart contract logic by dynamically adding method bodies, business logic information, basic operation atoms and corresponding data parameters. At the same time, there is no need to train contract developers in blockchain professional technical knowledge, which lowers the entry threshold for blockchain smart contract application development and greatly improves the implementation rate of blockchain.

[0086] See also Figure 4 Another embodiment of the blockchain deployment device in the embodiment of the present invention includes:

[0087] Extraction module 301 is used to obtain deployment information of the business function corresponding to the blockchain to be deployed inputted in the visual interactive interface, and extract the business logic information, method body, multiple basic operation atoms and data parameters required by each of the basic operation atoms in the deployment information;

[0088] Insertion module 302, configured to insert each of the basic operation atoms into the method body according to the business logic information, and enter each of the data parameters into the corresponding basic operation atoms in the method body to obtain a smart contract;

[0089] The deployment module 303 is used to generate the contract code corresponding to the blockchain to be deployed according to the smart contract, and deploy the blockchain to be deployed based on the contract code using a preset integrated development tool.

[0090] Specifically, the extraction module 301 includes:

[0091] A method body generation unit 3011 is configured to generate a method body in the deployment information of the corresponding business function of the blockchain in response to the method name field, input field, and output field inputted in the visual interactive interface;

[0092] The atom generation unit 3012 is used to generate business logic information, multiple basic operation atoms, and data parameters required for each basic operation atom in the deployment information of the blockchain corresponding business function in response to the logical statements and operation statements input in the visual interactive interface.

[0093] Specifically, the deployment module 303 includes:

[0094] Determining unit 3031, configured to determine, based on the input fields and the codes corresponding to the output fields in the contract code, a calling logic relationship between method bodies corresponding to various business functions of the blockchain using a pre-installed integrated development tool;

[0095] The deployment unit 3032 is used to deploy the contract code corresponding to each business function to the corresponding location in the blockchain to be deployed through the integrated development tool according to the calling logical relationship.

[0096] Specifically, the deployment module 303 further includes:

[0097] A sorting unit 3033 is configured to sort statements of the smart contract in response to a code generation instruction inputted through the visual interactive interface;

[0098] The compiling unit 3034 is used to sequentially compile the smart contract after the statements are sorted to obtain the contract code corresponding to the blockchain.

[0099] Specifically, the blockchain deployment device further includes a registration module 304, which is used to:

[0100] Obtaining registration information of the basic operation atom to be registered, and encapsulating the registration information into a visual component;

[0101] Generate a URI access address corresponding to the visualization component, and dynamically register a visualization URI resource for the URI access address;

[0102] The visual component containing the URI access address is registered and activated in the component management container to obtain the corresponding basic operation atom.

[0103] Specifically, the blockchain deployment device further includes a visualization processing module 305, which is used to:

[0104] In response to a drag instruction of a visual component of the visual interaction interface, when detecting that the visual component is dragged to a preset area of the visual interaction interface, displaying the dragged visual component in the preset area;

[0105] Extracting configuration information and location information of the visualization component and storing them in a preset database, and setting page configuration parameters corresponding to the configuration information and location information;

[0106] The page configuration parameters are added to the URI access address corresponding to the basic operation atom of the corresponding visualization component.

[0107] Specifically, the insertion module 302 is further used for:

[0108] Determine the data parameters inputted by the URI access address corresponding to the basic operation atom of the method body in the visual interactive interface, and enter each of the data parameters into the corresponding basic operation atom to obtain a smart contract.

[0109] In the embodiment of the present invention, the difficulty of developing smart contract applications is reduced through a visual approach. Users only need to master simple programming concepts. After sorting out the business logic, they can construct the smart contract logic by dynamically adding method bodies, business logic information, basic operation atoms and corresponding data parameters. At the same time, there is no need to train contract developers in blockchain professional technical knowledge, which lowers the entry threshold for blockchain smart contract application development and greatly improves the implementation rate of blockchain. Furthermore, the minimum control is split into the level of basic operation atoms such as reading, writing, and conditional judgment. Users can write a complete smart contract in one smart contract, which improves the scalability of the smart contract. At the same time, there is no need to rely on other basic smart contracts, which reduces the number of contracts required for smart contract applications and reduces the cost of smart contract deployment.

[0110] above Figure 3 and Figure 4 The deployment device of the blockchain in the embodiment of the present invention is described in detail from the perspective of modular functional entities. The deployment device of the blockchain in the embodiment of the present invention is described in detail from the perspective of hardware processing.

[0111] Figure 5Figure 5 is a schematic diagram of the structure of a blockchain deployment device provided by an embodiment of the present invention. This blockchain deployment device 500 may vary significantly depending on configuration or performance. It may include one or more central processing units (CPUs) 510 (e.g., one or more processors), memory 520, and one or more storage media 530 (e.g., one or more mass storage devices) storing applications 533 or data 532. The memory 520 and storage medium 530 may be either ephemeral or persistent storage. The program stored in the storage medium 530 may include one or more modules (not shown), each of which may include a series of instructions for operating on the blockchain deployment device 500. Furthermore, the processor 510 may be configured to communicate with the storage medium 530 to execute the series of instructions stored in the storage medium 530 on the blockchain deployment device 500.

[0112] The blockchain deployment device 500 may also include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input and output interfaces 560, and / or one or more operating systems 531, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. It will be understood by those skilled in the art that Figure 5 The blockchain deployment device structure shown does not constitute a limitation on the blockchain deployment device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0113] The present invention also provides a blockchain deployment device, wherein the computer device includes a memory and a processor, wherein the memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor executes the steps of the blockchain deployment method in the above-mentioned embodiments.

[0114] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. The computer-readable storage medium stores instructions, which, when executed on a computer, cause the computer to execute the steps of the blockchain deployment method.

[0115] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0116] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, etc., various media that can store program code.

[0117] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions described in the above embodiments can still be modified, or some of the technical features thereof can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A blockchain deployment method, characterized in that: include: Obtaining registration information of the basic operation atom to be registered, and encapsulating the registration information into a visual component; Generate a URI access address corresponding to the visualization component, and dynamically register a visualization URI resource for the URI access address; Register and activate the visualization component containing the URI access address in the component management container to obtain the corresponding basic operation atoms; Obtaining deployment information corresponding to the business function of the blockchain to be deployed inputted in the visual interactive interface, and extracting the business logic information, method body, multiple basic operation atoms, and data parameters required by each of the basic operation atoms in the deployment information, wherein the multiple basic operation atoms include basic operation atoms for executing operations such as parameter definition, writing data, reading data, conditional judgment, or loop bodies; According to the business logic information, each of the basic operation atoms is inserted into the method body, and each of the data parameters is entered into the corresponding basic operation atom in the method body to obtain a smart contract; Generate contract code corresponding to the blockchain to be deployed according to the smart contract, and deploy the blockchain to be deployed using a pre-installed integrated development tool based on the contract code; The deployment information of the business function corresponding to the blockchain to be deployed inputted in the visual interactive interface is obtained, including: In response to the method name field, input field, and output field inputted in the visual interactive interface, a method body in the deployment information of the corresponding business function of the blockchain is generated; Generating the contract code corresponding to the blockchain to be deployed according to the smart contract includes: In response to the code generation instruction inputted in the visual interactive interface, the statements of the smart contract are sorted; Sequentially compile the smart contract after the statements are sorted to obtain the contract code corresponding to the blockchain; Deploying the blockchain to be deployed based on the contract code using a pre-installed integrated development tool includes: Based on the input fields and the corresponding codes of the output fields in the contract code, using the preset integrated development tool, determine the calling logical relationship between the method bodies corresponding to each business function of the blockchain; According to the calling logic relationship, the contract code corresponding to each business function is deployed to the corresponding position in the blockchain to be deployed through the integrated development tool.

2. The blockchain deployment method according to claim 1, characterized in that: The acquisition of deployment information of the business function corresponding to the to-be-deployed blockchain inputted in the visual interactive interface also includes: In response to the logical statements and operation statements input in the visual interactive interface, business logic information, multiple basic operation atoms and data parameters required by each basic operation atom in the deployment information of the corresponding business function of the blockchain are generated.

3. The blockchain deployment method according to claim 1, characterized in that: Before obtaining the deployment information of the business function corresponding to the to-be-deployed blockchain inputted in the visual interactive interface, the method further includes: In response to a drag instruction of a visual component of the visual interaction interface, when detecting that the visual component is dragged to a preset area of the visual interaction interface, displaying the dragged visual component in the preset area; Extracting configuration information and location information of the visualization component and storing them in a preset database, and setting page configuration parameters corresponding to the configuration information and location information; The page configuration parameters are added to the URI access address corresponding to the basic operation atom of the corresponding visualization component.

4. The blockchain deployment method according to claim 3, characterized in that: Entering each of the data parameters into the corresponding basic operation atoms in the method body to obtain the smart contract includes: Determine the data parameters inputted by the URI access address corresponding to the basic operation atom of the method body in the visual interactive interface, and enter each of the data parameters into the corresponding basic operation atom to obtain a smart contract.

5. A blockchain deployment device, characterized in that: The blockchain deployment device performs the steps of the blockchain deployment method according to any one of claims 1 to 4, including: An extraction module is used to obtain the deployment information of the business function corresponding to the blockchain to be deployed inputted in the visual interactive interface, and extract the business logic information, method body, multiple basic operation atoms and data parameters required by each of the basic operation atoms in the deployment information; An insertion module, configured to insert each of the basic operation atoms into the method body according to the business logic information, and enter each of the data parameters into the corresponding basic operation atoms in the method body to obtain a smart contract; A deployment module is used to generate a contract code corresponding to the blockchain to be deployed according to the smart contract, and deploy the blockchain to be deployed based on the contract code using a preset integrated development tool.

6. A blockchain deployment device, characterized in that: The blockchain deployment device includes: a memory and at least one processor, wherein the memory stores instructions; The at least one processor calls the instructions in the memory so that the blockchain deployment device performs the steps of the blockchain deployment method as described in any one of claims 1 to 4.

7. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by the processor, the steps of the blockchain deployment method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Intelligent contract generation method and device based on contract component imaging

    CN112163949A

  • Visual intelligent contract development system based on natural language

    CN112835567A