WO2012162989A1 - Media stream transmission method, channel initialization method and equipment - Google Patents

Media stream transmission method, channel initialization method and equipment Download PDF

Info

Publication number
WO2012162989A1
WO2012162989A1 PCT/CN2011/080346 CN2011080346W WO2012162989A1 WO 2012162989 A1 WO2012162989 A1 WO 2012162989A1 CN 2011080346 W CN2011080346 W CN 2011080346W WO 2012162989 A1 WO2012162989 A1 WO 2012162989A1
Authority
WO
WIPO (PCT)
Prior art keywords
media
channel
output channel
terminal
splicer
Prior art date
Application number
PCT/CN2011/080346
Other languages
French (fr)
Chinese (zh)
Inventor
张锦辉
黄治平
夏晖
李丛娟
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN201180001995.8A priority Critical patent/CN103141113B/en
Priority to PCT/CN2011/080346 priority patent/WO2012162989A1/en
Publication of WO2012162989A1 publication Critical patent/WO2012162989A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/81Monomedia components thereof
    • H04N21/812Monomedia components thereof involving advertisement data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/61Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio
    • H04L65/612Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio for unicast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/262Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists
    • H04N21/26258Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists for generating a list of items to be played back in a given order, e.g. playlist, or scheduling item distribution according to such list
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/44016Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving splicing one content stream with another content stream, e.g. for substituting a video clip
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/65Transmission of management data between client and server
    • H04N21/654Transmission by server directed to the client
    • H04N21/6543Transmission by server directed to the client for forcing some client operations, e.g. recording

Abstract

Disclosed in the present invention are a media stream transmission method, channel initialization method and equipment. The media stream transmission method comprises the following steps: a media splicer receives program media stream of a primary channel; when a terminal requests for the primary channel, the media splicer sends the program media stream to the terminal via a output channel corresponding to the terminal; the media splicer is configured with a corresponding relationship between the terminal and the output channel, which are one-to-one correspondence in the corresponding relationship; the media splicer sends an advertisement inserting notice message to an advertisement server via a TCP connection which is between the media splicer and the advertisement server and corresponding to the output channel; the media splicer is configured with a corresponding relationship between the output channel and the TCP connection, which are one-to-one correspondence in said corresponding relationship; and when receiving advertisement stream sent to the terminal from the advertisement server, the media splicer sends the advertisement stream to the terminal via the output channel corresponding to the terminal. The present invention reduces the number of the output channel which needs to be maintained and economizes the connection resource.

Description

媒体流传输方法、 频道初始化方法及设备 技术领域  Media stream transmission method, channel initialization method and device
本发明实施例涉及网络电视技术, 尤其涉及一种媒体流传输方法、 频 道初始化方法及设备。 背景技术  The embodiments of the present invention relate to network television technologies, and in particular, to a media stream transmission method, a channel initialization method, and a device. Background technique
互联网协议电视 ( Internet Protocol Televi s ion , 简称 IPTV ) 系 统中, 用户向媒体拼接器请求主频道 (Primary Channel ) 后, 媒体拼接 器从该主频道对应的组播设备接收包括有节目内容和广告时段的节目媒 体流, 同时还接收广告服务器 (Adverti sement Server ) 针对该用户定向 发送的广告媒体流。 媒体拼接器通过数字节目插播 (Digital Program Insert ion, 简称 DPI ) 技术将广告媒体流插入到节目媒体流的广告时段, 并将拼接后的媒体流转发给该用户。  In the Internet Protocol Telephony (IPTV) system, after the user requests the primary channel (Primary Channel) from the media splicer, the media splicer receives the program content and the advertising period from the multicast device corresponding to the primary channel. The program media stream, and also receives an advertisement media stream that the ad server (Adverti sement Server) is directed to send to the user. The media splicer inserts the advertisement media stream into the advertisement period of the program media stream through a Digital Program Insertion (DPI) technology, and forwards the spliced media stream to the user.
在通常的 IPTV 广告插入方法中, 预先为每一个需要插入广告的 Primary Channel 建立与用户的数目相同个数的输出频道 (Output Channel ) , 每个 Output Channel对应于一个用户。 相应地在广告服务器 与媒体拼接器之间需建立所有 Output Channel 对应的传输控制协议 ( Transmi ss ion Control Protocol , 简称 TCP ) 连接。 同一用户请求不 同的 Primary Channel时, 这些 Primary Channel分别对应不同的 Output Channel。 需要建立的 Output Channel 的总数为用户的数目与 Primary Channel的数目之积。 举例来说, 当有 M个用户和 N个 Primary Channel 时, 需建立 M X N个 Output Channel , 相应地广告服务器与媒体拼接器之 间需建立 M X N个 TCP连接。 媒体拼接器在 Primary Channel上接收节目 媒体流,通过与广告服务器之间的 TCP连接或其它连接接收广告服务器发 送的广告流。 媒体拼接器通过 Output Channel 向用户发送节目媒体流或 广告流。 媒体拼接器可以对不同终端, 在同一主频道的节目媒体流中插入 不同的广告流。 在终端切换频道时, 由于终端请求的 Primary Channel发 生改变, 相应地终端接收拼接后媒体流的 Output Channel 也发生改变。 因此, 媒体拼接器需根据切换后的 Primary Channel确定与该终端对应的 Output Channel。 In a typical IPTV advertisement insertion method, an output channel (Output Channel) of the same number as the number of users is created in advance for each Primary Channel that needs to insert an advertisement, and each Output Channel corresponds to one user. Correspondingly, a Transmit Control Protocol (TCP) connection corresponding to all Output Channels needs to be established between the advertisement server and the media splicer. When the same user requests a different Primary Channel, these Primary Channels correspond to different Output Channels. The total number of Output Channels that need to be established is the product of the number of users and the number of Primary Channels. For example, when there are M users and N Primary Channels, MXN Output Channels need to be established, and accordingly, MXN TCP connections need to be established between the advertisement server and the media splicer. The media splicer receives the program media stream on the Primary Channel, and receives the advertisement stream sent by the advertisement server through a TCP connection or other connection with the advertisement server. The media splicer sends a program media stream or an advertisement stream to the user through the Output Channel. The media splicer can insert different advertisement streams into the program media stream of the same main channel for different terminals. When the terminal switches channels, the Primary Channel is sent by the terminal. The change occurs, and accordingly, the output channel of the media stream after the terminal receives the splicing also changes. Therefore, the media splicer needs to determine an Output Channel corresponding to the terminal according to the switched Primary Channel.
在上述 IPTV广告插入方法中, 媒体拼接器和广告服务器间需预先建 立的 TCP连接的总数为用户的数目与 Primary Channel的数目之积, 连接 资源消耗较多。 发明内容  In the above IPTV advertisement insertion method, the total number of pre-established TCP connections between the media splicer and the advertisement server is the product of the number of users and the number of Primary Channels, and the connection resources are consumed more. Summary of the invention
本发明实施例提供一种媒体流传输方法、 频道初始化方法及设备, 用 以解决通常 IPTV的广告插入方法需消耗大量连接资源的缺陷。  The embodiments of the present invention provide a media stream transmission method, a channel initialization method, and a device, which are used to solve the defect that a normal IPTV advertisement insertion method consumes a large amount of connection resources.
本发明实施例提供一种媒体流传输方法, 包括:  The embodiment of the invention provides a media stream transmission method, including:
媒体拼接器接收主频道的节目媒体流;  The media splicer receives the program media stream of the main channel;
终端请求所述主频道时, 所述媒体拼接器通过与所述终端对应的输出 频道向所述终端发送所述节目媒体流, 所述媒体拼接器上设置有终端与输 出频道的对应关系, 在所述对应关系中终端与输出频道一一对应;  When the terminal requests the primary channel, the media splicer sends the program media stream to the terminal through an output channel corresponding to the terminal, where the media splicer is provided with a correspondence between the terminal and the output channel, where The terminal corresponds to the output channel in the corresponding relationship;
所述媒体拼接器通过与广告服务器之间的、 与所述输出频道所对应的 TCP连接, 向所述广告服务器发送广告插入通知消息; 所述媒体拼接器上 设置有输出频道与 TCP连接的对应关系, 在上述对应关系中所述输出频道 与所述 TCP连接一一对应;  The media splicer sends an advertisement insertion notification message to the advertisement server through a TCP connection with the output channel and the output server; the media splicer is provided with an output channel and a TCP connection. Relationship, in the foregoing correspondence, the output channel has a one-to-one correspondence with the TCP connection;
接收到所述广告服务器为所述终端发送的广告流后, 所述媒体拼接器 通过与所述终端对应的输出频道, 向所述终端发送所述广告流。  After receiving the advertisement stream sent by the advertisement server for the terminal, the media splicer sends the advertisement stream to the terminal through an output channel corresponding to the terminal.
本发明实施例还提供一种频道初始化方法, 包括:  The embodiment of the invention further provides a channel initialization method, including:
广告服务器接收终端的上线通知消息后, 在频道对应表查找与所述终 端对应的输出频道的标识; 所述频道对应表中包括终端与输出频道的对应 关系, 在所述对应关系中终端与输出频道一一对应;  After receiving the online notification message of the terminal, the advertisement server searches for the identifier of the output channel corresponding to the terminal in the channel correspondence table. The channel correspondence table includes a correspondence between the terminal and the output channel, where the terminal and the output are in the corresponding relationship. Channel one-to-one correspondence;
所述广告服务器向媒体拼接器发送包括与所述终端对应的输出频道 的标识的第一频道初始化消息;  The advertisement server sends a first channel initialization message including an identifier of an output channel corresponding to the terminal to the media splicer;
所述广告服务器接收到所述媒体拼接器的初始化响应后, 在所述广告 服务器与所述媒体拼接器之间, 建立与所述输出频道对应的 TCP连接。 本发明实施例提供一种媒体拼接器, 包括: After receiving the initialization response of the media splicer, the advertisement server establishes a TCP connection corresponding to the output channel between the advertisement server and the media splicer. An embodiment of the present invention provides a media splicer, including:
存储模块, 用于存储终端与输出频道的对应关系, 在所述对应关系中 终端与输出频道一一对应; 还用于存储输出频道与 TCP连接的对应关系, 在上述对应关系中所述输出频道与所述 TCP连接一一对应;  a storage module, configured to store a correspondence between the terminal and the output channel, where the terminal corresponds to the output channel in a one-to-one correspondence; and is further configured to store a correspondence between the output channel and the TCP connection, where the output channel is in the corresponding relationship One-to-one correspondence with the TCP connection;
节目媒体流传输模块, 用于接收主频道的节目媒体流; 并在终端请求 所述主频道时, 通过与所述终端对应的输出频道向所述终端发送所述节目 媒体流;  a program media stream transmission module, configured to receive a program media stream of the main channel; and when the terminal requests the main channel, send the program media stream to the terminal by using an output channel corresponding to the terminal;
广告流传输模块, 用于通过所述媒体拼接器与广告服务器之间的、 与 所述输出频道所对应的 TCP连接, 向所述广告服务器发送广告插入通知消 息; 接收到所述广告服务器为所述终端发送的广告流后, 所述媒体拼接器 通过与所述终端对应的输出频道, 向所述终端发送所述广告流。  An advertisement stream transmitting module, configured to send an advertisement insertion notification message to the advertisement server by using a TCP connection corresponding to the output channel between the media splicer and the advertisement server; receiving the advertisement server as a location After the advertisement stream sent by the terminal is described, the media splicer sends the advertisement stream to the terminal through an output channel corresponding to the terminal.
本发明实施例提供一种广告服务器, 包括:  An embodiment of the present invention provides an advertisement server, including:
查找模块, 用于接收终端的上线通知消息后, 在频道对应表查找与所 述终端对应的输出频道的标识; 所述频道对应表中包括终端与输出频道的 对应关系, 在所述对应关系中终端与输出频道一一对应;  a search module, configured to: after receiving an online notification message of the terminal, search for an identifier of an output channel corresponding to the terminal in the channel correspondence table; the channel correspondence table includes a correspondence between the terminal and the output channel, where the correspondence relationship is The terminal has a one-to-one correspondence with the output channel;
第一初始请求模块, 用于向媒体拼接器发送包括与所述终端对应的输 出频道的标识的第一频道初始化消息;  a first initial requesting module, configured to send, to the media splicer, a first channel initialization message that includes an identifier of an output channel corresponding to the terminal;
连接建立模块, 用于接收到所述媒体拼接器的初始化响应后, 在所述 广告服务器与所述媒体拼接器之间, 建立与所述输出频道对应的 TCP连接。  And a connection establishing module, configured to establish, after the initialization response of the media splicer, a TCP connection corresponding to the output channel between the advertisement server and the media splicer.
本发明实施例的媒体流传输方法、 频道初始化方法及设备, 媒体拼接 器接收到终端的频道请求后, 通过终端对应的输出频道向终端发送该频道 的节目媒体流, 同时还通过终端对应的输出频道, 将广告服务器为终端发 送的广告流发送给终端。 由于终端与输出频道一一对应, 终端请求不同的 主频道的节目媒体流, 媒体拼接器均通过同一个输出频道向终端发送广告 流和节目媒体流。 对于不同的终端, 媒体拼接器通过与输出频道 (与终端 绑定的输出频道)对应的 TCP连接向广告服务器发送广告插入消息。因此, 媒体拼接器只维护与终端个数相同的输出频道, 媒体拼接器和广告服务器 也只维护与终端个数相同的 TCP连接, 显著减少了需要维护的输出频道的 个数, 节省了连接资源。 在主频道增加时, 媒体拼接器不需要增加输出频 道, 广告服务器也不要增加与媒体拼接器之间的 TCP连接。 附图说明 为了更清楚地说明本发明实施例中的技术方案, 下面将对实施例描述中 所需要使用的附图作一简单地介绍, 显而易见地, 下面描述中的附图是本发 明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动性的 前提下, 还可以根据这些附图获得其他的附图。 The media stream transmission method, the channel initialization method and the device of the embodiment of the present invention, after receiving the channel request of the terminal, the media splicer sends the program media stream of the channel to the terminal through the output channel corresponding to the terminal, and also outputs the corresponding output of the terminal. The channel sends the advertisement stream sent by the advertisement server to the terminal to the terminal. Since the terminal and the output channel are in one-to-one correspondence, the terminal requests program media streams of different main channels, and the media splicer sends the advertisement stream and the program media stream to the terminal through the same output channel. For different terminals, the media splicer sends an advertisement insertion message to the advertisement server via a TCP connection corresponding to the output channel (the output channel bound to the terminal). Therefore, the media splicer only maintains the same number of output channels as the terminal, and the media splicer and the advertisement server only maintain the same TCP connection as the number of terminals, which significantly reduces the number of output channels that need to be maintained, saving connection resources. . The media splicer does not need to increase the output frequency when the main channel is increased. Road, the ad server also does not increase the TCP connection with the media splicer. BRIEF DESCRIPTION OF THE DRAWINGS In order to more clearly illustrate the technical solutions in the embodiments of the present invention, a brief description of the drawings to be used in the description of the embodiments will be briefly made. It is obvious that the drawings in the following description are some of the present invention. For the embodiments, those skilled in the art can obtain other drawings according to the drawings without any creative labor.
图 1为本发明提供的媒体流传输方法实施例一流程图;  FIG. 1 is a flowchart of Embodiment 1 of a media stream transmission method according to the present invention;
图 2为本发明提供的媒体流传输方法中的一种频道初始化方法实施例 流程图;  2 is a flowchart of an embodiment of a channel initialization method in a media stream transmission method according to the present invention;
图 3A为本发明提供的媒体流传输方法实施例二流程图;  3A is a flowchart of Embodiment 2 of a media stream transmission method according to the present invention;
图 3B为本发明提供的 Output Channel与 STB之间的对应关系图; 图 4为本发明提供的媒体拼接器实施例一结构示意图;  3B is a diagram showing the correspondence between the Output Channel and the STB provided by the present invention; FIG. 4 is a schematic structural diagram of Embodiment 1 of the media splicer provided by the present invention;
图 5为本发明提供的媒体拼接器实施例二结构示意图;  FIG. 5 is a schematic structural diagram of Embodiment 2 of a media splicer provided by the present invention; FIG.
图 6为本发明提供的媒体拼接器实施例三结构示意图;  6 is a schematic structural diagram of Embodiment 3 of a media splicer provided by the present invention;
图 7为本发明提供的媒体拼接器实施例四结构示意图;  7 is a schematic structural diagram of Embodiment 4 of a media splicer provided by the present invention;
图 8为本发明提供的媒体拼接器实施例五结构示意图;  8 is a schematic structural diagram of Embodiment 5 of a media splicer provided by the present invention;
图 9为本发明提供的广告服务器实施例一结构示意图;  9 is a schematic structural diagram of Embodiment 1 of an advertisement server according to the present invention;
图 10为本发明提供的广告服务器实施例二结构示意图;  10 is a schematic structural diagram of Embodiment 2 of an advertisement server according to the present invention;
图 1 1为本发明提供的广告服务器实施例三结构示意图;  FIG. 1 is a schematic structural diagram of Embodiment 3 of an advertisement server according to the present invention;
图 12为本发明提供的广告服务器实施例四结构示意图。 具体实施方式 为使本发明实施例的目的、 技术方案和优点更加清楚, 下面将结合本 发明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描 述, 显然, 所描述的实施例是本发明一部分实施例, 而不是全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没有付出创造性劳动前提 下所获得的所有其他实施例, 都属于本发明保护的范围。 如下各实施例中, 媒体拼接器执行的各歩骤和媒体拼接器各模块执行 的功能均可由计算机等设备的处理器执行。 与此相似, 广告服务器执行的 各歩骤和广告服务器各模块执行的功能也均可由计算机等设备的处理器 执行。 FIG. 12 is a schematic structural diagram of Embodiment 4 of an advertisement server according to the present invention. The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. The embodiments are a part of the embodiments of the invention, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without any inventive effort are within the scope of the present invention. In the following embodiments, the functions performed by the media splicer and the functions performed by each module of the media splicer may be executed by a processor of a computer or the like. Similarly, the various steps performed by the ad server and the functions performed by each module of the ad server can also be performed by a processor of a device such as a computer.
本发明实施例的主频道 (Primary Channel ) 与组播地址对应, 不同 的组播地址对应不同的主频道。 主频道和输出频道均为逻辑概念, 在广告 插入过程中, 媒体拼接器将主频道的节目媒体流与不同的广告流进行拼接 后发送给不同的终端, 通过输出频道可区分同一主频道的节目媒体流与不 同广告流拼接后形成的多个媒体流。 另外, 本发明实施例中频道请求可以 是终端开机后首次发出的频道请求, 也可以是终端后续发送的频道切换请 求, 即从一个频道切换到另一个频道。  The primary channel of the embodiment of the present invention corresponds to a multicast address, and different multicast addresses correspond to different primary channels. The main channel and the output channel are both logical concepts. During the insertion process, the media splicer splices the program media stream of the main channel with different advertisement streams and sends them to different terminals, and the output channels can distinguish the programs of the same main channel. A plurality of media streams formed after the media stream is spliced with different advertisement streams. In addition, in the embodiment of the present invention, the channel request may be a channel request that is sent for the first time after the terminal is powered on, or may be a channel switching request sent by the terminal, that is, switching from one channel to another channel.
图 1为本发明提供的媒体流传输方法实施例一流程图。 如图 1所示, 本实施例提供的媒体流传输方法包括:  FIG. 1 is a flowchart of Embodiment 1 of a media stream transmission method according to the present invention. As shown in FIG. 1, the media stream transmission method provided in this embodiment includes:
歩骤 11 : 媒体拼接器接收主频道的节目媒体流。  Step 11: The media splicer receives the program media stream of the main channel.
节目媒体流包括有主频道的节目内容, 还可包括广告插入提示信息 The program media stream includes program content of the main channel, and may also include advertisement insertion prompt information.
( cueing message ) 。 广告插入提示信息中包含该广告提示信息对应插入 事件的插入时间点和持续时间等信息。 ( cueing message ). The advertisement insertion prompt information includes information such as the insertion time point and duration of the insertion event corresponding to the advertisement prompt information.
歩骤 12 : 终端请求该主频道时, 媒体拼接器通过与该终端对应的输出 频道向该终端发送该主频道的节目媒体流; 媒体拼接器上设置有终端与输 出频道的对应关系, 在上述对应关系中终端与输出频道——对应。  Step 12: When the terminal requests the main channel, the media splicer sends the program media stream of the main channel to the terminal through an output channel corresponding to the terminal; the media splicer is provided with a correspondence between the terminal and the output channel, The terminal corresponds to the output channel in the corresponding relationship.
终端, 例如机顶盒 (Set Top Box , 简称 STB ) , 向媒体拼接器发送的 频道请求中携带有请求的主频道的标识和终端的标识。 主频道的标识可以 是主频道对应组播设备的组播地址, 终端的标识可以是以下信息中的一个 或多个: 终端的序列号、 终端的 IP地址、 终端的 MAC地址和终端的接入 端口等。  The terminal, such as a set top box (STB), sends a channel request to the media splicer carrying the identifier of the requested primary channel and the identifier of the terminal. The identifier of the primary channel may be the multicast address of the multicast channel corresponding to the primary channel, and the identifier of the terminal may be one or more of the following information: the serial number of the terminal, the IP address of the terminal, the MAC address of the terminal, and the access of the terminal. Port, etc.
媒体拼接器需通过与终端对应的输出频道向终端转发主频道的节目 媒体流。 本发明实施例中, 媒体拼接器可预先为每个终端分别建立与输出 频道的对应关系, 并保存每个终端与输出频道的对应关系。 另外, 媒体拼 接器也可在终端上线后, 再为该终端和一个输出频道建立对应关系, 并在 媒体拼接器上保存该终端与输出频道的对应关系。在上述对应关系中终端 与输出频道一一对应。 媒体拼接器接收到主频道上的节目媒体流后, 根据 设置的终端与输出频道的对应关系和频道请求中携带的终端的标识, 确定 与该终端对应的输出频道, 通过该终端对应的输出频道向终端发送主频道 的节目媒体流。 The media splicer needs to forward the program media stream of the main channel to the terminal through an output channel corresponding to the terminal. In the embodiment of the present invention, the media splicer can establish a corresponding relationship with the output channel for each terminal in advance, and save the correspondence between each terminal and the output channel. In addition, the media splicer can also establish a correspondence between the terminal and an output channel after the terminal is online, and The correspondence between the terminal and the output channel is saved on the media splicer. In the above correspondence, the terminal has a one-to-one correspondence with the output channel. After receiving the program media stream on the main channel, the media splicer determines an output channel corresponding to the terminal according to the corresponding relationship between the set terminal and the output channel and the identifier of the terminal carried in the channel request, and the output channel corresponding to the terminal The program media stream of the main channel is sent to the terminal.
媒体拼接器可将终端的标识和输出频道的标识的一一对应关系保存 在如表 1所示的频道配置表中。 在接收到终端的频道请求后, 根据频道请 求中终端的标识, 在频道配置表中查找与该终端的标识对应的输出频道的 标识, 从而确定与该终端对应的输出频道。  The media splicer can store the one-to-one correspondence between the identifier of the terminal and the identifier of the output channel in the channel configuration table as shown in Table 1. After receiving the channel request of the terminal, the identifier of the output channel corresponding to the identifier of the terminal is searched in the channel configuration table according to the identifier of the terminal in the channel request, thereby determining an output channel corresponding to the terminal.
表 1为媒体拼接器的一种频道配置表  Table 1 is a channel configuration table of the media splicer
Figure imgf000008_0001
歩骤 13 :媒体拼接器通过与广告服务器之间与上述输出频道所对应的 TCP连接, 向广告服务器发送广告插入通知消息, 并接收广告服务器为该 终端发送的广告流。
Figure imgf000008_0001
Step 13: The media splicer sends an advertisement insertion notification message to the advertisement server through a TCP connection with the advertisement server corresponding to the output channel, and receives an advertisement flow sent by the advertisement server for the terminal.
在初始化输出频道阶段, 由媒体拼接器或广告服务器建立与输出频道 所对应的 TCP连接。媒体拼接器上设置有输出频道与 TCP连接的对应关系, 在上述对应关系中输出频道与 TCP连接一一对应。  In the initialization of the output channel phase, a TCP connection corresponding to the output channel is established by the media splicer or the advertisement server. The media splicer is provided with a correspondence between the output channel and the TCP connection, and in the above correspondence, the output channel has a one-to-one correspondence with the TCP connection.
媒体拼接器向广告服务器发送广告插入通知消息的触发条件可以是 侦测到广告插入提示信息, 或接收到广告服务器、 组播设备或其它设备发 送的用于触发媒体拼接器发送广告插入通知消息的信息。 如果广告插入提 示信息采用带内 (in-band ) 传输方式, 媒体拼接器接收到节目媒体流后, 侦测主频道的节目媒体流中是否包括有广告提示消息。 上述带内传输方式 是指在节目媒体流中携带广告插入提示信息的方式。 当侦测到广告插入提 示消息时, 对于请求该主频道的终端, 媒体拼接器通过与该终端对应输出 频道所对应的 TCP连接向广告服务器发送广告插入通知消息, 以向广告服 务器通知广告插入事件。 另外, 广告服务器、 组播设备或其它设备还可向 媒体拼接器发送信息, 触发媒体拼接器向广告服务器发送广告插入通知消 息。 广告服务器通过 TCP连接接收到媒体拼接器的广告插入通知消息后, 根据与该 TCP连接对应的用户偏好参数 ( user preferences parameters ) 和 /或广告投放策略 (advert i s ing strategy ) 选择向用户推送的广告流, 并将广告流发给媒体拼接器。 媒体拼接器接收广告服务器的广告流时, 可 通过与输出频道对应的 TCP连接接收, 也可通过其它方式接收, 例如通过 用户数据报协议 (User Datagram Protocol , 简称 UDP ) 接收。 媒体拼接 器与广告服务器可通过 TCP连接协商, 在通过其它方式传输广告流时, 确 定被传输的广告流与终端之间的对应关系的方案, 从而使得媒体拼接器可 确定接收到的广告流与终端的对应关系, 进而通过该终端对应输出频道向 该终端发送广告流。 The triggering condition for the media splicer to send the advertisement insertion notification message to the advertisement server may be that the advertisement insertion prompt information is detected, or the advertisement server, the multicast device, or another device sends an advertisement insertion notification message for triggering the media splicer to send the advertisement insertion notification message. information. If the advertisement insertion prompt information adopts an in-band transmission mode, after receiving the program media stream, the media splicer detects whether an advertisement prompt message is included in the program media stream of the main channel. The above in-band transmission method refers to a method of carrying an advertisement insertion prompt information in a program media stream. When the advertisement insertion prompt message is detected, for the terminal requesting the main channel, the media splicer outputs the output corresponding to the terminal. The TCP connection corresponding to the channel sends an advertisement insertion notification message to the advertisement server to notify the advertisement server of the advertisement insertion event. In addition, the advertisement server, multicast device, or other device may also send information to the media splicer, triggering the media splicer to send an advertisement insertion notification message to the advertisement server. After receiving the advertisement insertion notification message of the media splicer through the TCP connection, the advertisement server selects the advertisement pushed to the user according to the user preference parameters and/or the advert is ing strategy corresponding to the TCP connection. Stream, and send the ad stream to the media splicer. When the media splicer receives the advertisement flow of the advertisement server, it may receive through the TCP connection corresponding to the output channel, or may receive through other methods, for example, through a User Datagram Protocol (UDP). The media splicer and the advertisement server can negotiate through the TCP connection, and when the advertisement stream is transmitted by other means, determine a scheme of the correspondence between the transmitted advertisement stream and the terminal, so that the media splicer can determine the received advertisement stream and The corresponding relationship of the terminal, and then the advertisement flow is sent to the terminal through the corresponding output channel of the terminal.
歩骤 14: 接收到广告服务器为该终端发送的广告流后, 媒体拼接器通 过与该终端对应的输出频道, 向该终端发送的广告流。  Step 14: After receiving the advertisement stream sent by the advertisement server for the terminal, the media splicer sends the advertisement stream to the terminal through the output channel corresponding to the terminal.
媒体拼接器接收到广告服务器的广告流后, 可在节目媒体流中插入时 间点处对广告流进行拼接 (Sp l i ce ) 操作, 对广告流进行拼接操作后, 通 过与该终端对应的输出频道向该终端发送拼接后的节目媒体流, 该节目媒 体流中包括广告流的内容。 这里的拼接操作具体可以是 J. 286 I SMPTE 312M 标准定义的数字节目插入拼接 ( Digi tal Program Insert ion Spl ic ing )操作, 也可以是任何其他可以将广告流插入到节目媒体流中的 拼接操作。 媒体拼接器可在插入时间点停止向终端发送节目媒体流, 也可 继续向终端发送节目媒体流。 媒体拼接器在跳出时间点到达时, 媒体拼接 器结束拼接操作, 停止向终端发送广告流, 继续向终端发送节目媒体流。 上述跳出时间点根据插入时间点和持续时间得到。 例如, 媒体拼接器计算 广告插入提示信息中插入时间点和持续时间之和作为跳出时间点。  After receiving the advertisement flow of the advertisement server, the media splicer may insert a splicing (Sp li ce ) operation on the advertisement stream at a point in time in the program media stream, and after splicing the advertisement stream, passing the output channel corresponding to the terminal Sending the spliced program media stream to the terminal, the program media stream including the content of the advertisement stream. The splicing operation herein may specifically be a digital program insertion splicing operation defined by the J. 286 I SMPTE 312M standard, or any other splicing operation that can insert an advertisement stream into the program media stream. . The media splicer may stop transmitting the program media stream to the terminal at the insertion time point, and may continue to send the program media stream to the terminal. When the media splicer arrives at the time of the bounce, the media splicer ends the splicing operation, stops sending the advertisement stream to the terminal, and continues to send the program media stream to the terminal. The above-mentioned bounce time point is obtained according to the insertion time point and the duration. For example, the media splicer calculates the sum of the insertion time point and the duration in the advertisement insertion prompt information as the bounce time point.
广告服务器上设置有与终端相关的用户偏好参数, 广告服务器通过 TCP连接接收到媒体拼接器的广告插入通知消息后, 确定该 TCP连接对应 输出频道所对应的终端, 根据该终端的用户偏好参数和广告投放策略选择 向用户推送的广告流, 并将广告流发给媒体拼接器。 The advertisement server is provided with a user preference parameter related to the terminal. After receiving the advertisement insertion notification message of the media splicer through the TCP connection, the advertisement server determines the terminal corresponding to the output channel of the TCP connection, according to the user preference parameter of the terminal and Ad serving strategy selection The stream of ads pushed to the user, and the stream of ads is sent to the media splicer.
本发明实施例媒体流传输方法, 媒体拼接器接收到终端的频道请求 后, 通过终端对应的输出频道向终端发送该频道的节目媒体流, 同时还通 过终端对应的输出频道, 将广告服务器为终端发送的广告流发送给终端。 由于终端与输出频道一一对应, 终端请求不同的主频道的节目媒体流, 媒 体拼接器均通过同一个输出频道向终端发送广告流和节目媒体流。对于不 同的终端, 媒体拼接器通过与终端绑定的输出频道所对应的 TCP连接向广 告服务器发送广告插入消息。 因此, 媒体拼接器只维护与终端个数相同的 输出频道,媒体拼接器和广告服务器也只维护与终端个数相同的 TCP连接, 显著减少了需要维护的输出频道的个数, 节省了连接资源。 在主频道增加 时, 媒体拼接器不需要增加输出频道, 广告服务器也不要增加与媒体拼接 器之间的 TCP连接。  In the media stream transmission method of the embodiment of the present invention, after receiving the channel request of the terminal, the media splicer sends the program media stream of the channel to the terminal through the output channel corresponding to the terminal, and also uses the output channel corresponding to the terminal to set the advertisement server as the terminal. The sent ad stream is sent to the terminal. Since the terminal corresponds to the output channel one by one, the terminal requests program media streams of different main channels, and the media splicer sends the advertisement stream and the program media stream to the terminal through the same output channel. For different terminals, the media splicer sends an advertisement insertion message to the advertisement server through a TCP connection corresponding to the output channel bound to the terminal. Therefore, the media splicer only maintains the same output channel as the number of terminals, and the media splicer and the advertisement server only maintain the same TCP connection as the number of terminals, which significantly reduces the number of output channels that need to be maintained, saving connection resources. . When the main channel is added, the media splicer does not need to increase the output channel, and the ad server does not increase the TCP connection with the media splicer.
图 2为本发明提供的媒体流传输方法中的一种频道初始化方法实施例 流程图。 本实施例主要说明输出频道的初始化过程。 如图 2所示, 本实施 例提供的频道初始化方法包括:  2 is a flow chart of an embodiment of a channel initialization method in a media stream transmission method provided by the present invention. This embodiment mainly describes the initialization process of the output channel. As shown in FIG. 2, the channel initialization method provided in this embodiment includes:
歩骤 21 : 广告服务器接收终端的上线通知消息后, 在频道对应表查找 与终端对应的输出频道的标识; 频道对应表中包括终端与输出频道的对应 关系, 在上述对应关系中终端与输出频道一一对应。  Step 21: After receiving the online notification message of the terminal, the advertisement server searches for the identifier of the output channel corresponding to the terminal in the channel correspondence table. The channel correspondence table includes the correspondence between the terminal and the output channel, where the terminal and the output channel are in the corresponding relationship. One-to-one correspondence.
在终端认证过程中, 认证服务器向广告服务器通知终端的位置。 广告 服务器可在终端上线后, 例如在接收到终端发送的包括终端标识的上线通 知消息或终端的上下线监测设备发送的包括终端标识的上线通知消息后, 向媒体拼接器发送第一频道初始化消息, 第一频道初始化消息包括有与该 终端——对应的 Output Channel 的标识。 第一频道初始化消息用于请求 媒体拼接器对与该终端——对应的 Output Channel 进行初始化。 其中, 终端的标识可以是终端的序列号、 终端的 IP地址、 终端的 MAC地址或终 端的物理线路号等。  In the terminal authentication process, the authentication server notifies the advertisement server of the location of the terminal. The advertisement server may send the first channel initialization message to the media splicer after the terminal is online, for example, after receiving the online notification message including the terminal identifier sent by the terminal or the online notification message including the terminal identifier sent by the uplink and downlink monitoring device of the terminal. The first channel initialization message includes an identifier of an Output Channel corresponding to the terminal. The first channel initialization message is used to request the media splicer to initialize the corresponding Output Channel of the terminal. The identifier of the terminal may be a serial number of the terminal, an IP address of the terminal, a MAC address of the terminal, or a physical line number of the terminal.
广告服务器设置有终端与输出频道对应关系, 在上述对应关系中一个 终端与一个输出频道一一对应。 广告服务器可将 Output Channel l的标识 和终端的标识的对应关系保存在如表 2所示的频道对应表中。如表 2所示, 频道对应表中保存有 Output Channel 的标识和终端的标识的——对应关 系。广告服务器在接收到终端或终端的上下线监测设备发送的上线通知消 息后,根据终端的标识查找频道对应表获取到与该终端一一对应的 Output Channel , 向媒体拼接器发送包括该 Output Channel的标识的第一频道初 始化消息。 The advertisement server is provided with a correspondence between the terminal and the output channel, and one terminal corresponds to one output channel one by one in the above correspondence. The advertisement server may store the correspondence between the identifier of the Output Channel 1 and the identifier of the terminal in the channel correspondence table as shown in Table 2. As shown in table 2, The channel correspondence table stores the correspondence between the identifier of the Output Channel and the identifier of the terminal. After receiving the online notification message sent by the uplink or downlink monitoring device of the terminal or the terminal, the advertisement server searches the channel correspondence table according to the identifier of the terminal, and obtains an Output Channel corresponding to the terminal, and sends the output channel including the Output Channel to the media splicer. The identified first channel initialization message.
表 2为广告服务器的频道对应表  Table 2 is the channel correspondence table of the advertisement server.
Figure imgf000011_0001
歩骤 22 : 广告服务器向媒体拼接器发送第一频道初始化消息,第一频 道初始化消息包括 Output Channel的标识。
Figure imgf000011_0001
Step 22: The advertisement server sends a first channel initialization message to the media splicer, where the first channel initialization message includes an identifier of the Output Channel.
媒体拼接器根据包括 Output Channel的标识的第一频道初始化消息, 初始化该 Output Channel。 如表 3所示, 在表 1的基础上, 媒体拼接器的 频道配置表还可包括 Output Channel的初始化参数。 初始化参数可以是, 与 Output Channel对应的缺省 primary channe output protocols Output IP或 Output port。output protocol是指输出的媒体流采用的协议, Output IP是指输出的媒体流采用的 IP地址, Output port是指输出的媒体流采用 的端口缺省 primary channel是指,在没有收到终端频道请求时,向 output channel输出的节目。  The media splicer initializes the Output Channel according to a first channel initialization message including an identifier of the Output Channel. As shown in Table 3, on the basis of Table 1, the channel configurator of the media splicer may further include an initialization parameter of the Output Channel. The initialization parameter can be a default primary channe output protocols Output IP or Output port corresponding to the Output Channel. The output protocol refers to the protocol used by the output media stream. The Output IP refers to the IP address used by the output media stream. The Output port refers to the port used by the output media stream. The default primary channel refers to the terminal channel request. The program that is output to the output channel.
表 3为媒体拼接器中的另一种频道配置表  Table 3 is another channel configuration table in the media splicer
Figure imgf000011_0002
Figure imgf000012_0001
在接收到广告服务器的第一频道初始化消息后, 媒体拼接器根据第一 频道初始化消息中包括的 Output Channel 的标识, 在频道配置表中查找 该 Output Channel 的初始化参数。 根据初始化参数初始化该 Output Channel包括: 在媒体接器与终端之间建立向终端发送媒体流的媒体流通 道, 为该 Output Channel 分配资源等, 初始化参数可以是缺省 primary channel , output protocol输出的媒体流采用的协议、 IP地址和端口等。 媒体拼接器初始化 Output Channel 时, 可以与终端进行交互, 也可以不 与终端进行交互。 如果媒体拼接器组播节目媒体流, 初始化 Output Channel时, 则不需要与终端交互。 为 Output Channel分配的资源可以是 带宽等。
Figure imgf000011_0002
Figure imgf000012_0001
After receiving the first channel initialization message of the advertisement server, the media splicer looks up the initialization parameter of the Output Channel in the channel configuration table according to the identifier of the Output Channel included in the first channel initialization message. Initializing the Output Channel according to the initialization parameter includes: establishing a media stream channel for sending a media stream to the terminal between the media interface and the terminal, and allocating resources for the Output Channel, and the initialization parameter may be a default primary channel, and the output protocol outputs the media. Protocols, IP addresses, ports, etc. used by the stream. When the media splicer initializes the Output Channel, it can interact with the terminal or not with the terminal. If the media splicer multicasts the program media stream and initializes the Output Channel, it does not need to interact with the terminal. The resources allocated for the Output Channel can be bandwidth and the like.
歩骤 23 : 广告服务器接收到媒体拼接器的初始化响应后, 在广告服务 器与媒体拼接器之间, 建立与该 Output Channel对应的 TCP连接。  Step 23: After receiving the initialization response of the media splicer, the advertisement server establishes a TCP connection corresponding to the Output Channel between the advertisement server and the media splicer.
广告服务器接收到媒体拼接器的初始化响应后, 广告服务器在广告服 务器与媒体拼接器之间为该终端对应的 Output Channel 建立对应的 TCP 连接; 或者, 也可由媒体拼接器在广告服务器与媒体拼接器之间为该终端 对应的 Output Channel建立对应的 TCP连接。 在建立 TCP连接时, 广告 服务器通过 TCP 连接通知媒体拼接器与该 TCP 连接对应的 Output Channel 媒体拼接器上保存输出频道与 TCP连接的对应关系, 在上述对 应关系中输出频道与 TCP连接一一对应。  After the advertisement server receives the initialization response of the media splicer, the advertisement server establishes a corresponding TCP connection between the advertisement server and the media splicer for the corresponding Output Channel of the terminal; or, the media splicer can be used in the advertisement server and the media splicer. A corresponding TCP connection is established between the corresponding Output Channels of the terminal. When the TCP connection is established, the advertisement server notifies the media splicer to store the correspondence between the output channel and the TCP connection on the Output Channel media splicer corresponding to the TCP connection through the TCP connection, and the output channel and the TCP connection are in one-to-one correspondence in the corresponding relationship. .
上述方法中, 广告服务器在终端上线后向媒体拼接器发送频道初始化 消息。 此情况下, 媒体拼接器可以只为上线终端的 Output Channel 分配 资源, 广告服务器可以只维护与在线终端的 Output Channel 对应的 TCP 连接。 终端下线时, 广告服务器接收到终端的下线通知消息。 之后广告服 务器通过该终端的 Output Channel所对应的 TCP连接向媒体拼接器发送 频道拆除消息。 媒体拼接器根据根频道拆除消息, 释放与该 TCP连接对应 的 Output Channel 的资源。 另外, 媒体拼接器在释放与该 TCP连接对应 的 Output Channel 的资源后, 可拆除该 TCP连接, 也可以不拆除该 TCP 连接, 由广告服务器将该 TCP连接分配给其它上线的终端, 即广告服务器 更改该 TCP连接与终端对应输出频道之间的对应关系, 同时广告服务器还 通知媒体拼接器更改该 TCP连接与终端对应输出频道之间的对应关系。 因 此, 媒体拼接器和广告服务器只需维护与在线终端个数相同的 TCP连接。 In the above method, the advertisement server sends a channel initialization message to the media splicer after the terminal is online. In this case, the media splicer can only allocate resources for the Output Channel of the online terminal, and the advertisement server can only maintain the TCP connection corresponding to the Output Channel of the online terminal. When the terminal goes offline, the advertisement server receives the offline notification message of the terminal. The advertisement server then sends a channel teardown message to the media splicer through the TCP connection corresponding to the Output Channel of the terminal. The media splicer removes the message according to the root channel and releases the resources of the Output Channel corresponding to the TCP connection. In addition, after releasing the resources of the Output Channel corresponding to the TCP connection, the media splicer may remove the TCP connection, or may not remove the TCP. Connection, the TCP server allocates the TCP connection to other online terminals, that is, the advertisement server changes the correspondence between the TCP connection and the corresponding output channel of the terminal, and the advertisement server also notifies the media splicer to change the TCP connection and the terminal corresponding output. The correspondence between channels. Therefore, the media splicer and the ad server only need to maintain the same number of TCP connections as the number of online terminals.
广告服务器对每个 Output Channel 分别向媒体拼接器发送第一频道 初始化消息, 每个第一频道初始化消息中包括一个 Output Channel 的标 识。 另外, 广告服务器也可以在完成自身初始化后, 向媒体拼接器发送第 二频道初始化消息, 第二频道初始化消息中不包括 Output Channel 的标 识, 用于触发媒体拼接器对所有 Output Channel 进行初始化。 媒体拼接 器在第二频道初始化消息的触发下, 根据频道配置表中各 Output Channel 的配置信息, 分别初始化频道配置表中各 Output Channel , 为各 Output Channel分配传输资源。 广告服务器接收到媒体拼接器的初始化响应后, 在广告服务器与媒体拼接器之间分别为 Output Channel 建立对应的 TCP 连接。  The advertisement server sends a first channel initialization message to the media splicer for each Output Channel, and each of the first channel initialization messages includes an identifier of the Output Channel. In addition, the advertisement server may also send a second channel initialization message to the media splicer after completing its own initialization. The second channel initialization message does not include the identifier of the Output Channel, and is used to trigger the media splicer to initialize all the Output Channels. The media splicer initializes each Output Channel in the channel configuration table according to the configuration information of each Output Channel in the channel configuration table under the trigger of the second channel initialization message, and allocates transmission resources for each Output Channel. After receiving the initialization response of the media splicer, the advertisement server establishes a corresponding TCP connection between the advertisement server and the media splicer for the Output Channel.
媒体拼接器可以在终端上线时动态为终端分配 Output Channel , 具体 过程如下: 广告服务器接收到终端的上线通知消息后, 向媒体拼接器发送 第三频道初始化消息, 第三频道初始化消息包括终端的标识。 媒体拼接器 接收广告服务器发送的第三频道初始化消息后,为该终端分配一个 Output Channel , 并保存该终端与该 Output Channel的对应关系。 之后, 媒体拼 接器根据该 Output Channel的初始化参数, 初始化该 Output Channel 广告服务器接收到媒体拼接器的初始化响应后, 在广告服务器与媒体拼接 器之间分别为 Output Channel建立对应的 TCP连接。  The media splicer can dynamically allocate an Output Channel to the terminal when the terminal is online. The specific process is as follows: After receiving the online notification message of the terminal, the advertisement server sends a third channel initialization message to the media splicer, where the third channel initialization message includes the identifier of the terminal. . After receiving the third channel initialization message sent by the advertisement server, the media splicer allocates an Output Channel to the terminal, and saves the correspondence between the terminal and the Output Channel. After that, the media splicer initializes the output channel according to the initialization parameter of the Output Channel, and after receiving the initialization response of the media splicer, the media server establishes a corresponding TCP connection between the advertisement server and the media splicer.
另外, 媒体拼接器也可以在终端上线时从除广告服务器之外的第三方 设备获取与该终端对应的 Output Channel 的标识, 此情况下, 第三方设 备上设置有终端与 Output Channel 的一一对应关系。 除广告服务器之外 的第三方设备可以是配置设备或网管设备。广告服务器接收到终端的上线 通知消息后, 向媒体拼接器发送第三频道初始化消息, 第三频道初始化消 息包括终端的标识。媒体拼接器接收广告服务器发送的第三频道初始化消 息后, 从第三方设备获取与该终端的标识对应的输出频道的标识, 根据该 输出频道的标识, 查找该输出频道的初始化参数, 并保存该终端与该In addition, the media splicer can also obtain the identifier of the Output Channel corresponding to the terminal from a third-party device other than the advertisement server when the terminal is online. In this case, the third-party device has a one-to-one correspondence between the terminal and the Output Channel. relationship. The third party device other than the advertisement server may be a configuration device or a network management device. After receiving the online notification message of the terminal, the advertisement server sends a third channel initialization message to the media splicer, where the third channel initialization message includes the identifier of the terminal. After receiving the third channel initialization message sent by the advertisement server, the media splicer acquires an identifier of the output channel corresponding to the identifier of the terminal from the third party device, according to the identifier Output the identifier of the channel, find the initialization parameter of the output channel, and save the terminal and the
Output Channel 的对应关系。 之后, 媒体拼接器根据该 Output Channel 的初始化参数, 初始化该 Output Channel。 广告服务器接收到媒体拼接器 的初始化响应后, 在广告服务器与媒体拼接器之间分别为 Output Channel 建立对应的 TCP连接。 The correspondence of the Output Channel. After that, the media splicer initializes the Output Channel according to the initialization parameter of the Output Channel. After receiving the initialization response of the media splicer, the advertisement server establishes a corresponding TCP connection between the advertisement server and the media splicer for the Output Channel.
图 3A 为本发明提供的媒体流传输方法实施例二流程图, 图 3B 为 Output Channel与 STB之间的对应关系图。 本实施例主要说明 STB1从上 线到下线的过程中, 媒体拼接器向 STB1传输 STB1请求的节目媒体流, 并 根据节目媒体流中广告插入提示信息向 STB1发送广告服务器为 STB1发送 的广告流的方法。  FIG. 3A is a flowchart of Embodiment 2 of a media stream transmission method according to the present invention, and FIG. 3B is a corresponding relationship diagram between an Output Channel and an STB. In this embodiment, the media splicer transmits the program media stream requested by the STB1 to the STB1 during the process of the STB1 from the uplink to the offline, and sends the advertisement flow sent by the advertisement server to the STB1 according to the advertisement insertion prompt information in the program media stream. method.
如图 3B所示, 在线机顶盒包括 STB1、 STB2和 STB3。 与 STB1对应的 Output Channel为 Output Channel l , 与广告服务器与媒体拼接器之间与 Output Channel l对应的 TCP连接为 TCP1 ;与 STB2对应的 Output Channel 为 Output Channel2 , 与广告服务器与媒体拼接器之间与 Output Channel2 对应的 TCP 连接为 TCP2 ; 与 STB3 对应的 Output Channel 为 Output Channel3,与广告服务器与媒体拼接器之间与 Output Channel3对应的 TCP 连接为 TCP3。  As shown in Fig. 3B, the online set top box includes STB1, STB2, and STB3. The Output Channel corresponding to STB1 is Output Channel l, and the TCP connection corresponding to Output Channel l between the advertisement server and the media splicer is TCP1; the Output Channel corresponding to STB2 is Output Channel2, and between the advertisement server and the media splicer The TCP connection corresponding to Output Channel2 is TCP2; the Output Channel corresponding to STB3 is Output Channel3, and the TCP connection corresponding to Output Channel3 between the advertisement server and the media splicer is TCP3.
如图 3B所示,当前 STB1请求的是 Primary Channel 1 , Output Channel l 与 Primary Channel l对应。当前 STB2请求的是 Primary Channel2 , Output Channel 2 与 Primary Channel2 对应。 当前 STB3 请求的是 Primary Channel3 , Output Channel3与 Primary Channel3对应。  As shown in FIG. 3B, the current STB1 requests Primary Channel 1, and the Output Channel l corresponds to Primary Channel l. The current STB2 requests Primary Channel2, and Output Channel 2 corresponds to Primary Channel2. The current STB3 request is Primary Channel3, and Output Channel3 corresponds to Primary Channel3.
如果 STB1请求的是 Primary Channel2 ,贝 lj Output Channel 1 ^ Primary Channel 2对应;如果 STB1请求的是 Primary Channel3,贝 lj Output Channel l 与 Primary Channel3对应。 如果 STB2请求的是 Primary Channel l , 贝 lj Output Ch誦 el2与 Primary Ch誦 el l对应; 如果 STB2请求的是 Primary Channel3 , 贝 lj Output Channel2与 Primary Channel3对应。 如果 STB3 if 求的是 Primary Channel2 , 贝 lj Output Channel3与 Primary Channel2对 应;如果 STB3请求的是 Primary Channel 1,贝 lj Output Channel3与 Primary Channel l对应。 如图 3A所示, 本实施例包括: If STB1 requests Primary Channel2, it corresponds to Primary Channel 1 ^ Primary Channel 2; if STB1 requests Primary Channel3, Bayer lj Output Channel l corresponds to Primary Channel3. If STB2 requests Primary Channel l, Bay lj Output Ch诵el2 corresponds to Primary Ch诵el l; if STB2 requests Primary Channel3, Shell lj Output Channel2 corresponds to Primary Channel3. If STB3 if is seeking Primary Channel2, Baye lj Output Channel3 corresponds to Primary Channel2; if STB3 requests Primary Channel 1, Baye lj Output Channel3 corresponds to Primary Channel l. As shown in FIG. 3A, this embodiment includes:
歩骤 31 : STB1 上线后向广告服务器发送上线通知消息, 上线通知消 息包括 STB1的标识。  Step 31: After the STB1 goes online, the online notification message is sent to the advertisement server, and the online notification message includes the identifier of the STB1.
歩骤 32 : 广告服务器向媒体拼接器发送第一频道初始化消息, 频道初 始化消息包括与 STB1对应的 Output Channel l的标识。  Step 32: The advertisement server sends a first channel initialization message to the media splicer, and the channel initialization message includes an identifier of the Output Channel 1 corresponding to the STB1.
歩骤 33 : 媒体拼接器根据第一频道初始化消息, 初始化 Output Channel 1。  Step 33: The media splicer initializes Output Channel 1 according to the first channel initialization message.
歩骤 34: 广告服务器在广告服务器与媒体拼接器之间建立与 Output Channel l对应的 TCP连接: TCP1。  Step 34: The advertisement server establishes a TCP connection corresponding to the Output Channel l between the advertisement server and the media splicer: TCP1.
歩骤 35A; 媒体拼接器接收节目源设备 1 发送的 Primary Channel l 的节目媒体流。 Primary Channel 1对应的节目源设备为节目源设备 1。  Step 35A: The media splicer receives the program media stream of the Primary Channel 1 sent by the program source device 1 . The source device corresponding to Primary Channel 1 is the program source device 1.
歩骤 35B; 媒体拼接器接收节目源设备 2 发送的 Primary Channel2 的节目媒体流。 Primary Channel2对应的节目源设备为节目源设备 2。  Step 35B: The media splicer receives the program media stream of the Primary Channel2 sent by the program source device 2. The program source device corresponding to Primary Channel 2 is the program source device 2.
歩骤 36A: 媒体拼接器侦测 Primary Channel l的节目媒体流中是否有 广告插入提示信息。  Step 36A: The media splicer detects whether there is an advertisement insertion prompt information in the program media stream of the Primary Channel l.
歩骤 36B: 媒体拼接器侦测 Primary Channel2的节目媒体流中是否有 广告插入提示信息。  Step 36B: The media splicer detects whether there is an advertisement insertion prompt information in the program media stream of the primary channel 2.
歩骤 37 : STB1 向媒体拼接器发送频道请求, 请求切换到 Primary Channel 1。频道请求包括 STBl的标识和请求的 Primary Channel l的标识。  Step 37: STB1 sends a channel request to the media splicer, requesting to switch to Primary Channel 1. The channel request includes the identity of the STB1 and the identity of the requested Primary Channel l.
歩骤 38 : 媒体拼接器通过与 STB1 对应的 Output Channel l 向 STBl 发送 Primary Channel l的节目媒体流。  Step 38: The media splicer sends the program media stream of the Primary Channel 1 to the STB1 through the Output Channel corresponding to the STB1.
歩骤 39: 侦测到节目媒体流的广告插入提示信息时, 媒体拼接器通过 TCP1向广告服务器发送广告插入通知消息。  Step 39: When detecting the advertisement insertion prompt information of the program media stream, the media splicer sends an advertisement insertion notification message to the advertisement server via TCP1.
歩骤 310 : 媒体拼接器接收广告服务器为 STB1发送的广告流。  Step 310: The media splicer receives the advertisement stream sent by the advertisement server for the STB1.
媒体拼接器可通过 Output Channel l对应的 TCP连接, 也可通过广告 服务器与媒体拼接器之间的其它连接, 例如 UDP连接, 接收广告服务器为 STB1发送的广告流。  The media splicer can receive the advertisement flow sent by the advertisement server for the STB1 through the TCP connection corresponding to the Output Channel l or through other connections between the advertisement server and the media splicer, such as a UDP connection.
歩骤 311 : 在广告插入提示信息中插入时间点到达时, 媒体拼接器通 过与 STB1对应的 Output Channel l向 STBl发送广告流。 媒体拼接器在插入时间点到达时向 STB1 发送广告流时, 可停止向终 端发送节目媒体流, 也可继续向终端发送节目媒体流。 Step 311: When the insertion time point arrives in the advertisement insertion prompt information, the media splicer sends the advertisement flow to the STB1 through the Output Channel l corresponding to the STB1. When the media splicer sends an advertisement stream to the STB1 when the insertion time point arrives, the program media stream may be stopped from being transmitted to the terminal, and the program media stream may continue to be transmitted to the terminal.
歩骤 312 : 在广告插入提示信息中跳出时间点到达时, 媒体拼接器通 过 STB1对应的 Output Channel l 向 STBl发送 Primary Channel l的节目 媒体流。  Step 312: When the time point of the jump in the advertisement insertion prompt message arrives, the media splicer sends the program media stream of the Primary Channel 1 to the STB1 through the Output Channel 1 corresponding to the STB1.
媒体拼接器计算广告插入提示信息中插入时间点和持续时间之和得 到跳出时间点,在跳出时间点到达时,媒体拼接器停止向终端发送广告流, 继续向终端发送节目媒体流。  The media splicer calculates the sum of the insertion time point and the duration in the advertisement insertion prompt information to obtain the bounce time point. When the bounce time point arrives, the media splicer stops sending the advertisement flow to the terminal, and continues to send the program media stream to the terminal.
歩骤 313 : STB1 向媒体拼接器发送频道请求, 请求切换到 Primary Ch誦 el2。  Step 313: STB1 sends a channel request to the media splicer, requesting to switch to Primary Ch诵 el2.
歩骤 314: 媒体拼接器通过与 STB1对应的 Output Channel l 向 STBl 发送 Primary Channel2的节目媒体流。  Step 314: The media splicer sends the program media stream of the Primary Channel2 to the STB1 through the Output Channel corresponding to the STB1.
歩骤 315 : 侦测到节目媒体流的广告插入提示信息时, 媒体拼接器通 过 TCP1向广告服务器发送广告插入通知消息。  Step 315: When detecting the advertisement insertion prompt information of the program media stream, the media splicer sends an advertisement insertion notification message to the advertisement server via TCP1.
歩骤 316: 媒体拼接器接收广告服务器为 STB1发送的广告流。  Step 316: The media splicer receives the advertisement stream sent by the advertisement server for the STB1.
歩骤 317: 在广告插入提示信息中插入时间点到达时, 媒体拼接器通 过与 STB1对应的 Output Channel l向 STBl发送广告流。  Step 317: When the insertion time point arrives in the advertisement insertion prompt message, the media splicer sends the advertisement flow to the STB1 through the Output Channel l corresponding to the STB1.
歩骤 318: 在广告插入提示信息中跳出时间点到达时, 通过与 STB1 ——对应的 Output Channel l向 STBl发送 Primary Channel2的节目媒体 流。  Step 318: When the time point of the jump is reached in the advertisement insertion prompt message, the program media stream of the Primary Channel 2 is sent to the STB1 through the Output Channel 1 corresponding to the STB1.
歩骤 319: STB1下线时向广告服务器发送下线通知信息, 下线通知消 息包括 STB1的标识。  Step 319: When the STB1 goes offline, it sends an offline notification message to the advertisement server, and the offline notification message includes the identifier of the STB1.
歩骤 320: 广告服务器通过 TCP1向媒体拼接器发送频道拆除消息。 歩骤 321 :媒体拼接器根据频道拆除消息,释放与 TCP1对应的 Output Channel l的资源。  Step 320: The advertisement server sends a channel teardown message to the media splicer through TCP1. Step 321: The media splicer releases the resources of the Output Channel 1 corresponding to the TCP1 according to the channel teardown message.
另外, 媒体拼接器也可以不拆除该 TCP连接, 由广告服务器将该 TCP 连接分配给其它上线的终端。  In addition, the media splicer may not remove the TCP connection, and the advertisement server allocates the TCP connection to other online terminals.
图 4为本发明提供的媒体拼接器实施例一结构示意图。 如图 4所示, 本实施例提供的媒体拼接器包括: 存储模块 41、 节目媒体流传输模块 42 和广告流传输模块 43。 FIG. 4 is a schematic structural diagram of Embodiment 1 of a media splicer provided by the present invention. As shown in FIG. 4, the media splicer provided in this embodiment includes: a storage module 41, and a program media stream transmission module 42. And an advertisement streaming module 43.
存储模块 41, 用于存储终端与输出频道的对应关系, 在所述对应关系 中终端与输出频道一一对应;还用于存储输出频道与 TCP连接的对应关系, 在上述对应关系中所述输出频道与所述 TCP连接一一对应。  The storage module 41 is configured to store a correspondence between the terminal and the output channel, where the terminal has a one-to-one correspondence with the output channel, and is further configured to store a correspondence between the output channel and the TCP connection, where the output is in the corresponding relationship. The channel has a one-to-one correspondence with the TCP connection.
媒体拼接器可预先为每个终端分别建立与输出频道的对应关系, 并保 存每个终端与输出频道的对应关系。另外,媒体拼接器也可在终端上线后, 再为该终端和一个输出频道动态建立对应关系, 并在媒体拼接器上保存该 终端与输出频道的对应关系。 在上述对应关系中终端与输出频道一一对 应。  The media splicer can establish a corresponding relationship with the output channel for each terminal in advance, and save the correspondence between each terminal and the output channel. In addition, the media splicer can dynamically establish a correspondence between the terminal and an output channel after the terminal is online, and save the correspondence between the terminal and the output channel on the media splicer. In the above correspondence, the terminal and the output channel are in one pair.
节目媒体流传输模块 42, 用于接收主频道的节目媒体流; 并在终端请 求所述主频道时, 通过与所述终端对应的输出频道向所述终端发送所述节 目媒体流。  The program media stream transmission module 42 is configured to receive a program media stream of the main channel; and when the terminal requests the main channel, send the program media stream to the terminal by using an output channel corresponding to the terminal.
终端向媒体拼接器发送的频道请求中携带有请求的主频道的标识和 终端的标识。 主频道的标识可以是主频道对应组播设备的组播地址, 终端 的标识可以是以下信息中的一个或多个: 终端的序列号、 终端的 IP地址、 终端的 MAC地址和终端的接入端口等。媒体拼接器接收到主频道上的节目 媒体流后, 根据设置的终端与输出频道的对应关系和终端频道请求中携带 的终端的标识, 确定与该终端对应的输出频道, 通过该终端对应的输出频 道向终端发送主频道的节目媒体流。  The channel request sent by the terminal to the media splicer carries the identifier of the requested primary channel and the identifier of the terminal. The identifier of the primary channel may be the multicast address of the multicast channel corresponding to the primary channel, and the identifier of the terminal may be one or more of the following information: the serial number of the terminal, the IP address of the terminal, the MAC address of the terminal, and the access of the terminal. Port, etc. After receiving the program media stream on the main channel, the media splicer determines an output channel corresponding to the terminal according to the corresponding relationship between the set terminal and the output channel and the identifier of the terminal carried in the terminal channel request, and the output corresponding to the terminal is output. The channel transmits the program media stream of the main channel to the terminal.
广告流传输模块 43, 用于通过所述媒体拼接器与广告服务器之间的、 与所述输出频道所对应的 TCP连接, 向所述广告服务器发送广告插入通知 消息; 接收到所述广告服务器为所述终端发送的广告流后, 所述媒体拼接 器通过与所述终端对应的输出频道, 向所述终端发送所述广告流。  The advertisement stream transmission module 43 is configured to send an advertisement insertion notification message to the advertisement server by using a TCP connection corresponding to the output channel between the media splicer and the advertisement server; and receiving the advertisement server as After the advertisement stream sent by the terminal, the media splicer sends the advertisement stream to the terminal through an output channel corresponding to the terminal.
媒体拼接器接收到节目媒体流后, 侦测主频道的节目媒体流中是否包 括有广告提示消息。 当侦测到广告插入提示消息时, 通过与终端对应输出 频道所对应的 TCP连接向广告服务器发送广告插入通知消息, 以向广告服 务器通知广告插入事件。 另外, 广告服务器、 组播设备或其它设备还可向 媒体拼接器发送信息, 触发媒体拼接器向广告服务器发送广告插入通知消 息。 广告服务器通过 TCP连接接收到媒体拼接器的广告插入通知消息后, 根据与该 TCP连接对应的用户偏好参数和 /或广告投放策略选择向用户推 送的广告流, 并将广告流发给媒体拼接器。 After receiving the program media stream, the media splicer detects whether an advertisement message message is included in the program media stream of the main channel. When the advertisement insertion prompt message is detected, the advertisement insertion notification message is sent to the advertisement server through the TCP connection corresponding to the output channel corresponding to the terminal, to notify the advertisement server of the advertisement insertion event. In addition, the advertisement server, multicast device, or other device may also send information to the media splicer, triggering the media splicer to send an advertisement insertion notification message to the advertisement server. After the advertisement server receives the advertisement insertion notification message of the media splicer through the TCP connection, The advertisement stream pushed to the user is selected according to the user preference parameter and/or the advertisement delivery policy corresponding to the TCP connection, and the advertisement stream is sent to the media splicer.
上述各模块实现的功能可参见图 1对应实施例中描述,在此不再赘述。 如图 5所示,在图 4的基础上,本实施例提供的媒体拼接器还可包括: 第一初始化模块 44。  For the functions of the foregoing modules, reference may be made to the corresponding embodiments in FIG. 1 , and details are not described herein again. As shown in FIG. 5, on the basis of FIG. 4, the media splicer provided in this embodiment may further include: a first initialization module 44.
存储模块 41, 还用于保存各输出频道的初始化参数。  The storage module 41 is further configured to save initialization parameters of each output channel.
第一初始化模块 44,用于接收所述广告服务器发送的第一频道初始化 消息, 根据存储模块 41 存储的所述输出频道的标识, 查找所述输出频道 的初始化参数,根据所述输出频道的初始化参数,初始化所述输出频道后, 向所述广告服务器发送初始化响应; 所述第一频道初始化消息包括输出频 道的标识, 所述第一频道初始化消息用于请求对所述输出频道的标识对应 的输出频道进行初始化。广告服务器在接收到终端或终端的上下线监测设 备发送的上线通知消息后, 根据终端的标识查找频道对应表获取到与该终 端——对应的 Output Channel , 向媒体拼接器发送包括该 Output Channel 的标识的第一频道初始化消息。  The first initialization module 44 is configured to receive a first channel initialization message sent by the advertisement server, and search for an initialization parameter of the output channel according to the identifier of the output channel stored by the storage module 41, according to the initialization of the output channel. a parameter, after initializing the output channel, sending an initialization response to the advertisement server; the first channel initialization message includes an identifier of an output channel, where the first channel initialization message is used to request an identifier corresponding to the output channel The output channel is initialized. After receiving the online notification message sent by the uplink or downlink monitoring device of the terminal or the terminal, the advertisement server searches the channel correspondence table according to the identifier of the terminal, obtains an Output Channel corresponding to the terminal, and sends the output channel including the Output Channel to the media splicer. The identified first channel initialization message.
如图 6所示,在图 4的基础上,本实施例提供的媒体拼接器还可包括: 第二初始化模块 45。  As shown in FIG. 6, the media splicer provided in this embodiment may further include: a second initialization module 45.
存储模块 41, 还用于保存各输出频道的初始化参数。  The storage module 41 is further configured to save initialization parameters of each output channel.
第二初始化模块 45,用于接收所述广告服务器发送的第二频道初始化 消息, 根据存储模块 41 存储的各输出频道的初始化参数, 分别初始化所 述频道配置表中各输出频道后, 向所述广告服务器发送初始化响应; 第二 频道初始化消息用于请求对所有输出频道进行初始化。  The second initialization module 45 is configured to receive a second channel initialization message sent by the advertisement server, and after initializing each output channel in the channel configuration table according to initialization parameters of each output channel stored by the storage module 41, The ad server sends an initialization response; a second channel initialization message is used to request initialization of all output channels.
广告服务器也可以在完成自身初始化后, 向媒体拼接器发送第二频道 初始化消息, 第二频道初始化消息中不包括 Output Channel 的标识, 用 于触发媒体拼接器对所有 Output Channel 进行初始化。 媒体拼接器在第 二频道初始化消息的触发下, 根据频道配置表中各 Output Channel 的配 置信息,分别初始化频道配置表中各 Output Channel ,为各 Output Channel 分配传输资源。 广告服务器接收到媒体拼接器的初始化响应后, 在广告服 务器与媒体拼接器之间分别为 Output Channel建立对应的 TCP连接。 如图 7所示,在图 4的基础上,本实施例提供的媒体拼接器还可包括: 第三初始化模块 46。 The advertisement server may also send a second channel initialization message to the media splicer after completing the initialization, and the second channel initialization message does not include the identifier of the Output Channel, and is used to trigger the media splicer to initialize all the Output Channels. The media splicer initializes each of the Output Channels in the channel configuration table according to the configuration information of each Output Channel in the channel configuration table under the trigger of the second channel initialization message, and allocates transmission resources for each Output Channel. After receiving the initialization response of the media splicer, the advertisement server establishes a corresponding TCP connection between the advertisement server and the media splicer for the Output Channel. As shown in FIG. 7, the media splicer provided in this embodiment may further include: a third initialization module 46.
存储模块 41, 还用于保存各输出频道的初始化参数。  The storage module 41 is further configured to save initialization parameters of each output channel.
第三初始化模块 46,用于接收所述广告服务器发送的第三频道初始化 消息, 为所述终端分配对应的输出频道, 并在存储模块 41 中保存所述终 端与所述输出频道的对应关系, 查找所述输出频道的初始化参数, 根据存 储模块 41 存储的所述输出频道的初始化参数初始化所述输出频道后, 向 所述广告服务器发送初始化响应; 所述第三频道初始化消息包括终端的标 识。  The third initialization module 46 is configured to receive a third channel initialization message sent by the advertisement server, allocate a corresponding output channel to the terminal, and save a correspondence between the terminal and the output channel in the storage module 41. Searching for an initialization parameter of the output channel, and initializing the output channel according to the initialization parameter of the output channel stored by the storage module 41, and sending an initialization response to the advertisement server; the third channel initialization message includes an identifier of the terminal.
广告服务器接收到终端的上线通知消息后, 向媒体拼接器发送第三频 道初始化消息, 第三频道初始化消息包括终端的标识。 媒体拼接器接收所 述广告服务器发送的第三频道初始化消息后, 为该终端分配一个 Output Channel , 并保存该终端与该 Output Channel的对应关系。 之后, 媒体拼 接器根据该 Output Channel的初始化参数, 初始化该 Output Channel 广告服务器接收到媒体拼接器的初始化响应后, 在广告服务器与媒体拼接 器之间分别为 Output Channel建立对应的 TCP连接。  After receiving the online notification message of the terminal, the advertisement server sends a third channel initialization message to the media splicer, where the third channel initialization message includes the identifier of the terminal. After receiving the third channel initialization message sent by the advertisement server, the media splicer allocates an Output Channel to the terminal, and saves the correspondence between the terminal and the Output Channel. After that, the media splicer initializes the output channel according to the initialization parameter of the Output Channel, and after receiving the initialization response of the media splicer, the media server establishes a corresponding TCP connection between the advertisement server and the media splicer.
如图 8所示,在图 4的基础上,本实施例提供的媒体拼接器还可包括: 第四初始化模块 47。  As shown in FIG. 8, the media splicer provided in this embodiment may further include: a fourth initialization module 47.
第四初始化模块 47,用于接收所述广告服务器发送的第三频道初始化 消息, 从除广告服务器之外的第三方设备获取与所述终端的标识对应的输 出频道的标识, 并在存储模块 41 中保存所述终端与所述输出频道的对应 关系, 查找所述输出频道的初始化参数, 根据存储模块 41 保存的所述输 出频道的初始化参数初始化所述输出频道后, 向所述广告服务器发送初始 化响应; 所述第三频道初始化消息包括终端的标识。  The fourth initialization module 47 is configured to receive a third channel initialization message sent by the advertisement server, and obtain an identifier of an output channel corresponding to the identifier of the terminal from a third-party device other than the advertisement server, and in the storage module 41 And storing the corresponding relationship between the terminal and the output channel, searching for an initialization parameter of the output channel, initializing the output channel according to an initialization parameter of the output channel saved by the storage module 41, and sending an initialization to the advertisement server. The third channel initialization message includes an identifier of the terminal.
广告服务器接收到终端的上线通知消息后, 向媒体拼接器发送第三频 道初始化消息, 第三频道初始化消息包括终端的标识。 媒体拼接器接收所 述广告服务器发送的第三频道初始化消息后, 从第三方设备获取与该终端 的标识对应的输出频道的标识, 根据该输出频道的标识, 查找该输出频道 的初始化参数, 并保存该终端与该 Output Channel 的对应关系。 之后, 媒体拼接器根据该 Output Channel 的初始化参数, 初始化该 Output Channel。 广告服务器接收到媒体拼接器的初始化响应后, 在广告服务器 与媒体拼接器之间分别为 Output Channel建立对应的 TCP连接。 After receiving the online notification message of the terminal, the advertisement server sends a third channel initialization message to the media splicer, where the third channel initialization message includes the identifier of the terminal. After receiving the third channel initialization message sent by the advertisement server, the media splicer obtains an identifier of the output channel corresponding to the identifier of the terminal from the third-party device, and searches for an initialization parameter of the output channel according to the identifier of the output channel, and Save the correspondence between the terminal and the Output Channel. after that, The media splicer initializes the Output Channel according to the initialization parameters of the Output Channel. After receiving the initialization response of the media splicer, the advertisement server establishes a corresponding TCP connection between the advertisement server and the media splicer for the Output Channel.
上述各初始化模块实现的功能可参见图 2对应实施例中描述, 在此不 再赘述。  The functions implemented by the foregoing initialization modules can be described in the corresponding embodiment of FIG. 2, and details are not described herein again.
本实施例提供的媒体拼接器接收到终端的频道请求后, 通过终端对应 的输出频道向终端发送该频道的节目媒体流, 同时还通过终端对应的输出 频道, 将广告服务器为终端发送的广告流发送给终端。 由于终端与输出频 道一一对应, 终端请求不同的主频道的节目媒体流, 媒体拼接器均通过同 一个输出频道向终端发送广告流和节目媒体流。 对于不同的终端, 媒体拼 接器通过与输出频道 (与终端绑定的输出频道)对应的 TCP连接向广告服 务器发送广告插入消息。 因此, 媒体拼接器只维护与终端个数相同的输出 频道, 媒体拼接器和广告服务器也只维护与终端个数相同的 TCP连接, 显 著减少了需要维护的输出频道的个数,节省了连接资源。在主频道增加时, 媒体拼接器不需要增加输出频道, 广告服务器也不要增加与媒体拼接器之 间的 TCP连接。  After receiving the channel request of the terminal, the media splicer provided by the embodiment sends the program media stream of the channel to the terminal through the output channel corresponding to the terminal, and also sends the advertisement stream sent by the advertisement server to the terminal through the output channel corresponding to the terminal. Send to the terminal. Since the terminal corresponds to the output channel one by one, the terminal requests program media streams of different main channels, and the media splicer sends the advertisement stream and the program media stream to the terminal through the same output channel. For different terminals, the media splicer sends an advertisement insertion message to the advertisement server via a TCP connection corresponding to the output channel (the output channel bound to the terminal). Therefore, the media splicer only maintains the same number of output channels as the number of terminals, and the media splicer and the advertisement server only maintain the same TCP connection as the number of terminals, which significantly reduces the number of output channels that need to be maintained, saving connection resources. . When the main channel is added, the media splicer does not need to increase the output channel, and the ad server does not increase the TCP connection with the media splicer.
图 9为本发明提供的广告服务器实施例一结构示意图。 如图 9所示, 本实施例提供的广告服务器包括: 查找模块 91、 第一初始请求模块 92和 连接建立模块 93。  FIG. 9 is a schematic structural diagram of Embodiment 1 of an advertisement server according to the present invention. As shown in FIG. 9, the advertisement server provided in this embodiment includes: a lookup module 91, a first initial request module 92, and a connection establishment module 93.
查找模块 91, 用于接收终端的上线通知消息后, 在频道对应表查找与 所述终端对应的输出频道的标识; 所述频道对应表中包括终端与输出频道 的对应关系, 在所述对应关系中终端与输出频道一一对应。  The searching module 91 is configured to: after receiving the online notification message of the terminal, search for an identifier of the output channel corresponding to the terminal in the channel correspondence table; the channel correspondence table includes a correspondence between the terminal and the output channel, where the corresponding relationship is The middle terminal has a one-to-one correspondence with the output channel.
第一初始请求模块 92,用于向媒体拼接器发送包括与所述终端对应的 输出频道的标识的第一频道初始化消息。  The first initial request module 92 is configured to send, to the media splicer, a first channel initialization message including an identifier of the output channel corresponding to the terminal.
查找模块 91 可在终端上线后, 例如在接收到终端发送的包括终端标 识的上线通知消息或终端的上下线监测设备发送的包括终端标识的上线 通知消息后, 在频道对应表查找与所述终端对应的输出频道的标识。 查找 模块 91 查找到与所述终端对应的输出频道的标识后, 第一初始请求模块 92向媒体拼接器发送第一频道初始化消息,第一频道初始化消息包括有与 该终端——对应的 Output Channel 的标识。 第一频道初始化消息用于请 求媒体拼接器对与该终端——对应的 Output Channel进行初始化。 其中, 终端的标识可以是终端的序列号、 终端的 IP地址、 终端的 MAC地址或终 端的物理线路号等。 The search module 91 may search for the terminal in the channel correspondence table after the terminal is online, for example, after receiving the online notification message including the terminal identifier sent by the terminal or the online notification message including the terminal identifier sent by the uplink and downlink monitoring device of the terminal. The identifier of the corresponding output channel. After the searching module 91 finds the identifier of the output channel corresponding to the terminal, the first initial requesting module 92 sends a first channel initialization message to the media splicer, where the first channel initialization message includes The terminal - the identifier of the corresponding Output Channel. The first channel initialization message is used to request the media splicer to initialize the corresponding Output Channel with the terminal. The identifier of the terminal may be a serial number of the terminal, an IP address of the terminal, a MAC address of the terminal, or a physical line number of the terminal.
连接建立模块 93, 用于接收到所述媒体拼接器的初始化响应后, 在所 述广告服务器与所述媒体拼接器之间, 建立与所述输出频道对应的 TCP连 接。  The connection establishing module 93 is configured to establish, after the initialization response of the media splicer, a TCP connection corresponding to the output channel between the advertisement server and the media splicer.
如图 10所示, 在图 9所示的广告服务器上还可包括: 频道拆除模块 94, 用于接收到所述终端的下线通知消息后, 通过所述终端对应输出频道 所对应的 TCP连接, 向所述媒体拼接器发送频道拆除消息。  As shown in FIG. 10, the advertisement server shown in FIG. 9 may further include: a channel removal module 94, configured to receive, by the terminal, a TCP connection corresponding to the output channel after receiving the offline notification message of the terminal Sending a channel teardown message to the media splicer.
媒体拼接器在释放与该 TCP连接对应的 Output Channel 的资源后, 可拆除该 TCP连接, 也可以不拆除该 TCP连接, 由广告服务器将该 TCP连 接分配给其它上线的终端, 即广告服务器更改该 TCP连接与终端对应输出 频道之间的对应关系, 同时广告服务器还通知媒体拼接器更改该 TCP连接 与终端对应输出频道之间的对应关系。 因此, 媒体拼接器和广告服务器只 需维护与在线终端个数相同的 TCP连接。  After releasing the resource of the Output Channel corresponding to the TCP connection, the media splicer may remove the TCP connection, or may not remove the TCP connection, and the advertisement server allocates the TCP connection to other online terminals, that is, the advertisement server changes the The correspondence between the TCP connection and the terminal corresponding to the output channel, and the advertisement server also notifies the media splicer to change the correspondence between the TCP connection and the corresponding output channel of the terminal. Therefore, the media splicer and the ad server only need to maintain the same number of TCP connections as the number of online terminals.
图 11为本发明提供的广告服务器实施例三结构示意图。如图 11所示, 本实施例提供的广告服务器包括: 第三初始请求模块 111和连接建立模块 112。  FIG. 11 is a schematic structural diagram of Embodiment 3 of an advertisement server according to the present invention. As shown in FIG. 11, the advertisement server provided in this embodiment includes: a third initial request module 111 and a connection establishment module 112.
第三初始请求模块 111,用于广告服务器接收终端的上线通知消息后, 向媒体拼接器发送第三频道初始化消息, 所述第三频道初始化消息包括所 述终端的标识;  The third initial requesting module 111 is configured to: after the advertisement server receives the online notification message of the terminal, send a third channel initialization message to the media splicer, where the third channel initialization message includes an identifier of the terminal;
广告服务器接收到终端的上线通知消息后, 向媒体拼接器发送第三频 道初始化消息, 第三频道初始化消息包括终端的标识。 媒体拼接器接收所 述广告服务器发送的第三频道初始化消息后, 为该终端分配一个 Output Channel , 并保存该终端与该 Output Channel的对应关系; 或者, 媒体拼 接器从第三方设备获取与该终端的标识对应的输出频道的标识。媒体拼接 器根据该 Output Channel的初始化参数, 初始化该 Output Channel。 广 告服务器接收到媒体拼接器的初始化响应后, 在广告服务器与媒体拼接器 之间分别为 Output Channel建立对应的 TCP连接。 After receiving the online notification message of the terminal, the advertisement server sends a third channel initialization message to the media splicer, where the third channel initialization message includes the identifier of the terminal. After receiving the third channel initialization message sent by the advertisement server, the media splicer allocates an Output Channel to the terminal, and saves the correspondence between the terminal and the Output Channel; or, the media splicer acquires the terminal from the third party device. The identifier of the output channel corresponding to the identifier. The media splicer initializes the Output Channel according to the initialization parameters of the Output Channel. After the ad server receives the initialization response of the media splicer, the ad server and the media splicer A corresponding TCP connection is established between the Output Channels.
连接建立模块 112, 用于接收到所述媒体拼接器的初始化响应后, 在 所述广告服务器与所述媒体拼接器之间, 建立与所述输出频道对应的 TCP 连接。  The connection establishing module 112 is configured to establish, after the initialization response of the media splicer, a TCP connection corresponding to the output channel between the advertisement server and the media splicer.
在建立 TCP连接时,广告服务器通过 TCP连接通知媒体拼接器与该 TCP 连接对应的 Output Channel 媒体拼接器上保存输出频道与 TCP连接的对 应关系, 在上述对应关系中输出频道与 TCP连接——对应。  When the TCP connection is established, the advertisement server notifies the media splicer to save the corresponding relationship between the output channel and the TCP connection on the Output Channel media splicer corresponding to the TCP connection through the TCP connection, and outputs the channel and the TCP connection in the corresponding relationship. .
如图 12所示, 在图 11所示的广告服务器上还可包括: 频道拆除模块 113 , 用于接收到所述终端的下线通知消息后, 通过所述终端对应输出频 道所对应的 TCP连接, 向所述媒体拼接器发送频道拆除消息。  As shown in FIG. 12, the advertisement server shown in FIG. 11 may further include: a channel removal module 113, configured to receive, by the terminal, a TCP connection corresponding to the output channel after receiving the offline notification message of the terminal. Sending a channel teardown message to the media splicer.
媒体拼接器在释放与该 TCP连接对应的 Output Channel 的资源后, 可拆除该 TCP连接, 也可以不拆除该 TCP连接, 由广告服务器将该 TCP连 接分配给其它上线的终端, 即广告服务器更改该 TCP连接与终端对应输出 频道之间的对应关系, 同时广告服务器还通知媒体拼接器更改该 TCP连接 与终端对应输出频道之间的对应关系。 因此, 媒体拼接器和广告服务器只 需维护与在线终端个数相同的 TCP连接。  After releasing the resource of the Output Channel corresponding to the TCP connection, the media splicer may remove the TCP connection, or may not remove the TCP connection, and the advertisement server allocates the TCP connection to other online terminals, that is, the advertisement server changes the The correspondence between the TCP connection and the terminal corresponding to the output channel, and the advertisement server also notifies the media splicer to change the correspondence between the TCP connection and the corresponding output channel of the terminal. Therefore, the media splicer and the ad server only need to maintain the same number of TCP connections as the number of online terminals.
本领域普通技术人员可以理解: 实现上述方法实施例的全部或部分歩 骤可以通过程序指令相关的硬件来完成, 前述的程序可以存储于一计算机 可读取存储介质中, 该程序在执行时, 执行包括上述方法实施例的歩骤; 而前述的存储介质包括: R0M、 RAM, 磁碟或者光盘等各种可以存储程序代 码的介质。  A person skilled in the art can understand that all or part of the steps of implementing the above method embodiments may be implemented by hardware related to program instructions, and the foregoing program may be stored in a computer readable storage medium, when executed, The steps of the foregoing method embodiments are performed; and the foregoing storage medium includes: various media that can store program codes, such as ROM, RAM, disk or optical disk.
最后应说明的是: 以上实施例仅用以说明本发明的技术方案, 而非对 其限制; 尽管参照前述实施例对本发明进行了详细的说明, 本领域的普通 技术人员应当理解: 其依然可以对前述各实施例所记载的技术方案进行修 改, 或者对其中部分技术特征进行等同替换; 而这些修改或者替换, 并不 使相应技术方案的本质脱离本发明各实施例技术方案的范围。  It should be noted that the above embodiments are only for explaining the technical solutions of the present invention, and are not intended to be limiting; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those skilled in the art that: The technical solutions described in the foregoing embodiments are modified, or some of the technical features are equivalently replaced; and the modifications or substitutions do not deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

