Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Contract defect detection method based on intelligent contract knowledge graph

A technology of smart contracts and knowledge graphs, applied in digital data information retrieval, unstructured text data retrieval, program code conversion, etc., can solve problems such as limited path coverage, state explosion, resource consumption expansion, etc., to achieve guaranteed performance, Benefit from expansion and use, high degree of automation effect

Pending Publication Date: 2021-05-28
SOUTHEAST UNIV
View PDF0 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The formal verification method of theorem proof uses a general method to construct code patterns and theorems to prove the security of smart contracts. It is difficult to fully automate the entire verification process, so a lot of manual work is required to build proofs and analysis of smart contracts
The advantage of the model checking method is that it has a high degree of automation. Even if only a partial description of the contract is given, useful information about the correctness of the known part can be provided by searching. The disadvantage of this method is that there is a state explosion problem. The model checking algorithm As the number of states in the model checking tool increases, the computation time will explode and the resource consumption on the computation space will expand
The fuzz testing method detects the contract by monitoring the dynamic running process of the smart contract, so it can detect the real loopholes of the contract more accurately. The disadvantage of this method is that the test cases are randomly generated, which can only cover part of the system behavior, and the path coverage is limited.

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
  • Contract defect detection method based on intelligent contract knowledge graph
  • Contract defect detection method based on intelligent contract knowledge graph
  • Contract defect detection method based on intelligent contract knowledge graph

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0032] Embodiment 1: A contract defect detection method based on smart contract knowledge graph, the shown method includes the following steps:

[0033] Step 1) Define Smart Contract Defect Patterns

[0034] Analyze the smart contract source code containing different smart contract defects, summarize the contract defect characteristics, and define the smart contract defect pattern DefectPattern for different contract defect types;

[0035] Step 2) Generate the abstract syntax tree of the smart contract to be detected

[0036] The smart contract source code written for the input Solidity, based on the Solidity grammar, generates the smart contract abstract syntax tree SmartContractAST through the smart contract source code parsing tool;

[0037] Step 3) Construct the knowledge map of the smart contract to be detected

[0038] On the basis of the smart contract abstract syntax tree SmartContractAST generated in step 2), analyze the source code dependencies of the smart contrac...

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

The invention discloses a contract defect detection method based on an intelligent contract knowledge graph. The contract defect detection method is mainly used for detecting code defects of an intelligent contract written by a Solidiity language on an Ethereum platform. The code defects of the smart contract refer to errors, faults or vulnerabilities in the smart contract, which may cause incorrect or accidental execution of the smart contract. The defect mode of the smart contract is defined by analyzing the defect of the smart contract. For a to-be-detected smart contract, the source code of the smart contract is analyzed based on Solidity grammar, and a smart contract abstract syntax tree is generated; basic knowledge entities and relationships thereof of the smart contract are obtained through an abstract syntax tree, so that a smart contract knowledge graph is constructed, and the smart contract knowledge graph is stored in an RDF triple database; and on the basis of the intelligent contract knowledge graph, reasoning query is performed by applying a knowledge graph query statement, the intelligent contract is matched with a defect mode, and defects and positions of the intelligent contract are detected.

Description

technical field [0001] The invention belongs to the field of smart contract defect detection of a block chain system, and relates to a contract defect detection method based on a smart contract knowledge map. Background technique [0002] Blockchain, as a distributed public ledger technology in a peer-to-peer network, is widely used in various fields. However, there are still security issues in the smart contract itself, which affects the further promotion and use of blockchain technology. Defects in the smart contract itself, calls between contracts, etc. are all important factors that affect the security of the contract. Before the smart contract goes online, it is necessary to conduct comprehensive and in-depth defect detection on the smart contract, fully analyze potential security threats, avoid defects as much as possible, and ensure the logical correctness of the smart contract code and the security of the assets involved with a higher standard. [0003] At present,...

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
IPC IPC(8): G06F8/41G06F16/36G06F16/242
CPCG06F8/43G06F16/367G06F16/2433
Inventor 李必信胡甜媛潘振宇
Owner SOUTHEAST UNIV
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products