A smart contract processing method, device and equipment

A technology of smart contracts and processing methods, applied in the computer field, can solve problems such as high design cost, unstable execution, and design difficulty

Active Publication Date: 2021-01-08
北京链化未来科技有限公司
View PDF8 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The embodiment of this specification provides a smart contract processing method, device and equipment to solve the problems of difficulty in designing existing smart contract processing schemes, high design costs, and unstable execution

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A smart contract processing method, device and equipment
  • A smart contract processing method, device and equipment
  • A smart contract processing method, device and equipment

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0052] figure 2 For a schematic flowchart of a smart contract processing method provided in Embodiment 1 of this specification, see figure 2 , the method can be given by Figure 1a The nodes in are completed, which may specifically include the following steps:

[0053] Step 22. In the process of executing the contract transaction corresponding to the smart contract, execute the contract transaction based on the first time slice allocated by the node;

[0054] That is, the relevant programs in the node use the CPU to execute the contract transaction based on the time allocated by the node CPU, or in other words, execute the business logic related to the contract transaction.

[0055] In addition, based on the description of the above-mentioned life cycle management mechanism, it can be seen that the smart contract in step 22 is in the second life cycle Running, and before step 22, it may also include: the step of entering the second life cycle Running, which can be specifica...

Embodiment 2

[0090] Figure 4 For a schematic flowchart of a smart contract processing method provided in Embodiment 2 of this specification, see Figure 4 , for ease of understanding, the method will be described in detail below from an overall perspective, which may specifically include the following steps:

[0091] Step 42. Obtain the contract transaction of the smart contract to be executed.

[0092] Step 44, when the first time slice starts, execute the contract transaction.

[0093] Synchronously, lock the account information of the parties involved in the contract transaction, and set the contract transaction to an active state at the same time.

[0094] Step 46: When the time slice ends, it is judged whether the execution result satisfies the preset stop execution condition.

[0095] If so, then perform step 412 and step 420; if not, then perform step 48;

[0096] Step 48. Set a breakpoint for the contract transaction.

[0097] After setting a breakpoint for a contract transac...

Embodiment 3

[0111] Figure 5 For a schematic structural diagram of a smart contract processing device provided in Embodiment 3 of this specification, see Figure 5 , the means can be included for nodes Figure 1a The shown device of the life cycle management module may specifically include: an execution module 51 and a detection module 52, wherein:

[0112] An execution module 51, configured to execute the contract transaction based on the first time slice allocated by the node during the execution of the contract transaction corresponding to the smart contract;

[0113] A detection module 52, configured to record the execution progress of the contract transaction if it is detected that the first time slice is over and the contract transaction has not been completed;

[0114] The execution module 51 is further configured to execute the contract transaction based on the second time slice allocated by the node and the execution progress;

[0115] The execution module 51 is further configu...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

An intelligent contract processing method, apparatus and apparatus are disclosed. The method comprises the following steps: in the process of executing the contract transaction corresponding to the intelligent contract, executing the contract transaction based on the first time slice allocated by the node; Recording the execution progress of the contract transaction if it is detected that the first time slice ends and the contract transaction is not completed; Executing a contract transaction based on a second time slice and an execution schedule assigned by the node; And so on until the execution result meets the default stop execution condition. Dimensions of time slices allocated from a node according to the present application, When a contract transaction cannot be completed in one time slice, Record Implementation Progress, to continue executing the contract transaction at a subsequent time slice, By analogy, until the condition of stopping execution of the contract transaction istriggered, the problem of execution of the contract transaction is effectively improved and the design difficulty of the developer is reduced compared with the prior art scheme of dividing the contract into sub-two contracts that can be completed in a single consensus period, while solving the downtime problem.

Description

technical field [0001] The present application relates to the field of computer technology, and in particular to a smart contract processing method, device and equipment. Background technique [0002] A smart contract is a computer protocol that disseminates, verifies, or executes contracts in an informational manner, allowing trusted transactions without a third party. In recent years, with the rapid development of blockchain technology, blockchain can allow smart contracts to run in a trusted environment, making smart contracts more and more widely used. [0003] In Ethereum, the smart contract execution mechanism generally adopts the Gas mechanism, that is, the program to execute the contract transaction executes the order step by step according to the provisions of the smart contract. Every time a command is executed, a certain amount of Gas will be consumed. When the Gas is exhausted and the contract transaction is not executed When completed, the node will forcibly te...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Patents(China)
IPC IPC(8): G06Q40/04G06Q20/38
CPCG06Q20/3829G06Q40/04
Inventor 沈宇峰
Owner 北京链化未来科技有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products