# Research on Secure Community Opportunity Network Based on Trust Model
## 4 Performance Evaluation
Consequently, the average transmission delays witnessed substantial reductions in the Epdic, BubbleRap, and SCTM algorithms. Notably, owing to community division, the average transmission delays in the BubbleRap and SCTM algorithms exhibit further decline, showcasing a clear and continuous descent. Conversely, in the Epdic algorithm, the surge in network message forwarding leads to a proliferation of message copies, consequently resulting in an initial decline followed by an eventual increase in transmission delay. Meanwhile, the average  
Figure 8: Deliveryratio and node numbers. transmission delay observed in the Direct and Spray algorithms is contingent upon the encounter probability between the message-carrying node and the destination node, with minimal impact from the network size. As depicted in Figure 10, the Direct and Spray algorithms maintain a fixed number of message copies, with the Spray algorithm halting message forwarding upon generating a single copy. Consequently, the number of nodes in the network profoundly impacts these algorithms, albeit with minimal effect. In contrast, the flooding forwarding approach adopted by the Epdic and BubbleRap algorithms leads to an upsurge in message forwarding with increasing node count, resulting in network congestion and elevated routing overhead. Conversely, the SCTM algorithm demonstrates a proportional increase in message forwarding as the number of nodes rises. However, owing to community division and meticulous selection of next-hop relay nodes, the SCTM algorithm experiences only marginal increments in routing overhead. To evaluate the resilience of opportunistic routing algorithms against malicious node attacks, this study introduces a subset of specialized nodes within the simulation frame  
Figure 10: Overhead and node numbers. \[overhead=\frac{message_{rel}-message_{del}}{message_{del}} \tag{14}\]0 Latency_avg and node numbers. work, designed to mimic a black hole attack by solely accepting messages without further dissemination. A comparative analysis was undertaken by establishing a baseline of 500 operational nodes within the opportunistic network, followed by a systematic variation in the quantity of malicious nodes introduced. This approach facilitates a comprehensive understanding of the algorithm's performance under the duress of adversarial conditions. As can be seen from Figure 11, the Direct algorithm, which exclusively delivers messages to the intended destination node, exhibits minimal susceptibility to the influence of malicious nodes. In contrast, the Epdic and BubbleRap algorithms, employing a flooding forwarding strategy, experience a nuanced impact from malicious activities. While the deliberate loss of packets by malicious nodes can inadvertently reduce network congestion by diminishing the volume of redundant messages, it concurrently risks the malicious discarding of messages destined for successful delivery, resulting in negligible fluctuations in the transmission success rate. The Spray algorithm, predicated on the random selection of next-hop relay nodes, encounters a marked decrease in the transmission success rate when malicious nodes intercept and halt the propagation of message copies within the opportunistic network. Conversely, the SCTM algorithm, by prioritizing nodes within a secure community for next-hop selection, effectively insulates against malicious nodes, which are precluded from the secure community due to their detrimental behaviors, thereby maintaining a stable transmission success rate. Simulation outcomes reveal that the SCTM algorithm possesses the capability to detect and exclude malicious nodes from the opportunistic network, offering robust defense against malevolent attacks. Notably, even with the presence of 150 malicious nodes, the SCTM algorithm achieves the highest transmission success rate of 73%, underscoring its effectiveness in safeguarding communication integrity within opportunistic networks.