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
Patent Information
- Authority / Receiving Office
- CN · China
- Current Assignee / Owner
- Publication Date
- 2021-11-09
Smart Images

Figure 1 
Figure 2 
Figure 3
Abstract
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...
Examples
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...