为了提高搜索的性能,出现了混合P2P网络搜索方法。在混合P2P网络中,关键的问题在于确定资源的流行程度。针对该问题,该文提出了一种基于Gossip的动态自适应算法(DaHG),通过抛硬币操作估计节点加入和离开P2P网络时所带入和带走的文档副本数;并通过Gossips传递估计值,获得资源的流行程度。仿真结果表明,该算法具有良好的适应性,能够反映P2P网络中节点和资源的动态性,从而选择出正确的资源搜索方法,减少搜索响应时间和提高资源的命中率。
In hybrid Peer-to-Peer (P2P) networks, the decision of whether to use flooding or DHT depends mainly on the popularity of desired data. Previous work either used only local information, or do not consider the dynamic factors of P2P systems. In this paper, an improved algorithm called dynamic adaptive hybrid based on Gossip (DAHG) is presented. In DAHG a P2P ultrapeer tosses a coin when an end node joins or leaves the P2P networks, and uses a gossip-style algorithm to collect global statistics about document popularity. Therefore the dynamics of the resources is taken into consideration by DAHG which it can be used to get the exact popularity of resources in a dynamic P2P network. Simulation shows that DAHG outperforms existing approaches and also scales well.