Summary of the invention
The technical problem to be solved in the present invention provides a kind of implementation method, media control server and wheel of broadcasting channel of taking turns and broadcasts channel system, can switch between dissimilar programs.
For solving the problems of the technologies described above, embodiments of the invention provide technical scheme as follows:
On the one hand, provide a kind of implementation method of broadcasting channel of taking turns, comprising:
Media control server is obtained the play start time of next program and the type of described next program;
Described media control server when the play start time of described next program arrives, is carried out the switching of program according to the type of described next program.
When the type of described next program was media file, described media control server was according to the type of described next program, and when the play start time of described next program arrived, the step of carrying out the switching of program was:
Described media control server issues first order to the media store server at described next program place, make described media store server open the media file of described next program, and the media file of described next program is sent to the media distribution service device in the play start time of described next program.
When the type of described next program was the direct broadcast band program, described media control server was according to the type of described next program, and when the play start time of described next program arrived, the step of carrying out the switching of program was:
Described media control server issues second order to the live code stream Distributor at described next program place, makes described live code stream Distributor that the direct broadcast band program of described next program is sent to the media distribution service device.
Described media control server is according to the type of described next program, when the play start time of described next program arrives, carries out also comprising before the step of switching of program:
Described media control server checks whether the channel state of described next program is normal.
The described implementation method of broadcasting channel of taking turns also comprises:
Described media control server discharges current program according to the type of current program.
When the type of described current program was media file, described media control server was according to the type of current program, and the step that discharges current program is:
Described media control server issues the 3rd order to the media store server at described current program place, makes described media store server close the media file of described current program.
When the type of described current program was the direct broadcast band program, described media control server was according to the type of current program, and the step that discharges current program is:
Described media control server issues the 4th order to the live code stream Distributor at described current program place, makes described live code stream Distributor stop to send to described media distribution service device the direct broadcast band program of described current program.
On the other hand, provide a kind of media control server, comprising:
Acquiring unit is used to obtain the play start time of next program and the type of described next program;
Switch unit is used for the type according to described next program, when the play start time of described next program arrives, carries out the switching of program.
Described media control server also comprises:
Releasing unit is used for the type according to current program, discharges current program.
On the other hand, provide a kind of the wheel to broadcast channel system, comprising: media control server, media store server, live code stream Distributor and media distribution service device;
When the type of described next program is media file, described media control server issues first order to the media store server at described next program place, make described media store server open the media file of described next program, and the media file of described next program is sent to described media distribution service device in the play start time of described next program;
When the type of described next program is the direct broadcast band program, described media control server issues second order to the live code stream Distributor at described next program place, makes described live code stream Distributor that the direct broadcast band program of described next program is sent to described media distribution service device.
Embodiments of the invention have following beneficial effect:
In the such scheme, media control server is carried out the switching of program according to the type of current program and the type of described next program, therefore can realize the switching between the different program categories, makes that the type of broadcast program is abundanter.
Embodiment
For technical problem, technical scheme and advantage that embodiments of the invention will be solved is clearer, be described in detail below in conjunction with the accompanying drawings and the specific embodiments.
Embodiments of the invention provide a kind of implementation method, media control server and wheel of broadcasting channel of taking turns to broadcast channel system at taking turns the more single problem of content type of broadcasting channel in the prior art.
As shown in Figure 1, be a kind of implementation method of broadcasting channel of taking turns of the present invention, comprise:
Step 11, media control server are obtained the play start time of next program and the type of described next program; Wherein, the type of the play start time of next program and described next program can be obtained according to the playing programs scheduling.
Step 12, described media control server when the play start time of described next program arrives, are carried out the switching of program according to the type of described next program.
In the such scheme, media control server is carried out the switching of program according to the type of current program and the type of described next program, therefore can realize the switching between the different program categories, makes that the type of broadcast program is abundanter.
Optionally, described a kind of implementation method of broadcasting channel of taking turns also comprises:
Step 13, described media control server discharge current program according to the type of current program.
Below describe another embodiment that takes turns the implementation method of broadcasting channel of the present invention, comprising:
Step 21, media control server are obtained the play start time of next program and the type of described next program;
Step 22, when the type of described current program and next program all is media file, described media control server issues first order to the media store server at described next program place, make described media store server open the media file of described next program, and the media file of described next program is sent to the media distribution service device in the play start time of described next program.
Step 23, described media control server issues second order to the media store server at described current program place, makes described media store server close the media file of described current program.
Wherein, when the media store server at the media store server at next program place and current program place when being same, first order and second is ordered to may be incorporated in the order and is sent.
Below describe another embodiment that takes turns the implementation method of broadcasting channel of the present invention, comprising:
Step 31, media control server are obtained the play start time of next program and the type of described next program;
Step 32, when the type of described current program is the direct broadcast band program, when the type of described next program is media file, described media control server issues first order to the media store server at described next program place, make described media store server open the media file of described next program, and send to the media distribution service device;
Step 33, described media control server issues second order to the live code stream Distributor at described current program place, makes described live code stream Distributor stop to send to described media distribution service device the direct broadcast band program of described current program.
Below describe another embodiment that takes turns the implementation method of broadcasting channel of the present invention, comprising:
Step 41, media control server are obtained the play start time of next program and the type of described next program;
Step 42, when the type of described current program is a media file, when the type of described next program was the direct broadcast band program, described media control server checked whether the channel state of described next program is normal, if normal, carried out next step;
Step 43, described media control server issues first order to the live code stream Distributor at described next program place, makes described live code stream Distributor that the direct broadcast band program of described next program is sent to the media distribution service device;
Step 44, described media control server issues the order of source of media closing of a file to the media store server at described current program place, makes described media store server close the media file of described current program.
Below describe another embodiment that takes turns the implementation method of broadcasting channel of the present invention, comprising:
Step 51, media control server are obtained the play start time of next program and the type of described next program;
Step 52, when the type of described current program and described next program all was the direct broadcast band program, described media control server checked whether the channel state of described next program is normal, if normal, carried out next step;
Step 53, described media control server sends first order to the live code stream Distributor at described next program place, makes the live code stream Distributor at described next program place send the direct broadcast band program of described next program to the media distribution service device;
Step 54, described media control server sends second order to the live code stream Distributor at described current program place, makes the live code stream Distributor at described current program place stop to send to described media distribution service device the direct broadcast band program of described current program.
When the live code stream Distributor at the live code stream Distributor at described next program place and current program place when being same, first order and second is ordered and can be sent in an order.
As shown in Figure 2, be the describedmedia control server 60 of the embodiment of the invention, comprise:
Acquiringunit 61 is used to obtain the play start time of next program and the type of described next program;
Switch unit 62 is used for the type according to described next program, when the play start time of described next program arrives, carries out the switching of program.
Optionally, describedmedia control server 60 can also comprise:
Inspection unit 63 is used for when the type of described next program is the direct broadcast band program, checks whether the channel state of described next program is normal.
Optionally, describedmedia control server 60 can also comprise: releasingunit 64, be used for type according to current program, and discharge current program.
When the type of described next program is media file, describedswitch unit 62 is specially: the media store server to described next program place issues first order, make described media store server open the media file of described next program, and the media file of described next program is sent to the media distribution service device in the play start time of described next program.
When the type of described next program is the direct broadcast band program, describedswitch unit 62 is specially: described media control server issues second order to the live code stream Distributor at described next program place, makes described live code stream Distributor that the direct broadcast band program of described next program is sent to the media distribution service device.
When the type of described current program is media file, described releasingunit 64 is specially: described media control server issues the 3rd order to the media store server at described current program place, makes described media store server close the media file of described current program.
When the type of described current program is the direct broadcast band program, described releasingunit 64 is specially: described media control server issues the 4th order to the live code stream Distributor at described current program place, makes described live code stream Distributor stop to send to described media distribution service device the direct broadcast band program of described current program.
As shown in Figure 3, broadcast channel system, comprising:media control server 60,media store server 30, mediadistribution service device 40, livecode stream Distributor 50 for described a kind of wheel of the embodiment of the invention;
When the type of described next program is media file, describedmedia control server 60 issues first order to the media store server at described next program place, make describedmedia store server 30 open the media file of described next program, and the media file of described next program is sent to described mediadistribution service device 40 in the play start time of described next program;
When the type of described next program is the direct broadcast band program, describedmedia control server 60 issues second order to the live code stream Distributor at described next program place, makes described livecode stream Distributor 50 that the direct broadcast band program of described next program is sent to described mediadistribution service device 40.
Application scenarios of the present invention is below described.
The present invention can realize switching between the broadcast programs dissimilar in the IPTV system, satisfy to play the requirement of multiple different content file, and can guarantee that ageing strong program plays immediately.Can have the combination of playback of media files and cannel broadcast in the playing programs scheduling, switching comprises the switching of first file to second file, and file is to the switching of channel, and channel is to the switching of file, and first channel is to the switching of second channel.Guarantee the seamless switching between program, and correctly discharged the related resource that previous program takies.
As shown in Figure 4, be the structure chart that should use stream media service system in the scene, comprising:
Medium positioning service device is used to issue the playing programs scheduling;
Media control server is used to accept playing programs scheduling, sending controling instruction, and the programs stored displaying schedule;
Media store server is used to operate media file, transmits code stream;
The media distribution service device is used to distribute code stream to the user;
Live code stream Distributor is used for receiving and transmitting the direct broadcast band code stream.
In this application scenarios, live code stream Distributor sends to the media distribution service device by media store server, the invention is not restricted to this, and additive method can be arranged, for example, live code stream Distributor directly sends to the media distribution service device with the code stream of direct broadcast band.
The implementation method of broadcasting channel of taking turns of the present invention comprises:
Step 1, wheel is broadcast channel creation and is handled, after media control server, media store server, media distribution service device, live code stream Distributor start successfully, media control server issues control command to media distribution service device, media store server, to open media store server sends media channel from code stream to the media distribution service device, passage adopts disconnected socket mode, as udp (User DatagramProtocol, User Datagram Protoco (UDP)), raw socket etc.Media control server issues control command to the media store forwarding server again, to open the code stream of organizing that reads the acquiescence played file, utilizes above-mentioned media channel that code stream is sent to the media distribution service device.
Wherein, the wheel of step 1 is broadcast specific implementation method that channel creation handles as shown in Figure 5, comprising:
Step 71, media control server, media store server, media distribution service device, live code stream Distributor power on successfully.
Step 72, media control server issues to the media distribution service device and opens the media channel order, after waiting for that the media distribution service device is created the success response of receiving code flow device, open the media channel order to the media store server transmission, success is created and is sent code stream equipment, thereby the media channel that media store server is transmitted code stream to the media distribution service device is opened success.
Step 73, media control server issue the order of opening media file to the media distribution service device.Media store server is opened and is read the file that acquiescence is play, and organizes code stream to send to the media distribution service device.
After above-mentioned steps completed successfully, wheel was broadcast the channel creation success.
Step 2, the managing programm displaying schedule.
Wherein, medium positioning service device is finished editor and is issued the playing programs scheduling.The playing programs scheduling can have many to play program plan, plan information comprises: broadcast program VCDN ID (Video ContentDelivery Network ID, video content delivery network sign), content ID, play start time, playing duration etc., edit successfully after, be handed down to media control server.The interface that the playing programs scheduling is set in the medium positioning service device comprises: playing programs scheduling numbering, and wheel is broadcast channel coding and many field data of scheduling information is arranged, and each field data of scheduling information has VCDN ID, content ID, play start time, playing duration.Media control server can be obtained detailed program content information and program category according to VCDN ID, content ID.Set up the playing programs scheduling, the playing programs scheduling is issued to media control server.
Media control server is stored after receiving the playing programs scheduling;
Media control server regularly reads the playing programs scheduling of storage, and whether check in the future has program to need to play in the certain hour, if having, according to the play start time of this program absolute timer is set, and timing arrives, switching flow that will the beginning program.
Wherein, the specific implementation method of the managing programm displaying schedule of step 2 comprises as shown in Figure 6:
Step 81 after medium positioning service device edits the playing programs scheduling, issues the playing programs scheduling to media control server.
Step 82, media control server program receiving displaying schedule calls database interface programs stored displaying schedule.
Whetherstep 83, media control server regularly read the playing programs scheduling, and the play start time of checking every playing programs scheduling is in the future certain hour.If there is such playing programs scheduling, then absolute timer is set with the playing programs time started, after the time arrives, trigger the broadcast program switching flow.
Above-mentioned steps finished the playing programs scheduling editor, issue, store, thereby and detect to trigger program and switch.
Step 3, broadcast program switches.
According to broadcast program VCDN ID, content ID Query Database, can get access to this broadcast program type.According to the program category of present broadcast and the program category that will play, have first file to second file, file is to direct broadcast band, direct broadcast band is to file, first direct broadcast band is to several switching modes of second direct broadcast band, wherein VOD, TVOD belong to document form, and direct broadcast band belongs to the channel form.
As shown in Figure 7, for program among the present invention switch in first file to the second file switching flow figure.
Step 91, media control server issue to media store server and revise the source of media file command, and media store server is opened second file.
Step 92, media store server are closed first file.
Step 93, media store server read second file, organize code stream to utilize opened media channel to send to the media distribution service device.
Above-mentioned steps is finished the program switching of first file to second file, suitable wheel is broadcast channel program and is switched TVOD program, TVOD program from the VOD program and switch to VOD program, VOD program and switch to the situation that VOD program or TVOD program switch to the TVOD program, wherein the program of TVOD is the program after the filing, plays with the form of VOD program.
As shown in Figure 8, for program among the present invention switch in file to the switching flow figure of direct broadcast band.
Step 101, media control server check whether the state of target direct broadcast band is normal, if normal, then carry out next step.
Step 102, media control server issue the order of source of media closing of a file on media store server, the source of media file of program before the control media store server is closed, media store server close file.
Step 103, media control server issue to media store server, live code stream Distributor respectively, open live code stream Distributor and send out channel command to the media code circulation of media store server.After ordering successfully processing, live code stream is sent to media store server, media store server receives code stream, and the media channel that uses the media distribution service device is forwarded to the media distribution service device.That is to say, media control server issues to live code stream Distributor, media store server and opens channel control command, open live code stream Distributor and send the media channel of live code stream to media store server, the media store server live code stream that will receive is transmitted to the media distribution service device simultaneously.
Above-mentioned steps is finished file to the switching of direct broadcast band type, and suitable wheel is broadcast channel program switches to programme televised live from TVOD or VOD program situation.
As shown in Figure 9, for program among the present invention switch in direct broadcast band to the switching flow figure of file.
Step 111, media control server issue the closing passage control command to media store server, live code stream Distributor respectively, close live code stream Distributor sends media channel order from live code stream to media store server.After ordering successfully processing, live code stream no longer is forwarded to media store server.
Step 112, media control server control media store server is opened the program media source file.
Step 113, media store server read the source of media file, organize code stream to utilize opened media channel to be forwarded to the media distribution service device.
Above-mentioned steps is finished programme televised live and is switched to file type, suitable wheel broadcast channel program from the programme televised live to TVOD or the VOD program switch.
As shown in figure 10, for program among the present invention switch in first programme televised live to the switching flow figure of second programme televised live.
Step 121, media control server check whether the channel state of second programme televised live is normal, if normal, then carry out next step.
Step 122, media control server are sent out a channel command to the media code circulation that media store server, live code stream Distributor issue the live code stream Distributor of closing second programme televised live and media store server respectively.After ordering successfully processing, the live code stream of first programme televised live no longer is forwarded to media store server.That is to say that media control server issues the closing passage control command to live code stream Distributor, media store server, the live code stream Distributor of closing the first channel place sends the media channel of live code stream to media store server.
Step 123, media control server issue the live code stream Distributor of opening second programme televised live to media store server, live code stream Distributor respectively and send out channel command to the media code circulation of media store server.Order successfully handle after, the live code stream of second programme televised live is forwarded to media store server, media store server will receive the media channel that code stream uses the media distribution service device, be forwarded to the media distribution service device.That is to say, media control server issues to live code stream Distributor, media store server and opens channel control command, the live code stream Distributor of opening the second channel place sends the media channel of live code stream to media store server, and media store server is forwarded to the media distribution service device with the live code stream of second channel.
Above-mentioned steps is finished the type switching of first programme televised live to second programme televised live, and suitable wheel is broadcast channel program and switched from the programme televised live to the programme televised live.
In the scheme of the present invention, the type of described current program comprises media file, direct broadcast band program; The type of described next program comprises media file, direct broadcast band program.Described media file comprises: be stored in video request program (VOD) content in the file system, telecast demanding (TVOD) content of filing, real-time code stream with direct broadcast band, it is the real-time code stream of certain channel, as the real-time code stream of in progress certain section of intercutting CCTV-1, or their combination.
Described method embodiment is corresponding with described device embodiment, the description of relevant portion gets final product among the part comparable device embodiment that does not describe in detail in method embodiment, and the description of relevant portion gets final product among the part reference method embodiment that does not describe in detail in device embodiment.
One of ordinary skill in the art will appreciate that, realize that all or part of step in the foregoing description method is to instruct relevant hardware to finish by program, described program can be stored in the computer read/write memory medium, this program is when carrying out, comprise step as above-mentioned method embodiment, described storage medium, as: magnetic disc, CD, read-only storage memory body (Read-Only Memory, ROM) or at random store memory body (Random Access Memory, RAM) etc.
In each method embodiment of the present invention; the sequence number of described each step can not be used to limit the sequencing of each step; for those of ordinary skills, under the prerequisite of not paying creative work, the priority of each step is changed also within protection scope of the present invention.
The above is a preferred implementation of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from principle of the present invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.