技术领域Technical Field
本发明属于区块链和车联网领域,具体为在基于区块链的车联网系统中一种预奖惩机制的信任管理方法。The present invention belongs to the field of blockchain and Internet of Vehicles, and specifically is a trust management method of a pre-reward and punishment mechanism in an Internet of Vehicles system based on blockchain.
背景技术Background Art
随着车联网技术的迅速发展,车辆之间的信息交换已成为智能交通系统中的重要组成部分。然而,车联网环境面临着诸多挑战,包括数据安全性、信息可信度和信任管理等问题。传统的车联网系统往往依赖于中心化的信任机构来管理车辆之间的通信和数据交换,但这种方式容易受到单点故障和恶意攻击的影响,导致系统的不稳定性和安全性问题。为了解决这些问题,研究者们开始探索基于区块链技术的车联网信任管理方法。区块链作为一种去中心化的分布式账本技术,能够保障数据的安全性和可信度,使得车辆之间的通信更加安全可靠。同时,预奖励机制作为一种激励措施,能够有效地提高车辆节点的行为合规性和诚信度,促进系统的良性运行。With the rapid development of Internet of Vehicles (IoV) technology, information exchange between vehicles has become an important part of intelligent transportation systems. However, the IoV environment faces many challenges, including data security, information credibility, and trust management. Traditional IoV systems often rely on centralized trust agencies to manage communication and data exchange between vehicles, but this approach is vulnerable to single point failures and malicious attacks, leading to system instability and security issues. In order to solve these problems, researchers have begun to explore IoV trust management methods based on blockchain technology. Blockchain, as a decentralized distributed ledger technology, can ensure data security and credibility, making communication between vehicles more secure and reliable. At the same time, the pre-reward mechanism, as an incentive measure, can effectively improve the behavioral compliance and integrity of vehicle nodes and promote the benign operation of the system.
然而,现有的车联网信任管理方法还存在一些问题,例如对车辆行为的准确预测、奖惩机制的合理设计以及共识算法的效率和安全性等方面仍有待进一步提升。因此,开展基于区块链的车联网信任管理研究具有重要的理论和实践意义,能够为智能交通系统的发展和应用提供更加可靠和安全的技术支持。However, there are still some problems in the existing IoV trust management methods, such as the accurate prediction of vehicle behavior, the reasonable design of reward and punishment mechanisms, and the efficiency and security of consensus algorithms, which still need to be further improved. Therefore, conducting research on IoV trust management based on blockchain has important theoretical and practical significance, and can provide more reliable and secure technical support for the development and application of intelligent transportation systems.
发明内容Summary of the invention
发明目的:本发明旨在构建一个创新的车联网信任管理模式,通过将区块链技术与预奖励机制相结合,解决传统车联网系统中存在的数据安全性、信息可信度和信任管理等方面的问题。通过建立安全可靠、智能高效的信任管理系统,促进车辆之间的信息交换和数据共享,推动智慧交通系统的发展和应用,实现更安全、更可靠的智慧交通运输。Purpose of the invention: The present invention aims to build an innovative trust management model for Internet of Vehicles, which combines blockchain technology with a pre-reward mechanism to solve the problems of data security, information credibility, and trust management in traditional Internet of Vehicles systems. By establishing a safe, reliable, intelligent, and efficient trust management system, it promotes information exchange and data sharing between vehicles, promotes the development and application of smart transportation systems, and realizes safer and more reliable smart transportation.
技术方案:基于区块链的车联网系统中一种预奖惩机制的信任管理方法:包括以下几个步骤:Technical solution: A trust management method for a pre-reward and punishment mechanism in a blockchain-based Internet of Vehicles system: including the following steps:
1)构建基于区块链的车联网信任管理模型;1) Build a blockchain-based Internet of Vehicles trust management model;
2)构建了一种综合考虑初始化信任、本地信任与全局信任的车辆信任评价体系;2) A vehicle trust evaluation system that comprehensively considers initialization trust, local trust and global trust is constructed;
3)构建基于CNNs模型预测消息真实性的预奖惩机制;3) Construct a pre-reward and punishment mechanism based on the CNNs model to predict the authenticity of messages;
4)设计一种基于预奖惩和信任的共识机制。4) Design a consensus mechanism based on pre-reward and punishment and trust.
进一步,步骤1)中,构建基于区块链的车联网信任管理模型,上述的模型主要包括车辆(Vehicle)、路边单元节点(RSU)以及可信认证机构(TA)。Furthermore, in step 1), a blockchain-based Internet of Vehicles trust management model is constructed. The above model mainly includes a vehicle, a roadside unit node (RSU) and a trusted certification authority (TA).
(1)车辆(Vehicle):在信任管理系统中,车辆不仅提供道路事件信息、交通条件、驾驶安全和地形服务等数据给其他车辆节点,还根据其他车辆节点的初始化信任和本地信任建立信任关系,并将这些数据上传至路边单元。作为领导者节点的车辆负责产生新的区块并上传至路边单元,而共识参与车辆节点则与其他车辆共同协作,验证和确认交通信息的有效性。这一过程中,车辆节点通过相互合作和信任建立,共同维护着整个车联网系统的安全稳定运行。(1) Vehicle: In the trust management system, vehicles not only provide data such as road event information, traffic conditions, driving safety, and terrain services to other vehicle nodes, but also establish trust relationships based on the initial trust and local trust of other vehicle nodes, and upload these data to the roadside unit. The vehicle as the leader node is responsible for generating new blocks and uploading them to the roadside unit, while the consensus participating vehicle nodes work together with other vehicles to verify and confirm the validity of traffic information. In this process, vehicle nodes jointly maintain the safe and stable operation of the entire Internet of Vehicles system through mutual cooperation and trust establishment.
(2)路边单元节点(RSU):RSU在车联网信任管理系统中扮演着至关重要的角色。首先,它根据车辆节点上传的初始化信任和本地信任数据,计算出全局信任,并向区域内的车辆进行全局信任广播,从而建立车辆之间的信任关系网络。其次,RSU部署基于CNNs模型的预测车辆信息准确性和预惩罚机制,以提高车辆信息传输的可信度和准确性,进一步保障系统的安全性和稳定性。最后,作为数据的中转和存储节点,RSU负责接收来自车辆节点的区块数据,并进行中转和存储,为后续的数据处理和分析提供了支持。(2) Roadside Unit Node (RSU): RSU plays a vital role in the Internet of Vehicles trust management system. First, it calculates the global trust based on the initial trust and local trust data uploaded by the vehicle node, and broadcasts the global trust to the vehicles in the area, thereby establishing a trust relationship network between vehicles. Secondly, RSU deploys the CNNs model-based prediction vehicle information accuracy and pre-punishment mechanism to improve the credibility and accuracy of vehicle information transmission, and further ensure the security and stability of the system. Finally, as a data transfer and storage node, RSU is responsible for receiving block data from vehicle nodes, transferring and storing it, and providing support for subsequent data processing and analysis.
(3)可信认证机构(TA):可信认证机构(TA)承担着对车辆节点进行身份验证和信任建立的重要职责。通过验证车辆节点的身份信息,并颁发数字证书等凭证,TA确保只有合法的车辆节点才能参与到车联网系统中,并建立车辆节点之间的信任关系。在车辆节点注册阶段,TA生成初始化信任,在一定的周期或者违规事件发生后,对车辆的注册信息进行审核。审核完成后,TA对车辆的初始化信任进行更新赋值,并通过区块链广播,将更新后的信息发送至路边单元,以确保车辆节点的合法性和信任度。TA的作用不仅在于确认车辆身份的真实性,还在于维护车辆节点之间的信任网络,为系统的安全性和稳定性提供了可靠保障。(3) Trusted Certification Authority (TA): The Trusted Certification Authority (TA) has the important responsibility of authenticating and establishing trust for vehicle nodes. By verifying the identity information of vehicle nodes and issuing digital certificates and other credentials, TA ensures that only legitimate vehicle nodes can participate in the Internet of Vehicles system and establishes a trust relationship between vehicle nodes. During the vehicle node registration phase, TA generates initial trust and reviews the vehicle registration information after a certain period or after a violation occurs. After the review is completed, TA updates the initial trust of the vehicle and sends the updated information to the roadside unit through blockchain broadcast to ensure the legitimacy and trustworthiness of the vehicle node. The role of TA is not only to confirm the authenticity of the vehicle identity, but also to maintain the trust network between vehicle nodes, providing reliable protection for the security and stability of the system.
车联网信任管理系统采用了多种技术和算法,包括可信认证机构(TA)、路边单元(RSU)、预测模型、共识算法和区块链技术等。TA负责对车辆节点进行身份验证和信任建立,RSU负责接收和验证车辆节点上传的交通信息,并执行预测模型和预奖惩机制。系统通过区块链技术实现了交通信息的安全存储和不可篡改性。综合利用这些技术和算法,车联网信任管理系统为智能交通系统的安全、可靠和可信提供了重要支持。The Internet of Vehicles Trust Management System uses a variety of technologies and algorithms, including trusted authentication authorities (TA), roadside units (RSU), prediction models, consensus algorithms, and blockchain technology. TA is responsible for authenticating and establishing trust with vehicle nodes, while RSU is responsible for receiving and verifying traffic information uploaded by vehicle nodes, and executing prediction models and pre-reward and punishment mechanisms. The system uses blockchain technology to achieve secure storage and non-tamperability of traffic information. By combining these technologies and algorithms, the Internet of Vehicles Trust Management System provides important support for the safety, reliability, and trustworthiness of intelligent transportation systems.
进一步,步骤2)中,构建了一种综合考虑初始化信任、本地信任与全局信任的车辆信任评价体系。Furthermore, in step 2), a vehicle trust evaluation system is constructed that comprehensively considers initialization trust, local trust and global trust.
车辆信任的定义:在本发明中使用一个区域来说明信任的定义,假设在这个指定区域内存在多个车辆节点。在这样的区域内,路边单元可以与多个车辆共存,形成用于信任管理和计算的集成系统。Definition of vehicle trust: In this invention, a region is used to illustrate the definition of trust, assuming that there are multiple vehicle nodes in this specified region. In such a region, roadside units can coexist with multiple vehicles to form an integrated system for trust management and calculation.
步骤2-1:初始化信任(Initialize Trust):车辆在注册加入车辆时需要提交的车辆类型、品牌、型号、保险、行驶年限以及违章记录等信息,这些信息组成的信任属性集合(Trust Attribute Matrix-TAM)。Step 2-1: Initialize Trust: The vehicle type, brand, model, insurance, driving age, and violation record that the vehicle needs to submit when registering. This information constitutes the Trust Attribute Matrix (TAM).
TAM=ξta1,ta2,…,tal,…,tam} (1)TAM=ξta1 , ta2 ,..., tal ,..., tam } (1)
使用表示信任属性tag的可信测量的相关度量函数。m表示信任属性的数量。use represents the relevant metric function of the trust attributetag . m represents the number of trust attributes.
所以,车辆的初始化信任值可以表示为:Therefore, the initial trust value of the vehicle can be expressed as:
值得注意的是,车辆管理部门在一定的周期或者违章发生后,对车辆的注册信息进行审核,审核完成后对车辆的初始化信任进行赋值。所以车辆的初始化信任并不是固定的。ω,表示每个属性的权重。It is worth noting that the vehicle management department will review the vehicle registration information in a certain period or after a violation occurs, and assign a value to the vehicle's initial trust after the review is completed. Therefore, the vehicle's initial trust is not fixed. ω represents the weight of each attribute.
步骤2-2:本地信任(LocalTrust):每隔一段时间,车辆将在以区域内产生的信任反馈发送到路边单元,其对一个区域中所有其他设备的本地信任形成信任反馈列表。通过路径传输损失和提供消息的准确性来定义本地信任。Step 2-2: Local Trust: At regular intervals, the vehicle sends the trust feedback generated in the area to the roadside unit, which forms a trust feedback list for the local trust of all other devices in an area. Local trust is defined by path transmission loss and the accuracy of the provided message.
假设区域内车辆节点i对车辆节点,的本地信任定义为LTij。Assume that the local trust of vehicle node i to vehicle node , in the region is defined as LTi j.
路径损耗:LPij=L0+10nlog10(dij) (3)Path loss: LPij = L0 + 10nlog10 (dij ) (3)
其中L0表示参考距离为1米时的路径损耗,n表示路径损耗指数,dij表示车辆节点i和车辆节点,之间的距离。WhereL0 represents the path loss when the reference distance is 1 meter, n represents the path loss index, anddij represents the distance between vehicle node i and vehicle node,.
消息准确性:Message accuracy:
其中α,β分别代表车辆节点i收到的车辆节点j的消息是正确和错误的数量。Where α and β represent the number of correct and incorrect messages received by vehicle node i from vehicle node j, respectively.
其中ω1和(1-ω1)表示路径损耗和消息传输准确性的权重,γ和ε是额外的参数,用于调整路径损耗和消息传输准确性的影响。Where ω1 and (1-ω1 ) represent the weights of path loss and message transmission accuracy, and γ and ε are additional parameters used to adjust the impact of path loss and message transmission accuracy.
由于本地信任具有时间敏感性,所以定义车辆节点i对车辆节点j的本地信任关于时间t的集合如果在时间t内未进行信息交互,则使用初始化信任进行赋值。Since local trust is time-sensitive, the set of local trust of vehicle node i to vehicle node j with respect to time t is defined as If no information interaction occurs within time t, the initial trust is used for assignment.
本地信任的更新:Updates to local trust:
其中表示窗口时间内历史的本地信任的平均值。λΔT表示用于调整信任值的更新程度,λΔT选择的值需要考虑具体应用场景的特性和对信任值变化的敏感度。ΔT表示当前本地信任与历史的本地信任的平均值之间的差值,即:in Represents the average value of local trust in history within the window time. λΔT represents the update degree used to adjust the trust value. The value selected by λΔT needs to consider the characteristics of the specific application scenario and the sensitivity to the change of trust value. ΔT represents the difference between the current local trust and the average value of local trust in history, that is:
更新方法可以表示如下:The update method can be expressed as follows:
表示窗口时间内第τ个历史的本地信任值,σ是一个衰减参数,用于控制历史信任值的权重。 represents the local trust value of the τth history within the window time, and σ is a decay parameter used to control the weight of the historical trust value.
步骤2-3:车辆节点i在进入某一路边单元区域内,将上传自身的本地信任列表至所在区域的路边单元。然后路边单元将进行全局信任的计算。为了防止恶意节点之间的串谋,各节点之间的具有一定的节点信任的相似度。Step 2-3: When vehicle node i enters a roadside unit area, it will upload its local trust list to the roadside unit in the area. The roadside unit will then calculate the global trust. In order to prevent collusion between malicious nodes, each node has a certain node trust similarity.
本发明中利用欧式距离来计算车辆节点信任的相似度:In the present invention, Euclidean distance is used to calculate the similarity of vehicle node trust:
全局信任则可以表示为:Global trust can be expressed as:
表示某一区域在t时间内与车辆节点i、j相互进行本地信任评估的节点集。 It represents the set of nodes in a certain area that conduct local trust evaluation with vehicle nodes i and j within time t.
进一步,步骤3)中,基于CNNs模型预测消息真实性的预奖惩机制,提高车联网系统对车辆节点消息的准确性和可信度。Furthermore, in step 3), a pre-reward and punishment mechanism based on the CNNs model predicts the authenticity of the message, thereby improving the accuracy and credibility of the vehicle node messages in the Internet of Vehicles system.
步骤3-1:使用车辆节点生成的区块数量和成功验证的交易数来衡量节点的贡献度。Step 3-1: Use the number of blocks generated by the vehicle node and the number of transactions successfully verified to measure the node's contribution.
路边单元记录车辆节点产生的区块数量与成功验证交易数,在区域内达成共识后,上传至路边单元进行存储,并由路边单元在区块链内进行广播。The roadside unit records the number of blocks generated by the vehicle node and the number of successfully verified transactions. After reaching a consensus in the area, it is uploaded to the roadside unit for storage and broadcast by the roadside unit in the blockchain.
节点的贡献度Ci=ρ·Mi+(1-ρ)·Ni(11)Node contribution Ci = ρ·Mi +(1-ρ)·Ni (11)
其中Mi表示车辆节点i生成的区块数量,Ni表示车辆节点i成功验证的交易数,ρ是待定的参数,用于调节区块数量和交易数对节点贡献度的影响。WhereMi represents the number of blocks generated by vehicle node i,Ni represents the number of transactions successfully verified by vehicle node i, and ρ is a parameter to be determined, which is used to adjust the impact of the number of blocks and transactions on the node contribution.
步骤3-2:使用CNNs模型来预测车辆提供的消息真实性。Step 3-2: Use the CNNs model to predict the authenticity of the message provided by the vehicle.
在车辆信任评价体系和节点的贡献度中,可以看出,以上这些评价特征参数,都是基于时间的序列。如果想要预测车辆提供的消息的真实性,然后给与预奖惩,从而降低车辆参与恶意行为的意向,提高车联网的安全性。所以,本发明中我们使用基于CNNs的消息事件真实性进行预测。In the vehicle trust evaluation system and the contribution of the node, it can be seen that the above evaluation feature parameters are all based on time series. If you want to predict the authenticity of the message provided by the vehicle, and then give pre-rewards and punishments, thereby reducing the vehicle's intention to participate in malicious behavior and improving the security of the Internet of Vehicles. Therefore, in this invention, we use the authenticity of message events based on CNNs for prediction.
假设有一组消息事件数据集{(x(1),y(1)),(x(2),y(2)),…,(x(m),y(m))},其中x(i)是第i条消息事件的特征,包括消息发送者的初始化信任、本地信任以及全局信任,以及消息签名是否校验成功,y(i)是第i条消息事件的真实标签(0表示虚假,1表示真实)。Suppose there is a set of message event datasets {(x(1) , y(1) ), (x(2) , y(2) ), …, (x(m) , y(m) )}, where x(i) is the feature of the i-th message event, including the initial trust, local trust, and global trust of the message sender, and whether the message signature is verified successfully, and y(i) is the true label of the i-th message event (0 for false and 1 for true).
首先,本方法定义一个基于CNNs的消息真实性预测模型,它可以将消息的特征x(i)映射到真实性预测模型的参数用θ表示。定义CNNSS模型的输入层为接受消息事件的特征x(i),CNNs用于学习序列特征,输出层用于预测消息事件的真实性的概率。First, this method defines a message authenticity prediction model based on CNNs, which can map the message features x(i) to the authenticity prediction The parameters of the model are represented by θ. The input layer of the CNNSS model is defined as the feature x(i) of the received message event, CNNs is used to learn sequence features, and the output layer is used to predict the probability of the authenticity of the message event.
对于给定的消息事件特征x(i),进行向前传播计算,得到模型的预测输出For a given message event feature x(i) , forward propagation calculation is performed to obtain the model's predicted output
cκ=F(Wκ*x(i)+bκ) (12)cκ =F(Wκ *x(i) +bκ ) (12)
pκ=mean(cκ) (13)pκ =mean(cκ ) (13)
其中Wκ和bκ代表第k个卷积核的权重和偏差,F代表RELU激活函数,Wy和by是全连接层的权值和偏差,softmax是激活函数,k是类别的数量。是预测模型的概率分布。Where Wκ and bκ represent the weight and bias of the kth convolution kernel, F represents the RELU activation function, Wy and byy are the weight and bias of the fully connected layer, softmax is the activation function, and k is the number of categories. is the probability distribution of the prediction model.
其次,方法中定义交叉熵损失函数,用于衡量模型预测输出与真是标签y(i)之间的差异。Secondly, the cross entropy loss function is defined in the method to measure the model prediction output The difference between the true label y(i) .
最后,使用随机梯度下降优化算法,每次迭代选择一个样本(x(i),y(i)),计算目标函数在当前参数θ(t)处对选择的样本的梯度使用梯度下降更新规则,更新参数向量:Finally, using the stochastic gradient descent optimization algorithm, a sample (x(i) , y(i) ) is selected at each iteration and the objective function is calculated. The gradient of the selected sample at the current parameter θ(t) Using the gradient descent update rule, update the parameter vector:
其中μ是学习率,控制每次迭代中参数更新的补偿。重复迭代直到满足梯度的大小小于10-4,认为模型已经收敛,停止训练。Where μ is the learning rate, which controls the compensation of parameter update in each iteration. Repeat the iteration until the gradient is less than 10-4 , then the model is considered to have converged and training is stopped.
步骤3-3:预奖惩机制Step 3-3: Pre-reward and punishment mechanism
在本方法中,设计的奖惩函数旨在考虑车辆节点的贡献度和信任度,并根据预测的消息事件真实性进行调整。In this method, the designed reward and punishment function aims to take into account the contribution and trust of the vehicle node and is adjusted according to the authenticity of the predicted message event.
其中,和δ是权重系数,用于调整不同因素的重要性。in, and δ are weight coefficients used to adjust the importance of different factors.
Ci是车辆的贡献度;Ti是车辆的全局信任;Confidence(x)是模型对消息真实性预测的置信度;是模型预测的消息事件的真实性;theshold是消息事件真实性的阈值;Sig(x)是sigmoid函数,将x映射到(0,1)范围内。Ci is the contribution of the vehicle;Ti is the global trust of the vehicle; Confidence(x) is the confidence of the model in predicting the authenticity of the message; is the authenticity of the message event predicted by the model; theshold is the threshold of the authenticity of the message event; Sig(x) is the sigmoid function, which maps x to the range of (0,1).
置信度是模型对消息真实性预测的预测概率分布的熵的负值。当熵值越低时,表示模型对预测结果的置信度越高;当熵值越高时,表示模型对预测结果的置信度越低。Confidence is the negative value of the entropy of the predicted probability distribution of the model's prediction of the authenticity of the message. When the entropy value is lower, it means that the model has a higher confidence in the prediction result; when the entropy value is higher, it means that the model has a lower confidence in the prediction result.
通过本方法的设计可以更精细地调节奖励和惩罚,以更有效地激励车辆传输消息行为的良好表现和惩罚不良行为。The design of this method allows for more fine-tuned adjustments of rewards and penalties to more effectively incentivize good performance in vehicle message transmission behavior and punish bad behavior.
进一步,所述步骤4)中,设计一种基于预奖惩和信任共识机制,旨在提高车联网系统的容错性和性能,以确保在存在最多f个恶意节点的情况下系统依然能够达成一致。Furthermore, in step 4), a pre-reward and punishment and trust consensus mechanism is designed to improve the fault tolerance and performance of the Internet of Vehicles system to ensure that the system can still reach a consensus in the presence of a maximum of f malicious nodes.
步骤4-1:信任识别与角色划分:Step 4-1: Trust identification and role division:
根据车辆节点的全局信任与预奖惩,识别出共识参与者和候选参与者。Based on the global trust and pre-reward and punishment of vehicle nodes, consensus participants and candidate participants are identified.
共识参与者数量为总节点数的1/3以上,并且大于2f+1,其中f是故障节点和恶意节点的总数量,剩余的节点为候选参与者。恶意节点不参与共识。具体为:全局信任+奖/-惩罚,从大到小排序,选择排序1/3以上,并且大于2f+1的车辆节点为共识参与者。The number of consensus participants is more than 1/3 of the total number of nodes and greater than 2f+1, where f is the total number of faulty nodes and malicious nodes, and the remaining nodes are candidate participants. Malicious nodes do not participate in consensus. Specifically: global trust + reward/- penalty, sort from large to small, select more than 1/3 of the sorting and greater than 2f+1 vehicle nodes as consensus participants.
步骤4-2:领导者选择:Step 4-2: Leader Selection:
从共识参与者中选择具有最高信任且预奖励的车辆节点作为领导者,其次选择第二高信任的节点作为备选领导者。若领导者受到攻击,则备选领导者的车辆节点为领导者。The vehicle node with the highest trust and pre-reward is selected as the leader from the consensus participants, and the node with the second highest trust is selected as the candidate leader. If the leader is attacked, the vehicle node of the candidate leader becomes the leader.
领导者在共识时间内负责广播交通信息,并使用自己的签名对信息进行认证,发送给所有区域内的其他共识参与者节点。如果消息验证成功,则共识参与者车辆节点进入准备阶段;否则,信息将被丢弃。The leader is responsible for broadcasting traffic information within the consensus time, and authenticates the information with its own signature and sends it to other consensus participant nodes in all regions. If the message verification is successful, the consensus participant vehicle node enters the preparation phase; otherwise, the information will be discarded.
步骤4-3:消息验证与响应Step 4-3: Message Verification and Response
共识参与者节点在收到领导者的广播信息后进行公钥验证,确保信息的完整性和消息来源的可信性。如果验证失败,节点将丢弃这些信息,防止信息被篡改或伪造。已验证节点继续验证信息,并将验证结果广播给其他参与者。如果一个节点从至少三分之一的参与者那里收到验证,它就会广播一个提交消息。在收到足够的提交消息后,将向领导者发送回复消息以确认事务。领导者在收到至少三分之一参与者的提交消息后,将交易打包到一个区块中。如果没有收到足够的结果消息,领导层会转移到信任度第二高的节点。这个过程重复进行,直到创建新区块或领导者转移三次。如果三次领导者更迭后仍未达成共识,则放弃当前一轮共识,开始下一轮或回退。After receiving the leader's broadcast information, the consensus participant node performs public key verification to ensure the integrity of the information and the credibility of the source of the message. If the verification fails, the node will discard the information to prevent the information from being tampered with or forged. The verified node continues to verify the information and broadcasts the verification results to other participants. If a node receives verification from at least one-third of the participants, it broadcasts a commit message. After receiving enough commit messages, a reply message will be sent to the leader to confirm the transaction. After receiving the commit messages from at least one-third of the participants, the leader will package the transaction into a block. If not enough result messages are received, the leadership will be transferred to the second most trusted node. This process is repeated until a new block is created or the leader is transferred three times. If consensus is not reached after three leader changes, the current round of consensus is abandoned and the next round or rollback is started.
步骤4-4:信任与奖惩更新Step 4-4: Trust and Reward and Punishment Update
领导者节点在共识完成并产生区块后,更新自身的信任评估。对于共识参与节点,根据其表现和对交通信息的处理结果,动态调整其信任值。同时依据预奖惩机制对车辆节点进行奖励或者惩罚。全局信任+奖/-惩罚=新的全局信任。After consensus is completed and blocks are generated, the leader node updates its trust evaluation. For consensus participating nodes, their trust values are dynamically adjusted based on their performance and the results of processing traffic information. At the same time, vehicle nodes are rewarded or punished based on the pre-reward and punishment mechanism. Global trust + reward/- punishment = new global trust.
有益效果:本发明的基于区块链的车联网系统中预奖惩机制的信任管理方法,首先,通过构建综合考虑初始化信任、本地信任与全局信任的车辆信任评价体系,能够更准确地评估车辆节点的信任水平,提高了系统对车辆行为的理解和预测能力。其次,基于CNNs模型预测消息真实性的预奖惩机制可以有效地识别和惩罚恶意车辆节点的行为,降低了恶意攻击的风险,提高了系统的安全性和稳定性。最后,设计基于预奖惩和信任的共识机制能够提高系统的容错性和性能,确保在存在恶意节点的情况下依然能够达成一致,从而保障了交通信息的可靠传递和共享。综合而言,该发明为车联网系统的安全、可信和高效运行提供了重要的技术保障。Beneficial effects: The trust management method of the pre-reward and punishment mechanism in the blockchain-based Internet of Vehicles system of the present invention, firstly, by constructing a vehicle trust evaluation system that comprehensively considers initialization trust, local trust and global trust, can more accurately evaluate the trust level of vehicle nodes, thereby improving the system's understanding and prediction capabilities of vehicle behavior. Secondly, the pre-reward and punishment mechanism based on the CNNs model to predict the authenticity of messages can effectively identify and punish the behavior of malicious vehicle nodes, reduce the risk of malicious attacks, and improve the security and stability of the system. Finally, the design of a consensus mechanism based on pre-reward and punishment and trust can improve the fault tolerance and performance of the system, ensuring that consensus can still be reached in the presence of malicious nodes, thereby ensuring the reliable transmission and sharing of traffic information. In summary, this invention provides important technical guarantees for the safe, reliable and efficient operation of the Internet of Vehicles system.
本发明旨在解决基于区块链的车联网系统中存在的信任管理不足和共识机制不完善的问题。针对车联网应用中的低延迟要求和默认安全性的节点,容易遭受恶意攻击的问题,本文提出了一种基于预奖惩机制的信任管理方法。通过此方法,能够解决车辆信任管理不足、信息可靠性问题,并通过设计基于预奖惩和信任的共识机制来解决共识不完善的问题。因此,本发明旨在设计一种适用于基于区块链的车联网架构下的信任管理方法,从而提高车联网系统的安全性、稳定性和可靠性。The present invention aims to solve the problems of insufficient trust management and imperfect consensus mechanism in the Internet of Vehicles system based on blockchain. In view of the problem that nodes with low latency requirements and default security in Internet of Vehicles applications are vulnerable to malicious attacks, this paper proposes a trust management method based on a pre-reward and punishment mechanism. Through this method, the problems of insufficient vehicle trust management and information reliability can be solved, and the problem of imperfect consensus can be solved by designing a consensus mechanism based on pre-reward and punishment and trust. Therefore, the present invention aims to design a trust management method suitable for the Internet of Vehicles architecture based on blockchain, so as to improve the security, stability and reliability of the Internet of Vehicles system.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1基于区块链的车联网信任管理模型。Figure 1. Internet of Vehicles trust management model based on blockchain.
图2基于CNNs模型预测消息真实性的预奖惩机制流程图。Figure 2 Flowchart of the pre-reward and punishment mechanism based on the CNNs model to predict the authenticity of messages.
图3基于预奖励和信任的共识机制流程图。Figure 3 Flowchart of the consensus mechanism based on pre-reward and trust.
具体实施方式DETAILED DESCRIPTION
下面将结合说明书附图对本发明的技术方法做进一步的详细说明The technical method of the present invention will be further described in detail below in conjunction with the accompanying drawings.
如图(1)所示,建立基于区块链的车联网信任管理模型。其模型主要包括车辆(Vehicle)、路边单元节点(RSU)以及可信认证机构(TA)。As shown in Figure (1), a blockchain-based Internet of Vehicles trust management model is established. The model mainly includes vehicles, roadside unit nodes (RSU) and trusted certification authorities (TA).
(1)车辆(Vehicle):在信任管理系统中,车辆不仅提供道路事件信息、交通条件、驾驶安全和地形服务等数据给其他车辆节点,还根据其他车辆节点的初始化信任和本地信任建立信任关系,并将这些数据上传至路边单元。作为领导者节点的车辆负责产生新的区块并上传至路边单元,而共识参与车辆节点则与其他车辆共同协作,验证和确认交通信息的有效性。这一过程中,车辆节点通过相互合作和信任建立,共同维护着整个车联网系统的安全稳定运行。(1) Vehicle: In the trust management system, vehicles not only provide data such as road event information, traffic conditions, driving safety, and terrain services to other vehicle nodes, but also establish trust relationships based on the initial trust and local trust of other vehicle nodes, and upload these data to the roadside unit. The vehicle as the leader node is responsible for generating new blocks and uploading them to the roadside unit, while the consensus participating vehicle nodes work together with other vehicles to verify and confirm the validity of traffic information. In this process, vehicle nodes jointly maintain the safe and stable operation of the entire Internet of Vehicles system through mutual cooperation and trust establishment.
(2)路边单元节点(RSU):RSU在车联网信任管理系统中扮演着至关重要的角色。首先,它根据车辆节点上传的初始化信任和本地信任数据,计算出全局信任,并向区域内的车辆进行全局信任广播,从而建立车辆之间的信任关系网络。其次,RSU部署基于CNNs模型的预测车辆信息准确性和预惩罚机制,以提高车辆信息传输的可信度和准确性,进一步保障系统的安全性和稳定性。最后,作为数据的中转和存储节点,RSU负责接收来自车辆节点的区块数据,并进行中转和存储,为后续的数据处理和分析提供了支持。(2) Roadside Unit Node (RSU): RSU plays a vital role in the Internet of Vehicles trust management system. First, it calculates the global trust based on the initial trust and local trust data uploaded by the vehicle node, and broadcasts the global trust to the vehicles in the area, thereby establishing a trust relationship network between vehicles. Secondly, RSU deploys the CNNs model-based prediction vehicle information accuracy and pre-punishment mechanism to improve the credibility and accuracy of vehicle information transmission, and further ensure the security and stability of the system. Finally, as a data transfer and storage node, RSU is responsible for receiving block data from vehicle nodes, transferring and storing it, and providing support for subsequent data processing and analysis.
(3)可信认证机构(TA):可信认证机构(TA)承担着对车辆节点进行身份验证和信任建立的重要职责。通过验证车辆节点的身份信息,并颁发数字证书等凭证,TA确保只有合法的车辆节点才能参与到车联网系统中,并建立车辆节点之间的信任关系。在车辆节点注册阶段,TA生成初始化信任,在一定的周期或者违规事件发生后,对车辆的注册信息进行审核。审核完成后,TA对车辆的初始化信任进行更新赋值,并通过区块链广播,将更新后的信息发送至路边单元,以确保车辆节点的合法性和信任度。TA的作用不仅在于确认车辆身份的真实性,还在于维护车辆节点之间的信任网络,为系统的安全性和稳定性提供了可靠保障。(3) Trusted Certification Authority (TA): The Trusted Certification Authority (TA) has the important responsibility of authenticating and establishing trust for vehicle nodes. By verifying the identity information of vehicle nodes and issuing digital certificates and other credentials, TA ensures that only legitimate vehicle nodes can participate in the Internet of Vehicles system and establishes a trust relationship between vehicle nodes. During the vehicle node registration phase, TA generates initial trust and reviews the vehicle registration information after a certain period or after a violation occurs. After the review is completed, TA updates the initial trust of the vehicle and sends the updated information to the roadside unit through blockchain broadcast to ensure the legitimacy and trustworthiness of the vehicle node. The role of TA is not only to confirm the authenticity of the vehicle identity, but also to maintain the trust network between vehicle nodes, providing reliable protection for the security and stability of the system.
车联网信任管理系统采用了多种技术和算法,包括可信认证机构(TA)、路边单元(RSU)、预测模型、共识算法和区块链技术等。TA负责对车辆节点进行身份验证和信任建立,RSU负责接收和验证车辆节点上传的交通信息,并执行预测模型和预奖惩机制。系统通过区块链技术实现了交通信息的安全存储和不可篡改性。综合利用这些技术和算法,车联网信任管理系统为智能交通系统的安全、可靠和可信提供了重要支持。The Internet of Vehicles Trust Management System uses a variety of technologies and algorithms, including trusted authentication authorities (TA), roadside units (RSU), prediction models, consensus algorithms, and blockchain technology. TA is responsible for authenticating and establishing trust with vehicle nodes, while RSU is responsible for receiving and verifying traffic information uploaded by vehicle nodes, and executing prediction models and pre-reward and punishment mechanisms. The system uses blockchain technology to achieve secure storage and non-tamperability of traffic information. By combining these technologies and algorithms, the Internet of Vehicles Trust Management System provides important support for the safety, reliability, and trustworthiness of intelligent transportation systems.
步骤2,构建了一种综合考虑初始化信任、本地信任与全局信任的车辆信任评价体系。Step 2, a vehicle trust evaluation system is constructed that comprehensively considers initialization trust, local trust and global trust.
车辆信任的定义:在本发明中使用一个区域来说明信任的定义,假设在这个指定区域内存在多个车辆节点。在这样的区域内,路边单元可以与多个车辆共存,形成用于信任管理和计算的集成系统。Definition of vehicle trust: In this invention, a region is used to illustrate the definition of trust, assuming that there are multiple vehicle nodes in this specified region. In such a region, roadside units can coexist with multiple vehicles to form an integrated system for trust management and calculation.
步骤2-1:初始化信任(Initialize Trust):车辆在注册加入车辆时需要提交的车辆类型、品牌、型号、保险、行驶年限以及违章记录等信息,这些信息组成的信任属性集合(TrustAttribute Matrix-TAM)。Step 2-1: Initialize Trust: The vehicle type, brand, model, insurance, driving age, violation record and other information that the vehicle needs to submit when registering. This information constitutes the Trust Attribute Matrix (TAM).
TAM={ta1,ta2,…,tal,…,tam} (1)TAM={ta1 ,ta2 ,…,tal ,…,tam } (1)
使用表示信任属性tag的可信测量的相关度量函数。use Represents the relevant metric function of the trust attributetag .
所以,车辆的初始化信任值可以表示为:Therefore, the initial trust value of the vehicle can be expressed as:
值得注意的是,车辆管理部门在一定的周期或者违章发生后,对车辆的注册信息进行审核,审核完成后对车辆的初始化信任进行赋值。所以车辆的初始化信任并不是固定的。It is worth noting that the vehicle management department will review the vehicle registration information at a certain period or after a violation occurs, and assign a value to the vehicle's initial trust after the review is completed. Therefore, the vehicle's initial trust is not fixed.
步骤2-2:本地信任(Local Trust):每隔一段时间,车辆将在以区域内产生的信任反馈发送到路边单元,其对一个区域中所有其他设备的本地信任形成信任反馈列表。通过路径传输损失和提供消息的准确性来定义本地信任。Step 2-2: Local Trust: At regular intervals, the vehicle sends the trust feedback generated in the area to the roadside unit, which forms a trust feedback list for the local trust of all other devices in an area. Local trust is defined by path transmission loss and the accuracy of the provided message.
假设区域内车辆节点i对车辆节点j的本地信任定义为LTij。Assume that the local trust of vehicle node i to vehicle node j in the region is defined as LTij .
路径损耗:LPij=L0+10nlog10(dij) (3)Path loss: LPij = L0 + 10nlog10 (dij ) (3)
其中L0表示参考距离为1米时的路径损耗,n表示路径损耗指数,dij表示车辆节点i和车辆节点j之间的距离。WhereL0 represents the path loss when the reference distance is 1 meter, n represents the path loss index, anddij represents the distance between vehicle node i and vehicle node j.
消息准确性:Message accuracy:
其中α,β分别代表车辆节点i收到的车辆节点j的消息是正确和错误的数量。Where α and β represent the number of correct and incorrect messages received by vehicle node i from vehicle node j, respectively.
其中ω1和(1-ω1)表示路径损耗和消息传输准确性的权重,γ和ε是额外的参数,用于调整路径损耗和消息传输准确性的影响。Where ω1 and (1-ω1 ) represent the weights of path loss and message transmission accuracy, and γ and ε are additional parameters used to adjust the impact of path loss and message transmission accuracy.
由于本地信任具有时间敏感性,所以定义车辆节点i对车辆节点j的本地信任关于时间t的集合如果在时间t内未进行信息交互,则使用初始化信任进行赋值。Since local trust is time-sensitive, the set of local trust of vehicle node i to vehicle node j with respect to time t is defined as If no information interaction occurs within time t, the initial trust is used for assignment.
本地信任的更新:Updates to local trust:
其中表示窗口时间内历史的本地信任的平均值。ΔT表示当前本地信任与历史的本地信任的平均值之间的差值,即:in represents the average value of the historical local trust within the window time. ΔT represents the difference between the current local trust and the average value of the historical local trust, that is:
更新方法可以表示如下:The update method can be expressed as follows:
表示窗口时间内第τ个历史的本地信任值。 Represents the local trust value of the τth history within the window time.
步骤2-3:车辆节点i在进入某一路边单元区域内,将上传自身的本地信任列表至所在区域的路边单元。然后路边单元将进行全局信任的计算。为了防止恶意节点之间的串谋,各节点之间的具有一定的节点信任的相似度。Step 2-3: When vehicle node i enters a roadside unit area, it will upload its local trust list to the roadside unit in the area. The roadside unit will then calculate the global trust. In order to prevent collusion between malicious nodes, each node has a certain node trust similarity.
本发明中利用欧式距离来计算车辆节点信任的相似度:In the present invention, Euclidean distance is used to calculate the similarity of vehicle node trust:
全局信任则可以表示为:Global trust can be expressed as:
步骤3,设计了一种基于的预奖惩机制,以应对车联网中车辆提供消息真实性的评估和管理问题,并部署在路边单元。该算法涵盖了奖励和惩罚两个方面,通过综合考虑车辆的历史生成区块的数量、成功验证交易数、信任值等因素,以及消息真实性的预测结果,对车辆的传输消息的行为进行预防性的奖励和惩罚。Step 3, a pre-reward and punishment mechanism based on is designed to deal with the evaluation and management of the authenticity of messages provided by vehicles in the Internet of Vehicles, and is deployed in roadside units. The algorithm covers both reward and punishment. By comprehensively considering factors such as the number of historically generated blocks, the number of successfully verified transactions, the trust value, and the prediction results of the authenticity of the message, the vehicle's behavior of transmitting messages is rewarded and punished in a preventive manner.
步骤3-1:使用车辆节点生成的区块数量和成功验证的交易数来衡量节点的贡献度。Step 3-1: Use the number of blocks generated by the vehicle node and the number of transactions successfully verified to measure the node's contribution.
路边单元记录车辆节点产生的区块数量与成功验证交易数,在区域内达成共识后,上传至路边单元进行存储,并由路边单元在区块链内进行广播。The roadside unit records the number of blocks generated by the vehicle node and the number of successfully verified transactions. After reaching a consensus in the area, it is uploaded to the roadside unit for storage and broadcast by the roadside unit in the blockchain.
节点的贡献度Ci=ρ·Mi+(1-ρ)·Ni(11)Node contribution Ci = ρ·Mi +(1-ρ)·Ni (11)
其中Mi表示车辆节点i生成的区块数量,Ni表示车辆节点i成功验证的交易数,ρ是待定的参数,用于调节区块数量和交易数对节点贡献度的影响。WhereMi represents the number of blocks generated by vehicle node i,Ni represents the number of transactions successfully verified by vehicle node i, and ρ is a parameter to be determined, which is used to adjust the impact of the number of blocks and transactions on the node contribution.
步骤3-2:使用CNNs模型来预测车辆提供的消息真实性。Step 3-2: Use the CNNs model to predict the authenticity of the message provided by the vehicle.
在车辆信任评价体系和节点的贡献度中,我们可以看出,以上这些评价特征参数,都是基于时间的序列。如果想要预测车辆提供的消息的真实性,然后给与预奖惩,从而降低车辆参与恶意行为的意向,提高车联网的安全性。所以,本发明中我们使用基于卷积神经网络(CNNs)的消息事件真实性进行预测。In the vehicle trust evaluation system and the contribution of nodes, we can see that the above evaluation feature parameters are all based on time series. If you want to predict the authenticity of the message provided by the vehicle, and then give pre-rewards and punishments, thereby reducing the vehicle's intention to participate in malicious behavior and improving the security of the Internet of Vehicles. Therefore, in this invention, we use the authenticity of message events based on convolutional neural networks (CNNs) for prediction.
假设有一组消息事件数据集{(x(1),y(1)),(x(2),y(2)),…,(x(m),y(m))},其中x(i)是第i条消息事件的特征,包括消息发送者的初始化信任、本地信任以及全局信任,以及消息签名是否校验成功,y(i)是第i条消息事件的真实标签(0表示虚假,1表示真实)。Suppose there is a set of message event datasets {(x(1) , y(1) ), (x(2) , y(2) ), …, (x(m) , y(m) )}, where x(i) is the feature of the i-th message event, including the initial trust, local trust, and global trust of the message sender, and whether the message signature is verified successfully, and y(i) is the true label of the i-th message event (0 for false and 1 for true).
首先,本方法定义一个基于CNNs的神经网络模型,它可以将消息的特征x(i)映射到真实性预测模型的参数用θ表示。定义CNNs模型的输入层为接受消息事件的特征x(i),CNNs层用于学习序列特征,输出层用于预测消息事件的真实性的概率。First, this method defines a neural network model based on CNNs, which can map the message features x(i) to the authenticity prediction The parameters of the model are represented by θ. The input layer of the CNNs model is defined as the feature x(i) of the received message event, the CNNs layer is used to learn the sequence features, and the output layer is used to predict the probability of the authenticity of the message event.
对于给定的消息事件特征x(i),进行向前传播计算,得到模型的预测输出For a given message event feature x(i) , forward propagation calculation is performed to obtain the model's predicted output
cκ=F(Wκ*x(i)+bκ) (12)cκ =F(Wκ *x(i) +bκ ) (12)
pκ=mean(cκ) (13)pκ =mean(cκ ) (13)
其中Wκ和bκ代表第k个卷积核的权重和偏差,F代表RELU激活函数,Wy和by是全连接层的权值和偏差,softmax是激活函数,k是类别的数量。是预测模型的概率分布。Where Wκ and bκ represent the weight and bias of the kth convolution kernel, F represents the RELU activation function, Wy and byy are the weight and bias of the fully connected layer, softmax is the activation function, and k is the number of categories. is the probability distribution of the prediction model.
其次,方法中定义交叉熵损失函数,用于衡量模型预测输出与真是标签y(i)之间的差异。Secondly, the cross entropy loss function is defined in the method to measure the model prediction output The difference between the true label y(i) .
最后,使用随机梯度下降优化算法,每次迭代选择一个样本(x(i),y(i)),计算目标函数在当前参数θ(t)处对选择的样本的梯度使用梯度下降更新规则,更新参数向量:Finally, using the stochastic gradient descent optimization algorithm, a sample (x(i) , y(i) ) is selected at each iteration and the objective function is calculated. The gradient of the selected sample at the current parameter θ(t) Using the gradient descent update rule, update the parameter vector:
其中μ是学习率,控制每次迭代中参数更新的补偿。重复迭代直到满足梯度的大小小于10-4,认为模型已经收敛,停止训练。Where μ is the learning rate, which controls the compensation of parameter update in each iteration. Repeat the iteration until the gradient is less than 10-4 , then the model is considered to have converged and training is stopped.
步骤3-3:预奖惩机制Step 3-3: Pre-reward and punishment mechanism
在本方法中,我们设计的奖惩函数旨在考虑车辆节点的贡献度和信任度,并根据预测的消息事件真实性进行调整。In this method, the reward and punishment function we designed aims to take into account the contribution and trust of the vehicle node and adjust it according to the authenticity of the predicted message event.
其中,和δ是权重系数,用于调整不同因素的重要性。in, and δ are weight coefficients used to adjust the importance of different factors.
Ci是车辆的贡献度;Ti是车辆的全局信任;Confidence(x)是模型对消息真实性预测的置信度;是模型预测的消息事件的真实性;threshold是消息事件真实性的阈值;Sig(x)是sigmoid函数,将×映射到(0,1)范围内。Ci is the contribution of the vehicle;Ti is the global trust of the vehicle; Confidence(x) is the confidence of the model in predicting the authenticity of the message; is the authenticity of the message event predicted by the model; threshold is the threshold of the authenticity of the message event; Sig(x) is the sigmoid function, which maps × to the range of (0,1).
置信度是模型对消息真实性预测的预测概率分布的熵的负值。当熵值越低时,表示模型对预测结果的置信度越高;当熵值越高时,表示模型对预测结果的置信度越低。Confidence is the negative value of the entropy of the predicted probability distribution of the model's prediction of the authenticity of the message. When the entropy value is lower, it means that the model has a higher confidence in the prediction result; when the entropy value is higher, it means that the model has a lower confidence in the prediction result.
通过本方法的设计可以更精细地调节奖励和惩罚,以更有效地激励车辆传输消息行为的良好表现和惩罚不良行为。The design of this method allows for more fine-tuned adjustments of rewards and penalties to more effectively incentivize good performance in vehicle message transmission behavior and punish bad behavior.
步骤4,设计了一种基于预奖惩和信任共识机制,解决区域内交通信息共享系统中的拜占庭容错问题。它通过在区域内的车辆的节点之间建立信任关系来达成一致,并在存在最多f个恶意节点的情况下保证系统的正确性。Step 4, a pre-reward and trust consensus mechanism is designed to solve the Byzantine fault tolerance problem in the regional traffic information sharing system. It reaches consensus by establishing a trust relationship between the nodes of the vehicles in the region and ensures the correctness of the system in the presence of at most f malicious nodes.
步骤4-1:信任识别与角色划分:Step 4-1: Trust identification and role division:
根据车辆节点的全局信任,识别出共识参与者和候选参与者。Based on the global trust of vehicle nodes, consensus participants and candidate participants are identified.
共识参与者数量为总节点数的1/3以上,并且大于2f+1,其中f是故障节点或恶意节点的数量,剩余的节点为候选参与者。惩罚节点不参与共识。The number of consensus participants is more than 1/3 of the total number of nodes and greater than 2f+1, where f is the number of faulty or malicious nodes, and the remaining nodes are candidate participants. Penalized nodes do not participate in consensus.
步骤4-2:领导者选择:Step 4-2: Leader Selection:
从共识参与者中选择具有最高信任且预奖励的车辆节点作为领导者,其次选择第二高信任的节点作为备选领导者。若领导者受到攻击,则备选领导者的车辆节点为领导者。The vehicle node with the highest trust and pre-reward is selected as the leader from the consensus participants, and the node with the second highest trust is selected as the candidate leader. If the leader is attacked, the vehicle node of the candidate leader becomes the leader.
领导者在共识时间内负责广播交通信息,并使用自己的签名对信息进行签名,发送给所有区域内的其他共识参与者节点。如果消息验证成功,则共识参与者车辆节点进入准备阶段;否则,信息将被丢弃。The leader is responsible for broadcasting traffic information within the consensus time, and signs the information with its own signature and sends it to other consensus participant nodes in all regions. If the message verification is successful, the consensus participant vehicle node enters the preparation phase; otherwise, the information will be discarded.
步骤4-3:消息验证与响应Step 4-3: Message Verification and Response
共识参与者节点在收到领导者的广播信息后进行公钥验证,确保信息的完整性和消息来源的可信性。如果验证失败,节点将丢弃这些信息,防止信息被篡改或伪造。已验证节点继续验证信息,并将验证结果广播给其他参与者。如果一个节点从至少三分之一的参与者那里收到验证,它就会广播一个提交消息。在收到足够的提交消息后,将向领导者发送回复消息以确认事务。领导者在收到至少三分之一参与者的提交消息后,将交易打包到一个区块中。如果没有收到足够的结果消息,领导层会转移到信任度第二高的节点。这个过程重复进行,直到创建新区块或领导者转移三次。如果三次领导者更迭后仍未达成共识,则放弃当前一轮共识,开始下一轮或回退。After receiving the leader's broadcast information, the consensus participant node performs public key verification to ensure the integrity of the information and the credibility of the source of the message. If the verification fails, the node will discard the information to prevent the information from being tampered with or forged. The verified node continues to verify the information and broadcasts the verification results to other participants. If a node receives verification from at least one-third of the participants, it broadcasts a commit message. After receiving enough commit messages, a reply message will be sent to the leader to confirm the transaction. After receiving the commit messages from at least one-third of the participants, the leader will package the transaction into a block. If not enough result messages are received, the leadership will be transferred to the second most trusted node. This process is repeated until a new block is created or the leader is transferred three times. If consensus is not reached after three leader changes, the current round of consensus is abandoned and the next round or rollback is started.
步骤4-4:信任与奖惩更新Step 4-4: Trust and Reward and Punishment Update
领导者节点在共识完成并产生区块后,更新自身的信任评估。对于共识参与节点,根据其表现和对交通信息的处理结果,动态调整其信任值。同时依据预奖惩机制对车辆节点进行奖励或者惩罚。After consensus is reached and blocks are generated, the leader node updates its trust evaluation. For consensus participating nodes, the trust value is dynamically adjusted based on their performance and the results of processing traffic information. At the same time, vehicle nodes are rewarded or punished according to the pre-reward and punishment mechanism.
以上所述仅为本发明在基于区块链的车联网模型下的实施方式,本发明保护范围并不以上述实施方式为限制,但凡本领域普通技术人员根据本发明所揭示内容所作的等效修改和其他修饰变化,皆应纳入权利要求书记载的保护范围。The above is only an implementation method of the present invention under the blockchain-based Internet of Vehicles model. The protection scope of the present invention is not limited to the above implementation method. Any equivalent modifications and other modifications made by ordinary technicians in this field based on the contents disclosed by the present invention should be included in the protection scope recorded in the claims.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410907397.6ACN118890625A (en) | 2024-07-08 | 2024-07-08 | A trust management method for Internet of Vehicles based on blockchain-based pre-reward and punishment mechanism |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410907397.6ACN118890625A (en) | 2024-07-08 | 2024-07-08 | A trust management method for Internet of Vehicles based on blockchain-based pre-reward and punishment mechanism |
| Publication Number | Publication Date |
|---|---|
| CN118890625Atrue CN118890625A (en) | 2024-11-01 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202410907397.6APendingCN118890625A (en) | 2024-07-08 | 2024-07-08 | A trust management method for Internet of Vehicles based on blockchain-based pre-reward and punishment mechanism |
| Country | Link |
|---|---|
| CN (1) | CN118890625A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119160250A (en)* | 2024-11-20 | 2024-12-20 | 广州配天通信技术有限公司 | A rail transit accident monitoring system and method based on wireless communication |
| CN120342632A (en)* | 2025-05-06 | 2025-07-18 | 北京琼海宏信科技有限公司 | An Internet of Things encryption method and system combining distributed trust mechanism |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119160250A (en)* | 2024-11-20 | 2024-12-20 | 广州配天通信技术有限公司 | A rail transit accident monitoring system and method based on wireless communication |
| CN120342632A (en)* | 2025-05-06 | 2025-07-18 | 北京琼海宏信科技有限公司 | An Internet of Things encryption method and system combining distributed trust mechanism |
| Publication | Publication Date | Title |
|---|---|---|
| CN118890625A (en) | A trust management method for Internet of Vehicles based on blockchain-based pre-reward and punishment mechanism | |
| Sun et al. | RC-chain: Reputation-based crowdsourcing blockchain for vehicular networks | |
| US11687562B2 (en) | Apparatus and method for adaptively managing sharded blockchain network based on deep Q network | |
| CN115499129B (en) | Multimode trust cross-link consensus method, system, medium, equipment and terminal | |
| CN111090892A (en) | Block chain consensus method and device based on VRF and threshold signature | |
| CN111935674B (en) | Vehicle networking hierarchical authentication method based on block chain technology | |
| CN111723946A (en) | A federated learning method and device applied to blockchain | |
| CN112990921A (en) | Data processing method and device based on block chain, computer and storage medium | |
| CN113452681B (en) | Internet of vehicles crowd sensing reputation management system and method based on block chain | |
| Wang et al. | Blockchain-based federated learning in mobile edge networks with application in internet of vehicles | |
| Yan et al. | Reputation consensus-based scheme for information sharing in internet of vehicles | |
| Yan et al. | Info-chain: Reputation-based blockchain for secure information sharing in 6G intelligent transportation systems | |
| Zhu et al. | HCSC: A hierarchical certificate service chain based on reputation for VANETs | |
| Alotaibi et al. | PPIoV: A privacy preserving-based framework for IoV-fog environment using federated learning and blockchain | |
| Bai et al. | Blockchain-based Authentication and Proof-of-Reputation Mechanism for Trust Data Sharing in Internet of Vehicles. | |
| Song et al. | Efficient consensus algorithm based on improved DPoS in UAV-assisted mobile edge computing | |
| Diallo et al. | An improved PBFT-based consensus for securing traffic messages in VANETs | |
| CN114745406B (en) | Wide area road condition information sharing system based on alliance chain | |
| Wu et al. | A trusted paradigm of data management for blockchain-enabled Internet of Vehicles in smart cities | |
| CN119273369A (en) | Practical Byzantine fault-tolerant consensus method, device, equipment, medium and product for commodity transactions in blockchain | |
| CN116996521B (en) | Cross-chain interaction system and method of relay committee based on trust evaluation model | |
| CN119090618A (en) | A corporate credit assessment method based on blockchain and federated learning in housing transactions | |
| CN113159743A (en) | Vehicle crowd sensing excitation system and method based on block chain and edge calculation | |
| CN115714649B (en) | Consensus method based on credibility | |
| CN113946829B (en) | Block chain-based Internet of vehicles distributed trust system |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |