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

Smart contract security detection method and system, equipment, terminal and application

A technology of smart contracts and security detection, applied in neural learning methods, computer security devices, special data processing applications, etc., can solve the problems of increasing difficulty, difficulty in obtaining, and increasing the difficulty of model training, so as to reduce cumbersomeness and improve efficiency. Effect

Pending Publication Date: 2021-11-09
XIDIAN UNIV
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] (1) Smart contracts on the Fabric platform are mainly deployed within the organization and are difficult to obtain;
[0004] (2) Ethereum and Fabric have different platform characteristics, and the security detection tools and methods of the two platforms cannot be directly interoperable;
[0005] (3) There are few smart contracts publicly available on the Fabric platform, and it is impossible to conduct large-scale analysis and research
[0008] (1) The existing research is mainly carried out around the Ethereum platform, but there is a lack of targeted detection methods for the smart contract security detection of the alliance chain platform represented by Hyperledger Fabric
[0009] (2) Smart contracts on the Fabric platform are mainly deployed within the organization and are difficult to obtain; there are few smart contracts on the Fabric platform, and large-scale analysis and research cannot be carried out
[0010] (3) Ethereum and Fabric have different platform characteristics, and the security detection tools and methods of the two platforms cannot be directly interoperable
[0012] On the one hand, due to the lack of smart contract codes disclosed on the Fabric platform, for the graph neural network, the available data sets are insufficient, and the lack of training data limits the quality of the machine learning detection model, which increases the difficulty of model training in the present invention; On the one hand, the existing blockchain platform contract security detection tools are mainly aimed at the Ethereum platform, which cannot be directly used on the Fabric platform, and there is an extreme lack of information on Fabric contract vulnerability detection for reference, which further increases the difficulty of implementing the solution

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
  • Smart contract security detection method and system, equipment, terminal and application
  • Smart contract security detection method and system, equipment, terminal and application
  • Smart contract security detection method and system, equipment, terminal and application

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0066] 1) The experiment uses TensorFlow-2.1.0 to implement the Fabric smart contract security detection model.

[0067] 2) Construct the AST graph of the source code with the help of the Go language ast package, and extract different edge relationships from it. That is, AST nodes of all source codes are traversed. When traversing, all nodes are sequentially numbered, and the relationship between different edges is obtained according to specific rules, and variable names are rewritten using a unified naming scheme. This step ensures that semantic differences such as variable names in the program do not affect the choice of token embedding.

[0068] 3) Create a directory, and then create a train.py training file.

[0069] 4) Write the GGNN model training code in this file. The code starts with the following package loading code.

[0070]

[0071] 5) In the same directory, create a test.py test file.

[0072] 6) Write the GGNN model test code in this file. The code star...

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 belongs to the technical field of block chain security, and discloses a smart contract security detection method and system, equipment, a terminal and application, the smart contract security detection method comprises the following steps: using an open source code to train a word2vec model; packaging the open source code into an intelligent contract function according to an intelligent contract grammar; converting the packaged function into an abstract syntax tree, and extracting data flow and control flow information; converting data flow and control flow information of the smart contract into a graph model; using a trained word2vec model to convert the graph nodes into vectors; training the graph model by using a graph neural network; reading all node information, and converting the intelligent contract function graph model into vectors; and judging whether the function vector contains the intelligent contract vulnerability information or not by using the classification model. According to the invention, the security detection efficiency of the smart contract is improved, and a good effect is achieved.

Description

technical field [0001] The invention belongs to the technical field of block chain security, and in particular relates to a smart contract security detection method, system, equipment, terminal and application. Background technique [0002] At present, most of the smart contracts on the blockchain platform involve the transaction and processing of digital assets or cryptocurrencies, so the loopholes in smart contracts may be exploited to expose users to malicious attacks. For this reason, in recent years, more and more researchers have begun to study the security detection methods for smart contracts, but the existing research is mainly carried out around the Ethereum platform, and the smart contracts of the alliance chain platform represented by Hyperledger Fabric However, there is a lack of targeted detection methods for security detection. The main reasons are as follows: [0003] (1) Smart contracts on the Fabric platform are mainly deployed within the organization and...

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): G06F21/57G06F16/27G06F8/41G06N3/04G06N3/08
CPCG06F21/577G06F16/27G06F8/42G06N3/04G06N3/08
Inventor 董学文田文生沈玉龙丛雅倩张志为佟威张涛冶英杰李光夏
Owner XIDIAN 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