Summary of the invention
The embodiment of the invention is to provide a kind of method, Apparatus and system of distributed plug-flow; Can be through video plug-flow server be divided into plug-flow main control unit and plug-flow performance element; And through file is cut into pieces, be distributed in each storage, make load more balanced.
The present invention is achieved in that a kind of method of distributed plug-flow, comprising:
The plug-flow main control unit receives the request playback messages, and according to the described request playback messages, obtains to be about to the section of propelling movement;
Said plug-flow main control unit is about to the positional information of the section of propelling movement to the distributed file system inquiry;
Said plug-flow main control unit receives the said memory node information that is about to the section place of propelling movement that said distributed file system is returned, and finds corresponding plug-flow performance element according to said memory node information;
Said plug-flow main control unit sends plug-flow message to said plug-flow performance element;
Said plug-flow performance element is according to said plug-flow message, reads the said slice of data that pushes of being about to through internal bus from the memory node of said distributed file system;
Said plug-flow performance element pushes the said slice of data that is about to propelling movement.
Another object of the present invention is to provide a kind of video plug-flow device, comprising:
The plug-flow main control unit; Be used for receiving the request playback messages, and, obtain to be about to the section of propelling movement according to the described request playback messages; To the said positional information that is about to the section of propelling movement of distributed file system inquiry; And receive the said memory node information that is about to the section place of propelling movement that said distributed file system is returned, find corresponding plug-flow performance element according to said memory node information, and send plug-flow message to the plug-flow performance element of correspondence;
The plug-flow performance element; Be arranged in the memory node of distributed file system, link to each other through network, link to each other through the internal system bus with the memory node of said distributed file system with said plug-flow main control unit; Receive said plug-flow message; And, read the data of the section that is about to propelling movement from said distributed file system through internal bus according to said plug-flow message, push the said data that are about to the section of propelling movement.
Another purpose of the present invention is to provide a kind of system of distributed plug-flow, video plug-flow device and distributed file system:
The device of said video plug-flow comprises:
The plug-flow main control unit; Be used for receiving the request playback messages, and, obtain to be about to the section of propelling movement according to the described request playback messages; To the said positional information that is about to the section of propelling movement of said distributed file system inquiry; And receive the said memory node information that is about to the section place of propelling movement that said distributed file system is returned, find corresponding plug-flow performance element according to said memory node information, and send plug-flow message to the plug-flow performance element of correspondence;
The plug-flow performance element; Link to each other with the plug-flow main control unit; And link to each other with said distributed file system through internal bus, receive said plug-flow message, and according to said plug-flow message; Read the slice of data that is about to propelling movement through internal bus from said distributed file system, push the said slice of data that is about to propelling movement;
Distributed file system; Link to each other with said video plug-flow device; Be used to receive the said message of the positional information of the section of propelling movement soon of inquiry; And the memory node information at the section place that should be about to according to the information acquisition of the said section that be about to push to push, and said memory node information returned to said video plug-flow device.
Implement the foregoing description; Through video plug-flow server is divided into plug-flow main control unit and plug-flow performance element; And through file is cut into pieces, be distributed in each memory node, can utilize the ability of multiple servers simultaneously; Effectively solve lack of uniformity, improve the concurrent performance of system greatly; And through plug-flow performance element and memory node are deployed in the system; What make the plug-flow performance element reading of data is passed through from memory node is the internal system bus of memory node; Thereby can effectively accelerate data reading speed, not have the additional networks expense simultaneously.
Embodiment
In order to make technical problem to be solved by this invention, technical scheme and beneficial effect clearer,, the present invention is further elaborated below in conjunction with accompanying drawing and embodiment.
See also the method flow sketch map of a kind of distributed plug-flow of the embodiment of the invention shown in Fig. 2, comprising:
Step S201: the plug-flow main control unit receives the request playback messages, and according to the request playback messages, obtains the section that will soon push.
Concrete, this request playback messages comprises the position of movie.
Step S202: this is about to the positional information of the section of propelling movement to the plug-flow main control unit to the distributed file system inquiry.
Step S203: the plug-flow main control unit receives the memory node information of being somebody's turn to do the section place that is about to propelling movement that this distributed file system is returned, and finds corresponding plug-flow performance element according to this memory node information.
Step S204: the plug-flow main control unit sends plug-flow message to this plug-flow performance element.
Step S205: the plug-flow performance element is according to this plug-flow message, reads from the memory node of distributed file system through internal bus and is about to the slice of data that pushes.
Step S206: this plug-flow performance element pushes the slice of data that is about to propelling movement.
Implement the foregoing description, through video plug-flow server is divided into plug-flow main control unit and plug-flow performance element, and through file is cut into pieces; Be distributed in each storage; Can utilize the ability of multiple servers simultaneously, effectively solve lack of uniformity, improve the concurrent performance of system greatly; And because plug-flow performance element and distributed file system reading of data pass through is internal bus; Promptly read the data of local section file, can effectively accelerate data reading speed, do not have the additional networks expense simultaneously.
Below in conjunction with the schematic flow sheet of another embodiment of the method for a kind of distributed plug-flow of the present invention shown in Fig. 4, in this embodiment, for clearer description; Can combine the distributed plug-flow network architecture diagram shown in Fig. 3; This distributed plug-flow network architecture comprises: SS Master (Streaming Server Master, plug-flow main control unit), SS Worker1 (Streaming Server Worker; The plug-flow performance element); SS Worker2 and SS Worker3, wherein SS Master management SS Worker1, SS Worker2 and SS Worker3.Also comprise distributed file system, this distributed file system comprises memory node 1, memory node 2 and memory node 3, and FCU file control unit.Wherein SS Worker1 and memory node 1 are deployed in together, and SS Worker1 is through the internal system bus from memory node 1 reading of data; SS Worker2 and memory node 2 are deployed in together, and SS Worker2 is through the internal system bus from memory node 2 reading of data; SS Worker3 and memory node 3 are deployed in together, and SS Worker3 is through the internal system bus from memory node 3 reading of data.FCU file control unit is in charge of the storage of the section file of whole distributed file system.In distributed file system, data with the section stored in form in each memory node.Such as, portion is the data of 100MB, can be cut to 10 parts; Each slice size is 10MB; Section 1, section 2, section 3, section 4 are stored in memory node 1, and section 5, section 6, section 7 are stored in memory node 2, and section 8, section 9, section 10 are stored in memory node 3.Following examples are all with the data instance of this 100MB of user terminal program request.
Step S401: user terminal sends the request playback messages to SS Master.
Concrete, this request playback messages comprises the position of movie.
Step S402:SS Master obtains to be about to the section of propelling movement according to the request playback messages.
Concrete, SS Master obtains to be about to the section of propelling movement according to the position of movie.Such as, user terminal sends from the place of film 30MB and begins to play, and then the SS Master acquisition section of propelling movement soon is section 4.
This is about to the positional information of the section of propelling movement to step S403:SS Master to the distributed file system inquiry.
Concrete, SS Master is to the request of the positional information of FCU file control unit transmission inquiry section 4, i.e. and which memory node inquiry section 4 is stored on.
Step S404: distributed file system is returned the memory node information at this section that is about to propelling movement place and is given SS Master.
Concrete, memory node information comprises memory node numbering or IP address.FCU file control unit learns that section 4 is stored on the memory node 1, and the numbering or the IP address of memory node 1 returned to SS Master.
Step S405:SS Master finds corresponding SS Worker according to this memory node information.
Concrete, because SS Worker1 and memory node 1 are deployed in together, so SS Master can find SS Worker1 according to the information of memory node 1.
Step S406:SS Master sends plug-flow message to this SS Worker, notifies this SS Worker to begin plug-flow.
Concrete, SS Master notice SS Worker1 begins plug-flow, and the content of propelling movement is section 4.This plug-flow message comprises slice information, propelling movement code stream size, plug-flow original position and plug-flow final position, the IPQAM address etc. that are about to propelling movement.
Step S407: this SS Worker is according to plug-flow message, from the distributed file system reading of data to buffer memory.
Concrete, the data content that SS Worker1 reads section 4 from memory node 1 is to buffer memory.Because SS Worker1 and memory node 1 are deployed in together, SS Worker1 reads section 4 data through being internal bus from memory node 1, promptly reads the data of local section file, can effectively accelerate data reading speed, does not have the additional networks expense simultaneously.
Step S408: this SS Worker propelling data is to IPQAM.
Concrete, SS Worker1 pushes the data of section 4 to IPQAM through IP network.The IPQAM modulating data, output RF, user terminal receives RF and watches program after treatment.
In execution in step S408, this SS Worker also carries out:
Step S409: this SS Worker sends the message of obtaining next SS Worker to SS Master.
Step S410:SS Master is according to next slice information, to the positional information of the next section of distributed file system inquiry.
Concrete, next section is section 5, which memory node inquiry section 5 is stored on.
Step S411: distributed file system is returned the memory node information at this next one section place and is given SS Master.
Concrete, FCU file control unit learns that section 5 is stored on the memory node 2, and the numbering or the IP address of memory node 2 returned to SS Master.
Wherein, memory node 2 can backup each other with memory node 3,5 also possibly be stored on the memory node 3 so cut into slices, and at this moment, FCU file control unit also can return to SS Master with the numbering or the IP address of memory node 3.
Step S412:SS Master finds corresponding SS Worker according to this memory node information.
Concrete because SS Worker2 and memory node 2 are deployed in together, SS Worker2 from memory node 2 reading of data through being internal bus, so SS Master can find SS Worker2 according to the information of memory node 2.
When FCU file control unit also returned to SS Master with memory node 3, SS Master learnt that section 5 can obtain from memory node 2 or memory node, and promptly SS Master can select SS Worker1 or SS Worker2.At this moment, SS Master can select one of them SSWorker according to the strategy of load balancing.In the present embodiment, SS Master selects SS Worker2.
Step S413:SS Master issues current SS Worker with the information of next SS Worker.
Concrete, SS Master issues SS Worker1 with the information of SS Worker2.
Step S414: when current SS Worker was near completion the plug-flow task, current SS Worker sent to next SS Worker and prepares plug-flow message.
Concrete, this preparation plug-flow message comprises being next slice information, pushes code stream size, plug-flow initial sum final position, IPQAM address etc.When SS Worker1 when plug-flow finishes also surplus 10ms, SS Worker1 sends to SS Worker2 and prepares plug-flow message, this plug-flow message comprises section 5 information that are about to push etc.
Step S415: after next SS Worker receives and prepares plug-flow message, from the distributed file system reading of data to buffer memory.
Concrete, the data content that SS Worker2 reads section 5 from memory node 2 is to buffer memory.
Step S416: when current SS Worker accomplished the plug-flow task, current SS Worker notified next SS Worker to start plug-flow at once, simultaneously the plug-flow ending message is reported the Master to SS.
Concrete, when SS Worker1 accomplished the plug-flow task, SS Worker1 notified SS Worker2 to start plug-flow at once, simultaneously the plug-flow ending message is reported the Master to SS.
Step S417: after next SS Worker receives notice, time-delay a period of time.
Concrete, after SS Worker2 receives notice, judge whether delay time arrives preset delay time, for example, preset delay time is 20ms, 20ms then delays time.If SS Worker2 is plug-flow at once, IPQAM may receive the data of SS Worker2 earlier, after receive and the data of SS Worker1 out of order problem occurs.Wherein, concrete delay time is relevant with the SS Worker1 plug-flow concluding time.
Step S418: next SS Worker propelling data is to IPQAM.
Concrete, SS Worker2 pushes the data of section 5 to IPQAM through IP network.The IPQAM modulating data, output RF, user terminal receives RF and watches program after treatment.
The slice of data that repeating step S409 needs until all users pushes and finishes.
In above step, SS Worker can regularly report the plug-flow state information and give SS Master, and the plug-flow state information comprises current plug-flow position, plug-flow sheet sequence number etc., so that SS Master monitors each SS Worker in real time.
In above embodiment, manage a plurality of SS Worker by a SS Master.Yet, in another embodiment of the present invention, can constitute this distributed plug-flow network architecture through the SS Master service cluster of forming by a plurality of SS Master, manage a plurality of SS Worker through SS Master service cluster.
Implement the foregoing description, through video plug-flow server is divided into SS Master and SS Worker, and through file is cut into pieces; Be distributed in each storage, can utilize the ability of multiple servers simultaneously, effectively solve lack of uniformity; Improve the concurrent performance of system greatly, and because SS Worker and memory node are deployed in one, what SS Worker passed through from the storage system reading of data is internal bus; Can effectively accelerate data reading speed, not have the additional networks expense simultaneously.
Below in conjunction with the structural representation of a kind of video plug-flow device of the embodiment of the invention shown in Fig. 5, the structure of a kind of video plug-flow of further explain embodiment of the invention device.
Plug-flow main control unit 501; Be used to receive the request playback messages that user terminal sends, and, obtain to be about to the section of propelling movement according to the request playback messages; This is about to the positional information of the section of propelling movement to the distributed file system inquiry; And the memory node information at the section place that pushes of should being about to of receiving that this distributed file system returns, find corresponding plug-flow performance element according to this memory node information, and send plug-flow message to the plug-flow performance element of correspondence.
Plug-flow performance element 502; Be arranged in the memory node of distributed file system, link to each other, link to each other through the internal system bus with the memory node of distributed file system with plug-flow main control unit 501; Receive this plug-flow message; And, from the distributed file system reading of data, push this data through internal bus according to this plug-flow message.
Implement the foregoing description, through video plug-flow server is divided into plug-flow main control unit and plug-flow performance element, and through file is cut into pieces; Be distributed in each storage, can utilize the ability of multiple servers simultaneously, effectively solve lack of uniformity; Improve the concurrent performance of system greatly; And, can effectively accelerate data reading speed because plug-flow performance element and distributed file system reading of data pass through is internal bus, there is not the additional networks expense simultaneously.
Concrete, plug-flow performance element 502 also is used for sending the message of obtaining next SS Worker to SS Master.
Plug-flow main control unit 501; Also be used to receive the message that this obtains next SS Worker; And,, receive the memory node information at the next one section place that this distributed file system returns to the positional information of the next section of distributed file system inquiry according to next slice information; Find next plug-flow performance element according to this memory node information, and next plug-flow performance element information is returned.
Concrete, finding according to this memory node information in the next plug-flow performance element step, SS Master can select one of them SS Worker according to the strategy of load balancing.
Plug-flow performance element 502 links to each other with other plug-flow performance elements 502, also is used for when accomplishing the plug-flow task, sending plug-flow message to next SS Worker.
Concrete, this plug-flow message comprises the slice information that is about to push, pushes code stream size, plug-flow initial sum final position, IPQAM address etc.
Concrete, when accomplishing the plug-flow task, before next SS Worker sent the plug-flow messages step, plug-flow performance element 502 also was used for when being about to accomplish the plug-flow task, sent to next SS Worker and prepared plug-flow message; Concrete, this preparations plug-flow message comprises the slice information that is about to push, propelling movement code stream size, plug-flow initial sum final position, IPQAM address etc.After next SS Worker receives and prepares plug-flow message, from the distributed file system reading of data to buffer memory; After next SS Worker receives plug-flow message, can delay time a period of time, push data into IPQAM again.
Implement the foregoing description, through video plug-flow server is divided into plug-flow main control unit and plug-flow performance element, and through file is cut into pieces; Be distributed in each storage, can utilize the ability of multiple servers simultaneously, effectively solve lack of uniformity; Improve the concurrent performance of system greatly; And, can effectively accelerate data reading speed because plug-flow performance element and distributed file system reading of data pass through is internal bus, there is not the additional networks expense simultaneously.
Below in conjunction with the system schematic of a kind of distributed plug-flow of the embodiment of the invention shown in Fig. 6, the system of a kind of distributed plug-flow of the further explain embodiment of the invention comprises video plug-flow device 601, distributed file system 602:
Video plug-flow device 601 comprises:
Plug-flow main control unit 6011; Be used for receiving the request playback messages, and, obtain the section that will soon push according to the request playback messages; This is about to the positional information of the section of propelling movement to distributed file system 602 inquiries; And the memory node information at the section place that pushes of should being about to of receiving that this distributed file system 602 returns, find corresponding plug-flow performance element according to this memory node information, and send plug-flow message to the plug-flow performance element of correspondence.
Plug-flow performance element 6012; Be arranged in the memory node of distributed file system, link to each other through network, link to each other through the internal system bus with the memory node of said distributed file system 602 with plug-flow main control unit 501; Receive this plug-flow message; And, from distributed file system 602 reading of data, push this data through internal bus according to this plug-flow message.
Distributed file system 602; Link to each other with video plug-flow device 601; Be used to receive the message of the positional information of this section that is about to push of inquiry; And the memory node information at the section place that should be about to according to information acquisition of this section that be about to push to push, and this memory node information returned to video plug-flow device 601.
In embodiments of the present invention, the network of said connection plug-flow performance element 6012 and plug-flow main control unit 501 promptly can be a wireline communication network, also can be cordless communication network.
Implement the foregoing description, through video plug-flow server is divided into plug-flow main control unit and plug-flow performance element, and through file is cut into pieces; Be distributed in each storage, can utilize the ability of multiple servers simultaneously, effectively solve lack of uniformity; Improve the concurrent performance of system greatly; And, can effectively accelerate data reading speed because plug-flow performance element and distributed file system reading of data pass through is internal bus, there is not the additional networks expense simultaneously.
Need to prove that through the description of above execution mode, 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 through hardware.Based on such understanding; All or part of can the coming out that technical scheme of the present invention contributes to background technology with the embodied of software product; This computer software product can be stored in the storage medium, like ROM/RAM, magnetic disc, CD etc., comprises 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 disclosed preferred embodiment that is merely in the embodiment of the invention can not limit the present invention's interest field certainly with this, so according to the equivalent variations that claim of the present invention is done, still belong to the scope that the present invention is contained.