摘要
针对区块链技术存在智能合约服务困难问题,提出基于注意力机制和双向长短期记忆神经网络的智能合约分类。运用Bi-LSTM网络从智能合约源代码和账户信息两个角度进行建模,提取出智能合约的最大特征信息。加入注意力机制的Bi-LSTM模型在Dataset-E、Dataset-N和Dataset-EO数据集上正确率分别达到89.8%、87.9%和85.0%,比同样条件下传统的CNN模型提高6.4%、5.5%和3.7%。仿真结果表明该智能合约分类能捕获到关键特征,提高效率和准确度。
In view of a series of difficult problems in the service of smart contracts suitable for human use in the blockchain technology,this paper proposes a smart contract classification based on the attention mechanism and a two-way long-short memory neural network.This smart contract classification uses the Bi-LSTM network to model from the two perspectives of smart contract source code and account information,and extract the information of the biggest features of the smart contract.Results The accuracy of the Bi-LSTM model with the attention mechanism reached 89.8%,87.9%,and 85.0%in the Dataset-E,Dataset-N,and Dataset-EO datasets,respectively,which is higher than the traditional CNN model under the same conditions 6.4%,5.5%and 3.7%.The simulation results show that the smart contract classification proposed in this paper captures the most critical features more intelligently and improves efficiency and accuracy.
作者
王灿
王冬
WANG Can;WANG Dong(School of Computer Science and Engineering,Shandong University of Science and Technology,Qingdao 266590,China;Tengdong Shengjian Coal Mine,Tengzhou 277522,China)
出处
《软件导刊》
2021年第2期40-43,共4页
Software Guide
基金
国家自然科学青年基金项目(61702305)。
关键词
智能合约分类
区块链技术
双向长短期记忆神经网络
注意力机制
代码语义特征
账户特征
smart contract classification
blockchain technology
Bidirectional Long and Short-term Memory neural network
attention mechanism
code semantic features
account features