## 4 Application of Blockchain Technology in the Internet of Vehicles
### POS Consensus Algorithm Improvement
The first indicator is the false alarm rate (_FAR_), detecting the number of messages identified as false using the \(N_{i}\) representative, and detecting the number of false messages identified as true information using the \(N_{j}\) representative, from which _FAR_ can be obtained:

\[\text{Stake}_{R-1}=\sum_{x=1}^{J}Egy_{x}\times(1+a\%)^{J}\]6

The second indicator is the missed detection rate (_MDR_), where the number of detected true messages identified as false messages is replaced by \(N_{miss}\), while the number of detected messages identified as true messages is \(N\). From this, the _MDR_ is obtained:

\[\text{Stake}_{R-1}=\sum_{x=1}^{J}Egy_{x}\times(1+a\%)^{J}\]7

Simulation experiments were carried out to verify the results of the malicious node identification algorithm of the Internet of Vehicles, and _FAR_ and _MDR_ were used to evaluate the results of the Internet of Vehicles' trust evaluation algorithm. The independent variable taken by the experiment is the proportion of malicious vehicle nodes in all vehicle networks,and the results of the malicious vehicle node identification algorithm are evaluated for low-traffic-density and high-traffic-density conditions. Whether the traffic density is low or high, the malicious node identification algorithm is less than 20%, and the _FAR_ decreases as the percentage increases. At the same time, a significant trend towards decreased _MDR_ also occurs with increasing percentage. Details are shown below. In the presence of a false information attack and black hole attack, the anti-attack performance of the malicious message detection algorithm is analyzed using several details: delivery rate (_Dr_), average end-to-end delay (_Ad_), and network overhead (_Or_). First, _Dr_ is calculated. The actual meaning of _Dr_ is the ratio of the number of messages that are successfully sent to the target node or the designated location to the total number of messages that are generated and sent by the source vehicle nodes in the network. The calculation formula is as follows:

\[\text{Stake}_{R-1}=\sum_{x=1}^{J}Egy_{x}\times(1+a\%)^{J}\]8

In the formula, the total number of messages generated and sent by the source vehicle node is \(N_{l}\), the number of messages successfully sent to the target vehicle or designated location is \(N_{a}\), and there is a proportional relationship between the communication quality between the nodes and _Dr_. In other words, the higher the _Dr_, the higher the communication quality, meaning that the overall network performance is very good. If the _Dr_ is lower, then the communication quality is lower, meaning that the overall network performance is very poor. Second, _Ad_ is calculated. _Ad_ is a very important indicator when evaluating the anti-attack performance of malicious message detection algorithms; by using the Ad evaluation method, how the additional overhead of security measures increases latency in the routing process can be described. The actual meaning of _Ad_ is the average time taken to pass a message between two nodes

\[\text{Stake}_{R-1}=\sum_{x=1}^{J}Egy_{x}\times(1+a\%)^{J}\]9

In this formula, the total number of sent messages is recorded as \(N\); the total time taken to send each message during \(N\) messages is \(\sum\limits_{n-1}^{N}T_{n}\). After analysis, an inverse relationship was found between _Ad_ and the overall simulation performance; that is, if _Ad_ is shorter, the corresponding performance is better, and if _Ad_ is longer, the corresponding performance is worse. Finally, _Or_ is calculated. _Or_ is another very important indicator when evaluating the anti-attack performance of the malicious message detection algorithm. This refers to the ratio of the total number of nodes involved showing the target node the total number of nodes involved in forwarding the message to the nodes required for transmission.