The document presents UP2S2, an ontology-based routing mechanism for large-scale unstructured peer-to-peer (P2P) publish/subscribe systems that improves event routing by constructing subscription probability trees and selecting optimal paths for event dissemination. The system divides the network into multiple subnets based on subscription deviation to enhance network efficiency and reduce bottlenecks typically found in structured P2P systems. Simulation results indicate that UP2S2 achieves faster and more accurate event routing compared to existing methods.