权 利 要 求 书 Claim
1、 一种媒体流传输方法, 其特征在于, 包括: A media stream transmission method, comprising:
媒体拼接器接收主频道的节目媒体流;  The media splicer receives the program media stream of the main channel;
终端请求所述主频道时, 所述媒体拼接器通过与所述终端对应的输出 频道向所述终端发送所述节目媒体流, 所述媒体拼接器上设置有终端与输 出频道的对应关系, 在所述对应关系中终端与输出频道一一对应;  When the terminal requests the primary channel, the media splicer sends the program media stream to the terminal through an output channel corresponding to the terminal, where the media splicer is provided with a correspondence between the terminal and the output channel, where The terminal corresponds to the output channel in the corresponding relationship;
所述媒体拼接器通过与广告服务器之间的、 与所述输出频道所对应的 TCP连接, 向所述广告服务器发送广告插入通知消息; 所述媒体拼接器上 设置有输出频道与 TCP连接的对应关系, 在上述对应关系中所述输出频道 与所述 TCP连接一一对应;  The media splicer sends an advertisement insertion notification message to the advertisement server through a TCP connection with the output channel and the output server; the media splicer is provided with an output channel and a TCP connection. Relationship, in the foregoing correspondence, the output channel has a one-to-one correspondence with the TCP connection;
接收到所述广告服务器为所述终端发送的广告流后, 所述媒体拼接器 通过与所述终端对应的输出频道, 向所述终端发送所述广告流。  After receiving the advertisement stream sent by the advertisement server for the terminal, the media splicer sends the advertisement stream to the terminal through an output channel corresponding to the terminal.
2、 根据权利要求 1 所述的方法, 其特征在于, 所述媒体拼接器接收 主频道的节目媒体流之前, 还包括:  The method according to claim 1, wherein before the media splicer receives the program media stream of the main channel, the method further includes:
所述媒体拼接器接收所述广告服务器发送的第一频道初始化消息, 所 述第一频道初始化消息包括输出频道的标识, 所述第一频道初始化消息用 于请求对所述输出频道的标识对应的输出频道进行初始化;  The media splicer receives a first channel initialization message sent by the advertisement server, where the first channel initialization message includes an identifier of an output channel, where the first channel initialization message is used to request an identifier corresponding to the output channel. Output channel is initialized;
所述媒体拼接器根据所述输出频道的标识, 查找所述输出频道的初始 化参数; 所述媒体拼接器上设置有各输出频道的初始化参数;  The media splicer searches for an initialization parameter of the output channel according to the identifier of the output channel; and the initialization parameter of each output channel is set on the media splicer;
所述媒体拼接器根据所述输出频道的初始化参数, 初始化所述输出频 道后, 向所述广告服务器发送初始化响应。  The media splicer sends an initialization response to the advertisement server after initializing the output channel according to the initialization parameter of the output channel.
3、 根据权利要求 1 所述的方法, 其特征在于, 所述媒体拼接器接收 主频道的节目媒体流之前, 还包括:  The method according to claim 1, wherein before the media splicer receives the program media stream of the main channel, the method further includes:
所述媒体拼接器接收所述广告服务器发送的第二频道初始化消息, 用 于请求对所有输出频道进行初始化;  The media splicer receives a second channel initialization message sent by the advertisement server, for requesting initialization of all output channels;
所述媒体拼接器根据各输出频道的初始化参数, 分别初始化所述频道 配置表中各输出频道后, 向所述广告服务器发送初始化响应; 所述媒体拼 接器上设置有各输出频道的初始化参数。 The media splicer respectively initializes each output channel in the channel configuration table according to the initialization parameters of each output channel, and then sends an initialization response to the advertisement server; the media splicer is provided with initialization parameters of each output channel.
4、 根据权利要求 1 所述的方法, 其特征在于, 所述媒体拼接器接收 主频道的节目媒体流之前, 还包括: The method according to claim 1, wherein before the media splicer receives the program media stream of the main channel, the method further includes:
所述媒体拼接器接收所述广告服务器发送的第三频道初始化消息, 所 述第三频道初始化消息包括终端的标识;  The media splicer receives a third channel initialization message sent by the advertisement server, where the third channel initialization message includes an identifier of the terminal;
所述媒体拼接器为所述终端分配对应的输出频道, 并保存所述终端与 所述输出频道的对应关系;  The media splicer allocates a corresponding output channel to the terminal, and saves a correspondence between the terminal and the output channel;
所述媒体拼接器查找所述输出频道的初始化参数, 根据所述输出频道 的初始化参数初始化所述输出频道后, 向所述广告服务器发送初始化响 应; 所述媒体拼接器上设置有各输出频道的初始化参数。  The media splicer searches for an initialization parameter of the output channel, and after initializing the output channel according to the initialization parameter of the output channel, sends an initialization response to the advertisement server; the media splicer is provided with each output channel. Initialization parameters.
5、 根据权利要求 1 所述的方法, 其特征在于, 所述媒体拼接器接收 主频道的节目媒体流之前, 还包括:  The method according to claim 1, wherein before the media splicer receives the program media stream of the main channel, the method further includes:
所述媒体拼接器接收所述广告服务器发送的第三频道初始化消息, 所 述第三频道初始化消息包括终端的标识;  The media splicer receives a third channel initialization message sent by the advertisement server, where the third channel initialization message includes an identifier of the terminal;
所述媒体拼接器从除广告服务器之外的第三方设备获取与所述终端 的标识对应的输出频道的标识, 并保存所述终端与所述输出频道的对应关 所述媒体拼接器查找所述输出频道的初始化参数, 根据所述输出频道 的初始化参数初始化所述输出频道后, 向所述广告服务器发送初始化响 应; 所述媒体拼接器上设置有各输出频道的初始化参数。  The media splicer acquires an identifier of an output channel corresponding to the identifier of the terminal from a third-party device other than the advertisement server, and saves the corresponding connection of the terminal and the output channel to the media splicer to find the An initialization parameter of the output channel, after initializing the output channel according to the initialization parameter of the output channel, sending an initialization response to the advertisement server; and setting, by the media splicer, an initialization parameter of each output channel.
6、 一种频道初始化方法, 其特征在于, 包括:  6. A channel initialization method, comprising:
广告服务器接收终端的上线通知消息后, 在频道对应表查找与所述终 端对应的输出频道的标识; 所述频道对应表中包括终端与输出频道的对应 关系, 在所述对应关系中终端与输出频道一一对应;  After receiving the online notification message of the terminal, the advertisement server searches for the identifier of the output channel corresponding to the terminal in the channel correspondence table. The channel correspondence table includes a correspondence between the terminal and the output channel, where the terminal and the output are in the corresponding relationship. Channel one-to-one correspondence;
所述广告服务器向媒体拼接器发送包括与所述终端对应的输出频道 的标识的第一频道初始化消息 ·'  The advertisement server sends a first channel initialization message including an identifier of an output channel corresponding to the terminal to the media splicer.
所述广告服务器接收到所述媒体拼接器的初始化响应后, 在所述广告 服务器与所述媒体拼接器之间, 建立与所述输出频道对应的 TCP连接。  After receiving the initialization response of the media splicer, the advertisement server establishes a TCP connection corresponding to the output channel between the advertisement server and the media splicer.
7、 根据权利要求 6所述的方法, 其特征在于, 在所述广告服务器与 所述媒体拼接器之间,建立与所述输出频道对应的 TCP连接之后,还包括: 所述广告服务器接收到所述终端的下线通知消息后, 通过所述终端对 应输出频道所对应的 TCP连接, 向所述媒体拼接器发送频道拆除消息。 The method according to claim 6, wherein after the establishment of the TCP connection corresponding to the output channel between the advertisement server and the media splicer, the method further includes: After receiving the offline notification message of the terminal, the advertisement server sends a channel teardown message to the media splicer through the TCP connection corresponding to the output channel of the terminal.
8、 一种媒体拼接器, 其特征在于, 包括:  8. A media splicer, comprising:
存储模块, 用于存储终端与输出频道的对应关系, 在所述对应关系中 终端与输出频道一一对应; 还用于存储输出频道与 TCP连接的对应关系, 在上述对应关系中所述输出频道与所述 TCP连接一一对应;  a storage module, configured to store a correspondence between the terminal and the output channel, where the terminal corresponds to the output channel in a one-to-one correspondence; and is further configured to store a correspondence between the output channel and the TCP connection, where the output channel is in the corresponding relationship One-to-one correspondence with the TCP connection;
节目媒体流传输模块, 用于接收主频道的节目媒体流; 并在终端请求 所述主频道时, 通过与所述终端对应的输出频道向所述终端发送所述节目 媒体流;  a program media stream transmission module, configured to receive a program media stream of the main channel; and when the terminal requests the main channel, send the program media stream to the terminal by using an output channel corresponding to the terminal;
广告流传输模块, 用于通过所述媒体拼接器与广告服务器之间的、 与 所述输出频道所对应的 TCP连接, 向所述广告服务器发送广告插入通知消 息; 接收到所述广告服务器为所述终端发送的广告流后, 所述媒体拼接器 通过与所述终端对应的输出频道, 向所述终端发送所述广告流。  An advertisement stream transmitting module, configured to send an advertisement insertion notification message to the advertisement server by using a TCP connection corresponding to the output channel between the media splicer and the advertisement server; receiving the advertisement server as a location After the advertisement stream sent by the terminal is described, the media splicer sends the advertisement stream to the terminal through an output channel corresponding to the terminal.
9、 根据权利要求 8所述的媒体拼接器, 其特征在于, 还包括: 第一初始化模块, 用于接收所述广告服务器发送的第一频道初始化消 息, 根据所述输出频道的标识, 查找所述输出频道的初始化参数, 根据所 述输出频道的初始化参数, 初始化所述输出频道后, 向所述广告服务器发 送初始化响应; 所述第一频道初始化消息包括输出频道的标识, 所述第一 频道初始化消息用于请求对所述输出频道的标识对应的输出频道进行初 始化;  The media splicer according to claim 8, further comprising: a first initialization module, configured to receive a first channel initialization message sent by the advertisement server, and find a location according to the identifier of the output channel An initialization parameter of the output channel, after initializing the output channel according to the initialization parameter of the output channel, sending an initialization response to the advertisement server; the first channel initialization message includes an identifier of an output channel, the first channel The initialization message is used to request to initialize an output channel corresponding to the identifier of the output channel;
所述存储模块, 还用于存储各输出频道的初始化参数。  The storage module is further configured to store initialization parameters of each output channel.
10、 根据权利要求 8所述的媒体拼接器, 其特征在于, 还包括: 第二初始化模块, 用于接收所述广告服务器发送的第二频道初始化消 息, 根据各输出频道的初始化参数, 分别初始化所述频道配置表中各输出 频道后, 向所述广告服务器发送初始化响应; 第二频道初始化消息用于请 求对所有输出频道进行初始化;  The media splicer according to claim 8, further comprising: a second initialization module, configured to receive a second channel initialization message sent by the advertisement server, and respectively initialize according to initialization parameters of each output channel After each output channel in the channel configuration table, sending an initialization response to the advertisement server; the second channel initialization message is used to request initialization of all output channels;
所述存储模块, 还用于存储各输出频道的初始化参数。  The storage module is further configured to store initialization parameters of each output channel.
1 1、 根据权利要求 8所述的媒体拼接器, 其特征在于, 还包括: 第三初始化模块, 用于接收所述广告服务器发送的第三频道初始化消 息, 为所述终端分配对应的输出频道, 并保存所述终端与所述输出频道的 对应关系, 查找所述输出频道的初始化参数, 根据所述输出频道的初始化 参数初始化所述输出频道后, 向所述广告服务器发送初始化响应; 所述第 三频道初始化消息包括终端的标识; The media splicer according to claim 8, further comprising: a third initialization module, configured to receive a third channel initialization cancellation sent by the advertisement server And assigning a corresponding output channel to the terminal, and storing a correspondence between the terminal and the output channel, searching for an initialization parameter of the output channel, and initializing the output channel according to an initialization parameter of the output channel, Sending an initialization response to the advertisement server; the third channel initialization message includes an identifier of the terminal;
所述存储模块, 还用于存储各输出频道的初始化参数。  The storage module is further configured to store initialization parameters of each output channel.
12、 根据权利要求 8所述的媒体拼接器, 其特征在于, 还包括: 第四初始化模块, 用于接收所述广告服务器发送的第三频道初始化消 息, 从除广告服务器之外的第三方设备获取与所述终端的标识对应的输出 频道的标识, 并保存所述终端与所述输出频道的对应关系, 查找所述输出 频道的初始化参数, 根据所述输出频道的初始化参数初始化所述输出频道 后, 向所述广告服务器发送初始化响应; 所述第三频道初始化消息包括终 端的标识;  The media splicer according to claim 8, further comprising: a fourth initialization module, configured to receive a third channel initialization message sent by the advertisement server, from a third party device other than the advertisement server Obtaining an identifier of an output channel corresponding to the identifier of the terminal, and storing a correspondence between the terminal and the output channel, searching an initialization parameter of the output channel, and initializing the output channel according to an initialization parameter of the output channel And sending an initialization response to the advertisement server; the third channel initialization message includes an identifier of the terminal;
所述存储模块, 还用于存储各输出频道的初始化参数。  The storage module is further configured to store initialization parameters of each output channel.
13、 一种广告服务器, 其特征在于, 包括:  13. An advertisement server, comprising:
查找模块, 用于接收终端的上线通知消息后, 在频道对应表查找与所 述终端对应的输出频道的标识; 所述频道对应表中包括终端与输出频道的 对应关系, 在所述对应关系中终端与输出频道一一对应;  a search module, configured to: after receiving an online notification message of the terminal, search for an identifier of an output channel corresponding to the terminal in the channel correspondence table; the channel correspondence table includes a correspondence between the terminal and the output channel, where the correspondence relationship is The terminal has a one-to-one correspondence with the output channel;
第一初始请求模块, 用于向媒体拼接器发送包括与所述终端对应的输 出频道的标识的第一频道初始化消息;  a first initial requesting module, configured to send, to the media splicer, a first channel initialization message that includes an identifier of an output channel corresponding to the terminal;
连接建立模块, 用于接收到所述媒体拼接器的初始化响应后, 在所述 广告服务器与所述媒体拼接器之间,建立与所述输出频道对应的 TCP连接。  a connection establishing module, configured to establish, after the initialization response of the media splicer, a TCP connection corresponding to the output channel between the advertisement server and the media splicer.
14、 根据权利要求 13所述的广告服务器, 其特征在于, 还包括: 频道拆除模块, 用于接收到所述终端的下线通知消息后, 通过所述终 端对应输出频道所对应的 TCP连接,向所述媒体拼接器发送频道拆除消息。  The advertisement server according to claim 13, further comprising: a channel removal module, configured to receive, by the terminal, a TCP connection corresponding to the output channel after receiving the offline notification message of the terminal, A channel teardown message is sent to the media splicer.
PCT/CN2011/080346 2011-09-29 2011-09-29 Media stream transmission method, channel initialization method and equipment WO2012162989A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201180001995.8A CN103141113B (en) 2011-09-29 2011-09-29 Media stream transmission method, channel initial method and equipment
PCT/CN2011/080346 WO2012162989A1 (en) 2011-09-29 2011-09-29 Media stream transmission method, channel initialization method and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2011/080346 WO2012162989A1 (en) 2011-09-29 2011-09-29 Media stream transmission method, channel initialization method and equipment

