School of Computer Science,Nanjing Audit University,Nanjing 211815,Jiangsu,China
Show less
文章历史+
Received
Published
2022-09-16
2023-04-24
Issue Date
2026-07-23
PDF (2773K)
摘要
针对区块链网络中共识节点的恶意行为导致的区块链系统安全问题,提出一种基于LSTM(long short-term memory)-Blacklist的动态信任度证明机制(PoDT-LSTMB)。该动态信任度证明机制通过前向注意力机制的两层LSTM神经网络学习并分析参与共识节点的行为数据,预测节点行为倾向。以节点信任度为基础构建黑名单,剔除低于信任度阈值的节点,提高全网节点的总体可信性。以正常区块上链率以及节点信任度的变化为主要评估指标,与信任度证明PoT(Proof of Trust)机制以及不带黑名单的PoDT-LSTM机制进行了对比实验。实验结果表明,基于前向注意力机制的两层LSTM神经网络结构准确率可达0.915 1,本文提出的PoDT-LSTMB机制比PoT机制的正常区块上链率提高30%~33%。
Abstract
Aiming at the security problem of blockchain system caused by the malicious behavior of consensus nodes in the blockchain network, a dynamic trust proof mechanism (PoDT-LSTMB) based on LSTM (long short-term memory) and Blacklist is proposed. The dynamic trust proof mechanism learns and analyzes the behavior data of participating consensus nodes through the two-layer LSTM neural network of the forward attention mechanism, and predicts the behavior tendency of nodes. A blacklist is built based on node trust, eliminating nodes below the trust threshold to improve the overall trust of nodes in the entire network. Taking the normal block chaining rate and the change of node trust as the main evaluation indicators, we conducted comparative experiments with the PoT (Proof of Trust) mechanism and the PoDT-LSTM mechanism without blacklists. The experimental results show that the accuracy of the two-layer LSTM neural network based on the forward attention mechanism can reach 0.915 1. The PoDT-LSTMB mechanism proposed in this paper improves the chain-up ratio of normal block by 30%~33% over the PoT mechanism.
因此,本文以黑名单机制和LSTM模型为基础,结合区块链系统的特性,提出一种基于LSTM-Blacklist的动态信任度证明机制PoDT-LSTMB(Proof-of-Dynamic-Trust Based on LSTM Model and Blacklist)。该机制主要面向公有链,首先收集所有节点在每轮共识中的行为数据,然后采用LSTM模型,根据节点历史行为预测其行为倾向,实时评估节点信任度,并以此为基础,构建黑名单机制及时剔除信任度低于信任度阈值的节点。本方法的主要贡献表现在以下三个方面:一是解决了如何在节点动态变化下保证系统安全稳定,及时识别并剔除恶意节点的问题;二是利用动态信任度解决节点积极性不足的问题;三是解决贿赂攻击和权益粉碎攻击等攻击问题。
① 第轮共识前,第轮挖矿节点群、签名交易打包节点群和验证节点群的行为特征将输入到LSTM模型,该模型将结合各节点的历史行为特征及当前行为特征,生成动态信任度计算函数,更新各个节点的信任度。系统中信任度最高的t个节点确定节点群分配方案,并分发给所有节点,组成第轮共识节点群。在确定节点群分配方案时,信任度最高的t个节点会先剔除低于信任度阈值节点,并将其移入黑名单中,再对白黑名单中的节点进行分配。
② 挖矿节点群中的节点通过调整随机值,解决目标哈希问题,率先计算出目标值的节点记为矿工头,其余节点记为普通矿工节点。矿工头计算出的空区块记为,其中包含前一个区块的哈希值、矿工头地址、本区块在区块链的高度、随机值以及时间戳。同时,为保障该矿工头及集合中其他挖矿节点的收益,该空区块中将携带一个发给自身及集合中其他挖矿节点的交易,作为该区块的第一笔交易数据。
③ 将产生的空区块交由签名交易打包节点群进行处理。的所有节点依次对区块进行验证和打包处理。验证过程是逐个进行的,每个STG节点一旦收到一个空的区块,则会验证该空区块的合法性。其中,判断区块是否合法主要是将收到的区块数据与该节点本地保留的数据进行比对,包括区块头中的前一个区块的Hash值以及各节点信任度字段等。若比对一致则认为区块合法,该节点签名并将部分交易打包进入区块,然后再将该区块随机转发给下一个STG的节点进行验证。因为验证是依次进行的,每当一个STG节点进行验证时,都能够通过该区块已经添加的节点标记信息知道当前已经完成了多少节点的验证,而在节点群分配时,每个节点都知道哪些是STG节点。因此,当区块签名数量达到集合中节点数2/3时,它将在剩余未进行验证的节点中挑选信任度最高和次高的节点,若二者验证均不通过则返回步骤①,若二者任一验证通过,则该节点将交易池中交易尽可能多地打包,生成最终MerkleTree[18],并将打包后的区块提交至验证节点群中,进行二次验证操作;同时,为避免STG各个节点争做主打包节点,验证通过后,区块签名和打包奖励将均分给所有的STG节点,所以主打包节点其实不会获得额外的收益。如果主打包节点想将某些不合法的数据打包上链,也还是要接受验证节点群的验证才能真正上链,因此STG节点群中主打包节点和一般的签名节点从利益上看并没有太大的区别,不会出现STG节点争做主打包节点而选择不验证交易。此外,由于整个打包验证过程是逐个依次进行的,而且每次都是随机选择下一个验证节点,因此也不会造成信誉中心化问题。
CAIX Q, DENGY, ZHANGL, et al. The principle and core technology of blockchain[J]. Chinese Journal of Computers, 2021, 44(1): 84-131(Ch). DOI: 10.11897/SP.J.1016.2021.00084 .
SHANGY M, CAOY N, HANY, et al. Recommending the right items for user temporal interests with matrix factorization through topic model[J]. Chinese Journal of Computers, 2018, 41(7): 1431-1447. DOI: 10.11897/SP.J.1016.2018.01431(Ch ).
RENJ D, LIUX Q, WANGQ, et al. An multi-level intrusion detection method based on KNN outlier detection and random forests[J]. Journal of Computer Research and Development, 2019, 56(3): 566-575. DOI: 10.7544/issn1000-1239.2019.20180063(Ch ).
[7]
HUANGJ Q, KONGL H, CHENG H, et al. Towards secure industrial IoT: Blockchain system with credit-based consensus mechanism[J]. IEEE Transactions on Industrial Informatics, 2019, 15(6): 3680-3689. DOI: 10.1109/TII.2019.2903342 .
WANGS. A probe into the legal nature of the “blacklist” system and its administrative regulations—From the perspective of article 25 of the regulations of Shanghai municipality on the administration of single-use prepaid consumer cards[J]. Journal of Southeast University (Philosophy and Social Science), 2019, 21(S1): 88-93. DOI: 10.13916/j.cnki.issn1671-511x.2019.s1.018(Ch ).
GUPTAM, JUDGEP, AMMARM. A Reputation System for Peer-to-Peer Networks[EB/OL].[2022-08-12].DOI: 10.1145/776322.776346 .
[12]
KAMVARS D, SCHLOSSERM T, GARCIA-MOLINAH. The Eigentrust Algorithm for Reputation Management in P2P Networks[EB/OL].[2013-06-16].Management_in_P2P_Networks/links/0046351b0f1a8dd2a6000000/The-EigenTrust-Algorithm-for-Reputation-Management-in-P2P-Networks.pdf.
[13]
GAIF Y, WANGB S, DENGW P, et al. Proof of reputation: A reputation-based consensus protocol for peer-to-peer network[M]// Database Systems for Advanced Applications. Cham:Springer International Pressing, 2018: 666-681. DOI: 10.1007/978-3-319-91458-9_41 .
HUANGJ H, XIAX, LIZ C, et al. Proof of trust: Mechanism of trust degree based on dynamic authorization[J]. Journal of Software, 2019, 30(9): 2593-2607. DOI: 10.13328/j.cnki.jos.005772(Ch ).
WANGZ, TIANY L, LIQ X, et al. Proof of work algorithm based on credit model[J]. Journal on Communications, 2018, 39(8): 185-198. DOI: 10.11959/j.issn.1000-436x.2018138(Ch ).
[18]
BUGDAYA, OZSOYA, ÖZTANERS M, et al.Creating consensus group using online learning based reputation in blockchain networks[J]. Pervasive and Mobile Computing, 2019, 59: 101056. DOI: 10.1016/j.pmcj.2019.101056 .
[19]
OTTEP, DEV M, POUWELSEJ. Trustchain: A Sybil-resistant scalable blockchain[J]. Future Generation Computer Systems, 2020, 107: 770-780. DOI: 10.1016/j.future.2017.08.048 .
[20]
DOUCEURJ R. The sybil attack[M]//Peer-to-Peer Systems. Berlin: Springer, 2002: 251-260. DOI: 10.1007/3-540-45748-8_24 .
[21]
LIUD X, ALAHMADIA, NIJ B, et al. Anonymous reputation system for IIoT-enabled retail marketing atop PoS blockchain[J]. IEEE Transactions on Industrial Informatics, 2019, 15(6): 3527-3537. DOI: 10.1109/TII.2019.2898900 .
[22]
TANGC B, WUL Y, WENG H, et al. Incentivizing honest mining in blockchain networks: A reputation approach[J]. IEEE Transactions on Circuits and Systems Ⅱ: Express Briefs, 2020, 67(1): 117-121. DOI: 10.1109/TCSII.2019.2901746 .
[23]
BAHRIL, GIRDZIJAUSKASS. Trust mends blockchains: Living up to expectations[C]//2019 IEEE 39th International Conference on Distributed Computing Systems (ICDCS). New York: IEEE Press, 2019: 1358-1368. DOI: 10.1109/ICDCS.2019.00136 .
[24]
SZYDLOM. Merkle tree traversal in log space and time[M]//Advances in Cryptology - EUROCRYPT 2004. Berlin: Springer, 2004: 541-554. DOI: 10.1007/978-3-540-24676-3_32 .
[25]
VASWANIA, SHAZEERN, PARMARN, et al. Attention is all you need[C]//Proceedings of the 31st International Conference on Neural Information Processing Systems. New York: ACM, 2017: 6000-6010. DOI: 10.5555/3295222.3295349 .
[26]
BAHDANAU D CHOK, BENGIOY. Neural machine translation by jointly learning to align and translate[EB/OL].[2014-09-01].DOI: 10.3115/v1/w14-4012 .
[27]
EYALI, SIRERE G. Majority is not enough: Bitcoin mining is vulnerable[M]// Financial Cryptography and Data Security. Berlin:Springer, 2014: 436-454. DOI: 10.1007/978-3-662-45472-5_28 .