《计算机应用》唯一官方网站 ›› 2022, Vol. 42 ›› Issue (8): 2471-2480.DOI: 10.11772/j.issn.1001-9081.2021060958
收稿日期:
2021-06-07
修回日期:
2021-09-03
接受日期:
2021-09-28
发布日期:
2021-10-18
出版日期:
2022-08-10
通讯作者:
熊晓芸
作者简介:
王旭(1997—),男,山东滨州人,硕士研究生,CCF会员,主要研究方向:区块链;基金资助:
Xu WANG1, Yumin SHEN1, Xiaoyun XIONG1(), Peng LI2, Jinlong WANG1
Received:
2021-06-07
Revised:
2021-09-03
Accepted:
2021-09-28
Online:
2021-10-18
Published:
2022-08-10
Contact:
Xiaoyun XIONG
About author:
WANG Xu, born in 1997, M. S. candidate. His research interests include blockchain.Supported by:
摘要:
针对区块链应用于建筑物联网场景时存在的吞吐量严重不足和响应时延高的问题,提出一种基于哈希图的建筑物联网数据管理方法。该方法使用有向无环图(DAG)存储数据,从而利用图式结构的高并发特性提高区块链的吞吐量性能;引入哈希图算法对存储在DAG内的数据达成共识,从而减少共识所需时间;设计智能合约实现访问权限控制,以防止未授权用户对数据的操作。使用区块链性能测试工具Caliper进行的性能测试的结果表明:在由32个节点构成的中等规模仿真环境下,与现有边缘计算方法和跨链方法相比,所提方法的吞吐量为每秒处理1 063.1笔交易,分别为对比方法吞吐量的6倍和3倍;该方法的数据存储时延和控制时延分别为4.57 s和4.92 s,响应速度优于对比方法;该方法在尖峰冲击测试中的交易成功率为87.4%;同时基于该方法的原型系统在稳定性测试中可以平稳运行120 h。可见,所提方法可以有效提高区块链的交易吞吐量和响应速度,满足建筑物联网场景的实际使用需求。
中图分类号:
王旭, 申玉民, 熊晓芸, 李鹏, 王金龙. 基于哈希图的建筑物联网数据管理方法[J]. 计算机应用, 2022, 42(8): 2471-2480.
Xu WANG, Yumin SHEN, Xiaoyun XIONG, Peng LI, Jinlong WANG. Data management method for building internet of things based on Hashgraph[J]. Journal of Computer Applications, 2022, 42(8): 2471-2480.
符号 | 符号描述 |
---|---|
控制请求信息,由 | |
控制请求信息记录 | |
表示用户发起的设备控制命令 | |
数据存储交易, | |
事件,Hashgraph中各节点传播数据所使用的数据结构。例如 | |
事件 | |
事件 | |
事件 | |
事件 | |
各节点存储在本地的Hashgraph副本,用于记录全网事件历史。 | |
记录用户请求执行的操作类型(数据查询、设备控制等)和操作涉及的设备组编号 | |
全局权限表,记录用户访问控制权限,随着用户身份在区块链网络中的登记与注销而动态更新 | |
私钥签名,例如 | |
记录用户的身份信息, |
表1 形式化描述
Tab. 1 Formal description
符号 | 符号描述 |
---|---|
控制请求信息,由 | |
控制请求信息记录 | |
表示用户发起的设备控制命令 | |
数据存储交易, | |
事件,Hashgraph中各节点传播数据所使用的数据结构。例如 | |
事件 | |
事件 | |
事件 | |
事件 | |
各节点存储在本地的Hashgraph副本,用于记录全网事件历史。 | |
记录用户请求执行的操作类型(数据查询、设备控制等)和操作涉及的设备组编号 | |
全局权限表,记录用户访问控制权限,随着用户身份在区块链网络中的登记与注销而动态更新 | |
私钥签名,例如 | |
记录用户的身份信息, |
共识 | 通信代价 | 容错性 | 准确性 |
---|---|---|---|
Hashgraph | 无需额外通信代价 | <1/3恶意节点 | 由投票保证 |
Tendermint、PBFT等 | O(n²) | <1/3恶意节点 | 由 |
表2 共识算法对比
Tab. 2 Comparison of consensus algorithms
共识 | 通信代价 | 容错性 | 准确性 |
---|---|---|---|
Hashgraph | 无需额外通信代价 | <1/3恶意节点 | 由投票保证 |
Tendermint、PBFT等 | O(n²) | <1/3恶意节点 | 由 |
配置项 | 版本 |
---|---|
Ubuntu | 18.04 |
go | v1.13.5 |
docker | v19.03.6 |
docker-compose | v1.17.1 |
Hyperledger Fabric | v2.2 |
表3 软件环境配置
Tab. 3 Software environment configuration
配置项 | 版本 |
---|---|
Ubuntu | 18.04 |
go | v1.13.5 |
docker | v19.03.6 |
docker-compose | v1.17.1 |
Hyperledger Fabric | v2.2 |
采样项目 | 采样间隔/s | 采样数 |
---|---|---|
门禁系统 | 5 | 49 |
视频监控 | 5 | 453 |
照明系统 | 5 | 146 |
消防系统 | 5 | 115 |
给排水系统 | 10 | 67 |
新风系统 | 10 | 126 |
机房检测 | 10 | 105 |
精密空调 | 20 | 148 |
表4 IBMS项目数据采样频率与数量
Tab. 4 Data-sampling frequencies and numbers of IBMS projects
采样项目 | 采样间隔/s | 采样数 |
---|---|---|
门禁系统 | 5 | 49 |
视频监控 | 5 | 453 |
照明系统 | 5 | 146 |
消防系统 | 5 | 115 |
给排水系统 | 10 | 67 |
新风系统 | 10 | 126 |
机房检测 | 10 | 105 |
精密空调 | 20 | 148 |
实体 | 权限 | 注册时间 | 过期时间 |
---|---|---|---|
U1 | 2021-04-29T15:30 | 2021-05-29T15:30 | |
U2 | 2021-04-30T17:45 | 2022-04-30T17:45 |
表5 权限表信息(部分)
Tab. 5 Information of access table (part)
实体 | 权限 | 注册时间 | 过期时间 |
---|---|---|---|
U1 | 2021-04-29T15:30 | 2021-05-29T15:30 | |
U2 | 2021-04-30T17:45 | 2022-04-30T17:45 |
1 | TRAGOS E Z, FOTI M, SURLIGAS M, et al. An IoT based intelligent building management system for ambient assisted living [C]// Proceedings of the 2015 IEEE International Conference on Communication Workshop. Piscataway: IEEE, 2015: 246-252. 10.1109/iccw.2015.7247186 |
2 | GAO M R, SU W, XUE L J. Engineering design of Intelligent Building Management System (IBMS) [C]// Proceedings of the 2010 International Conference on Computer and Communication Technologies in Agriculture Engineering. Piscataway: IEEE, 2010: 337-340. 10.1109/cctae.2010.5544762 |
3 | LILIS G, CONUS G, ASADI N, et al. Towards the next generation of intelligent building: an assessment study of current automation and future IoT based systems with a proposal for transitional design[J]. Sustainable Cities and Society, 2017, 28: 473-481. 10.1016/j.scs.2016.08.019 |
4 | ALI M S, VECCHIO M, PINCHEIRA M, et al. Applications of blockchains in the Internet of Things: a comprehensive survey[J]. IEEE Communications Surveys and Tutorials, 2019, 21(2): 1676-1717. 10.1109/comst.2018.2886932 |
5 | SHAFAGH H, BURKHALTER L, HITHNAWI A, et al. Towards blockchain-based auditable storage and sharing of IoT data [C]// Proceedings of the 2017 Cloud Computing Security Workshop. New York: ACM, 2017: 45-50. 10.1145/3140649.3140656 |
6 | NAKAMOTO S. Bitcoin: a peer-to-peer electronic cash system[EB/OL]. [2021-03-02]. . 10.2139/ssrn.3977007 |
7 | HUH S, CHO S, KIM S. Managing IoT devices using blockchain platform [C]// Proceedings of the 19th International Conference on Advanced Communication Technology. Piscataway: IEEE, 2017: 464-467. 10.23919/icact.2017.7890132 |
8 | XU Q Q, HE Z Z, LI Z X, et al. An effective blockchain-based, decentralized application for smart building system management[M]// DAS H, DEY N, BALAS V E. Real-Time Data Analytics for Large Scale Sensor Data. London: Academic Press, 2019: 157-181. 10.1016/b978-0-12-818014-3.00008-5 |
9 | 程冠杰,黄诤杰,邓水光.基于区块链与边缘计算的物联网数据管理[J].物联网学报, 2020, 4(2): 1-9. 10.11959/j.issn.2096-3750.2020.00165 |
CHENG G J, HUANG Z J, DENG S G. Data management based on blockchain and edge computing for Internet of things[J]. Chinese Journal on Internet of Things, 2020, 4(2): 1-9. 10.11959/j.issn.2096-3750.2020.00165 | |
10 | JIANG Y M, WANG C X, WANG Y W, et al. A cross-chain solution to integrating multiple blockchains for IoT data management[J]. Sensors, 2019, 19(9): No.2042. 10.3390/s19092042 |
11 | XU C H, WANG K, LI P, et al. Making big data open in edges: a resource-efficient blockchain-based approach[J]. IEEE Transactions on Parallel and Distributed Systems, 2019, 30(4): 870-882. 10.1109/tpds.2018.2871449 |
12 | CHOWDHURY M J M, FERDOUS M S, BISWAS K, et al. A survey on blockchain-based platforms for IoT use-cases[J]. The Knowledge Engineering Review, 2020, 35: No.e19. 10.1017/s0269888920000284 |
13 | CAO B, LI Y X, ZHANG L, et al. When Internet of Things meets blockchain: challenges in distributed consensus[J]. IEEE Network, 2019, 33(6): 133-139. 10.1109/mnet.2019.1900002 |
14 | 田志宏,赵金东.面向物联网的区块链共识机制综述[J].计算机应用, 2021, 41(4): 917-929. 10.11772/j.issn.1001-9081.2020111722 |
TIAN Z H, ZHAO J D. Overview of blockchain consensus mechanism for internet of things[J]. Journal of Computer Applications, 2021, 41(4): 917-929. 10.11772/j.issn.1001-9081.2020111722 | |
15 | SIOUNTRI K, SKONDRAS E, VERGADOS D D. Developing smart buildings using blockchain, Internet of Things, and building information modeling[J]. International Journal of Interdisciplinary Telecommunications and Networking, 2020, 12(3): 1-15. 10.4018/ijitn.2020070101 |
16 | 高政风,郑继来,汤舒扬,等.基于DAG的分布式账本共识机制研究[J].软件学报, 2020, 31(4): 1124-1142. 10.13328/j.cnki.jos.005982 |
GAO Z F, ZHENG J L, TANG S Y, et al. State-of-the-art survey of consensus mechanisms on DAG-based distributed ledger[J]. Journal of Software, 2020, 31(4): 1124-1142. 10.13328/j.cnki.jos.005982 | |
17 | BAIRD L. Hashgraph consensus algorithm: fair, fast, Byzantine fault tolerance: SWIRLDS TECH REPORT TR- 2016-01[R/OL]. (2016-05-31) [2021-03-06]. . |
18 | ZHAO L R, YU J S. Evaluating DAG-based blockchains for IoT [C]// Proceedings of the 18th IEEE International Conference on Trust, Security and Privacy in Computing and Communications/ 13th IEEE International Conference on Big Data Science and Engineering. Piscataway: IEEE, 2019: 507-513. 10.1109/trustcom/bigdatase.2019.00074 |
19 | PRASHAR D, JHA N, JHA S, et al. Integrating IoT and blockchain for ensuring road safety: an unconventional approach[J]. Sensors, 2020, 20(11): No.3296. 10.3390/s20113296 |
20 | BANSAL G, BHATIA A. A fast, secure and distributed consensus mechanism for energy trading among vehicles using Hashgraph [C]// Proceedings of the 2020 International Conference on Information Networking. Piscataway: IEEE, 2020: 772-777. 10.1109/icoin48656.2020.9016440 |
21 | 全国安全防范报警系统标准化技术委员会. 出入口控制系统工程设计规范: [S].北京:中国计划出版社, 2007: 13. |
Security and Protection Alarm Systems of Standardization Administration of China. Code of design for access control systems engineering: [S]. Beijing: China Planning Press, 2007: 13. | |
22 | 刘虹男,魏凯.联盟链技术测试观察与分析[J].信息通信技术与政策, 2020, 46(1): 35-45. 10.3969/j.issn.1008-9217.2020.01.009 |
LIU H N, WEI K. Consortiumblockchain technology test observation and analysis[J]. Information and Communications Technology and Policy, 2020, 46(1): 35-45. 10.3969/j.issn.1008-9217.2020.01.009 | |
23 | 同方股份有限公司,智能建筑工程质量验收规范: [S].北京:中国建筑工业出版社, 2013: 4. 10.1109/iscas.2013.6572103 |
Tongfang Company Limited. , Code for acceptance of quality of intelligent building systems: GB 50339—2013 [S]. Beijing: China Architecture and Building Press, 2013: 4. 10.1109/iscas.2013.6572103 |
[1] | 陈廷伟, 张嘉诚, 王俊陆. 面向联邦学习的随机验证区块链构建[J]. 《计算机应用》唯一官方网站, 2024, 44(9): 2770-2776. |
[2] | 孙晓玲, 王丹辉, 李姗姗. 基于区块链的动态密文排序检索方案[J]. 《计算机应用》唯一官方网站, 2024, 44(8): 2500-2505. |
[3] | 黄河, 金瑜. 基于投票和以太坊智能合约的云数据审计方案[J]. 《计算机应用》唯一官方网站, 2024, 44(7): 2093-2101. |
[4] | 李皎, 张秀山, 宁远航. 降低跨分片交易比例的区块链分片方法[J]. 《计算机应用》唯一官方网站, 2024, 44(6): 1889-1896. |
[5] | 赵莉朋, 郭兵. 基于BDLS的区块链共识改进算法[J]. 《计算机应用》唯一官方网站, 2024, 44(4): 1139-1147. |
[6] | 陈美宏, 袁凌云, 夏桐. 基于主从多链的数据分类分级访问控制模型[J]. 《计算机应用》唯一官方网站, 2024, 44(4): 1148-1157. |
[7] | 高改梅, 张瑾, 刘春霞, 党伟超, 白尚旺. 基于区块链与CP-ABE策略隐藏的众包测试任务隐私保护方案[J]. 《计算机应用》唯一官方网站, 2024, 44(3): 811-818. |
[8] | 马海峰, 李玉霞, 薛庆水, 杨家海, 高永福. 用于实现区块链隐私保护的属性基加密方案[J]. 《计算机应用》唯一官方网站, 2024, 44(2): 485-489. |
[9] | 陈姿芊, 牛科迪, 姚中原, 斯雪明. 适用于物联网的区块链轻量化技术综述[J]. 《计算机应用》唯一官方网站, 2024, 44(12): 3688-3698. |
[10] | 高婷婷, 姚中原, 贾淼, 斯雪明. 链上链下一致性保护技术综述[J]. 《计算机应用》唯一官方网站, 2024, 44(12): 3658-3668. |
[11] | 贾淼, 姚中原, 祝卫华, 高婷婷, 斯雪明, 邓翔. 零知识证明赋能区块链的进展与展望[J]. 《计算机应用》唯一官方网站, 2024, 44(12): 3669-3677. |
[12] | 牛科迪, 李敏, 姚中原, 斯雪明. 面向物联网的区块链共识算法综述[J]. 《计算机应用》唯一官方网站, 2024, 44(12): 3678-3687. |
[13] | 王伊婷, 万武南, 张仕斌, 张金全, 秦智. 基于SM9算法的可链接环签名方案[J]. 《计算机应用》唯一官方网站, 2024, 44(12): 3709-3716. |
[14] | 刘德渊, 张金全, 张鑫, 万武南, 张仕斌, 秦智. 基于无证书签密的跨链身份认证方案[J]. 《计算机应用》唯一官方网站, 2024, 44(12): 3731-3740. |
[15] | 孙科硕, 高海英, 宋杨. 面向公有区块链上的私有区块链的多权威属性加密方案[J]. 《计算机应用》唯一官方网站, 2024, 44(12): 3699-3708. |
阅读次数 | ||||||
全文 |
|
|||||
摘要 |
|
|||||