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 is provided with 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, and described service logic module comprises the submodule of acting on behalf of of each protocol type correspondence;
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 message content corresponding protocols type;
Described messaging bus is used for the message content protocol type of the general format message that receives is discerned, and message content is sent to the submodule of acting on behalf of that can handle the respective protocol kind of message in the 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 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 submodule in the service logic module accordingly;
The described submodule of acting on behalf of also is used for receiveing the response of receiving ability parts sub-interface feedback, sends to client-side interface;
Described client-side interface also is used to receive the message of acting on behalf of submodule from described, 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 according to the request of acting on behalf of submodule the selection of stream media system, the stream media system feedback information of selecting is given 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, the frequency point information handling capacity parts sub-interface that also is used for the described stream media system of selecting that will receive sends the stream media system of selecting to.
In the 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 select stream media system; To the selection step of stream media system, carry out before the conversation initialization carrying out between client and the stream media system, and finish in the prior art by network side.Among 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 among the present invention, then, the stream media system of selecting is offered act on behalf of submodule; Also can, select by stream media system management submodule, after determining the protocol type of stream media system, select a stream media system of this protocol type correspondence again, the specific implementation and the prior art of its selection are similar, for example can adopt priority mode or random fashion etc. to select, exceed here and give unnecessary details.
In the prior art, carry out between client and the stream media system before the media flow transmission, stream media system need select to transmit frequency; Among the present invention, not only can adopt existing mode, carry out the selection of frequency point information, can also concentrate the selection of finishing frequency point information by frequency resource management submodule by stream media system; 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 is connected with protocol type corresponding client terminal interface 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 be example with customer end adopted SOAP, RTSP and Session Initiation Protocol, each several part in the 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, is used to preserve the plug-in unit about service logic module, client-side interface and ability unit interface, when service logic module need be added when acting on behalf of submodule, from object container, obtain corresponding insert, generate and act on behalf of submodule; Perhaps, when client-side interface need add the client sub-interface, from object container, obtain corresponding insert, generate the client sub-interface; Perhaps, when the ability unit interface need add ability parts sub-interface, from object container, obtain corresponding insert, 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.
Utilization the present invention program can support that more the client of multi-protocols inserts, and for example supports the XMPP access of IM etc.; And, can also support the access of multiple stream media system.
Further, adopt after the 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, this method is provided with 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, and described service logic module comprises the submodule of acting on behalf of of each protocol type correspondence;
This 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 message content corresponding protocols type;
Messaging bus is discerned 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 handle the respective protocol kind of message in the service logic module;
Act on behalf of submodule the message content that receives is resolved,, and the stream media system of selecting is notified to the ability unit interface according to the information call capability unit interface after resolving;
The ability unit interface is acted 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 submodule in the service logic module accordingly;
Act on behalf of receiveing the response of submodule receiving 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.
Be that the web applications client is an example with client below, by Fig. 2,3 and 4 flow process the radio data system that the present invention is based on Fig. 1 carried out information interactive method and describe; Fig. 2,3 and 4 sends to relevant device with the message that is directly sent to relevant device by client in the prior art by the Streaming Media gateway.
Can consult the defining interface function voluntarily between Streaming Media gateway and the client, carry out interface interchange then, 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 the 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 send information order one by one to the Streaming Media gateway.With the message that directly sends by client in the prior art, adopt the mode of interface function to send among Fig. 2,3 and 4, like this, can reduce the quantity that sends message between client and the gateway by the Streaming Media gateway to stream media system.
Table 1 shows the interface (API, Application Programming Interface) that relates in Fig. 2,3 and 4 flow processs, and table 2 shows the order under the different agreement of each interface correspondence:
Interface name |
Function |
msInit |
Initialization |
msPlay |
Begin to play |
msPause |
Suspend and play |
msStop |
Stop to play |
msHeartbeat |
Send heartbeat |
msNotice |
Event notice |
The interface definition of table 1SOAP
The order of each interface correspondence of table 2
Fig. 2 inserts for adopting SOAP, is connected to the flow chart that the RTSP stream media system carries out video-see by the Streaming Media gateway, and it may further comprise the steps:
Step 201, the msInit interface between client call and the Streaming Media gateway sends the msInit instruction to the Streaming Media gateway.
Step 202, the Streaming Media gateway becomes the describing message (DESCRIBE) of RTSP agreement to instruct the msInit instruction transformation, sends to the RTSP streaming media server.
Step 203, RTSP streaming media server are returned DESCRIBE result and are given the Streaming Media gateway.
The DESCRIBE result who returns is 200ok, shows that the RTSP streaming media server finished about DESCRIBE message respective handling.
Step 204, the Streaming Media gateway becomes the foundation (SET UP) of RTSP agreement to instruct the msInit instruction transformation, sends to the RTSP streaming media server.
Send SET UP instruction, be used to ask the RTSP streaming media server to set up circulation flow path, as set up the audio/video flow path between RTSP streaming media server and the client.
Step 205, RTSP streaming media server are returned SETUP result and are given the Streaming Media gateway.
The SETUP result who returns is 200ok, shows that the RTSP streaming media server finished the foundation of circulation flow path.
Step 206, streaming media server is responded msInit result to client.
Step 207, the msPlay interface between client call and the Streaming Media gateway sends the msPlay instruction to the Streaming Media gateway, the request streaming media playing.
Step 208, the Streaming Media gateway becomes the broadcast (Play) of RTSP agreement to instruct the msPlay instruction transformation, sends to the RTSP streaming media server.
Step 209, RTSP streaming media server are returned Play result and are given the Streaming Media gateway.
The Play result who returns 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 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, the Streaming Media gateway becomes get parms (GET_PARAMETER) of RTSP agreement to instruct the msHeartbeat instruction transformation, sends to the RTSP streaming media server.
Step 214, RTSP streaming media server are returned GET_PARAMETER result and are given the Streaming Media gateway.
Step 215, the Streaming Media gateway is responded msHeartbeat result to client.
Step 216, when the position of playing programs to end, 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 becomes close (TEARDOWN) of RTSP agreement to instruct the msStop instruction transformation, sends to the RTSP streaming media server.
Step 219, RTSP streaming media server are returned TEARDOWN result and are given the Streaming Media gateway.
The TEARDOWN result who returns is 200ok, shows that the RTSP streaming media server closed program.
Step 220, the Streaming Media gateway is responded msStop result to client.
Fig. 3 inserts for adopting SOAP, be connected to the flow chart that SRM cluster and SSP/LSCP streaming media server carry out video-see by the Streaming Media gateway, 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 may further comprise the steps:
Step 301, the msInit interface between client call and the 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 handled 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 handled 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 the SSP agreement, informs program the Resources list that the SRM cluster can be used.
Step 306, the SRM cluster increases resource affirmation (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 the SSP agreement, and the expression resource allocation is finished.
Step 308, the SRM cluster is set up affirmation (Client Session Setup Confirm) to the client session that the Streaming Media gateway sends the SSP agreement, and expression is set up and is finished.
Step 309, the Streaming Media gateway is to the client connection request (Client Connect Request) of SRM cluster transmission SSP agreement, and expression need 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 msInit result to client.
Step 312, the msPlay interface between client call and the Streaming Media gateway sends the msPlay instruction to the Streaming Media gateway, the request streaming media playing.
Step 313, the Streaming Media gateway becomes the broadcast (PLAY) of LSCP to instruct the msPlay instruction transformation, sends 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 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, the Streaming Media gateway becomes the client state request (Client Status Request) of SSP agreement to instruct the msHeartbeat instruction transformation, sends to the SRM cluster.
Step 319, the SRM cluster is to SSP/LSCP streaming media server send server state request (Server Status Request) instruction query State.
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 msHeartbeat result to client.
Step 323, the SSP/LSCP streaming media server instructs to the incident (Event) that the Streaming Media gateway sends the LSCP agreement, the notice asynchronous event.
Step 324, client call msStop interface sends the msStop instruction to the Streaming Media gateway, to stop broadcast.
Step 325, the Streaming Media gateway becomes the session client that stops of SSP agreement to discharge request (Client Release Request) instruction the msStop instruction transformation, sends to the SRM cluster.
Step 326, the SRM cluster discharges request (Server Release Request) request to the server that the SSP/LSCP streaming media server sends the SSP agreement.
Step 327, the SSP/LSCP streaming media server discharges indication (Server Release Indication) to the server that the SRM cluster returns the SSP agreement.
Step 328, the SRM cluster discharges indication (Client Release Indication) to the client that the Streaming Media gateway returns the SSP agreement.
Step 329, the client that the Streaming Media gateway is initiated the SSP agreement to the SRM cluster discharges affirmation (Client Release Confirm) message, closes with affirmation.
Step 330, the SRM cluster discharges affirmation (Server Release Confirm) message to the server that the SSP/LSCP streaming media server sends the SSP agreement, closes with affirmation.
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 msStop result to client.
Fig. 4 inserts for adopting SOAP, is connected to the flow chart that the SIP monitoring server carries out video-see by the Streaming Media gateway, and it may further comprise the steps:
Step 401, the msInit interface between client call and the 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, return msInit result to client after the inter-process.
Step 403, the msPlay interface between client call and the Streaming Media gateway sends the msPlay instruction to the Streaming Media gateway, the request streaming media playing.
Step 404, the Streaming Media gateway becomes the broadcast (Play) of Session Initiation Protocol to instruct the msPlay instruction transformation, sends to the SIP monitoring server.
The Play instruction can be by the Invite command transfer in the Session Initiation Protocol, the subject=Play in the Invite order.
Step 405, the SIP monitoring server is responded SIP ALERTING message and return results to the Streaming Media gateway.
Step 406, the SIP monitoring server is to Streaming Media gateway return results.
The result who returns represents with 200OK.
Step 407, the Streaming Media gateway represents to receive the result to SIP monitoring server SIP acknowledge message.
This acknowledge message is represented with ACK.
Step 408, the SIP monitoring server is to client push RTP or TS stream.
Step 409, the Streaming Media gateway is responded 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 becomes the session (Bye) that stops of Session Initiation Protocol to instruct the msStop instruction transformation to the SIP monitoring server, sends to the SIP monitoring server.
Step 412, SIP monitoring server stop to push away Liu's co-current flow media gateway and respond the result.
This result is expressed as 200OK.
Step 413, the Streaming Media gateway is responded 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 to play 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.
Be example with the initialization reciprocal process among Fig. 2 below, 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 may further comprise the steps:
Step 501, Web applications client call and SOAP client sub-interface between the msInit interface.
Each client adopts fixing protocol type respectively, every kind of protocol type correspondence client sub-interface separately, and like this, each client is passed through corresponding client terminal interface incoming stream media gateway separately.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 message content corresponding protocols type, is the soap protocol type here.
The instruction message that receives is converted to the general format message of setting,, does not give unnecessary details here for the art technology person of the recognizing people technology of realization easily.
Step 503, messaging bus is discerned 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, message content is sent to SOAP act on behalf of submodule.
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 fixing protocol type respectively, every kind of corresponding respectively ability parts sub-interface separately of protocol type, and like this, each stream 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 obtains selection from resource management module stream media system: SOAP and acts on behalf of submodule to the request of resource management module transmission about the selection stream media system, resource management module is selected according to request, and the stream media system feedback information of selecting is acted on behalf of submodule to SOAP.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, the message conversion that RTSP ability parts sub-interface need will send to the RTSP streaming media server is the corresponding message of RTSP; 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 resolved, is learnt and need be carried out the initialization flow process in 506, then 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 describing message (DESCRIBE) of RTSP to instruct the DESCRIBE instruction transformation, sends to the RTSP streaming media server; The RTSP streaming media server returns DESCRIBE result and gives RTSP ability parts sub-interface; RTSP ability parts sub-interface feeds back to SOAP and acts on behalf of submodule after 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 SETUP result and gives RTSP ability parts sub-interface; RTSP ability parts sub-interface will feed back to SOAP and acts on behalf of submodule after will 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 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 is acted on behalf of the msInit result that submodule sends with SOAP, is converted to the corresponding message in the soap protocol, sends to the web applications client; With a certain message conversion is the corresponding message of specified protocol, is the easy technology that realizes of those skilled in the art.
Fig. 2,3,4 is that terminal inserts with SOAP, serves as to use to insert to carry out with RTSP, SSP/LSCP and SIP, for example understands the adaptive of multiple access protocol; With RTSP or SIP etc. is that terminal inserts, and serve as the mode of using access with RTSP, SSP/LSCP or SIP etc., with Fig. 2,3,4 similar, exceeds here and gives unnecessary details.
The above only is preferred embodiment of the present invention, and is in order to restriction the present invention, within the spirit and principles in the present invention not all, any modification of being made, is equal to replacement, improvement etc., all should be included within the scope of protection of the invention.