A novel method using LSTM-RNN to generate smart contracts code templates for improved usability

被引:0
|
作者
Zhihao Hao
Bob Zhang
Dianhui Mao
Jerome Yen
Zhihua Zhao
Min Zuo
Haisheng Li
Cheng-Zhong Xu
机构
[1] University of Macau,PAMI Research Group, Department of Computer and Information Science
[2] Beijing Technology and Business University,Beijing Key Laboratory of Big Data Technology for Food Safety, School of Computer
[3] Beijing Technology and Business University,National Engineering Laboratory for Agri
[4] China Industrial Control Systems Cyber Emergency Response Team,product Quality Traceability
[5] University of Macau,Department of Computer and Information Science
[6] China University of Political Science and Law,School of Law
[7] University of Macau,State Key Laboratory of Internet of Things for Smart City
来源
关键词
Blockchain; Smart contracts; Usability; Deep learning;
D O I
暂无
中图分类号
学科分类号
摘要
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.
引用
收藏
页码:41669 / 41699
页数:30
相关论文
共 10 条
  • [1] A novel method using LSTM-RNN to generate smart contracts code templates for improved usability
    Hao, Zhihao
    Zhang, Bob
    Mao, Dianhui
    Yen, Jerome
    Zhao, Zhihua
    Zuo, Min
    Li, Haisheng
    Xu, Cheng-Zhong
    MULTIMEDIA TOOLS AND APPLICATIONS, 2023, 82 (27) : 41669 - 41699
  • [2] A Bidirectional LSTM-RNN and GRU Method to Exon Prediction Using Splice-Site Mapping
    Canatalay, Peren Jerfi
    Ucan, Osman Nuri
    APPLIED SCIENCES-BASEL, 2022, 12 (09):
  • [3] Load forecasting method for CCHP system based on deep learning strategy using LSTM-RNN
    Li, ke
    Sun, Yunxin
    Li, Shuzhen
    Ma, Xin
    Zhang, Chenghui
    PROCEEDINGS OF THE 2019 14TH IEEE CONFERENCE ON INDUSTRIAL ELECTRONICS AND APPLICATIONS (ICIEA 2019), 2019, : 827 - 831
  • [4] Improving the Accuracy of Multi-Valued Datasets in Agriculture Using Logistic Regression and LSTM-RNN Method
    Alameen, Abdalla
    TEM JOURNAL-TECHNOLOGY EDUCATION MANAGEMENT INFORMATICS, 2022, 11 (01): : 454 - 462
  • [5] A MEMS IMU De-Noising Method Using Long Short Term Memory Recurrent Neural Networks (LSTM-RNN)
    Jiang, Changhui
    Chen, Shuai
    Chen, Yuwei
    Zhang, Boya
    Feng, Ziyi
    Zhou, Hui
    Bo, Yuming
    SENSORS, 2018, 18 (10)
  • [6] A novel method for image captioning using multimodal feature fusion employing mask RNN and LSTM models
    Thangavel, Kumaravel
    Palanisamy, Natesan
    Muthusamy, Suresh
    Mishra, Om Prava
    Sundararajan, Suma Christal Mary
    Panchal, Hitesh
    Loganathan, Ashok Kumar
    Ramamoorthi, Ponarun
    SOFT COMPUTING, 2023, 27 (19) : 14205 - 14218
  • [7] A novel method for image captioning using multimodal feature fusion employing mask RNN and LSTM models
    Kumaravel Thangavel
    Natesan Palanisamy
    Suresh Muthusamy
    Om Prava Mishra
    Suma Christal Mary Sundararajan
    Hitesh Panchal
    Ashok Kumar Loganathan
    Ponarun Ramamoorthi
    Soft Computing, 2023, 27 : 14205 - 14218
  • [8] A novel method to ensure the security of the shared medical data using smart contracts: Organ transplantation sample
    Calik, Elif
    Kaya, Hilal
    Celebi, Fatih Vehbi
    CONCURRENCY AND COMPUTATION-PRACTICE & EXPERIENCE, 2022, 34 (09):
  • [9] A novel method using matrix coding on-chain and sharing multimedia data for improved usability and reliability
    Yang L.
    Qin Y.
    Multimedia Tools and Applications, 2024, 83 (40) : 87727 - 87748
  • [10] A Novel Hybrid Short-Term Load Forecasting Method of Smart Grid Using MLR and LSTM Neural Network
    Li, Jian
    Deng, Daiyu
    Zhao, Junbo
    Cai, Dongsheng
    Hu, Weihao
    Zhang, Man
    Huang, Qi
    IEEE TRANSACTIONS ON INDUSTRIAL INFORMATICS, 2021, 17 (04) : 2443 - 2452