A blockchain-based business deployment method and device
By automatically generating and deploying blockchain-based service code, the problem of low efficiency in asset data on-chain storage services in existing technologies has been solved, and an efficient automatic on-chain storage process has been achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ANT BLOCKCHAIN TECHNOLOGY (SHANGHAI) CO LTD
- Filing Date
- 2022-08-29
- Publication Date
- 2026-04-17
AI Technical Summary
In existing technologies, the deployment efficiency of blockchain-based automatic asset data uploading and storage services is low, making it difficult to meet the rapid storage needs of business users.
By obtaining the service configuration document corresponding to the asset data of the business party, the service code related to the automatic on-chain evidence storage service is automatically generated, and the service is deployed on the evidence storage server to realize automatic on-chain evidence storage.
It improves the efficiency of asset data on-chain storage, meets the business needs for rapid storage, and simplifies the blockchain storage process.
Smart Images

Figure CN115550374B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of computer technology, and in particular to a business deployment method and apparatus based on blockchain. Background Technology
[0002] With the continuous development of information technology, blockchain can be applied to various businesses. In practical applications, due to the immutability of blockchain, business operators in every industry can use blockchain for data storage and notarization. For example, traditional logistics, shipping, and finance industries can all use blockchain to store the data they need to prove. Summary of the Invention
[0003] This specification provides a blockchain-based business deployment method and apparatus to improve the efficiency of deploying blockchain-based automatic on-chain notarization services for asset data.
[0004] The following technical solution is adopted in this specification:
[0005] This specification provides a blockchain-based business deployment method, wherein the blockchain is connected to at least one business party with asset data storage requirements, including:
[0006] Obtain the service configuration document related to the automatic on-chain evidence storage service corresponding to the asset data of the business party; wherein, the service configuration document includes service configuration data corresponding to the automatic on-chain evidence storage service;
[0007] Based on the service configuration data in the service configuration document, service code related to the automatic on-chain evidence storage service is automatically generated.
[0008] Based on the service code, the automatic on-chain evidence storage service is deployed on the evidence storage server so that when the evidence storage server collects the asset data of the business party, it calls the automatic on-chain evidence storage service to publish the asset data of the business party to the blockchain for evidence storage.
[0009] Optionally, the service process corresponding to the automatic on-chain evidence storage service includes multiple sub-processes; the service configuration document includes service configuration data corresponding to each of the multiple sub-processes.
[0010] Optionally, the service process corresponding to the automatic on-chain evidence storage service includes:
[0011] The first sub-process involves calling the service interface deployed on the evidence storage server corresponding to the automatic on-chain evidence storage service to create standard asset data conforming to the standard asset format and store it in the local asset database; and...
[0012] The second sub-process involves invoking a smart contract deployed on the blockchain and bound to the service interface for data storage, performing a consistency check between the standard asset data to be stored on the blockchain and the standard asset data stored in the asset database, and publishing the standard asset data to be stored on the blockchain to the blockchain when the consistency check passes.
[0013] Optionally, the service configuration document includes:
[0014] First service configuration data describing the standard asset format; second service configuration data for generating interface code corresponding to the service interface; wherein, the interface code includes interface code corresponding to a storage method for creating standard asset data conforming to the standard asset format and storing it in a local asset database; and,
[0015] Third service configuration data for generating contract code corresponding to the smart contract; wherein, the contract code includes contract code for performing consistency checks between the standard asset data to be stored on the blockchain and the standard asset data stored in the asset database.
[0016] Optionally, based on the service configuration data in the service configuration document, service code related to the automatic on-chain evidence storage service is automatically generated, including:
[0017] Based on the first service configuration data in the service configuration document, an SQL script template for creating the asset data into a standard asset format is automatically generated.
[0018] The interface code is automatically generated based on the second service configuration data in the service configuration document;
[0019] Based on the third service configuration data in the service configuration document, the contract code corresponding to the smart contract is automatically generated.
[0020] Optionally, the second service configuration data includes an interface code template corresponding to the interface code; the third service configuration data includes a contract code template corresponding to the contract code.
[0021] Based on the second service configuration data in the service configuration document, the interface code is automatically generated, including:
[0022] The interface code template is input into the template engine, which then generates the interface code based on the interface code template.
[0023] Based on the third service configuration data in the service configuration document, the contract code corresponding to the smart contract is automatically generated, including:
[0024] The contract code template is input into the template engine, which then generates the contract code based on the template.
[0025] Optionally, the service configuration document includes a code document written in a preset programming language to describe the service configuration related to the automatic on-chain evidence storage service; the service configuration data includes service configuration code to describe the service configuration related to the automatic on-chain evidence storage service.
[0026] Optionally, the service configuration document may also include:
[0027] The fourth service configuration data used to create the local asset database;
[0028] Before deploying the automatic on-chain evidence storage service on the evidence storage server based on the service code, the method further includes:
[0029] Based on the fourth service configuration data in the service configuration document, the asset database is automatically created locally.
[0030] Optionally, the service configuration document may also include:
[0031] Fifth configuration data used to deploy automatically generated contract code to the blockchain in the form of smart contracts;
[0032] Before deploying the automatic on-chain evidence storage service on the evidence storage server based on the service code, the method further includes:
[0033] Based on the fifth configuration data, the contract code is deployed to the blockchain in the form of a smart contract.
[0034] Optionally, the service configuration document may also include:
[0035] The sixth configuration data is used to deploy the automatically generated SQL script template and the interface code to the evidence storage server in the form of a service interface;
[0036] Deploying the automatic blockchain-based evidence storage service on the evidence storage server based on the service code includes:
[0037] Based on the sixth configuration data, the automatically generated SQL script template and the interface code will be deployed to the evidence storage server in the form of a service interface.
[0038] Optionally, the evidence storage service is a cloud server;
[0039] The automatically generated SQL script template and the interface code are deployed to the evidence storage server as a service interface, including:
[0040] The automatically generated SQL script template and the interface code are created into a container image, and the created container image is published to the cloud server, which then creates the service interface based on the container image.
[0041] Optionally, the asset data includes asset data corresponding to certificate-type assets.
[0042] This specification provides a blockchain-based business deployment device, wherein the blockchain is connected to at least one business party with asset data storage requirements, including:
[0043] The acquisition module is used to acquire the service configuration document related to the automatic on-chain evidence storage service corresponding to the asset data of the business party; wherein, the service configuration document includes service configuration data corresponding to the automatic on-chain evidence storage service;
[0044] The generation module is used to automatically generate service code related to the automatic on-chain evidence storage service based on the service configuration data in the service configuration document;
[0045] The deployment module is used to deploy the automatic on-chain evidence storage service on the evidence storage server based on the service code, so that when the evidence storage server collects the asset data of the business party, it calls the automatic on-chain evidence storage service to publish the asset data of the business party to the blockchain for evidence storage.
[0046] This specification provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned blockchain-based business deployment method.
[0047] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the aforementioned blockchain-based business deployment method.
[0048] The above-mentioned technical solutions adopted in this specification can achieve the following beneficial effects:
[0049] In the blockchain-based business deployment method and apparatus provided in this specification, the blockchain connects to at least one business party with asset data storage requirements. It can obtain a service configuration document related to the automatic on-chain storage service corresponding to the business party's asset data. The service configuration document includes service configuration data corresponding to the automatic on-chain storage service. Then, based on the service configuration data in the service configuration document, service code related to the automatic on-chain storage service can be automatically generated. Based on the service code, the automatic on-chain storage service is deployed on the storage service terminal. This allows the storage service terminal to call the automatic on-chain storage service when it collects the business party's asset data, and publish the business party's asset data to the blockchain for storage.
[0050] As can be seen from the above method, this method can automatically generate service code for an automatic on-chain evidence storage service that supports the on-chain evidence storage requirements of the business party through the pre-configured service configuration document of the business party, and automatically deploy the automatic on-chain evidence storage service based on the service code, thereby improving the efficiency of on-chain evidence storage for the business party. Attached Figure Description
[0051] The accompanying drawings, which are included to provide a further understanding of this specification and form part of this specification, illustrate exemplary embodiments and are used to explain this specification, but do not constitute an undue limitation thereof. In the drawings:
[0052] Figure 1 This is a flowchart illustrating a blockchain-based business deployment method described in this specification.
[0053] Figure 2 This is a schematic diagram illustrating a complete process for deploying an evidence storage service as provided in this specification.
[0054] Figure 3 This is a schematic diagram of a blockchain-based business deployment device described in this specification;
[0055] Figure 4 The corresponding information provided in this specification Figure 1 A schematic diagram of an electronic device. Detailed Implementation
[0056] To make the objectives, technical solutions, and advantages of this specification clearer, the technical solutions of this specification will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of them. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this specification.
[0057] The technical solutions provided in the various embodiments of this specification are described in detail below with reference to the accompanying drawings.
[0058] Figure 1 This is a flowchart illustrating a blockchain-based business deployment method described in this specification. The blockchain connects to at least one business entity with asset data storage requirements, and specifically includes the following steps:
[0059] S100: Obtain the service configuration document related to the automatic on-chain evidence storage service corresponding to the asset data of the business party; wherein, the service configuration document includes service configuration data corresponding to the automatic on-chain evidence storage service.
[0060] In practical applications, the evidence storage service can provide automatic on-chain evidence storage services for business parties. That is, the automatic on-chain evidence storage service can refer to the service of storing the data that needs to be stored on the blockchain for the business party. Based on this, the server can obtain the service configuration document related to the automatic on-chain evidence storage service corresponding to the asset data of the business party; wherein, the service configuration document includes the service configuration data corresponding to the automatic on-chain evidence storage service.
[0061] The service configuration document mentioned above is used to configure the automatic on-chain evidence storage service, enabling the automatic on-chain evidence storage service to be deployed and used automatically.
[0062] The aforementioned automatic on-chain evidence storage service can include multiple sub-processes in its service flow, and the service configuration document includes service configuration data corresponding to each of these sub-processes. At a minimum, each sub-process can include: an on-chain evidence storage process for the data that the business needs to store.
[0063] In this specification, the aforementioned automatic on-chain evidence storage service can be applied in scenarios where businesses store their asset data on the blockchain, thereby facilitating their application for credit from banks and other institutions using the stored asset data. This asset data can include asset data corresponding to voucher-type assets, which may include accounts receivable.
[0064] Therefore, the service process corresponding to the automatic on-chain notarization service can specifically include: the first sub-process of calling the service interface corresponding to the automatic on-chain notarization service deployed on the notarization service client to create standard asset data that conforms to the standard asset format and store it in the local asset database; and the second sub-process of calling the smart contract for data notarization that is bound to the service interface and deployed on the blockchain to perform a consistency check between the standard asset data to be notarized on the blockchain and the standard asset data stored in the asset database, and publishing the standard asset data to be notarized on the blockchain to the blockchain for notarization when the consistency check passes.
[0065] In other words, the first sub-process can refer to the process of creating standard asset data with a certain format and storing it in the database (asset database) through the service interface. That is, the first sub-process is the preparation stage for storing asset data on the blockchain, and it does not yet involve the process of storing asset data on the blockchain. The second sub-process involves storing asset data on the blockchain. The second sub-process first uses a smart contract to perform a consistency check on the standard asset data to be stored on the blockchain and the standard asset data stored in the database. After the consistency check is passed, the standard asset data can be stored on the blockchain.
[0066] Corresponding to the first and second sub-processes mentioned above, the service configuration document may include first service configuration data describing the standard asset format, second service configuration data for generating interface code corresponding to the service interface, and third service configuration data for generating contract code corresponding to the smart contract. The interface code includes interface code corresponding to the storage method for creating standard asset data conforming to the standard asset format and storing it in the local asset database. The contract code includes contract code for performing a consistency check between the standard asset data to be stored on the blockchain and the standard asset data stored in the asset database.
[0067] The specific approach to the consistency check mentioned here can be as follows: check whether the standard asset data to be uploaded to the blockchain for verification is stored in the asset database; if so, determine that the standard asset data to be uploaded to the blockchain for verification has passed the consistency check; otherwise, determine that the standard asset data to be uploaded to the blockchain for verification has not passed the consistency check.
[0068] In this specification, for ease of description, the entity executing this blockchain-based business deployment method is referred to as a server. This entity is not limited and can be a server, a large service platform, or a Blockchain as a Service (BaaS) platform, etc.
[0069] S102: Based on the service configuration data in the service configuration document, automatically generate service code related to the automatic on-chain evidence storage service.
[0070] S104: Deploy the automatic on-chain evidence storage service on the evidence storage service based on the service code, so that when the evidence storage service collects the asset data of the business party, it calls the automatic on-chain evidence storage service to publish the asset data of the business party to the blockchain for evidence storage.
[0071] After the server determines the above service configuration document, it can automatically generate service code related to the automatic on-chain evidence storage service based on the service configuration data in the service configuration document. Then, it can deploy the automatic on-chain evidence storage service on the evidence storage server based on the service code, so that when the evidence storage server collects the asset data of the business party, it can call the automatic on-chain evidence storage service to publish the asset data of the business party to the blockchain for evidence storage.
[0072] Specifically, based on the first service configuration data in the service configuration document mentioned above, an SQL (database) script template for creating asset data in a standard asset format can be automatically generated. Based on the second service configuration data in the service configuration document, the interface code corresponding to the above service interface can be automatically generated. Based on the third service configuration data in the service configuration document, the contract code corresponding to the above smart contract can be automatically generated.
[0073] The aforementioned first service configuration data can be used to standardize the format of standard asset data. This first service configuration data can then be used to generate SQL script templates. The server can automatically generate SQL scripts based on the system's built-in SQL generation tool, following the standardized format in the first service configuration data. The server can then parse the SQL statements according to this SQL script template. The purpose of the SQL script template is to define a standard data format (standardized format). After obtaining the asset data, the evidence storage server can convert the asset data into a standard SQL script according to this SQL script template, and then submit this SQL script as a parameter for the interface call to the asset database, completing the writing of the asset data into the database.
[0074] The specific configuration data for the first service can be shown in the following example:
[0075] @StandardModel(modelRemark="credential")
[0076] public class Voucher{
[0077] @StandardAttribute(attributeDesc="Data Identifier",unk="true",attributeLength="100")
[0078] private String businessCode;
[0079] @StandardAttribute(attributeDesc="Issuance Amount",privacy="Homomorphic",attributeLength="200)
[0080] private String amount;
[0081] @StandardAttribute(attributeDesc="Balance",privacy="Homomorphic",attributeLength="200)
[0082] private String balance;
[0083] "}" (This defines a format for voucher-type assets.)
[0084] The second service configuration data may include an interface code template corresponding to the aforementioned interface code. This interface code template can be input into a template engine, which will then generate the interface code based on it. The third service configuration data may include a contract code template corresponding to the aforementioned contract code. This contract code template can be input into a template engine, which will then generate the contract code based on it.
[0085] A specific example of the second service configuration data can be shown below: "public interface VoucherService{
[0086] @OpenApi(openApiCode="digital.logistic.standard.voucher.create",openApiName="Voucher Issuance", checkRule="BizDataNonentityChecker")
[0087] String createVoucher(CreateVoucherReq req);}
[0088] @OpenApiModel(modelRemark="Create Voucher", standardModel="Voucher.class")
[0089] public class CreateVoucherReq{
[0090] @OpenApiAttribute(attributeDesc="Data Identifier",unk="true") (Creates an attribute for voucher-type assets)
[0091] private String businessCode;
[0092] @OpenApiAttribute(attributeDesc="Asset Type")
[0093] private String assetType;
[0094] @OpenApiAttribute(attributeDesc="Issuance Amount",
[0095] privacy="HomomorphicCreate")
[0096] private String amount;
[0097] @OpenApiAttribute(attributeDesc="Balance",privacy="HomomorphicCreate")
[0098] private String balance; (This defines a creation operation for voucher-type assets)
[0099] The service configuration document may include code documentation written in a preset programming language to describe the service configurations related to the aforementioned automatic on-chain evidence storage service; the service configuration data includes service configuration code describing the service configurations related to the automatic on-chain evidence storage service. The preset programming language mentioned here can be Java; the template engine mentioned here can be the Velocity template engine.
[0100] It should be noted that the service configuration document mentioned above may also include: a fourth service configuration data for creating a local asset database. The server can automatically create the asset database locally based on the fourth service configuration data in the service configuration document.
[0101] The service configuration document may also include: fifth configuration data for deploying automatically generated contract code to the blockchain as a smart contract, and the server can deploy the contract code to the blockchain as a smart contract based on the fifth configuration data.
[0102] The service configuration document may also include: a sixth configuration data for deploying automatically generated SQL script templates and interface code to the evidence storage service in the form of a service interface. The server can deploy the automatically generated SQL script templates and interface code to the evidence storage service based on the sixth configuration data, and bind the service interface to the aforementioned smart contract. This allows the server to call the service interface when it collects the asset data of the business party, create an SQL script that conforms to the standard asset format according to the SQL script template, and submit the SQL script to the asset database for execution, so as to write the standard data assets defined by the SQL script into the asset database. Furthermore, when storing the standard data assets to be stored on the blockchain, the smart contract bound to the service interface is further called to perform a consistency check between the standard asset data to be stored on the blockchain and the standard asset data stored in the asset database. When the consistency check passes, the standard asset data to be stored on the blockchain is published to the blockchain for evidence storage.
[0103] It should be noted that the aforementioned evidence storage service can be a cloud server. The server can create a container image from the automatically generated SQL script template and interface code, and then publish the created container image to the cloud server, which will then create the service interface based on the container image. The container image mentioned here can refer to a Docker container image; that is, the SQL script template and interface code can be packaged into a container image using Docker, thereby deploying the service interface to the cloud server.
[0104] It should also be noted that the first service configuration data mentioned above can include data fields and corresponding condition fields for each data field. Data fields indicate what data can be included in the asset data, and for each data field, the corresponding condition field can represent the constraints for that data field. The constraints mentioned here can refer to conditions such as specifying the maximum data length of the data field or performing a uniqueness check on the data field (to ensure data uniqueness).
[0105] Constraints on data fields can be implemented using components and smart contracts.
[0106] It should also be noted that after the above service interface is constructed, it can be tested first to verify its correctness before deployment. Therefore, before deploying the service interface, a test script can be generated according to the service configuration document, and the service interface can be tested using this test script. This test script can be used to test whether the service interface can accurately store asset data on the blockchain and whether it accurately implements the constraints for each data field.
[0107] Furthermore, to ensure that the smart contract can produce the desired effect for the business, that is, to guarantee the accuracy of the smart contract code, before deploying the smart contract to the blockchain, a test script corresponding to the smart contract can be generated according to the service configuration document, and the smart contract can be tested by the test script to ensure the accuracy of the generated smart contract code.
[0108] The aforementioned components and smart contracts can be used to implement various functions (components are mainly used for off-chain (i.e., outside the blockchain) operations, while smart contracts are mainly used for on-chain operations), such as ensuring data consistency and protecting data privacy. Data consistency refers to ensuring that the data before and after being uploaded to the blockchain is consistent. This is typically used when modifying business data, which may result in discrepancies between the modified and original data. Therefore, the uploaded data can be checked to ensure consistency. Privacy protection refers to the encryption of asset data during the on-chain notarization process.
[0109] The following section will provide a complete explanation of the blockchain-based business deployment methods described in this manual, such as... Figure 2 As shown.
[0110] Figure 2 This is a schematic diagram illustrating a complete process for deploying an evidence storage service as provided in this specification.
[0111] from Figure 2 As can be seen, the process begins with design, which refers to the design of asset data by staff and developers. Based on this design, a service configuration document can be determined. Then, according to the service configuration document, interface code, contract code, and SPL script templates can be generated sequentially, followed by the deployment of the service interface, smart contract, and the generation of the corresponding database. Furthermore, test scripts (for both the service interface and the smart contract) can be used to verify the accuracy of the service interface and smart contract before deployment.
[0112] As can be seen from the above, the service code for the automatic on-chain evidence storage service that supports the on-chain evidence storage requirements of the business party can be automatically generated through the pre-configured service configuration document of the business party, and the automatic on-chain evidence storage service can be automatically deployed based on the service code, thereby improving the efficiency of on-chain evidence storage for the business party.
[0113] The above describes one or more embodiments of a blockchain-based business deployment method provided in this specification. Based on the same concept, this specification also provides corresponding blockchain-based business deployment devices, such as... Figure 3 As shown.
[0114] Figure 3 This specification provides a schematic diagram of a blockchain-based business deployment device, which specifically includes:
[0115] The acquisition module 301 is used to acquire a service configuration document related to the automatic on-chain evidence storage service corresponding to the asset data of the business party; wherein, the service configuration document includes service configuration data corresponding to the automatic on-chain evidence storage service;
[0116] The generation module 302 is used to automatically generate service code related to the automatic on-chain evidence storage service based on the service configuration data in the service configuration document;
[0117] Deployment module 303 is used to deploy the automatic on-chain evidence storage service on the evidence storage server based on the service code, so that when the evidence storage server collects the asset data of the business party, it calls the automatic on-chain evidence storage service to publish the asset data of the business party to the blockchain for evidence storage.
[0118] Optionally, the service process corresponding to the automatic on-chain evidence storage service includes multiple sub-processes; the service configuration document includes service configuration data corresponding to each of the multiple sub-processes.
[0119] Optionally, the service process corresponding to the automatic on-chain notarization service includes: a first sub-process of calling the service interface deployed on the notarization service server corresponding to the automatic on-chain notarization service to create standard asset data conforming to the standard asset format and store it in the local asset database; and a second sub-process of calling the smart contract deployed on the blockchain and bound to the service interface for data notarization to perform a consistency check between the standard asset data to be notarized on the blockchain and the standard asset data stored in the asset database, and publishing the standard asset data to be notarized on the blockchain to the blockchain for notarization when the consistency check passes.
[0120] Optionally, the service configuration document includes: first service configuration data describing the standard asset format; second service configuration data for generating interface code corresponding to the service interface; wherein the interface code includes interface code corresponding to a storage method for creating standard asset data conforming to the standard asset format and storing it in a local asset database; and third service configuration data for generating contract code corresponding to the smart contract; wherein the contract code includes contract code for performing a consistency check between the standard asset data to be stored on the blockchain and the standard asset data stored in the asset database.
[0121] Optionally, the generation module 302 is specifically used to automatically generate an SQL script template for creating the asset data into a standard asset format based on the first service configuration data in the service configuration document; the generation module 302 is specifically used to automatically generate the contract code corresponding to the smart contract based on the third service configuration data in the service configuration document.
[0122] Optionally, the second service configuration data includes an interface code template corresponding to the interface code; the third service configuration data includes a contract code template corresponding to the contract code; the generation module 302 is specifically used to input the interface code template into the template engine, and the template engine generates the interface code based on the interface code template; the generation module 302 is specifically used to input the contract code template into the template engine, and the template engine generates the contract code based on the contract code template.
[0123] Optionally, the service configuration document includes a code document written in a preset programming language to describe the service configuration related to the automatic on-chain evidence storage service; the service configuration data includes service configuration code to describe the service configuration related to the automatic on-chain evidence storage service.
[0124] Optionally, the service configuration document may further include: fourth service configuration data for creating the local asset database;
[0125] Before deploying the automatic on-chain evidence storage service on the evidence storage service based on the service code, the deployment module 303 is further configured to automatically create the asset database locally based on the fourth service configuration data in the service configuration document.
[0126] Optionally, the service configuration document further includes: fifth configuration data for deploying the automatically generated contract code to the blockchain in the form of a smart contract; before deploying the automatic on-chain evidence storage service on the evidence storage service based on the service code, the deployment module 303 is further configured to deploy the contract code to the blockchain in the form of a smart contract based on the fifth configuration data.
[0127] Optionally, the service configuration document further includes: sixth configuration data for deploying the automatically generated SQL script template and the interface code to the evidence storage service in the form of a service interface; the deployment module 303 is specifically used to deploy the automatically generated SQL script template and the interface code to the evidence storage service in the form of a service interface based on the sixth configuration data.
[0128] Optionally, the evidence storage service is a cloud service; the deployment module 303 is specifically used to create a container image from the automatically generated SQL script template and the interface code, and publish the created container image to the cloud service, so that the cloud service can create the service interface based on the container image.
[0129] Optionally, the asset data includes asset data corresponding to certificate-type assets.
[0130] This specification also provides a computer-readable storage medium storing a computer program that can be used to execute the above-described... Figure 1 The example shown illustrates a blockchain-based business deployment method.
[0131] This instruction manual also provides Figure 4 The diagram shows a schematic structural representation of the electronic device. Figure 4 At the hardware level, the electronic device includes a processor, internal bus, network interface, memory, and non-volatile memory, and may also include other hardware required for the business operations. The processor reads the corresponding computer program from the non-volatile memory into memory and then runs it to achieve the above-mentioned functions. Figure 1 The described blockchain-based business deployment method. Of course, in addition to software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. In other words, the execution subject of the following processing flow is not limited to individual logic units, but can also be hardware or logic devices.
[0132] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program and "integrate" a digital system onto a PLD themselves, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should understand that by simply performing some logic programming on the method flow using one of these hardware description languages and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.
[0133] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, ASICs, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.
[0134] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.
[0135] For ease of description, the above devices are described in terms of function, divided into various units. Of course, in implementing this specification, the functions of each unit can be implemented in one or more software and / or hardware components.
[0136] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0137] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0138] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0139] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0140] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0141] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0142] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0143] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0144] Those skilled in the art will understand that the embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this specification may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0145] This specification can be described in the general context of computer-executable instructions that are executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This specification can also be practiced in distributed computing environments, where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0146] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0147] The above description is merely an embodiment of this specification and is not intended to limit this specification. Various modifications and variations can be made to this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of the claims of this specification.
Claims
1. A blockchain-based business deployment method, wherein, The blockchain connects to at least one business entity with asset data storage requirements, including: Obtain the service configuration document related to the automatic on-chain evidence storage service corresponding to the asset data of the business party; wherein, the service configuration data corresponding to the automatic on-chain evidence storage service in the service configuration document includes: first service configuration data for describing the standard asset format, second service configuration data for generating interface code corresponding to the service interface deployed on the evidence storage service terminal, and third service configuration data for generating contract code corresponding to the smart contract deployed on the blockchain, wherein the smart contract is bound to the service interface and used for data evidence storage; Based on the service configuration data in the service configuration document, service code related to the automatic on-chain notarization service is automatically generated, including: automatically generating an SQL script template for creating the asset data into a standard asset format based on the first service configuration data; automatically generating the interface code based on the second service configuration data, wherein the storage method corresponding to the interface code is used to create standard asset data into standard asset data in a standard asset format and store it in a local asset database; and automatically generating the contract code based on the third service configuration data, wherein the contract code is used to perform a consistency check between the standard asset data to be on-chain notarized and the standard asset data stored in the asset database. Based on the service code, the automatic on-chain evidence storage service is deployed on the evidence storage server so that when the evidence storage server collects the asset data of the business party, it calls the automatic on-chain evidence storage service to publish the asset data of the business party to the blockchain for evidence storage.
2. The method as described in claim 1, wherein the service process corresponding to the automatic on-chain evidence storage service includes multiple sub-processes; and the service configuration document includes service configuration data corresponding to each of the multiple sub-processes.
3. The method as described in claim 2, wherein the service process corresponding to the automatic on-chain evidence storage service includes: The first sub-process involves calling the service interface to create standard asset data that conforms to the standard asset format and storing it in the local asset database. as well as, The second sub-process involves invoking the smart contract to perform a consistency check between the standard asset data to be stored on the blockchain and the standard asset data stored in the asset database. If the consistency check passes, the standard asset data to be stored on the blockchain is published to the blockchain for storage.
4. The method as described in claim 1, wherein the second service configuration data includes an interface code template corresponding to the interface code; The third service configuration data includes a contract code template corresponding to the contract code; The automatic generation of the interface code based on the second service configuration data includes: The interface code template is input into the template engine, which then generates the interface code based on the interface code template. Based on the third service configuration data in the service configuration document, the contract code corresponding to the smart contract is automatically generated, including: The contract code template is input into the template engine, which then generates the contract code based on the template.
5. The method as described in claim 1, wherein the service configuration document includes a code document written in a preset programming language to describe the service configuration related to the automatic on-chain evidence storage service; and the service configuration data includes service configuration code to describe the service configuration related to the automatic on-chain evidence storage service.
6. The method of claim 1, wherein the service configuration document further includes: The fourth service configuration data used to create the local asset database; Before deploying the automatic on-chain evidence storage service on the evidence storage server based on the service code, the method further includes: Based on the fourth service configuration data in the service configuration document, the asset database is automatically created locally.
7. The method of claim 1, wherein the service configuration document further includes: Fifth configuration data used to deploy automatically generated contract code to the blockchain in the form of smart contracts; Before deploying the automatic on-chain evidence storage service on the evidence storage server based on the service code, the method further includes: Based on the fifth configuration data, the contract code is deployed to the blockchain in the form of a smart contract.
8. The method of claim 1, wherein the service configuration document further includes: The sixth configuration data is used to deploy the automatically generated SQL script template and the interface code to the evidence storage server in the form of a service interface; Deploying the automatic blockchain-based evidence storage service on the evidence storage server based on the service code includes: Based on the sixth configuration data, the automatically generated SQL script template and the interface code will be deployed to the evidence storage server in the form of a service interface.
9. The method as described in claim 8, wherein the evidence storage server is a cloud server; The automatically generated SQL script template and the interface code are deployed to the evidence storage server as a service interface, including: The automatically generated SQL script template and the interface code are created into a container image, and the created container image is published to the cloud server, which then creates the service interface based on the container image.
10. The method as described in claim 1, wherein the asset data includes asset data corresponding to certificate-type assets.
11. A blockchain-based business deployment device, wherein, The blockchain connects to at least one business entity with asset data storage requirements, including: The acquisition module is used to acquire service configuration documents related to the automatic on-chain evidence storage service corresponding to the asset data of the business party; wherein, the service configuration data corresponding to the automatic on-chain evidence storage service in the service configuration document includes: first service configuration data for describing the standard asset format, second service configuration data for generating interface code corresponding to the service interface deployed on the evidence storage service terminal, and third service configuration data for generating contract code corresponding to the smart contract deployed on the blockchain, wherein the smart contract is bound to the service interface and used for data evidence storage; The generation module is used to automatically generate service code related to the automatic on-chain notarization service based on the service configuration data in the service configuration document. This includes: automatically generating an SQL script template based on the first service configuration data to create the asset data conforming to the standard asset format; automatically generating the interface code based on the second service configuration data, wherein the storage method corresponding to the interface code is used to create standard asset data conforming to the standard asset format and store it in a local asset database; and automatically generating the contract code based on the third service configuration data, wherein the contract code is used to perform a consistency check between the standard asset data to be on-chain notarized and the standard asset data stored in the asset database. The deployment module is used to deploy the automatic on-chain evidence storage service on the evidence storage server based on the service code, so that when the evidence storage server collects the asset data of the business party, it calls the automatic on-chain evidence storage service to publish the asset data of the business party to the blockchain for evidence storage.
12. A computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in any one of claims 1 to 10.
13. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described in any one of claims 1 to 10.
Citation Information
Patent Citations
Project data evidence storage method and system, terminal equipment and readable storage medium
CN112507668A