4.1. Time Complexity and Space Complexity Analysis
In this section, we compare the complexity of our DLBTM with DTMS [
27], a popular blockchain-based trust management model. DTMS considers message classification and message evaluator for trust value calculation, and the message classification algorithm of DTMS only generates indexes for classified messages, while does not generate a message summary. This results in wasted time and storage space during message evaluation by vehicle nodes in subsequent phases. Therefore, DTMS has higher time complexity in terms of message classification and message evaluator selection compared with our DLBTM.
The comparison of time complexity and space complexity between DTMS and DLBTM message classification algorithms is shown in
Table 5. We count the number of statements executed in the algorithm to do so. There is a ‘while’ loop and a ‘for’ loop in DTMS’s message classification algorithm, and the number of statements executed is quadratic to the data size, and, therefore, the time complexity is
. However, the message classification algorithm of DLBTM has only one ‘for’ loop, therefore, the time complexity is
. Therefore, Algorithm 1 in DLBTM executed faster due to the computation of the lower order. However, the temporary storage space occupied by the two algorithms during operation is the same, and, therefore, the space complexity of both algorithms is
.
The comparison of the time complexity and space complexity of the DTMS and DLBTM message evaluator selection algorithms is shown in
Table 6. There are two ‘for’ loops in DTMS’s message evaluator algorithm selection. The number of statements executed in the loop is quadratic with the increase in data size, so the time complexity is
. However, DLBTM’s message evaluator algorithm proposed in this paper, namely, Algorithm 2, has an
time complexity. This means that the computational complexity required to execute the algorithm in DLBTM is lower than in DTMS. However, the temporary storage space used by the two algorithms during operation is the same, and, therefore, the space complexity of DTMS and DLBTM is both
.
4.2. Simulation Results and Performance Evaluation
We design a virtual traffic environment using Veins and simulate traffic scenes within 2 km of Hangzhou Dianzi University.
Figure 3a shows the situation of roads and streets near Hangzhou Dianzi University, and
Figure 3b shows the simulation map drawn by sumo and OMNET++ based on
Figure 3a. The black vehicle icons on the simulated map in
Figure 3b represent vehicle nodes, the yellow diamond icons represent RSUs, and the large black circles represent the communication range of RSUs. There are 100 or 50 vehicles on this simulated map, which report messages to nearby RSUs at regular intervals, and then proceed with the process in
Figure 2. We set the initial value of the final trust value of the vehicle to 0.5, which means that the newly registered vehicle has a 50% probability of providing satisfactory service to other vehicles, which is easy to formulate using the sigmoid function in logistic regression. We set the system to conduct trust management by RSU every 30 s, and the entire simulation time 160 s, with vehicle nodes reporting messages to RSU at any moment.
Figure 4 and
Figure 5 show the changes in the final trust value caused by malicious behavior by a vehicle node with different probabilities over time when the total number of vehicles during the simulation period is 50 or 100. It can be seen that as a normal node, the final trust value of the vehicle (that is, the probability of providing a satisfactory service) approaches 1. This means that the normal node actively reports the perceived events to the RSU, and the system assigns them a higher trust value based on their positive history behavior since their reported events are accurate and effective. Therefore, the system is more probable to believe the information reported by this vehicle node will be very satisfactory to other vehicle nodes in the next period. Specifically, suppose the vehicle node has a 30% probability of malicious behavior. In that case, the final trust value of it fluctuates between 0 and 0.5, which is quite different from the final trust value of the normal node and is easy to discriminate. If the vehicle node has a 60% probability of malicious behavior, and the final trust value of the vehicle is close to 0, this indicates that the probability of providing a satisfactory service is close to 0. If there is a 90% probability that the vehicle node will commit malicious behaviors, the final trust value of the vehicle node approaches 0 infinitely, indicating that it is difficult to provide satisfactory services to other nodes in the future. It can be seen that the reliability of our DLBTM has been fully verified. Regardless of whether malicious nodes act maliciously with high probability or low probability, or whether traffic is congested or unblocked, our proposed DLBTM model can identify malicious nodes well.
Figure 6a–c shows the changes in the proportion of malicious nodes identified by our DLBTM when the total number of vehicles is 50, that malicious nodes of the vehicle commit malicious behavior with different probabilities, and that there are malicious nodes with different proportions in the system. It can be clearly seen from
Figure 6a, that our DLBTM recognizes more than 80% of malicious nodes in the second stage around 60 s when malicious nodes perform malicious behaviors with a probability of 30%, and the recognition rate is above 90% as time goes by. As shown in
Figure 6b, when malicious nodes commit malicious behaviors with a probability of 60%, at about 30 s in the first stage, the proportion of malicious nodes identified by the proposed system model is above 80%, and the recognition rate reaches 100% over time. As shown in
Figure 6c, when malicious nodes commit malicious behaviors with a 90% probability, the proportion of malicious nodes identified by the proposed system model is above 90% at about 30 s of the first stage, and the recognition rate reaches 100% with time.
Figure 7a–c shows the changes in the proportion of malicious nodes identified by our DLBTM when the total number of vehicles is 100, malicious nodes of the vehicle commit malicious behavior with different probabilities, and there are malicious nodes with different proportions in the system. It can be clearly seen from
Figure 7a, that our DLBTM recognizes more than 90% of malicious nodes in the second stage around 60 s when malicious nodes perform malicious behaviors with a probability of 30%, and the recognition rate approaches 100% as time goes by. As shown in
Figure 7b, when malicious nodes commit malicious behaviors with a probability of 60%, at about 30 s in the first stage, the proportion of malicious nodes identified by the proposed system model is above 95%, and the recognition rate reaches 100% over time. As shown in
Figure 7c, when malicious nodes commit malicious behaviors with a 90% probability, the proportion of malicious nodes identified by the proposed system model is above 95% at about 30 s of the first stage, and the recognition rate reaches 100% with time.
The comparison between
Figure 6 and
Figure 7 shows the effect of changes in the probability of malicious behavior and the number of vehicles. When the probability of malicious behavior among nodes in the system is 30% and the total number of vehicles is 50, our DLBTM system identifies malicious nodes at a rate of over 92% over time. When the total number of vehicles is 100, our DLBTM system identifies malicious nodes at a rate of over 97% over time. When the probability of malicious behavior among nodes in the system is 60% and the total number of vehicles is 50, our DLBTM system’s recognition rate of malicious nodes reaches 100% over time. When the total number of vehicles is 100, our DLBTM system’s recognition rate of malicious nodes reaches 100% over time. When the probability of malicious behavior among nodes in the system is 90% and the total number of vehicles is 50, our DLBTM system’s recognition rate of malicious nodes reaches 100% over time. When the total number of vehicles is 100, our DLBTM system’s recognition rate of malicious nodes reaches 100% over time. In short, when the probability of malicious behavior is constant, the increase or decrease in the number of vehicles has little impact on the proportion of DLBTM systems identifying malicious nodes.
In summary, regardless of whether the proportion of malicious nodes in the system is 10%, 20%, 30%, or the total number of vehicles is 50 or 100, our DLBTM can accurately identify the proportion of malicious nodes with a probability more than 90%.
We compared our DLBTM with the BTCPS model [
28], MWSL method [
13], and TSL method [
29]. We consider the impact of the probability
of malicious behavior by a malicious vehicle. When
= 30%,
= 50%, and
= 80%, we observe the change in the final trust value of a malicious vehicle. As shown in
Figure 8, when
= 30%, both DLBTM and BTCPS can reduce the trust value of the vehicle, but BTCPS does not reduce the trust value as quickly as DLBTM, which means it cannot quickly identify malicious nodes. When
= 50%, both DLBTM and BTCPS can reduce the trust value of the vehicle, but DLBTM recognizes malicious nodes significantly faster than BTCPS. When
= 80%, all four methods can reduce the trust value of the vehicle, but DLBTM is significantly faster than the other three methods in identifying malicious nodes.
In the trust management mechanism of the IoV based on a single blockchain, vehicle nodes in the system generate a large number of transactions, and vehicle nodes process and store a large amount of transaction information. Therefore, vehicle nodes may encounter hardware bottlenecks. However, in a double-layer blockchain, due to the stronger storage and computing power of RSUs compared to vehicles, we store data on RSUs, reducing the burden on vehicles. At the same time, our algorithm uses message summarization to reduce the storage space of RSU data, effectively improving the effectiveness of data storage and sharing between vehicles and RSUs, thereby indirectly improving the throughput of the system.