作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2025, Vol. 51 ›› Issue (4): 217-226. doi: 10.19678/j.issn.1000-3428.0068957

• 网络空间安全 • 上一篇    下一篇

基于信誉机制的车联网共识算法

李俊吉, 张佳琦*(), 高改梅, 杨莉   

  1. 太原科技大学计算机科学与技术学院, 山西 太原 030024
  • 收稿日期:2023-12-06 出版日期:2025-04-15 发布日期:2024-06-04
  • 通讯作者: 张佳琦
  • 基金资助:
    国家自然科学基金(62272336); 山西省教学改革创新项目(J20220723); 山西省研究生科研创新项目(2023KY661); 太原科技大学研究生教育教学改革课题(JG202310); 太原科技大学纪检监察研究项目(JWYB202408)

Consensus Algorithm for Internet of Vehicles Based on Reputation Mechanism

LI Junji, ZHANG Jiaqi*(), GAO Gaimei, YANG Li   

  1. College of Computer Science and Technology, Taiyuan University of Science and Technology, Taiyuan 030024, Shanxi, China
  • Received:2023-12-06 Online:2025-04-15 Published:2024-06-04
  • Contact: ZHANG Jiaqi

摘要:

针对车联网(IoV)中传统共识算法存在的通信开销大、主节点选取随意的问题, 提出一种基于信誉机制的IoV共识算法RHotStuff。将IoV中的车辆和路旁单元(RSU)作为节点组成共识网络, 同时引入投票积极度、历史影响程度、信誉惩罚因子等指标来实现信誉机制, 用于评估节点的信誉分数, 衡量其可信程度。根据信誉分数将节点划分为主节点、从节点和候选节点。在共识开始前, 仅选取信誉分数较高的部分节点作为主节点, 和从节点参与共识, 以降低通信开销并提高共识性能, 其中主节点由信誉分数最高的节点担任, 以降低主节点的可预测性。在共识完成后, 信誉分数将重新计算, 并据此选择下一轮参与共识的节点。此外, 主节点会在Reply阶段将共识结果发送给其他所有节点, 以同步信誉分数和区块。实验结果表明, RHotStuff具有O(N)的通信复杂度, 并且其共识成功率相较于C-HotStuff提升了约30%。当节点数量为93时, RHotStuff的共识吞吐量相较于R-PBFT提高了11.68%, 同时其共识时延降低了11.74%。综合来看, RHotStuff优化了主节点选取方式, 具有较低的通信开销和共识时延, 同时获得了较高的共识成功率和共识吞吐量, 对提升IoV通信效率、推动智能交通的发展具有重要意义。

关键词: 信誉机制, 车联网, 共识算法, 区块链, 路旁单元

Abstract:

This paper introduces RHotStuff, a reputation-based consensus algorithm for Internet of Vehicles (IoV), to address the issues of high communication overhead and arbitrary selection of master nodes in traditional consensus algorithms for IoV. This algorithm treats vehicles and Road Side Units (RSU) in the IoV as nodes, forming a consensus network. Indicators such as voting activity, historical influence, and reputation punishment factors are introduced to implement the reputation mechanism. This mechanism evaluates the reputation scores of nodes and measures their credibility. Based on their reputation scores, the nodes are divided into master, slave, and candidates. Before the consensus begins, only a subset of nodes with higher reputation scores are selected as master and slave nodes to participate in the consensus. This reduces communication overhead and improves consensus performance. The master node is selected from the node with the highest reputation score, reducing the predictability of the master node. After the consensus is reached, the reputation scores are recalculated, and the next round of nodes participating in the consensus is selected accordingly. Additionally, the master node sends the consensus result to all other nodes during the Reply phase to synchronize the reputation scores and blocks. Experimental results demonstrate that RHotStuff has an O(N) communication complexity, and its consensus success rate is approximately 30% higher than that of C-HotStuff. This helps improve the consensus performance. When there are 93 nodes, the consensus throughput of RHotStuff is 11.68% higher than that of R-PBFT, whereas its consensus delay is reduced by 11.74%. Overall, RHotStuff optimizes the selection method of the master node and has low communication overhead and consensus delay while also obtaining a high consensus success rate and throughput, which is of great significance for improving the communication efficiency of the IoV and the development of intelligent transportation.

Key words: reputation mechanism, Internet of Vehicles(IoV), consensus algorithm, blockchain, Road Side Units(RSU)