Publications (1)

Publication Number Publication Date
WO2012162989A1 true WO2012162989A1 (en) 2012-12-06

Family

ID=47258317

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/080346 WO2012162989A1 (en) 2011-09-29 2011-09-29 Media stream transmission method, channel initialization method and equipment

Country Status (2)

Country Link
CN (1) CN103141113B (en)
WO (1) WO2012162989A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021121026A1 (en) * 2019-12-16 2021-06-24 中兴通讯股份有限公司 Advertisement insertion method, electronic device and storage medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105959743A (en) * 2016-04-29 2016-09-21 乐视控股(北京)有限公司 Video advertisement playing method and device and server

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101232490A (en) * 2007-01-24 2008-07-30 中兴通讯股份有限公司 System and method for advertisement inter cut in mobile media business
US20090119702A1 (en) * 2007-11-06 2009-05-07 Alcatel Lucent Advertisement and content distribution
CN101668165A (en) * 2008-09-05 2010-03-10 华为技术有限公司 Method, device and system for realizing advertisement in IPTV
CN102130822A (en) * 2010-08-28 2011-07-20 华为技术有限公司 Targeted advertisement playing method, device and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100591016C (en) * 2006-03-17 2010-02-17 华为技术有限公司 Dynamic content continuous transmission method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101232490A (en) * 2007-01-24 2008-07-30 中兴通讯股份有限公司 System and method for advertisement inter cut in mobile media business
US20090119702A1 (en) * 2007-11-06 2009-05-07 Alcatel Lucent Advertisement and content distribution
CN101668165A (en) * 2008-09-05 2010-03-10 华为技术有限公司 Method, device and system for realizing advertisement in IPTV
CN102130822A (en) * 2010-08-28 2011-07-20 华为技术有限公司 Targeted advertisement playing method, device and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021121026A1 (en) * 2019-12-16 2021-06-24 中兴通讯股份有限公司 Advertisement insertion method, electronic device and storage medium

Also Published As

Publication number Publication date
CN103141113A (en) 2013-06-05
CN103141113B (en) 2016-03-09

Similar Documents

Publication Publication Date Title
EP2171600B1 (en) Assisted peer-to-peer media streaming
JP5442766B2 (en) Multimedia stream access delivery changes supported by the service layer
US9226002B2 (en) Method, device and system for realizing broadcast TV
EP2330790B1 (en) Resource manager and method for admission control in a metropolitan area network
JP5650197B2 (en) Method and apparatus for a system for providing media through multicast distribution
US8160065B2 (en) Device and method for dynamically storing media data
EP2817971B1 (en) Network controlled streaming
JP2006191541A (en) Packet transfer apparatus
WO2014047784A1 (en) Method for determining packet forwarding path, network device and control device
CN109862437B (en) Forwarding table item creating method and BRAS
WO2011022994A1 (en) Method, apparatus and system for rapid acquisition of multicast realtime transport protocol sessions
US20210195271A1 (en) Stream control system for use in a network
WO2018121584A1 (en) Data stream transmission method, apparatus, related devices and storage medium
WO2012163181A1 (en) Method and device for implementing fast channel change
WO2012083841A1 (en) Method, terminal and system for changing channel
US8239909B2 (en) Method of securing resources in a video and audio streaming delivery system
US10425458B2 (en) Adaptive bit rate streaming with multi-interface reception
WO2009015539A1 (en) Multicast control method for service of demanding the media content and the system thereof
WO2012162989A1 (en) Media stream transmission method, channel initialization method and equipment
WO2018165869A1 (en) Video surveillance system, client, signaling exchange server, and control method
WO2010025635A1 (en) Method of switching of play, media server, user terminal and system thereof
KR101429032B1 (en) A method of delivering streaming data
Khabbiza et al. A novel approach to reduce the unicast bandwidth of an IPTV system in a high-speed access network
JP2008054078A (en) Multicast system
Azgin et al. A semi-distributed fast channel change framework for IPTV networks

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201180001995.8

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11866627

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11866627

Country of ref document: EP

Kind code of ref document: A1