## 4 Application of Blockchain Technology in the Internet of Vehicles
### POS Consensus Algorithm Improvement
``` Input:\(\text{Egy}_{0}\), k, \(\text{The}_{\text{Egy}}\), \(\Delta\text{T}_{\text{POS}}\), a, J, Pr; Output: commiter peer;
1: RSU sends a request to CA:
2: BCCA initializes an election for selecting committer peer;
3:for all RSU participating in the election do
4:\(R_{\text{l}}\) submITS \(\Delta Egy_{\text{consume-l}}=\frac{k}{2(k+1)}Egy_{\text{$o-l$}}\) as deposit;
5: Calculate \(Egy_{\text{e-l}}=Egy_{\text{$o-l$}}-\Delta Egy_{\text{consume-l}}\);
6:if\(Egy_{\text{e-l}}<\text{$\text{$\text{$\text{$\text{$\text{$\text{\[Egy_{n-l}=Egy_{0-l}-\Delta Egy_{0-l}\]0\text{\[Egy_{n-l}=Egy_{0-l}-\Delta Egy_{0-l}\]1\text{\[Egy_{n-l}=Egy_{0-l}-\Delta Egy_{0-l}\]2\text{\[Egy_{n-l}=Egy_{0-l}-\Delta Egy_{0-l}\]3\text{\[Egy_{n-l}=Egy_{0-l}-\Delta Egy_{0-l}\]4\text{\[Egy_{n-l}=Egy_{0-l}-\Delta Egy_{0-l}\]5}}}\[Egy_{n-l}=Egy_{0-l}-\Delta Egy_{0-l}\]6}{\[Egy_{n-l}=Egy_{0-l}-\Delta Egy_{0-l}\]7}{\[Egy_{n-l}=Egy_{0-l}-\Delta Egy_{0-l}\]8}{\[Egy_{n-l}=Egy_{0-l}-\Delta Egy_{0-l}\]9}{\[\text{Stake}_{R-1}=\sum_{x=1}^{J}Egy_{x}\times(1+a\%)^{J}\]0}\[\text{Stake}_{R-1}=\sum_{x=1}^{J}Egy_{x}\times(1+a\%)^{J}\]1}}\[\text{Stake}_{R-1}=\sum_{x=1}^{J}Egy_{x}\times(1+a\%)^{J}\]2{\[\text{Stake}_{R-1}=\sum_{x=1}^{J}Egy_{x}\times(1+a\%)^{J}\]3{\[\text{Stake}_{R-1}=\sum_{x=1}^{J}Egy_{x}\times(1+a\%)^{J}\]4}}\[\text{Stake}_{R-1}=\sum_{x=1}^{J}Egy_{x}\times(1+a\%)^{J}\]5



## 5 Results Analysis of the Malicious Node Identification Algorithm

### Simulation Software Setting

The experimental simulation verifies the performance of the false message detection mechanism on the ONE simulation platform. ONE is a discrete-time engine open-source simulation platform written in the Java language. It is a simulation software that is mainly used to design and evaluate the routing mechanisms of data forwarding and message communication in the Internet of Vehicles. The ONE simulation platform contains a variety of simulation modules, which will be updated during each simulation process to realize the whole simulation function. The main functions of the ONE simulation platform include: mobile modeling of nodes, sending, receiving and processing routing messages, node communication, visual representation of results, etc. This platform has various different communication protocols to simulate the process of message transmission and generate the trajectory information during the transmission process. All ONE's components are independent of each other. ONE simulates the network simulation environment to test and optimize the security scheme performance. In the simulation experiments, a motion model based on the shortest path map was used in the ONE to simulate vehicle behavior on the road. The model initially places nodes in random locations, but selects a specific destination for all nodes in the map. Vehicle nodes are not arbitrary and include various types: emergency vehicles (police cars and ambulances), vehicles with fixed lines (buses and trans), and randomly distributed vehicles (private cars and taxis). There are two scenarios in the simulation experiments: low flow density and high flow density. Each simulation was run 20 times on average. In the experiment, the number of malicious vehicles that sent forged or forged messages in VANET ranged from 10% to 45%. When malicious vehicles exceed 45%, VANET's efficiency will dramatically decline, and it will be unable to provide any reliable services. * Suppose an attacker cannot attack more than half the vehicles on the network. * Authorities and the RSU are equipped with customized hardware with high computing abilities. * Certification bodies and RSU are equipped with custom hardware, with a much higher computing power than general computers. * As long as the public or private keys are not stolen, encryption technology can be used to provide secure communication channels between entities. ### Evaluating Indicator

According to the requirements of the Internet of Vehicle malicious node identification algorithm, we selected the following indicators to verify the performance and results of the algorithm.