# A Hybrid Routing Protocol Based on Naive Bayes and Improved Particle Swarm Optimization Algorithms
## 3 Network Model and Assumptions
### Cluster Head Selection Based on a Naive Bayes Classifier
At about 600 rounds, ECRRS has the largest energy efficiency value, DUCF and HAR-NP are in the middle, and FC-RBAT has the smallest energy efficiency value. As is shown in the figure, all four algorithms have a good energy utilization rate before 200 rounds. After 200 rounds, as the number of dead nodes increases, the network structure is affected, and the energy utilization rate decreases. After 600 rounds, about 70% of the nodes die, the overall network structure is damaged, and the energy consumption efficiency curve is in a divergent state. The variation in the energy consumption of network nodes is an important index for measuring the energy consumption balance performance of routing algorithms. As can be seen in Figure 6, the death of network nodes has a great impact on the energy consumption distribution of the network. Therefore, we compared the energy consumption variance of network nodes of the four algorithms from round 0 to round 200 as shown in \[\mathbf{Y}^{(i)}=\left\{re^{(i)},ds^{(i)},de^{(i)},dc^{(i)},Lqc^{(i)},Df^{(i)}\right\} \tag{8}\]2 The energy consumption variance of the HRA-NP algorithm is the smallest, followed by ECRRS. The energy consumption variance of the DUCF and FC-RBAT algorithms is the largest, indicating that the average energy consumption difference of each round for the HRA-NP algorithm is small. In the HRA-NP algorithm, cluster heads are selected based on the distance from the node to the BS, the node degree, the average distance in the cluster, and the average link quality in the cluster. At the same time, the energy consumption cost of multi-hop paths between cluster heads is estimated to ensure that the algorithm has good energy consumption balance performance. \[\mathbf{Y}^{(i)}=\left\{re^{(i)},ds^{(i)},de^{(i)},dc^{(i)},Lqc^{(i)},Df^{(i)}\right\} \tag{8}\]3 Average energy consumption of network nodes. ### Average Number of Hops and Network Data Throughput

The average number of hops in the network is shown in \[\mathbf{Y}^{(i)}=\left\{re^{(i)},ds^{(i)},de^{(i)},dc^{(i)},Lqc^{(i)},Df^{(i)}\right\} \tag{8}\]4 From the average and maximum numbers of hops, the order (from large to small) of the four algorithms is DUCF, ECRRS, FC-RBAT, and HRA-NP, and the average number of hops is 4.5, 4.0, 2.8, and 2.3, respectively. In terms of the minimum number of hops, the order (from large to small) is DUCF, ECRRS, HRA-NP, and FC-RBAT. On the whole, the DUCF algorithm has the highest average number of hops, HRA-NP has the lowest average number of hops, and the ECRRS and FC-RBAT algorithms are in the middle, with the FC-RBAT algorithm having a slightly larger number of average hopes than the ECRRS algorithm. Network transmission data is also an important performance parameter in routing algorithms. Network transmission data is the total number of bits transmitted per round. In Figure 8, it can be seen that in the early stage of the network's operation, the network transmission data and stability are around \(1\times 10^{6}\) bits. HAR-NP has the lowest value, followed by ECRRS. The DUCF and FC-RBAT algorithms have slightly higher values. As

\[\mathbf{Y}^{(i)}=\left\{re^{(i)},ds^{(i)},de^{(i)},dc^{(i)},Lqc^{(i)},Df^{(i)}\right\} \tag{8}\]5 Comparison of network energy efficiency. \[\mathbf{Y}^{(i)}=\left\{re^{(i)},ds^{(i)},de^{(i)},dc^{(i)},Lqc^{(i)},Df^{(i)}\right\} \tag{8}\]6 Comparison of the energy consumption variance of network nodes. the amount of surviving node data in the network decreases, the total network data energy shows an overall downward trend, which is basically consistent with the decreasing trend of the node data. Moreover, during rounds 260 to 700, the network transmission data curve of the HAR-NP algorithm is closer to those of the other three algorithms than to the survival node curve. This is because, when using the Naive Bayes method for clustering, the degree of data fusion in the cluster is taken as one of the weights. Through data fusion in the cluster, the amount of data transmitted and energy consumed is effectively reduced.