Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, below in conjunction with embodiment and accompanying drawing, the present invention is described in more detail.
The present invention arranges the Streaming Media gateway between client and streaming media server, with adaptive multiple access protocol, the business that makes client can ask other protocol type stream media system to provide has been expanded the service application of client-requested.Referring to Fig. 1, structural representation for radio data system of the present invention, this system comprises client, Streaming Media gateway and stream media system, described Streaming Media gateway comprises protocol interface, messaging bus and service logic module, described protocol interface comprises client-side interface and ability unit interface, described service logic module comprise each protocol type corresponding act on behalf of submodule;
Described client is used for sending protocol message to client-side interface;
Described client-side interface is used for the protocol message that client sends is packaged into general format message, sends to messaging bus; Described general format message comprises message header and message content, and described message header has identified protocol type corresponding to message content;
Described messaging bus is used for the message content protocol type of the general format message that receives is identified, and message content is sent to the submodule of acting on behalf of that can process the respective protocol kind of message in service logic module;
The described submodule of acting on behalf of is used for the message content that receives is resolved, and according to the information call capability unit interface after resolving, and the notification capabilities unit interface is acted on behalf of the stream media system that submodule is selected;
Described ability unit interface comprises the ability parts sub-interface corresponding with the stream media protocol type, is used for acting on behalf of calling of submodule according to described, carries out information interaction with the stream media system of selecting, the receiveing the response of receiving stream media system feedback; To receive the response is converted to general format message, feeds back to act on behalf of accordingly submodule in service logic module;
The described submodule of acting on behalf of also is used for receiving receiveing the response of above-mentioned each ability parts sub-interface feedback, sends to client-side interface;
Described client-side interface also is used for receiving from the described message of acting on behalf of submodule, sends to client.
Alternatively, described Streaming Media gateway also comprises resource management module, and described resource management module comprises stream media system management submodule and frequency resource management submodule;
Described stream media system management submodule is used for carrying out the selection of stream media system according to the request of acting on behalf of submodule, the stream media system information of selecting is fed back to act on behalf of submodule;
Described frequency resource management submodule is used for carrying out frequency according to the request of acting on behalf of submodule and selects, and the frequency point information of selecting is fed back to act on behalf of submodule;
The described submodule of acting on behalf of, also the frequency point information handling capacity parts sub-interface for the described stream media system of selecting that will receive sends the stream media system of selecting to.
In prior art, client is only carried out information interaction with the stream media system of same protocol type, has a plurality ofly but have stream media system with client same protocol type, therefore, need to select stream media system; To the selection step of stream media system, carry out before conversation initialization carrying out between client and stream media system, and completed by network side in prior art.In the present invention, also can adopt the scheme of prior art to be selected by the network side relevant device, different is, can select the stream media system of different agreement type in the present invention, then, the stream media system of selecting is offered act on behalf of submodule; Also can, selected by stream media system management submodule, after determining the protocol type of stream media system, select again a stream media system corresponding to this protocol type, specific implementation and the prior art of its selection are similar, such as adopting priority mode or random fashion etc. to select, exceed here and give unnecessary details.
In prior art, before carrying out media flow transmission between client and stream media system, stream media system need to select to transmit frequency; In the present invention, not only can adopt existing mode, be carried out the selection of frequency point information by stream media system, can also concentrate the selection of being completed frequency point information by frequency resource management submodule; Its selection scheme and prior art are similar, do not give unnecessary details here.
Alternatively, described client comprises web applications client, RTSP client or SIP monitor client, and the RTSP client specifically comprises set-top box etc.; Described client protocol interface comprises Simple Object Access Protocol (SOAP, Simple Object Access Protocol) client sub-interface, RTSP client sub-interface or SIP client sub-interface, SOAP client sub-interface is connected with the web applications client, RTSP client sub-interface is connected with the RTSP client, and SIP client sub-interface is connected with the SIP monitor client;
Described ability unit interface comprises RTSP ability parts sub-interface, SSP/LSCP ability parts sub-interface or SIP ability parts sub-interface; Described stream media system comprises RTSP stream media system, Instrument Society Of America's standard I SA stream media system or SIP supervisory control system; Described RTSP ability parts sub-interface is connected with the RTSP stream media system, and described SSP/LSCP ability parts sub-interface is connected with described ISA stream media system, and described SIP ability parts sub-interface is connected with described SIP supervisory control system;
The server logic module comprises that SOAP acts on behalf of submodule, RTSP acts on behalf of submodule or sip agent submodule; According to actual needs, respectively acting on behalf of submodule can be connected with any ability parts sub-interface.Respectively acting on behalf of submodule also connects with the client sub-interface that protocol type is corresponding separately: SOAP acts on behalf of submodule and is connected with SOAP client sub-interface, RTSP acts on behalf of submodule and is connected with RTSP client sub-interface, and the sip agent submodule is connected with SIP client sub-interface.Here take customer end adopted SOAP, RTSP and Session Initiation Protocol as example, each several part in stream media system of the present invention is described; Naturally, the present invention program is not limited in this three kinds of agreements.
Alternatively, described Streaming Media gateway also comprises object container, be used for to preserve the plug-in unit about service logic module, client-side interface and ability unit interface, when service logic module need to be added when acting on behalf of submodule, obtain corresponding plug-in unit from object container, generate and act on behalf of submodule; Perhaps, when client-side interface need to add the client sub-interface, obtain corresponding plug-in unit from object container, generate the client sub-interface; Perhaps, when the ability unit interface need to add ability parts sub-interface, obtain corresponding plug-in unit from object container, generative capacity parts sub-interface.
This system also comprises webmaster, is used for statistics, reporting system information, as, add up the current number of users that carries out video request program.In system configuration, webmaster generally all can be set system is added up and reports, exceed here and give unnecessary details.
Use the present invention program, can support the more client access of multi-protocols, access such as the XMPP that supports IM etc.; And, can also support the access of multiple stream media system.
Further, after adopting object container, to different access protocols, service logic module can increase the corresponding submodule support of acting on behalf of.Service logic module also can make up the multiple different submodule of acting on behalf of and form new service logic application.By such expansion, finally form a unified ability gateway.What protocol interface docked is different networks, different terminals, different agreements.The ability that different networks is corresponding different, this ability comprises the Streaming Media ability, IM ability etc.
The present invention also provides a kind of broadcast and television information exchange method, the method arranges the Streaming Media gateway between client and stream media system, described Streaming Media gateway comprises client-side interface, ability unit interface, messaging bus and service logic module, described service logic module comprise each protocol type corresponding act on behalf of submodule;
The method also comprises:
Client sends protocol message to client-side interface;
Client-side interface is packaged into general format message with the protocol message that client sends, and sends to messaging bus; Described general format message comprises message header and message content, and described message header has identified protocol type corresponding to message content;
Messaging bus is identified the message content protocol type of the general format message of reception, message content is sent to the submodule of acting on behalf of that can process the respective protocol kind of message in service logic module;
Act on behalf of submodule the message content that receives is resolved, according to the information call capability unit interface after resolving, and the stream media system of selecting is notified to the ability unit interface;
The ability unit interface comprises the ability parts sub-interface corresponding with the stream media protocol type, acts on behalf of calling of submodule according to described, carries out information interaction with the stream media system of selecting, the receiveing the response of receiving stream media system feedback; To receive the response is converted to general format message, feeds back to act on behalf of accordingly submodule in service logic module;
Act on behalf of submodule and receive receiveing the response of above-mentioned each ability parts sub-interface feedback, send to client-side interface;
Client-side interface receives from the described message of acting on behalf of submodule, sends to client.
The below take client be the web applications client as example, by Fig. 2,3 and 4 flow process, the method that the radio data system that the present invention is based on Fig. 1 carries out information interaction is described; Fig. 2,3 and 4 sends to relevant device with the message that is directly sent to relevant device by client in prior art by the Streaming Media gateway.
Can consult voluntarily the defining interface function between Streaming Media gateway and client, then carry out interface interchange, interface function can corresponding one or more information order; For an interface function can corresponding multiple messages order situation, interface function of client call just is equivalent to send multiple messages to the respective streams media system in prior art; Also can, interface function is not set, this situation, client do not send information order by the mode of calling interface function to stream media system, and need to send one by one information order to the Streaming Media gateway.With the message that is directly sent to stream media system by client in prior art, adopt the mode of interface function to send by the Streaming Media gateway in Fig. 2,3 and 4, like this, can reduce the quantity that sends message between client and gateway.
Table 1 shows the interface (API, Application ProgrammingInterface) that relates in Fig. 2,3 and 4 flow processs, and table 2 shows the order under different agreement corresponding to each interface:
Interface name |
Function |
msInit |
Initialization |
msPlay |
Begin to play |
msPause |
Suspend and play |
msStop |
Stop playing |
msHeartbeat |
Send heartbeat |
msNotice |
Event notice |
The interface definition of table 1 SOAP
The order that each interface of table 2 is corresponding
Fig. 2 is connected to by the Streaming Media gateway flow chart that the RTSP stream media system carries out video-see for adopting the SOAP access, and it comprises the following steps:
Step 201, the msInit interface between client call and Streaming Media gateway sends the msInit instruction to the Streaming Media gateway.
Step 202, Streaming Media gateway become the msInit instruction transformation describing message (DESCRIBE) instruction of RTSP agreement, send to the RTSP streaming media server.
Step 203, RTSP streaming media server are returned to the DESCRIBE result to the Streaming Media gateway.
The DESCRIBE result of returning is 200ok, shows that the RTSP streaming media server completed about DESCRIBE message respective handling.
Step 204, Streaming Media gateway become the msInit instruction transformation foundation (SET UP) instruction of RTSP agreement, send to the RTSP streaming media server.
Send SET UP instruction, be used for request RTSP streaming media server and set up circulation flow path, as set up the audio/video flow path between RTSP streaming media server and client.
Step 205, RTSP streaming media server are returned to the SETUP result to the Streaming Media gateway.
The SETUP result of returning is 200ok, shows that the RTSP streaming media server completed the foundation of circulation flow path.
Step 206, streaming media server is responded the msInit result to client.
Step 207, the msPlay interface between client call and Streaming Media gateway sends the msPlay instruction to the Streaming Media gateway, the request streaming media playing.
Step 208, Streaming Media gateway become the msPlay instruction transformation broadcast (Play) instruction of RTSP agreement, send to the RTSP streaming media server.
Step 209, RTSP streaming media server are returned to the Play result to the Streaming Media gateway.
The Play result of returning is 200ok, shows that the RTSP streaming media server is about to the client transmissions Streaming Media.
Step 210, the audio/video flow path of RTSP streaming media server by setting up before is to the client push audio, video data.
Step 211, the Streaming Media gateway is responded the msPlay result to client.
Step 212, client regularly call and the Streaming Media gateway between the msHeartbeat interface, the msHeartbeat instruction that sends to the Streaming Media gateway.
Step 213, Streaming Media gateway become the msHeartbeat instruction transformation (GET_PARAMETER) instruction that gets parms of RTSP agreement, send to the RTSP streaming media server.
Step 214, RTSP streaming media server are returned to the GET_PARAMETER result to the Streaming Media gateway.
Step 215, the Streaming Media gateway is responded the msHeartbeat result to client.
Step 216 is played to the position of end when program, the RTSP streaming media server sends notice (ANNOUNCE) instruction notification Streaming Media gateway program to be finished.
Step 217, Streaming Media gateway are called msNotice interface notice client slide program and are finished.
Step 218, client call msStop interface sends the msStop instruction to the Streaming Media gateway, and the Streaming Media gateway is closed (TEARDOWN) instruction with what the msStop instruction transformation became the RTSP agreement, sends to the RTSP streaming media server.
Step 219, RTSP streaming media server are returned to the TEARDOWN result to the Streaming Media gateway.
The TEARDOWN result of returning is 200ok, shows that the RTSP streaming media server closed program.
Step 220, the Streaming Media gateway is responded the msStop result to client.
Fig. 3 is for adopting the SOAP access, be connected to by the Streaming Media gateway flow chart that SRM cluster and SSP/LSCP streaming media server carry out video-see, wherein SSP/LSCP streaming media server and SRM cluster all belong to ISA framework program request (VOD, Video On Demand) system.
The flow process of Fig. 3 comprises the following steps:
Step 301, the msInit interface between client call and gateway sends the msInit instruction to the Streaming Media gateway.
Step 302, the Streaming Media gateway becomes the client session of SSP agreement to set up request (Client Session SetUp Request) instruction the msInit instruction transformation, sends to the SRM cluster.
Step 303, the SRM cluster is set up indication (Server Session Setup Indication) instruction to the server session that the SSP/LSCP streaming media server sends the SSP agreement.
Step 304, the SRM cluster is processed indication (Client Session Proceding Indication) instruction to the client session that the Streaming Media gateway sends the SSP agreement, and the notification streams media gateway is being processed client session and is being set up request.
Step 305, the SSP/LSCP streaming media server increases resource request (Server Add Resource Request) instruction to the server that the SRM cluster returns to the SSP agreement, informs the program resource list that the SRM cluster can be used.
Step 306, the SRM cluster increases resource confirmation (Server Add Resource Confirm) message to the server that the SSP/LSCP streaming media server sends the SSP agreement, to confirm resource.
Step 307, the SSP/LSCP streaming media server is set up response (Server Session Setup Reponse) to the server session that the SRM cluster returns to the SSP agreement, and the expression resource has assigned.
Step 308, the SRM cluster is set up confirmation (Client Session Setup Confirm) to the client session that the Streaming Media gateway sends the SSP agreement, and expression is set up and is completed.
Step 309, Streaming Media gateway send the client connection request (Client Connect Request) of SSP agreement to the SRM cluster, expression need to be set up the LSCP connection request.
Step 310, the SRM cluster connects indication (Server Connect Indication) to the server that the SSP/LSCP streaming media server sends the SSP agreement, and notice LSCP connection is about to set up.
Step 311, the Streaming Media gateway returns to the msInit result to client.
Step 312, the msPlay interface between client call and Streaming Media gateway sends the msPlay instruction to the Streaming Media gateway, the request streaming media playing.
Step 313, Streaming Media gateway become the msPlay instruction transformation broadcast (PLAY) instruction of LSCP, send to the SSP/LSCP streaming media server, and request is play.
In practice, described PLAY instruction also can be F.F. (FAST-FORWARD) instruction, rewinding (REWIND) instruction etc., and rewinding is that accent is play.
Step 314, the SSP/LSCP streaming media server is responded result (LSCP Reply) to the Streaming Media gateway.
Step 315, the SSP/LSCP streaming media server is to the client push audio, video data.
Step 316, the Streaming Media gateway returns to the msPlay result to client.
Step 317, client regularly call and the Streaming Media gateway between the msHeartbeat interface, the msPlay instruction that sends to the Streaming Media gateway.
Call and the Streaming Media gateway between the msHeartbeat interface, to keep heartbeat.
Step 318, Streaming Media gateway become the msHeartbeat instruction transformation client state request (the Client Status Request) instruction of SSP agreement, send to the SRM cluster.
Step 319, the SRM cluster sends server state request (Server Status Request) instruction query State to the SSP/LSCP streaming media server.
Step 320, the SSP/LSCP streaming media server confirms that by the server state of SSP agreement (Server Status Confirm) message is to SRM cluster return state.
Step 321, the SRM cluster confirms that by the client state of SSP agreement (Client Status Confirm) message is to Streaming Media gateway return state.
Step 322, the Streaming Media gateway returns to the msHeartbeat result to client.
Step 323, SSP/LSCP streaming media server send event (Event) instruction of LSCP agreement to the Streaming Media gateway, the notice asynchronous event.
Step 324, client call msStop interface sends the msStop instruction to the Streaming Media gateway, to stop broadcast.
Step 325, Streaming Media gateway stop session client releasing request (Client Release Request) instruction with what the msStop instruction transformation became the SSP agreement, send to the SRM cluster.
Step 326, SRM cluster send server releasing request (the Server Release Request) request of SSP agreement to the SSP/LSCP streaming media server.
Step 327, the SSP/LSCP streaming media server discharges indication (Server Release Indication) to the server that the SRM cluster returns to the SSP agreement.
Step 328, the SRM cluster discharges indication (Client Release Indication) to the client that the Streaming Media gateway returns to the SSP agreement.
Step 329, the client that the Streaming Media gateway is initiated the SSP agreement to the SRM cluster discharges confirmation (Client Release Confirm) message, closes with confirmation.
Step 330, the SRM cluster discharges confirmation (Server Release Confirm) message to the server that the SSP/LSCP streaming media server sends the SSP agreement, closes with confirmation.
Step 331, the SSP/LSCP streaming media server stops plug-flow, and responds the server release response (Server Release Reponse) of SSP agreement to the SRM cluster.
Step 332, the client that the SRM cluster is responded the SSP agreement to the Streaming Media gateway discharges response (Client Release Response).
Step 333, the Streaming Media gateway returns to the msStop result to client.
Fig. 4 is connected to by the Streaming Media gateway flow chart that the SIP monitoring server carries out video-see for adopting the SOAP access, and it comprises the following steps:
Step 401, the msInit interface between client call and gateway sends the msInit instruction to the Streaming Media gateway.
Step 402, Streaming Media gateway do not need and the communication of SIP monitoring server, and the backward client of inter-process is returned to the msInit result.
Step 403, the msPlay interface between client call and Streaming Media gateway sends the msPlay instruction to the Streaming Media gateway, the request streaming media playing.
Step 404, Streaming Media gateway become the msPlay instruction transformation broadcast (Play) instruction of Session Initiation Protocol, send to the SIP monitoring server.
The Play instruction can be by the Invite command transfer in Session Initiation Protocol, the subject=Play in the Invite order.
Step 405, the SIP monitoring server is responded the SIP ALERTING message and returns results to the Streaming Media gateway.
Step 406, the SIP monitoring server returns results to the Streaming Media gateway.
The result of returning represents with 200OK.
Step 407, the Streaming Media gateway represents to receive result to SIP monitoring server SIP acknowledge message.
This acknowledge message represents with ACK.
Step 408, the SIP monitoring server is to client push RTP or TS stream.
Step 409, the Streaming Media gateway is responded the msPlay result to client.
This result represents with OK.
Step 410, client call msStop interface sends the msStop instruction to the Streaming Media gateway.
Client call msStop interface is watched stopping.
Step 411, the Streaming Media gateway stops session (Bye) instruction to the SIP monitoring server with what the msStop instruction transformation became Session Initiation Protocol, sends to the SIP monitoring server.
Step 412, SIP monitoring server stop pushing away Liu's co-current flow media gateway and respond result.
This result is expressed as 200 OK.
Step 413, the Streaming Media gateway is responded the msStop result to client.
This result is expressed as OK.
in the flow process of Fig. 2, step 201 is passed through the Streaming Media gateway to 206 for client and is initiated the mutual process of initialization to the RTSP streaming media server, step 207 is initiated the process of video playback to the RTSP streaming media server by the Streaming Media gateway for client to step 211, step 212 is initiated the process of heartbeat inspecting to the RTSP streaming media server by the Streaming Media gateway for client to step 215, the process that step 216 is notified to the client initiated event by the Streaming Media gateway for the RTSP streaming media server to step 217, the process that step 218 stops playing to the initiation of RTSP streaming media server by the Streaming Media gateway for client to step 220.Similarly, the flow process of Fig. 3 and Fig. 4 has also comprised a plurality of processing procedures, does not exemplify one by one here.
The initialization reciprocal process of the below in Fig. 2 is as example, and in conjunction with the structure of Fig. 1, the operation of convection current media gateway describes, and other process is similar with it; This process as shown in Figure 5, it comprises the following steps:
Step 501, Web applications client call and SOAP client sub-interface between the msInit interface.
Each client adopts respectively fixing protocol type, every kind of protocol type correspondence client sub-interface separately, and like this, each client is by each self-corresponding client sub-interface incoming stream media gateway.Particularly, in the present embodiment, the web applications client is by SOAP client sub-interface incoming stream media gateway.
The Web applications client call and SOAP client sub-interface between the msInit interface specifically comprise: the Web applications client sends the msInit instruction to SOAP client sub-interface.
Step 502, SOAP client sub-interface is packaged into general format message with the msInit instruction that receives, and sends to messaging bus.
General format is the unified message form that transmits between each module in the Streaming Media gateway, and it can set up on their own as required, and general format message comprises message header and message content.In this step, message header has comprised protocol type corresponding to message content, is the soap protocol type here.
The instruction message that receives is converted to the general format message of setting, for the technology that the art technology person of recognizing people is easily realized, does not give unnecessary details here.
Step 503, messaging bus is identified the message content protocol type of the general format message of reception, message content is sent to the submodule of acting on behalf of of respective protocol kind of message.
In the present embodiment, it is SOAP that messaging bus identifies the message content protocol type, sends to SOAP to act on behalf of submodule message content.
And messaging bus also will send the client sub-interface of this general format message and inform that SOAP acts on behalf of submodule.
Step 504, SOAP acts on behalf of submodule the message content that receives is resolved, and according to the information call capability parts sub-interface after resolving, and the stream media system of selecting is notified to the ability unit interface.
Each stream media system adopts respectively fixing protocol type, every kind of corresponding ability parts sub-interface separately of protocol type difference, and like this, the every flow media system is by each self-corresponding ability parts sub-interface incoming stream media gateway.In the present embodiment, it is the RTSP stream media system that SOAP acts on behalf of the stream media system that submodule selects, particularly, SOAP acts on behalf of submodule and obtains the stream media system of selection: SOAP from resource management module and act on behalf of submodule and send about selecting the request of stream media system to resource management module, resource management module is selected according to request, the stream media system information of selecting is fed back to SOAP act on behalf of submodule.Resource management module can be selected at random, also can select according to predefined relation, supposes that here predefined relation comprises: the stream media system of acting on behalf of the submodule selection for SOAP is the RTSP stream media system.
And the RTSP stream media system passes through RTSP ability parts sub-interface incoming stream media gateway, and correspondingly, the ability parts sub-interface that calls is RTSP ability parts sub-interfaces.
Step 505, RTSP ability parts sub-interface is acted on behalf of calling of submodule according to RTSP, carries out information interaction with the RTSP streaming media server of selecting, the receiveing the response of receiving stream media system feedback.
When carrying out information interaction with the RTSP streaming media server, it is the corresponding message of RTSP that RTSP ability parts sub-interface needs to send to the message conversion of RTSP streaming media server; This conversion is that those skilled in the art are easy to realize, does not give unnecessary details here.
Step 506, RTSP ability unit interface will be receiveed the response and will be converted to general format message, feed back to SOAP and act on behalf of submodule.
Step 504 after the message content that receives is resolved, is learnt and need to be carried out the initialization flow process in 506, RTSP ability unit interface is called, and specifically comprises:
SOAP acts on behalf of submodule and sends the DESCRIBE instruction to RTSP ability parts sub-interface; RTSP ability parts sub-interface becomes the DESCRIBE instruction transformation describing message (DESCRIBE) instruction of RTSP, sends to the RTSP streaming media server; The RTSP streaming media server returns to the DESCRIBE result to RTSP ability parts sub-interface; RTSP ability parts sub-interface feeds back to SOAP and acts on behalf of submodule after the DESCRIBE result is packaged into general format message;
SOAP acts on behalf of submodule and sends SET UP instruction to RTSP ability parts sub-interface again, RTSP ability parts sub-interface becomes SET UP instruction transformation the SET UP instruction of RTSP, send to the RTSP streaming media server, the RTSP streaming media server returns to the SETUP result to RTSP ability parts sub-interface; RTSP ability parts sub-interface will feed back to SOAP and acts on behalf of submodule after receiveing the response and being packaged into general format message.
Step 507, SOAP acts on behalf of submodule and receives receiveing the response of RTSP ability parts sub-interface feedback, sends to SOAP client sub-interface.
Receiveing the response of receiving in this step is the msInit result.
Step 508, SOAP client sub-interface receives the message of acting on behalf of submodule from SOAP, sends to the web applications client.
In this step, SOAP client sub-interface acts on behalf of with SOAP the msInit result that submodule sends, and is converted to the corresponding message in soap protocol, sends to the web applications client; Be the corresponding message of specified protocol with a certain message conversion, be the easy technology that realizes of those skilled in the art.
Fig. 2,3,4 accesses take SOAP as terminal, carries out as using access take RTSP, SSP/LSCP and SIP, for example understands the adaptive of multiple access protocol; The access take RTSP or SIP etc. as terminal in the mode for use accessing such as RTSP, SSP/LSCP or SIP, with Fig. 2,3,4 similar, being exceeded here and being given unnecessary details.
The above is only preferred embodiment of the present invention, and is in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of making, is equal to replacement, improvement etc., within all should being included in the scope of protection of the invention.