Patent ID: 8762461

Claim:
A method for searching an active peer in a P2P streaming media system, wherein, receiving, by a tracker, the number of continuous subblocks buffered by a selectable peer and a sequence number of the first subblock of the continuous subblocks; the method for searching an active peer comprises: receiving, by the tracker, a Peerlist request sent by a request peer, selecting, by the tracker, a plurality of selectable peers as candidate peers according to a sequence number of a starting subblock of data to be downloaded by the request peer which is contained in the Peerlist request, wherein, the starting subblock of the data to be downloaded is buffered in the candidate peers; and returning, by the tracker, peer information of the candidate peers to the request peer via a Peerlist, and instructing the request peer to determine at least one candidate peer as an active peer according to the peer information in the Peerlist, wherein after selecting by the tracker the candidate peers and before returning the Peerlist to the request peer, the method further comprises: when the number of the candidate peers is larger than a maximum value, the tracker reselects the candidate peers, the number of candidate peers reselected is no larger than the maximum value; or when the number of the candidate peers is larger than the maximum value, the tracker orders the candidate peers from large to small according to the number of continuous subblocks buffered, and reselects the first N candidate peers, wherein N is a positive integer and is no larger than the maximum value; or when the number of the candidate peers is larger than the maximum value, the tracker orders the candidate peers from large to small according to the total number of subblocks of the data to be downloaded, and reselects the first M candidate peers, wherein M is a positive integer and is no larger than the maximum value; and wherein the tracker returns the Peerlist to the request peer comprises: the tracker returns peer information of the candidate peers reselected to the request peer via a Peerlist.