CN111327648A - Processing method and system based on block chain intelligent contract - Google Patents
Processing method and system based on block chain intelligent contract Download PDFInfo
- Publication number
- CN111327648A CN111327648A CN201811527049.7A CN201811527049A CN111327648A CN 111327648 A CN111327648 A CN 111327648A CN 201811527049 A CN201811527049 A CN 201811527049A CN 111327648 A CN111327648 A CN 111327648A
- Authority
- CN
- China
- Prior art keywords
- intelligent contract
- side chain
- main chain
- node
- operation result
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/104—Peer-to-peer [P2P] networks
- H04L67/1059—Inter-group management mechanisms, e.g. splitting, merging or interconnection of groups
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q40/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/04—Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/30—Decision processes by autonomous network management units using voting and bidding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1095—Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L2209/00—Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
- H04L2209/56—Financial cryptography, e.g. electronic payment or e-cash
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/50—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Finance (AREA)
- Development Economics (AREA)
- Economics (AREA)
- Marketing (AREA)
- Strategic Management (AREA)
- Technology Law (AREA)
- Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
Abstract
The embodiment of the application provides a processing method and a system based on a blockchain intelligent contract, wherein the blockchain comprises a main chain and at least one side chain, and the processing method based on the blockchain intelligent contract comprises the following steps: initiating a transaction on the main chain triggers the establishment of the sidechain; deploying an intelligent contract on the side chain; running the intelligent contract on the side chain to bill the transaction; voting and verifying the operation result of the intelligent contract through the participants of the intelligent contract; and transmitting the operation result after voting verification to the node of the main chain through the side chain. The embodiment of the application can realize the shunting of the operation on the main chain, reduces the calculated amount of the main chain, and solves the problem of data storage and calculated amount expansion caused to a single node when multiple services are borne on the same chain.
Description
[ technical field ] A method for producing a semiconductor device
The application relates to the technical field of block chains, in particular to a processing method and a system based on a block chain intelligent contract.
[ background of the invention ]
Because the block chain uses distributed accounting and storage, centralized hardware or a management mechanism does not exist, the right and obligation of any node are equal, and the data blocks in the system are commonly maintained by the nodes with maintenance functions in the whole system.
An important application, namely intelligent contracts, is generated by the development of blockchain technology. The intelligent contract can completely replace the traditional centralized operating system, and all account operations can be operated according to the steps which are established in advance through strict logic operation.
With the development of block chain technology, side chain technology has been proposed. The side chain is a relative concept for the main chain of the block chain, and is called sidechains. Currently, the side-chain concept is proposed mainly to realize the transfer of digital assets among a plurality of blockchains.
[ summary of the invention ]
The embodiment of the application provides a processing method and a system based on a block chain intelligent contract, wherein the intelligent contract is deployed on a side chain, and the intelligent contract is operated on the side chain to book the transaction initiated on a main chain, so that the operation on the main chain can be shunted, the calculated amount of the main chain is reduced, and the problem of data storage and calculated amount expansion caused to a single node by multiple services carried on the same chain is solved.
In a first aspect, an embodiment of the present application provides a processing method based on a blockchain intelligent contract, where the blockchain includes a main chain and at least one side chain, and the method includes: initiating a transaction on the main chain triggers the establishment of the sidechain; deploying an intelligent contract on the side chain; running the intelligent contract on the side chain to bill the transaction; voting and verifying the operation result of the intelligent contract through the participants of the intelligent contract; and transmitting the operation result after voting verification to the node of the main chain through the side chain.
In one specific implementation, when a transaction is initiated on the main chain, creation of a founder block in the side chain is triggered, and the side chain and the main chain are anchored bidirectionally to form a synchronous relationship between the side chain and the main chain.
Wherein in one particular implementation, the last block in the main chain serves as the founder block in the side chain.
Wherein in a particular implementation, the deploying an intelligent contract on the side chain comprises: multiple users participate in making the intelligent contract together; diffusing and storing the intelligent contracts through a P2P network into the side chains in the block chain; automatically executing the intelligent contract in the side chain.
In a specific implementation manner, the voting verification of the running result of the intelligent contract by the participant of the intelligent contract includes: voting and confirming the operation result of the intelligent contract through all the participants of the intelligent contract; when the participant of the intelligent contract does not recognize the operation result, operating the intelligent contract again through the side chain; when all intelligent contract participants approve the operation result, the operation result of the intelligent contract is transmitted to the main chain through the side chain; the participants of the intelligent contract comprise at least two users.
In a specific implementation manner, after the passing the voting verification operation result to the node of the main chain through the side chain, the method further includes: and issuing the operation result of the intelligent contract to all the nodes of the main chain through the nodes of the main chain, and storing the operation result of the intelligent contract in the block chain.
In a second aspect, an embodiment of the present application provides a processing system based on a blockchain intelligent contract, where the blockchain includes a main chain and at least one side chain, and the processing system includes: a main chain node for initiating a transaction on the main chain to trigger the establishment of the side chain; at least one side chain node, the side chain node being triggered to be established by a transaction initiated on the main chain by the main chain node; the side chain node is used for deploying a smart contract on the side chain, operating the smart contract on the side chain to bill the transaction, performing voting verification on an operation result of the smart contract through a participant of the smart contract, and transmitting the operation result after voting verification to the main chain node through the side chain.
In a specific implementation manner, when the main chain node initiates a transaction on the main chain, creation of a creation block in the side chain node is triggered, and the side chain node and the main chain node are anchored bidirectionally to form a synchronous relationship between the side chain node and the main chain node.
Wherein in one particular implementation, the last block in the main chain node serves as the founder block in the side chain node.
In a specific implementation manner, the side chain node is specifically configured to make the intelligent contract through co-participation of multiple users, to spread and store the intelligent contract through a P2P network, and to automatically execute the intelligent contract in the side chain.
In a specific implementation manner, the side-chain node is specifically configured to perform voting validation on the operation result of the intelligent contract by all participants of the intelligent contract; when the participant of the intelligent contract does not recognize the operation result, operating the intelligent contract again; when all intelligent contract participants approve the operation result, transmitting the operation result of the intelligent contract to the main chain node; wherein the participants of the intelligent contract comprise at least two users.
In a specific implementation manner, the main chain node is further configured to issue, by the main chain node, the operation result of the intelligent contract to all nodes of the main chain after the side chain node transfers the operation result after the voting verification to the main chain node through the side chain, and store the operation result of the intelligent contract in the block chain.
In a third aspect, an embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program to implement the method described above.
In a fourth aspect, embodiments of the present application provide a non-transitory computer-readable storage medium having stored thereon a computer program, which when executed by a processor, implements the method as described above.
In the technical scheme, the intelligent contract is deployed on the side chain, and the transaction initiated on the main chain is booked by running the intelligent contract on the side chain, so that the operation on the main chain can be shunted, the calculated amount of the main chain is reduced, and the problem of data storage and calculated amount expansion caused to a single node by multiple services carried on the same chain is solved.
[ description of the drawings ]
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a processing method based on a blockchain intelligent contract according to an embodiment of the present disclosure;
FIG. 2 is a flow chart of a portion of the process at process step 105 of FIG. 1;
FIG. 3 is a schematic diagram of a processing system based on a blockchain intelligent contract according to an embodiment of the present application;
FIG. 4 is a further schematic diagram of a processing system based on block chain intelligent contracts according to an embodiment of the present application;
fig. 5 is another schematic diagram of a processing method based on a blockchain intelligent contract according to an embodiment of the present application;
FIG. 6 is a schematic structural diagram of an embodiment of a computer apparatus according to the present application.
[ detailed description ] embodiments
For better understanding of the technical solutions of the present application, the following detailed descriptions of the embodiments of the present application are provided with reference to the accompanying drawings.
It should be understood that the embodiments described are only a few embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the examples of this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
Technical term interpretation:
main chain
The main chain refers to a formally online, independent blockchain network.
Side chains
The side chain refers to wedged side chain technology (sidechains), which is a relative concept for the main chain, and the english language is sidechains. The side chain concept is proposed mainly to realize the transfer of bitcoin and other digital assets between a plurality of blockchains, and simply, the side chain is a mechanism for moving the currency between two blockchains.
Intelligent contract
An intelligent contract refers to a computer protocol that enables self-execution (self-validation) and self-verification (self-verification) once formulated and deployed, and that does not require human intervention. From a technical point of view, an intelligent contract may be considered a computer program that autonomously performs all or part of the contract-related operations and produces corresponding evidence that may be verified to demonstrate the effectiveness of the contract operations. Before deploying the intelligent contracts, the logic flow of most of the terms related to the contracts is established. Intelligent contracts are typically provided with a user interface (interface) to allow a user to interact with the contracts that have been established, all in strict compliance with previously established logic.
The intelligent contract has the following advantages: (1) efficient real-time updating; (2) accurate execution is carried out; (3) lower risk of human intervention; (4) removing the centralized authority; (5) lower running cost.
Ether house
Etherhouse is a universal global block chain, as well as platform and programming languages, including digital currency ethernet (Ether), and ethernet scripts (EherScript) used to build and publish distributed applications. Additionally, from a bottom-level perspective, etherhouses are a multi-tiered, open source technology protocol based on cryptography. The different function templates of the system are comprehensively integrated through design, and the system is a platform for creating and deploying decentralized application as a whole.
Account
Each account is determined by a pair of private and public keys. Each account has an address.
Trading
A transaction refers to a signed data packet storing a message sent from an external account number. The transaction contains the recipient of the message, a signature to confirm the sender, the ethernet account balance, and/or the data to be sent, etc.
Status of state
Confirmed, unconfirmed, locked, unlocked, executed, and/or unexecuted transactions, etc.
Because all the intelligent contract operations are performed on the main chain in the current block chain, the number of times that the intelligent contract is operated is continuously increased along with the continuous increase of block chain users, and the operation resources of the whole block chain are limited, so that the intelligent contract is slow to operate, and even congestion is caused. For example, in an ethernet house, a large number of intelligent contracts are run, which results in slow running speed and high cost, for example, the gas cost of the ethernet house is higher and higher, which results in increased economic cost for users. In order to solve the above technical problems, embodiments of the present application provide a processing method based on a block chain intelligent contract, in which a side chain is added to perform operation on an intelligent contract, so as to implement shunting of intelligent contract operation on a main chain, thereby increasing a main chain operation speed and reducing a cost required by a user for operating the intelligent contract. As will be described in detail below.
Fig. 1 is a flowchart of an embodiment of a processing method based on a blockchain intelligent contract according to the present application. It should be noted that the block chain includes a main chain and at least one side chain, wherein the main chain and the matching side chain are generally in a unique corresponding relationship. The reason for the side chain setting is that when the main chain is temporarily unable to meet new requirements, the transaction operation on the main chain is transferred to the side chain, and after the transaction operation on the side chain is completed, the transaction information on the side chain can be completely transferred to the main chain.
Through the side chain, new functions such as intelligent contracts can be added on the basis of the main chain, and even if a large number of transactions need to run the intelligent contracts, the work influence on the main chain can not be caused. In addition, the side chain provides a safer protocol upgrade, and the main chain is not greatly influenced when the side chain has a catastrophic problem. In addition, it should be noted that, because the side chains themselves are independent block chains, there is a node network (accounting node, etc.) of themselves, and the codes and data are also relatively independent; therefore, the load of the main chain cannot be increased in the running process, and the condition of excessive expansion of data is avoided.
The technical basis for sidechain implementation is Two-way anchoring (Two-way Peg), by which temporary locking of digital assets in the main chain can be achieved while releasing equivalent digital assets in the sidechain. Likewise, when an equivalent digital asset is locked in a sidechain, the digital asset of the main chain may also be released. The current side chain generation modes include a single escrow mode, a federation mode, a Simple Payment Verification (SPV) mode, a drive chain mode, a hybrid mode and the like.
The processing method based on the block chain intelligent contract provided in fig. 1 may be applied to the application scenario shown in fig. 5, and fig. 5 is a schematic view of the application scenario of the processing method based on the block chain intelligent contract according to the present application.
Referring to fig. 1 and 5, the processing method based on the blockchain intelligent contract may include:
step 101: initiating a transaction on the main chain triggers the establishment of the sidechain;
step 102: deploying an intelligent contract on the side chain;
step 103: running the intelligent contract on the side chain to bill the transaction;
step 104: voting and verifying the operation result of the intelligent contract through the participants of the intelligent contract;
step 105: and transmitting the operation result after voting verification to the node of the main chain through the side chain.
In a preferred embodiment, the side chains in the block chain of the above processing method are ether house block chains. The Ethernet workshop is provided with an Ethernet virtual machine built on a block chain, and the intelligent contract writing becomes simple due to the introduction of the virtual machine. The Ethernet virtual machine is a code running environment established on an Ethernet workshop blockchain, is stored on each node computer, and runs the virtual machine by each check node participating in the Ethernet workshop network and takes the virtual machine as a part of a blockchain validity check protocol. Each node performs the same calculations for deployment and invocation of the intelligent contracts and stores the same data to ensure that the most authoritative and true results are recorded in the blockchain.
Fig. 3 is a schematic structural diagram of an embodiment of a processing system based on a block chain intelligent contract according to the present application, and fig. 4 is a schematic structural diagram of another embodiment of a processing system based on a block chain intelligent contract according to the present application, as shown in fig. 3 and fig. 4, in the embodiment of the present application, generation of a side chain 12 is triggered when a transaction is initiated on a main chain 11 (i.e., when transaction information on a transaction terminal is transferred to the main chain 11), that is, creation of a creation block in the side chain is based on whether a transaction is performed on the main chain or not. When the side chain is generated, a synchronization relationship between the side chain 12 and the main chain 11 is formed by a bidirectional anchoring technique such as a single escrow mode, a alliance mode, an SPV mode and/or a driving chain mode between the side chain 12 and the main chain 11. The synchronous relationship refers to the transaction information in the side chain 12 and the main chain 11, the running results of the intelligent contracts can be shared with each other, and the latest state is synchronously updated.
In addition, the creation of the first block in the side chain 12 may be a creation block generated independently from the main chain 11, or as shown in fig. 4, the first block side chain 01 in the side chain 12 may be served by the last block main chain End in the main chain 11. In this way, the combination and synchronization of the main chain 11 and the side chain 12 can be made simpler. Of course, in the embodiment of the present application, each main chain 11 may include a plurality of different side chains 12, and the different side chains 12 may have different functions, such as smart contract operation performed by one side chain 12, transaction security and/or information upgrading performed by another side chain, and the like.
With continued reference to fig. 1, in the embodiment of the present application, the operation of the intelligent contract on the main chain 11 is shunted to the side chain 12, so that the intelligent contract needs to be deployed on the side chain 12, and specifically, the following steps may be included:
(1) multiple users participate in making the intelligent contract together;
(2) diffusing and storing the intelligent contract into the side chain of the block chain through a point-to-point (Peer to Peer; hereinafter referred to as P2P) network;
(3) automatically executing the intelligent contract in the side chain.
Wherein, for the step (1), the method specifically comprises the following steps:
① firstly, the user must register as a user of the blockchain, and the blockchain returns a pair of public key and private key to the user, where the public key is the account address of the user on the blockchain and the private key is the only key for operating the account.
② at least two users agree on a commitment containing the rights and obligations of each party, the rights and obligations are recorded in electronic form in machine language, and the participants sign with their private keys to ensure the effectiveness of the contract.
③ the signed intelligent contract will be transmitted to the blockchain network according to the promised content therein.
Wherein, for the step (2), the method specifically comprises the following steps:
① the contract is diffused in the block chain whole network by the mode of P2P, each node receives one contract, the verification node in the block chain stores the received contract in the memory first, waits for a new round of consensus time, and triggers the consensus and processing of the contract;
② when the agreement is reached, the verification node will pack all the contracts stored in the last period into a contract set (set) and calculate the Hash (Hash) value of the contract set, and finally assemble the Hash value of the contract set into a block structure to be diffused to the whole network, after other verification nodes receive the block structure, the Hash of the contract set contained in the verification node will be taken out and compared with the contract set stored by themselves, and at the same time, a contract set approved by themselves will be sent to other verification nodes, through the multi-round sending and comparison, all the verification nodes will finally reach the agreement to the latest contract set in the stipulated time.
③ the latest contract collection will be spread to the whole network in blocks, each block contains the Hash value of the current block, the Hash value of the previous block, the timestamp when the consensus is achieved, and other description information, the most important information of the block chain is the one with a group of agreed contracts, the node receiving the contracts will verify each contract, the verified contract will be written into the block chain finally, the verified content is mainly whether the signature of the contract participant private key matches with the account.
Wherein, for step (3), specifically, the method may include:
① the intelligent contract will periodically check the state of the automaton, traverse the state machine, affairs and trigger condition contained in each contract, push the affairs with satisfied condition to the queue to be verified, wait for consensus, and keep storing the affairs without satisfying the trigger condition on the block chain.
② the latest round of verification transaction can be spread to each verification node (accounting node), as with the common blockchain transaction or transaction, the verification node first performs signature verification to ensure the validity of the transaction, the transaction passing verification enters the waiting consensus set, and after most verification nodes achieve consensus, the transaction will be successfully executed and inform the user.
③ after the affairs are successfully executed, the state machine of the intelligent contract judges the state of the contract, when all affairs included in the contract are executed in sequence, the state machine marks the state of the contract as completed and removes the contract from the latest block, otherwise, the state of the contract is marked as in progress and continuously stored in the latest block to wait for the next round of processing until the processing is completed, the whole affairs and the state processing are automatically completed by the intelligent contract system built in the bottom layer of the block chain, and the whole process is transparent and can not be changed.
Fig. 2 is a flowchart of another embodiment of the processing method based on a block chain intelligent contract according to the present application, and as for the voting verification process in step 105 in fig. 1, as shown in fig. 2, the running result of the intelligent contract is implemented by performing the voting verification process by the participants of the intelligent contract, where the participants of the intelligent contract include at least two users, and for the confirmation of the running result of the intelligent contract, all the users need to reach a agreement to perform the voting verification process. The specific steps may include:
step 201, voting and confirming the operation result of the intelligent contract through all the participants of the intelligent contract;
step 203 transmits the operation result of the intelligent contract to the main chain through the side chain when all intelligent contract participants approve the operation result.
In an embodiment of the present application, in step 202, when there is an disapproval of the participant of the intelligent contract with the operation result, the method may further include: and voting to confirm whether the current operation result needs to be operated again through the participants of the intelligent contract. If the participants of the intelligent contract vote to decide that the operation needs to be carried out again, step 203 is entered; if the participants of the smart contract vote to decide that no further execution is necessary, execution is terminated.
According to the method and the device, the participant of the intelligent contract carries out a voting confirmation mechanism on the operation result of the intelligent contract in the side chain, so that the accuracy of the operation result of the intelligent contract is confirmed, and the problem that each accounting node of the operation result of the intelligent contract needs to be confirmed in the related technology, and the calculation amount is huge is solved. According to the method and the device for processing the intelligent contract, the intelligent contract is operated on the side chain, the operation result of the intelligent contract is transmitted to the main chain, after the operation result transmitted by the side chain is received by the node of the main chain, the operation result of the intelligent contract is issued to all the nodes of the main chain through the node of the main chain, and the operation result of the intelligent contract is stored in the block chain, so that the intelligent contract is operated on the side chain, resources on the main chain are occupied, and the method and the device for processing the intelligent contract are efficient.
On the basis of the above embodiments, referring to fig. 3 and fig. 4, the processing system 100 based on the block chain intelligent contract may include: a main chain node 11, at least one side chain node 12;
the main chain node 11 is used for initiating a transaction on the main chain to trigger the establishment of the side chain;
at least one side chain node 12, said side chain node being triggered by a transaction initiated on said main chain by said main chain node;
the side chain node 12 is configured to deploy an intelligent contract on the side chain, run the intelligent contract on the side chain to perform accounting on the transaction, perform voting verification on a running result of the intelligent contract through a participant of the intelligent contract, and transmit the running result after the voting verification to the main chain node 11 through the side chain.
In this embodiment, when the main chain node 11 initiates a transaction on the main chain, the creation block is created in the side chain node 12, and the side chain node 12 and the main chain node 11 are anchored in two directions, so as to form a synchronization relationship between the side chain node 12 and the main chain node 11.
The last block in the main chain node 11 serves as the above-described founder block in the side chain node 12.
The side chain node 12 is specifically configured to jointly participate in making the intelligent contract through multiple users, to spread and store the intelligent contract through a P2P network, and to automatically execute the intelligent contract in the side chain.
The side chain node 12 is specifically configured to perform voting validation on the operation result of the intelligent contract through all participants of the intelligent contract; when the participant of the intelligent contract does not recognize the operation result, operating the intelligent contract again; when all intelligent contract participants approve the operation result, transmitting the operation result of the intelligent contract to a main chain node; wherein, the participants of the intelligent contract comprise at least two users.
And the main chain node 11 is further configured to, after the side chain node 12 transmits the operation result after the voting verification to the main chain node 11 through the side chain, issue the operation result of the intelligent contract to all nodes of the main chain through the main chain node 11, and store the operation result of the intelligent contract in the block chain.
The operation mechanisms of the main chain node 11 and the side chain node 12 will be described below: the transaction is initiated on the main chain node 11 and is transmitted to the side chain node 12, and the side chain node 12 is established by the transaction trigger transmitted by the main chain node 11. Specifically, the foundational block of side chain nodes 12 is formed by transaction triggers in the main chain node 11. In one embodiment of the present application, as shown in fig. 4, the first block side chain 01 in the side chain node 11 may be served by the last block main chain End in the main chain 11. After the side chain node 12 is formed, deploying an intelligent contract in the side chain node 12, and performing accounting on the transaction on the main chain node 11 by operating an intelligent contract unit on the side chain node 12; voting and verifying the operation result of the intelligent contract through the participants of the intelligent contract, wherein the participants of the intelligent contract comprise at least two users; and finally, the operation result after voting verification is transmitted to the main chain node 11 through the side chain node 12. Furthermore, after the main chain node 11 receives the operation result (state) transmitted by the side chain node 12, the main chain node 11 issues the operation result (state) of the intelligent contract to all nodes (such as the main chain 01, the main chain 02, etc.) of the main chain; and storing the running result of the intelligent contract in the blockchain.
The embodiment of the application provides a processing method and a system based on a block chain intelligent contract, wherein the intelligent contract is deployed on a side chain, and the intelligent contract is operated on the side chain to book the transaction initiated on a main chain, so that the operation on the main chain can be shunted, the calculated amount of the main chain is reduced, and the problem of data storage and calculated amount expansion caused to a single node by multiple services carried on the same chain is solved.
Fig. 6 is a schematic structural diagram of an embodiment of a computer device according to the present application, where the computer device may include a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the processing method based on the intelligent contract for block chains according to the embodiment of the present application may be implemented.
The computer device may be a server, for example: the cloud server may also be an electronic device, for example: a smart device such as a smart phone, a Personal Computer (hereinafter, referred to as a PC), or a tablet Computer, and the embodiment does not limit the specific form of the Computer device.
FIG. 6 illustrates a block diagram of an exemplary computer device 12 suitable for use in implementing embodiments of the present application. The computer device 12 shown in fig. 6 is only an example and should not bring any limitation to the function and scope of use of the embodiments of the present application.
As shown in FIG. 6, computer device 12 is in the form of a general purpose computing device. The components of computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
The system Memory 28 may include computer system readable media in the form of volatile Memory, such as Random Access Memory (RAM) 30 and/or cache Memory 32. Computer device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 6, and commonly referred to as a "hard drive"). Although not shown in FIG. 6, a disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a Compact disk Read Only Memory (CD-ROM), a Digital versatile disk Read Only Memory (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the application.
Program/utility 40 having a set (at least one) of program modules 60 may be stored, for example, in memory 28, such program modules 60 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 60 generally perform the functions and/or methodologies of the embodiments described herein.
The processing unit 16 executes a program stored in the system memory 28 to execute various functional applications and data processing, for example, to implement the processing method based on the blockchain intelligent contract provided in the embodiment of the present application.
The embodiment of the present application further provides a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, can implement the processing method based on the blockchain intelligent contract provided in the embodiment of the present application.
The non-transitory computer readable storage medium described above may take any combination of one or more computer readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read Only Memory (ROM), an Erasable Programmable Read Only Memory (EPROM) or flash Memory, an optical fiber, a portable compact disc Read Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of Network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It should be understood that the term "and/or" as used herein is merely one type of association that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
It should be understood that although the terms first, second, etc. may be used to describe nodes in embodiments of the present application, these nodes should not be limited by these terms. These terms are only used to distinguish one node from another. For example, a first node may also be referred to as a second node, and similarly, a second node may also be referred to as a first node without departing from the scope of embodiments herein.
The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrases "if determined" or "if detected (a stated condition or event)" may be interpreted as "when determined" or "in response to a determination" or "when detected (a stated condition or event)" or "in response to a detection (a stated condition or event)", depending on the context.
It should be noted that the terminal referred to in the embodiments of the present application may include, but is not limited to, a PC, a Personal Digital Assistant (PDA), a wireless handheld device, a tablet computer (tablet computer), a mobile phone, an MP3 player, an MP4 player, and the like.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions in actual implementation, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) or a Processor (Processor) to execute some steps of the methods according to the embodiments of the present application. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.
Claims (14)
1. A method for processing a blockchain-based intelligent contract, wherein the blockchain comprises a main chain and at least one side chain, the method comprising:
initiating a transaction on the main chain triggers the establishment of the sidechain;
deploying an intelligent contract on the side chain;
running the intelligent contract on the side chain to bill the transaction;
voting and verifying the operation result of the intelligent contract through the participants of the intelligent contract;
and transmitting the operation result after voting verification to the node of the main chain through the side chain.
2. The method of claim 1, wherein when a transaction is initiated on the main chain, creation of a founder block in the sidechain is triggered, and the sidechain is anchored bi-directionally to the main chain, forming a synchronous relationship between the sidechain and the main chain.
3. The method of claim 2, wherein the last block in the main chain is the founder block in the side chain.
4. The method of claim 1, wherein the deploying an intelligent contract on the side chain comprises:
multiple users participate in making the intelligent contract together;
diffusing and storing the intelligent contracts through a P2P network into the side chains in the block chain;
automatically executing the intelligent contract in the side chain.
5. The method of claim 1, wherein the verifying voting by the parties to the intelligent contract for the outcome of the running of the intelligent contract comprises:
voting and confirming the operation result of the intelligent contract through all the participants of the intelligent contract; when the participant of the intelligent contract does not recognize the operation result, operating the intelligent contract again through the side chain;
when all intelligent contract participants approve the operation result, the operation result of the intelligent contract is transmitted to the main chain through the side chain;
the participants of the intelligent contract comprise at least two users.
6. The method of claim 1, wherein after the passing the vote-verified run result to the node of the main chain via the side chain, further comprising:
and issuing the operation result of the intelligent contract to all the nodes of the main chain through the nodes of the main chain, and storing the operation result of the intelligent contract in the block chain.
7. A processing system based on a blockchain intelligent contract, the blockchain including a main chain and at least one side chain, the processing system comprising:
a main chain node for initiating a transaction on the main chain to trigger the establishment of the side chain;
at least one side chain node, the side chain node being triggered to be established by a transaction initiated on the main chain by the main chain node;
the side chain node is used for deploying a smart contract on the side chain, operating the smart contract on the side chain to bill the transaction, performing voting verification on an operation result of the smart contract through a participant of the smart contract, and transmitting the operation result after voting verification to the main chain node through the side chain.
8. The system of claim 7, wherein when the main chain node initiates a transaction on the main chain, creation of a founder block in the side chain node is triggered, and the side chain node is anchored bi-directionally to the main chain node, forming a synchronous relationship between the side chain node and the main chain node.
9. The system of claim 8, wherein the last block in the main chain node is the founder block in the side chain node.
10. The system of claim 8,
the side chain node is specifically used for making the intelligent contract through the joint participation of multiple users, diffusing and storing the intelligent contract through a P2P network, and automatically executing the intelligent contract in the side chain.
11. The system of claim 8,
the side chain node is specifically used for voting and confirming the operation result of the intelligent contract through all the participants of the intelligent contract; when the participant of the intelligent contract does not recognize the operation result, operating the intelligent contract again; when all intelligent contract participants approve the operation result, transmitting the operation result of the intelligent contract to the main chain node; wherein the participants of the intelligent contract comprise at least two users.
12. The system of claim 8,
the main chain node is further configured to issue the operation result of the intelligent contract to all nodes of the main chain through the main chain node after the side chain node transmits the operation result after the voting verification to the main chain node through the side chain, and store the operation result of the intelligent contract in the block chain.
13. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method of any one of claims 1-6 when executing the computer program.
14. A non-transitory computer-readable storage medium having stored thereon a computer program, wherein the computer program, when executed by a processor, implements the method of any one of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811527049.7A CN111327648B (en) | 2018-12-13 | 2018-12-13 | Processing method and system based on block chain intelligent contract |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811527049.7A CN111327648B (en) | 2018-12-13 | 2018-12-13 | Processing method and system based on block chain intelligent contract |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111327648A true CN111327648A (en) | 2020-06-23 |
CN111327648B CN111327648B (en) | 2022-04-12 |
Family
ID=71166625
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811527049.7A Active CN111327648B (en) | 2018-12-13 | 2018-12-13 | Processing method and system based on block chain intelligent contract |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111327648B (en) |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111552986A (en) * | 2020-07-10 | 2020-08-18 | 鹏城实验室 | Block chain-based federal modeling method, device, equipment and storage medium |
CN111737762A (en) * | 2020-06-28 | 2020-10-02 | 江苏恒宝智能系统技术有限公司 | Data management method, device and system based on block chain technology |
CN113190285A (en) * | 2021-04-23 | 2021-07-30 | 神荼科技(山东)有限公司 | Block chain-based virtual environment security detection method and device and storage medium |
CN113259119A (en) * | 2021-06-02 | 2021-08-13 | 支付宝(杭州)信息技术有限公司 | Block chain message distribution method and device |
CN113342776A (en) * | 2021-05-18 | 2021-09-03 | 网易(杭州)网络有限公司 | Transaction information migration method, device, equipment and medium based on intelligent contract |
WO2022032988A1 (en) * | 2020-08-14 | 2022-02-17 | 中国银联股份有限公司 | Data processing method, apparatus and device, and medium |
CN114760316A (en) * | 2020-12-28 | 2022-07-15 | 富泰华工业(深圳)有限公司 | Block chain construction method and related equipment |
CN114866478A (en) * | 2022-04-26 | 2022-08-05 | 深圳大学 | 1.5-layer block chain and operation method, device and readable storage medium thereof |
CN115203330A (en) * | 2022-07-21 | 2022-10-18 | 深圳前海环融联易信息科技服务有限公司 | Intelligent contract deployment method and device, equipment, medium and product thereof |
CN116797181A (en) * | 2023-08-16 | 2023-09-22 | 江西倬慧信息科技有限公司 | Investment project management method, system, platform and readable storage medium |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150379510A1 (en) * | 2012-07-10 | 2015-12-31 | Stanley Benjamin Smith | Method and system to use a block chain infrastructure and Smart Contracts to monetize data transactions involving changes to data included into a data supply chain. |
CN107464106A (en) * | 2017-07-25 | 2017-12-12 | 北京果仁宝科技有限公司 | The method and system merchandised between block chain main chain and side chain |
CN107835166A (en) * | 2017-10-31 | 2018-03-23 | 济南浪潮高新科技投资发展有限公司 | A kind of high value crystal retroactive method and device based on block chain |
CN108074081A (en) * | 2017-12-08 | 2018-05-25 | 上海策赢网络科技有限公司 | The transfer method and device of a kind of virtual resource |
CN108564372A (en) * | 2018-03-07 | 2018-09-21 | 青岛华山油品有限公司 | A method of the storage guest room based on block chain and intelligent contract and order data |
CN108769173A (en) * | 2018-05-21 | 2018-11-06 | 阿里体育有限公司 | The block chain implementation method and equipment of the intelligent contract of operation |
US20180326291A1 (en) * | 2016-05-02 | 2018-11-15 | Bao Tran | Smart device |
CN108881187A (en) * | 2018-05-31 | 2018-11-23 | 杭州秘猿科技有限公司 | A kind of across chain data transferring method and equipment suitable for permitting chain scene |
-
2018
- 2018-12-13 CN CN201811527049.7A patent/CN111327648B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150379510A1 (en) * | 2012-07-10 | 2015-12-31 | Stanley Benjamin Smith | Method and system to use a block chain infrastructure and Smart Contracts to monetize data transactions involving changes to data included into a data supply chain. |
US20180326291A1 (en) * | 2016-05-02 | 2018-11-15 | Bao Tran | Smart device |
CN107464106A (en) * | 2017-07-25 | 2017-12-12 | 北京果仁宝科技有限公司 | The method and system merchandised between block chain main chain and side chain |
CN107835166A (en) * | 2017-10-31 | 2018-03-23 | 济南浪潮高新科技投资发展有限公司 | A kind of high value crystal retroactive method and device based on block chain |
CN108074081A (en) * | 2017-12-08 | 2018-05-25 | 上海策赢网络科技有限公司 | The transfer method and device of a kind of virtual resource |
CN108564372A (en) * | 2018-03-07 | 2018-09-21 | 青岛华山油品有限公司 | A method of the storage guest room based on block chain and intelligent contract and order data |
CN108769173A (en) * | 2018-05-21 | 2018-11-06 | 阿里体育有限公司 | The block chain implementation method and equipment of the intelligent contract of operation |
CN108881187A (en) * | 2018-05-31 | 2018-11-23 | 杭州秘猿科技有限公司 | A kind of across chain data transferring method and equipment suitable for permitting chain scene |
Non-Patent Citations (2)
Title |
---|
姚前: "《数字货币研究前沿(第一辑)》", 30 June 2018 * |
白杰: "《发布区块链标准应用模型及应用部署技术研究》", 《信息技术与网络安全》 * |
Cited By (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111737762B (en) * | 2020-06-28 | 2023-06-23 | 江苏恒宝智能系统技术有限公司 | Data management method, device and system based on blockchain technology |
CN111737762A (en) * | 2020-06-28 | 2020-10-02 | 江苏恒宝智能系统技术有限公司 | Data management method, device and system based on block chain technology |
CN111552986A (en) * | 2020-07-10 | 2020-08-18 | 鹏城实验室 | Block chain-based federal modeling method, device, equipment and storage medium |
WO2022032988A1 (en) * | 2020-08-14 | 2022-02-17 | 中国银联股份有限公司 | Data processing method, apparatus and device, and medium |
CN114760316A (en) * | 2020-12-28 | 2022-07-15 | 富泰华工业(深圳)有限公司 | Block chain construction method and related equipment |
CN114760316B (en) * | 2020-12-28 | 2023-09-26 | 富泰华工业(深圳)有限公司 | Block chain construction method and related equipment |
CN113190285A (en) * | 2021-04-23 | 2021-07-30 | 神荼科技(山东)有限公司 | Block chain-based virtual environment security detection method and device and storage medium |
CN113190285B (en) * | 2021-04-23 | 2023-06-20 | 神荼科技(山东)有限公司 | Virtual environment safety detection method and device based on block chain and storage medium |
CN113342776A (en) * | 2021-05-18 | 2021-09-03 | 网易(杭州)网络有限公司 | Transaction information migration method, device, equipment and medium based on intelligent contract |
CN113259119A (en) * | 2021-06-02 | 2021-08-13 | 支付宝(杭州)信息技术有限公司 | Block chain message distribution method and device |
CN113259119B (en) * | 2021-06-02 | 2021-10-29 | 支付宝(杭州)信息技术有限公司 | Block chain message distribution method and device |
CN114866478A (en) * | 2022-04-26 | 2022-08-05 | 深圳大学 | 1.5-layer block chain and operation method, device and readable storage medium thereof |
CN114866478B (en) * | 2022-04-26 | 2024-01-05 | 深圳大学 | 1.5-layer blockchain, and operation method, device and readable storage medium thereof |
CN115203330A (en) * | 2022-07-21 | 2022-10-18 | 深圳前海环融联易信息科技服务有限公司 | Intelligent contract deployment method and device, equipment, medium and product thereof |
CN115203330B (en) * | 2022-07-21 | 2024-01-19 | 深圳前海环融联易信息科技服务有限公司 | Intelligent contract deployment method and device, equipment, medium and product thereof |
CN116797181A (en) * | 2023-08-16 | 2023-09-22 | 江西倬慧信息科技有限公司 | Investment project management method, system, platform and readable storage medium |
CN116797181B (en) * | 2023-08-16 | 2024-02-13 | 江西倬慧信息科技有限公司 | Investment project management method, system, platform and readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN111327648B (en) | 2022-04-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111327648B (en) | Processing method and system based on block chain intelligent contract | |
CN111416808B (en) | Cross-block-chain data mutual storage method, device, equipment and storage medium | |
KR102652551B1 (en) | Smart contract execution using distributed coordination | |
WO2021204040A1 (en) | Federated learning data processing method and apparatus, and device and storage medium | |
CN108009811B (en) | Inter-cloud computing environment value exchange-oriented cross-chain communication method | |
CN108712257B (en) | Cross-block-chain authentication method and device and electronic equipment | |
CN105573828B (en) | A kind of operation processing method and device | |
CN109255713B (en) | Method for acquiring accounting right in block chain network within certain time period | |
CN107341402B (en) | Program execution method and device | |
CN109522362A (en) | Incomplete markets synchronous method, system and equipment based on block chain data | |
CN110430087A (en) | The architecture design and realization of block chain heat upgrading | |
CN107464106A (en) | The method and system merchandised between block chain main chain and side chain | |
CN110741373A (en) | Computer-implemented system and method for managing large blocks on a blockchain network | |
US10693646B2 (en) | Event execution using a blockchain approach | |
JP2020047104A (en) | Settlement system, settlement method, user device, and settlement program | |
Yanovich et al. | Exonum: Byzantine fault tolerant protocol for blockchains | |
CN111199489A (en) | Method, apparatus, computer-readable storage medium and computer program product for cross-blockchain asset management | |
CN109447605A (en) | A kind of chain currency conversion method, apparatus, equipment and medium based on block chain | |
CN115244526A (en) | Method and system for decentralized transaction communication protocols | |
CN110599175A (en) | Block processing method and related equipment | |
CN110879826A (en) | Credit blacklist sharing method and device based on block chain | |
Saad et al. | Decentralized directed acyclic graph based dlt network | |
CN113411338B (en) | Resource transaction method based on-chain-down cooperation of state channel | |
CN109460996A (en) | Processing method, equipment and the computer readable storage medium of publicly-owned block chain | |
CN110727735B (en) | Method, device and equipment for cooperatively completing task event based on block chain technology |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |