Background technology
The P2P video request program is that the class that the Internet rises is recently used, its main feature is that data are downloaded the mode by P2P, make the user can onlinely watch video frequency program, and need not to download entire media file, and compare with the network video-on-demand of traditional client-server pattern, relaxed requirement greatly the network bandwidth.The P2P video request program makes user's experience as the legacy network video request program, can arbitrarily watch, suspends and drag displaying video programs.
The network of all kinds of P2P video on-demand systems constitutes and may have nothing in common with each other, but in general, they all comprise index server, seed server and user usually.Wherein, index server is responsible for safeguarding the index of seed, i.e. the mapping relations of resource in the network and online user and seed server, and in some special network, this index function does not rely on server, can be finished by some user distribution formulas yet; The in store complete order video content of seed server is that user's program request is stablized and reliable data source, and its content is by the issue down of Service Operation side's line; The user is meant the online user in the current VOD system, and they are the participant of P2P transfer of data just, and also is other user's data supplier.
The main interactive mode of P2P video on-demand system is as follows; The user can be at first to index server request seed information when carrying out the program request operation, and after obtaining seed information, the user is to relevant seed (comprising seed server and some online users) this video content of dispatch request.In this process, this user also adds the P2P network, can provide service for other need the user of video content.
Nowadays the user is faced with a large amount of network media resources, and the especially Internet video short-movie of quantity rapid expanding has greatly enriched the potential source of program.But existing P 2P video-on-demand applications lacks the effective organization and management to the personalization of various types of programs information only for the user provides single video on-demand function.For example, in using the P2P video request-program process, some interested video segments are seen by regular meeting during the user, and hope can be covered up, and appreciate in order to watch or be shared with the good friend once more in the future.But the mechanism that the current resource that does not have this class P2P video request program is shared.
Summary of the invention
In view of this, the embodiment of the invention proposes to realize in a kind of P2P video request program the method for program collection, comprises the steps:
Indication according to collection P2P video frequency request program, the characteristic information of the definite program that will collect, foundation comprises the collection item of described programs feature information, described programs feature information comprises the initial moment of program identification, institute's favorites section and the finish time of institute's favorites section, and the collection item that described foundation comprises described programs feature information comprises: the collection server that described collection item is kept at network side;
Obtain the programs feature information in the described collection item, according to described programs feature information on demand P2P video frequency program.
The embodiment of the invention also discloses the client device of realizing program collection in a kind of P2P video request program, comprising:
User interactive module is used to receive the indication at user's collection P2P video request program interface;
The characteristic information module is used for determining the characteristic information of the program that will collect, and described programs feature information comprises the initial moment of program identification, institute's favorites section and the finish time of institute's favorites section;
A collection module is used to set up the collection item that comprises described programs feature information, and described programs feature information is dealt into network side;
The point broadcasting module is used for the programs feature information according to described collection item, program request P2P video frequency program.
As can be seen from the above technical solutions, the collection item that comprises programs feature information by foundation, and, can realize that the user fast sets up collection based on interested content when the P2P order video, in order to locating rapidly when thinking to watch once more by a collection program request P2P video frequency program.
Embodiment
Step 101: the user sends the indication that favorites is set to client device.
Step 102: client device is determined and the characteristic information of the program that record will be collected.Complete characteristic information comprises the program identification of institute's favorites, the initial moment and the finish time at least.The Partial Feature information that writes down in this step comprises the program identification and the initial moment, and the initial moment of the collection here can directly be imported the numerical value in the initial moment by the user.At this program that will collect is user just under the situation at the program of program request, and the initial moment also can be based on the current side-play amount constantly of playing of user's input, current the broadcasts moment when perhaps playing based on the user.To determine in the step below the finish time.Step 103: is client device to the finish time that whether is set to the program of current broadcast the finish time automatically of the described favorites of user's query? if the user is chosen as and is, be set to the finish time of favorites the finish time of the program of current broadcast, direct execution in step 105, if the user is chosen as not, then execution in step 104.
Step 104: client device waits for that the user determines the finish time of institute's favorites section, and concrete grammar is not limit, and direct end of input numerical value constantly also can be based on broadcast or the picture progress when dragging and dynamically arranging.
Step 105: after determining the initial and finish time of collection video, name and generate final collection item, the complete content of collection item comprises the characteristic information of this collection object, i.e. program identification, beginning and the finish time.The method for expressing of collection item is not done and is forced regulation, can be XML file or key value text formattings such as (Key-Value), can directly preserve with binary coding yet, and the unified resource that it can also be encoded to software inhouse identification is located (URL) form.For example: p2pvod: //abcdef/locate? beginSec=10﹠amp; EndSec=200 represents that it is the video segment of abcdef that this collection Xiang Weicong played the resource ID that finished in the 200th second on the 10th second.
Step 106: should collect item and preserve with suitable manner, the present invention does not limit its preservation form, can be kept in this client device, and the network that also can be kept at appointment is collected the network profile that distributes for this user in the server.
After having set up the collection item, the user can watch video request program by opening this collection item, specifically as shown in Figure 2, comprises the steps:
Step 201: the user selects to open the collection item.Unfolding mode is not limit, and comprises by the menu of client device selecting; Or the URL information that item is collected in direct click in the network profile that the collection server provides.
Step 202: obtaining to play needed characteristic information, comprise program identification and the initial moment and the finish time, client device calls P2P video request program module automatically, the content that begins from the described initial moment in the program of the described program identification correspondence of request broadcast.
Step 203: client device is according to original P2P video request program flow process, sequential scheduling media data and play to finish time of collection.
The user can also share to the good friend by the collection item that the related application platform will be set up.
According to the actual preservation position of collection item, sharing operation can be divided into two classes:
Share local collection item: will collect a pairing file and send to the good friend, and can upload on the network, and also can send this collection file by instruments such as Email Email or instant messagings.
Shared network collection item: the direct appointment of the collection item of preserving in the network shared to the associated user, and Fig. 3 is a specific embodiment, comprises the steps:
Step 301: the user at first selects the collection item;
Step 302: shared parameter is set, comprises that user ID or the customer group of sharing this collection item identify, share parameters such as effective time, shared event notice pattern, structure encapsulates the shared message of these input parameters then;
Step 303: described shared message is sent to network collection server;
Step 304: network collection server is after receiving sharing request, concrete file layout according to its shared collection, be provided with and collect the item user or the customer group that can be set and have access to, for example directly in the user's who is set network profile, add information such as this collection and sharer's sign, perhaps add information such as the index position of this collection item and sharer's sign.
The management of user's collection depends on the method for expressing of collection item.Based on representation of file collection item the time, its administrative class is similar to the collection management of the explorer (Internet Explorer) of Microsoft, promptly adopts the tree-shaped bibliographic structure of stratification.When chained representation Network Based is collected item, management such as its management directly adopts approach of Web to add, deletion, shearing, the collection server stores of network side is corresponding file or database.
In addition, for the network collection item that other users shared, its organizational form can identify as the inlet directory name with the sharer, also can comprise that in this attribute the sharer identifies.
The P2P network video-on-demand client device of the embodiment of the invention comprises as shown in Figure 4 as lower module:
User interactive module 401 is used to receive the indication at user's collection P2P video request program interface; Also be used to receive the indication of the initial moment of being provided with of user or the finish time.
Characteristic information module 402 is used for determining the characteristic information of the program that will collect;
A collection module 403 is used to set up the collection item that comprises described programs feature information; If adopt the mode of network profile, then a collection module also is used for described programs feature information is dealt into network side.
Point broadcasting module 404 is used for the programs feature information according to described collection item, program request P2P video frequency program.
Sharing Management module 405, be used to be provided with shared parameter, comprise user ID or the customer group sign of sharing this collection, share effective time, share parameters such as event notice pattern, structure encapsulates the shared message of these input parameters then, and should share message and be sent to network side.
The embodiment of the invention has also proposed to realize in a kind of P2P video request program the server of program collection, as shown in Figure 5, comprising:
Access interface module 501, be used to provide the access interface of client device to server, client device can pass through this access interface, the collection item of own collection in the visit collection module 501, the collection item that perhaps will newly collect sends to server, perhaps will comprise the shared message of sharing parameter and send to server.
Collection module 502 is used to preserve the collection item corresponding with user ID.Collection module 502 can be distributed the network profile of corresponding memory cell as the user for each user ID, stores the collection item that this user collects, and perhaps other user shares the collection item to this user.The collection item can also can be the network profile that is provided with from other user according to sharing from client device.
Shared processing module 503 is used for according to sharing parameter, collection item in the collection module 502 is set by the mode of other user capture outside this pairing user of collection item.
The present invention program makes the user fast set up collection based on interested content when the P2P order video, in order to locating rapidly when thinking to watch once more, and can promote interaction between P2P video request program user, freely shares the video request program resource.
Through the above description of the embodiments, those skilled in the art can be well understood to the present invention and can realize by the mode that software adds essential hardware platform, can certainly all implement, but the former is better execution mode under a lot of situation by hardware.Based on such understanding, all or part of can the embodying that technical scheme of the present invention contributes to background technology with the form of software product, this computer software product can be stored in the storage medium, as ROM/RAM, magnetic disc, CD etc., comprise that some instructions are with so that a computer equipment (can be a personal computer, server, the perhaps network equipment etc.) carry out the described method of some part of each embodiment of the present invention or embodiment.
The above only is preferred embodiment of the present invention, not in order to restriction the present invention, all any modifications of being done within the spirit and principles in the present invention, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.