Residential Collegefalse
Status已發表Published
A novel method using LSTM-RNN to generate smart contracts code templates for improved usability
Zhihao Hao1,2,3,4; Bob Zhang1,2; Dianhui Mao2,3; Jerome Yen5; Zhihua Zhao6; Min Zuo2,3; Haisheng Li2,3; Cheng-Zhong Xu7
2023-04-06
Source PublicationMultimedia Tools and Applications
ISSN1380-7501
Volume82Issue:27Pages:41669-41699
Abstract

Recently, the development of blockchain technology has given us an opportunity to improve the security and trustworthiness of multimedia. With the applications of blockchain technology, smart contracts have been widely used in many industries. However, the current development of smart contracts faces many challenges. One of the challenges is that the coding process is complicated for developers, leading to unnormalized code and can cause development and maintenance issues. Also, this is an important limitation factor in the development of smart contracts. To solve this problem, this paper proposes a method of generating contract templates based on the Long Short-Term Memory Recurrent Neural Network (LSTM-RNN) to simplify the coding process. First, the contracts available online were crawled, before detecting the vulnerabilities of these contracts. Contracts with less vulnerabilities are used as training data. For better generation effects, the Abstract Syntax Tree (AST) and the word2vec are used to extract the lexical unit sequence features to obtain a word vector in order to analyze the semantics of the code. Afterwards, the generated sequence vector features are fed to LSTM-RNN for template generation. The efficiency of four types of vectorization method models were tested and the results showed that the Skip-Gram+ HS used in this paper achieved the highest performance. In addition, a security test was conducted based on the contracts before and after using the contract templates for normalized coding. The results show that the proposed method is not only a beneficial attempt to combine deep learning with blockchain technology, but also provides an effective guidance for improving the security of smart contracts.

KeywordBlockchain Deep Learning Smart Contracts Usability
DOI10.1007/s11042-023-14592-x
URLView the original
Indexed BySCIE
Language英語English
WOS Research AreaComputer Science ; Engineering
WOS SubjectComputer Science, Information Systems ; Computer Science, Software Engineering ; Computer Science, Theory & Methods ; Engineering, Electrical & Electronic
WOS IDWOS:000964979100002
PublisherSPRINGERVAN GODEWIJCKSTRAAT 30, 3311 GZ DORDRECHT, NETHERLANDS
Scopus ID2-s2.0-85151986240
Fulltext Access
Citation statistics
Document TypeJournal article
CollectionTHE STATE KEY LABORATORY OF INTERNET OF THINGS FOR SMART CITY (UNIVERSITY OF MACAU)
Faculty of Science and Technology
DEPARTMENT OF COMPUTER AND INFORMATION SCIENCE
Corresponding AuthorBob Zhang; Dianhui Mao
Affiliation1.PAMI Research Group,Department of Computer and Information Science,University of Macau,Taipa,999078,Macao
2.Beijing Key Laboratory of Big Data Technology for Food Safety,School of Computer,Beijing Technology and Business University,Beijing,No. 33, Fucheng Road,100048,China
3.National Engineering Laboratory for Agri-product Quality Traceability,Beijing Technology and Business University,Beijing,No. 33, Fucheng Road,100048,China
4.China Industrial Control Systems Cyber Emergency Response Team,Beijing,100040,China
5.Department of Computer and Information Science,University of Macau,Taipa,SAR,999078,Macao
6.School of Law,China University of Political Science and Law,Beijing,No. 25, Xitucheng Road,102249,China
7.State Key Laboratory of Internet of Things for Smart City,University of Macau,Taipa,999078,Macao
First Author AffilicationUniversity of Macau
Corresponding Author AffilicationUniversity of Macau
Recommended Citation
GB/T 7714
Zhihao Hao,Bob Zhang,Dianhui Mao,et al. A novel method using LSTM-RNN to generate smart contracts code templates for improved usability[J]. Multimedia Tools and Applications, 2023, 82(27), 41669-41699.
APA Zhihao Hao., Bob Zhang., Dianhui Mao., Jerome Yen., Zhihua Zhao., Min Zuo., Haisheng Li., & Cheng-Zhong Xu (2023). A novel method using LSTM-RNN to generate smart contracts code templates for improved usability. Multimedia Tools and Applications, 82(27), 41669-41699.
MLA Zhihao Hao,et al."A novel method using LSTM-RNN to generate smart contracts code templates for improved usability".Multimedia Tools and Applications 82.27(2023):41669-41699.
Files in This Item:
There are no files associated with this item.
Related Services
Recommend this item
Bookmark
Usage statistics
Export to Endnote
Google Scholar
Similar articles in Google Scholar
[Zhihao Hao]'s Articles
[Bob Zhang]'s Articles
[Dianhui Mao]'s Articles
Baidu academic
Similar articles in Baidu academic
[Zhihao Hao]'s Articles
[Bob Zhang]'s Articles
[Dianhui Mao]'s Articles
Bing Scholar
Similar articles in Bing Scholar
[Zhihao Hao]'s Articles
[Bob Zhang]'s Articles
[Dianhui Mao]'s Articles
Terms of Use
No data!
Social Bookmark/Share
All comments (0)
No comment.
 

Items in the repository are protected by copyright, with all rights reserved, unless otherwise indicated.