A kind of data transmission method for set-top box, system and set-top box
Technical field
The present invention relates to field of set-top, relate in particular to a kind of data transmission method for set-top box, system and set-top box.
Background technology
Bottom on set-top box transmission at present generally is to realize by http protocol, or receives data by the mode of broadcasting, realizes a multicast function by player again.Under prior art, if satisfy a large number of users program request simultaneously, need provide a large amount of bandwidth just can realize.
Summary of the invention
The technical problem to be solved in the present invention is, could realize that at a large amount of bandwidth of the above-mentioned needs of prior art a large number of users carries out the play-on-demand program defective by set-top box simultaneously, and a kind of data transmission method for set-top box is provided.
The technical solution adopted for the present invention to solve the technical problems is: construct a kind of data transmission method for set-top box, comprising:
Tracking server and at least one Resource Server and at least one set-top box connect;
The eap-message digest of the positional information of described at least one Resource Server of tracking server collection and at least one program of storing, the positional information of also collecting described at least one set-top box reaches the eap-message digest of the program of downloading or downloading, and collected information is stored to database;
By the set-top box request program time, the request end set-top box is sent to tracking server according to user's input with the eap-message digest of the program of institute's program request and the positional information of this request end set-top box;
Tracking server is according to the eap-message digest search database that receives, and Resource Server that will be relevant with described eap-message digest and set-top box respectively corresponding positional information return to the request end set-top box;
The request end set-top box connects corresponding Resource Server and set-top box according to the positional information of returning, and obtains the programme information relevant with described eap-message digest that corresponding Resource Server has with set-top box, to realize play-on-demand program.
At the data transmission method for set-top box of the present invention, if one of them Resource Server and/or one of them set-top box are connected interruption with tracking server, then tracking server is deleted in database and is connected Resource Server and/or the corresponding positional information of set-top box and the eap-message digest of interrupting.
At the data transmission method for set-top box of the present invention, described positional information comprises IP information and port information.
The present invention also constructs a kind of data transmission system for set-top box, comprise tracking server, at least one Resource Server, at least one set-top box, wherein, tracking server and at least one Resource Server and at least one set-top box connect, and collect the positional information of described at least one Resource Server and the eap-message digest of at least one program of storing, the positional information of also collecting described at least one set-top box reaches the eap-message digest of the program of downloading or downloading, and collected information is stored to database; By the set-top box request program time, the request end set-top box is sent to tracking server according to user's input with the eap-message digest of the program of institute's program request and the positional information of this request end set-top box; Tracking server is according to the eap-message digest search database that receives, and Resource Server that will be relevant with described eap-message digest and set-top box respectively corresponding positional information return to the request end set-top box; The request end set-top box connects corresponding Resource Server and set-top box according to the positional information of returning, and obtains the programme information relevant with described eap-message digest that corresponding Resource Server has with set-top box, to realize play-on-demand program.
In the data transmission system for set-top box of the present invention, a Resource Server and/or one of them set-top box are connected with tracking server when interrupting therein, and described tracking server also is used for connecting the Resource Server of interruption and/or the eap-message digest of the corresponding positional information of set-top box and program in the database deletion.
In the data transmission system for set-top box of the present invention, described positional information comprises IP information and port information.
The present invention also constructs a kind of set-top box, be used for realizing play-on-demand program in the mode of P2P, described set-top box is connected with tracking server, and described tracking server is collected the positional information of at least one Resource Server in advance and the eap-message digest of at least one program of storing, also collect the eap-message digest of the positional information that other set-top box is arranged and the program of downloading or downloading, and collected information is stored to database, described set-top box comprises:
Put broadcasting module, be used for receiving the program of user institute program request, and the corresponding eap-message digest of this program is sent to player;
Player is used for described eap-message digest is sent to local streaming media server;
Local streaming media server is used for converting described eap-message digest to meet HTML (Hypertext Markup Language) form, and is sent to the P2P processing module;
The P2P processing module, be used for the positional information of request end set-top box is sent to tracking server, and inquire about the Resource Server and the set-top box that have described eap-message digest according to described eap-message digest to the tracking server request and distinguish corresponding positional information, and connect corresponding Resource Server and set-top box according to the positional information that inquires, and obtain the corresponding programme information of described eap-message digest from respective resources server and set-top box, to realize play-on-demand program.
In set-top box of the present invention, described positional information comprises IP information and port information.
Implement technical scheme of the present invention, when carrying out play-on-demand program by set-top box, the single-point download of traditional HTTP downloading mode is improved to the multiple spot download, therefore, program request speed and fluency have been improved, in addition, take full advantage of the broadband in the whole set-top box network, significantly reduce the cost expenditure of bandwidth for the operator of set-top box.
Description of drawings
The invention will be further described below in conjunction with drawings and Examples, in the accompanying drawing:
Fig. 1 is the flow chart that the present invention is used for the data transmission method embodiment one of set-top box;
Fig. 2 is the logic diagram that the present invention is used for the data transmission system embodiment one of set-top box;
Fig. 3 is the logic diagram of set-top box embodiment one of the present invention.
Embodiment
The present invention as shown in Figure 1 is used for the flow chart of the data transmission method embodiment one of set-top box, and this data transmission method comprises:
S1. tracking server and at least one Resource Server and at least one set-top box connect, and the foundation of this link is normally carried out when Resource Server or set-top box startup;
S2. tracking server is collected the positional information of described at least one Resource Server and the eap-message digest of at least one program of storing, the eap-message digest of the program of also collecting the positional information of described at least one set-top box and downloading or downloading, and collected information is stored to database, in this step, positional information can comprise IP information and port information.Should be noted that in addition tracking server is used for programs such as video display, each Resource Server, each set-top box are managed, to realize scheduling feature.The eap-message digest of program (hash information) is the unique identification of this program, and it is a hashed value of a certain regular length that obtains by hashing algorithm.Resource Server typically refers to video files for each set-top box provides Service Source, to realize the source of order program service.Set-top box is the taker that obtains of resource in whole system, and other set-top box is given in the resource-sharing of also oneself being obtained simultaneously, and it is more to make the request end set-top box obtain the channel of resource, has improved program request speed and fluency;
S3 is by the set-top box request program time, and the request end set-top box is sent to tracking server according to user's input with the eap-message digest of the program of institute's program request and the positional information of this request end set-top box;
S4. tracking server is according to the eap-message digest search database that receives, and Resource Server that will be relevant with described eap-message digest and set-top box respectively corresponding positional information return to the request end set-top box;
S5. the request end set-top box connects corresponding Resource Server and set-top box according to the positional information of returning, and obtains the programme information relevant with described eap-message digest that corresponding Resource Server has with set-top box, to realize play-on-demand program.
Implement this technical scheme, when carrying out play-on-demand program by set-top box, the single-point download of traditional HTTP downloading mode is improved to the multiple spot download, therefore, program request speed and fluency have been improved, in addition, take full advantage of the broadband in the whole set-top box network, significantly reduce the cost expenditure of bandwidth for the operator of set-top box.
Preferably, in the resource-sharing process, if wherein certain Resource Server and/or wherein certain set-top box be connected interruption with tracking server, then tracking server is deleted in database and is connected Resource Server and/or the corresponding positional information of set-top box and the eap-message digest of interrupting, with the information of the available resources that upgrade in time.
Fig. 2 is the logic diagram that the present invention is used for the data transmission system embodiment one of set-top box, this data transmission system comprises tracking server 10, Resource Server 21,22, set-top box 31,32, should be noted that, present embodiment only shows two Resource Servers and two set-top box, those skilled in the art will be understood that the quantity of Resource Server and set-top box can be any amount.In this embodiment, tracking server 10 at first with Resource Server 21,22 and set-top box 31,32 connect, and collect Resource Server 21,22 positional information respectively and the eap-message digest of at least one program of storing, the eap-message digest of gathering machine top box 31,32 positional information and the program downloading or downloading respectively also, and collected information is stored to database, wherein positional information can comprise IP information and port information.Obtaining of resource mainly is to show set-top box, for example, by set-top box 31 request programs the time, at this moment, the request end set-top box is set-top box 31, and request end set-top box 31 is sent to tracking server 10 according to user's input with the eap-message digest of the program of institute's program request and the positional information of this request end set-top box 31; Tracking server 10 is according to the eap-message digest search database that receives, and Resource Server that will be relevant with described eap-message digest and set-top box respectively corresponding positional information return to request end set-top box 31, if Resource Server 21,22 and set-top box 32 all have the corresponding program of this eap-message digest, then request end set-top box 31 connects corresponding Resource Server 21,22 and set-top box 32 according to the positional information of returning, and obtain corresponding Resource Server 21,22 with the set-top box 32 haves programme information relevant with described eap-message digest, to realize play-on-demand program.
In addition, preferably, a Resource Server and/or one of them set-top box are connected with tracking server when interrupting therein, and described tracking server also is used for connecting the Resource Server of interruption and/or the eap-message digest of the corresponding IP information of set-top box and program in the database deletion.
Fig. 3 is the logic diagram of set-top box embodiment one of the present invention, this set-top box is connected with tracking server, and described tracking server is collected the positional information of at least one Resource Server in advance and the eap-message digest of at least one program of storing, also collect the eap-message digest of the positional information that other set-top box is arranged and the program of downloading or downloading, and collected information is stored to database, positional information can comprise IP information and port information.This set-top box comprises some broadcasting module 311, player 312, local streaming media server 313 and the P2P processing module 314 that connects successively.Wherein, some broadcasting module 311 is used for receiving the program of user institute program request, and the corresponding eap-message digest of this program is sent to player; Player 312 is used for described eap-message digest is sent to local streaming media server; Local streaming media server 313 is used for converting described eap-message digest to meet HTML (Hypertext Markup Language) form, and is sent to P2P processing module 314; P2P processing module 314 is used for the positional information of request end set-top box is sent to tracking server, and inquire about the Resource Server and the set-top box that have described eap-message digest according to described eap-message digest to the tracking server request and distinguish corresponding IP information and port information, and be connected corresponding Resource Server and set-top box with port information according to the IP information that inquires, and obtain the corresponding programme information of described eap-message digest from respective resources server and set-top box, to realize play-on-demand program.After play-on-demand program is finished, the programme information that obtains returns to player 312 by P2P processing module 314, local streaming media server 313, after player 312 is received data, if play buffer is full, then begin to play, if less than, then wait for after buffering area is expired just beginning to play, guarantee the program request smoothness.
The above is the preferred embodiments of the present invention only, is not limited to the present invention, and for a person skilled in the art, the present invention can have various changes and variation.Within the spirit and principles in the present invention all, any modification of doing, be equal to replacement, improvement etc., all should be included within the claim scope of the present invention.