To improve the efficiency of resource locating in Peer-to-Peer (P2P) networks, and isolate malicious peers, a topology construction method for unstructured P2P networks called DPT was proposed.In DPT, each neighbor of a peer had a changeable TTL (time-to-live), the reliable TTL of each neighbor was changed by its transmitting condition after each interaction,and the transmitting condition of direct forwarding peers of query paths was also recorded.The method designed some structures to store peers’ transmitting information, and proposed algorithms to adjust the topology of P2P networks. Simulations demonstrated that the topology construction method of DPT can isolate malicious peers to the fringe of the network, and improve the efficiency of resource locating, enhancing the quality of service in P2P networks effectively.