WO2016154890A1 - Method and device for switching channels - Google Patents

Method and device for switching channels Download PDF

Info

Publication number
WO2016154890A1
WO2016154890A1 PCT/CN2015/075491 CN2015075491W WO2016154890A1 WO 2016154890 A1 WO2016154890 A1 WO 2016154890A1 CN 2015075491 W CN2015075491 W CN 2015075491W WO 2016154890 A1 WO2016154890 A1 WO 2016154890A1
Authority
WO
WIPO (PCT)
Prior art keywords
channel
data packet
rtp data
server
rtp
Prior art date
Application number
PCT/CN2015/075491
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 PCT/CN2015/075491 priority Critical patent/WO2016154890A1/en
Publication of WO2016154890A1 publication Critical patent/WO2016154890A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals

Abstract

Disclosed in the embodiments of the present invention is a method for switching channels, the method comprising: receiving a channel switching request sent from a user terminal, and the channel switching request carries the identifier of the target channel to be switched to; determining from buffer data a Real-time Transport Protocol (RTP) data packet corresponding to the identifier of the target channel; transmitting the RTP data packet to the user terminal through a unicast channel which is a channel established between the user terminal and a server for transmitting RTP data packets; and ceasing transmitting the RTP data packet when the condition of ceasing transmitting the RTP data packet is satisfied. The embodiments of the present invention also provide a device for switching channels, which can apply a fast channel switching technology in a digital video broadcasting system, thus shortening channel switching time.

Description

一种频道切换的方法以及装置Method and device for channel switching 技术领域Technical field
本发明涉及通信领域,尤其涉及一种频道切换的方法以及装置。The present invention relates to the field of communications, and in particular, to a method and an apparatus for channel switching.
背景技术Background technique
在数字视频广播(DVB,Digital Video Broadcasting)系统的技术领域中,多路电视节目经过压缩和复用后被调制成不同的无线频谱信号,并通过发射器广播发送,接收机接收空中的广播信号并进行处理、解调和解码后在屏幕上显示,从而将电视节目呈现给用户,通常用户在进行频道切换时,需要大于1秒的切换时间。In the technical field of a digital video broadcasting (DVB) system, a multi-channel television program is modulated into different radio spectrum signals after being compressed and multiplexed, and transmitted by a transmitter, and the receiver receives a broadcast signal in the air. After being processed, demodulated, and decoded, it is displayed on the screen to present the television program to the user. Usually, when the user performs channel switching, a switching time greater than 1 second is required.
在交互式网络电视(IPTV,Internet Protocol Television)的技术领域中,单路电视节目经过压缩和复用后被打包成实时传输协议(RTP,Real-Time Transport Protocol)数据包,并通过网际协议(IP,Internet Protocol)网络发送至接收机。通常用户在进行频道切换时,需要大于1秒的切换时间。In the technical field of Internet Protocol Television (IPTV), a single-channel television program is compressed and multiplexed and packaged into a Real-Time Transport Protocol (RTP) packet and passed through an Internet Protocol ( IP, Internet Protocol) The network is sent to the receiver. Usually, when a user performs channel switching, a switching time greater than 1 second is required.
现有技术中,将快速频道切换(FCC,Fast Channel Charge)技术引入IPTV领域,通过前端系统接收并处理广播信号,获取待处理频道节目,对该频道节目的标准格式的传送流(TS,Transport Stream)进行打包,每个包包含了RTP序号与时间戳,通过RTP序号来实现组播流和FCC单播流的无缝对接,节约了媒体数据缓冲时间。In the prior art, a Fast Channel Switching (FCC) technology is introduced into the IPTV field, and a broadcast signal is received and processed by the front-end system to obtain a channel program to be processed, and a standard format transport stream of the channel program (TS, Transport) Stream) is packaged, each packet contains the RTP sequence number and timestamp, and the seamless connection between the multicast stream and the FCC unicast stream is realized by the RTP sequence number, which saves the media data buffer time.
然而在现有技术中,FCC技术主要是通过RTP序号与时间戳来实现组播流与FCC单播流的对接,而现有的DVB技术主要是对广播信号进行处理,解调和解码之后在屏幕上进行显示,当用户进行频道切换时,需要经过对卫星网络、锁频、过滤、解复用、媒体数据缓存、解码和I帧等待等序列操作,导致媒体数据缓冲时间较长,切换频道速度较慢。However, in the prior art, the FCC technology mainly implements the connection between the multicast stream and the FCC unicast stream through the RTP sequence number and the time stamp, and the existing DVB technology mainly processes the broadcast signal, after demodulation and decoding. Displayed on the screen, when the user performs channel switching, it needs to perform sequence operations such as satellite network, frequency lock, filtering, demultiplexing, media data buffering, decoding, and I frame waiting, resulting in longer buffer time of media data, switching channels. Slower.
发明内容Summary of the invention
本发明实施例提供了一种频道切换的方法以及装置,可以在数字视频广播系统运用快速频道切换技术,从而加快频道切换时间。Embodiments of the present invention provide a channel switching method and apparatus, which can apply a fast channel switching technology in a digital video broadcasting system, thereby speeding up channel switching time.
第一方面,本发明提供了一种频道切换的方法,包括:In a first aspect, the present invention provides a method for channel switching, including:
接收用户端发送的频道切换请求,所述频道切换请求中携带待切换到的目的频道的标识; Receiving, by the user terminal, a channel switching request, where the channel switching request carries an identifier of a destination channel to be switched to;
从缓存数据中确定与所述目的频道的标识对应的实时传输协议RTP数据包;Determining, from the cached data, a real-time transport protocol RTP data packet corresponding to the identifier of the destination channel;
通过单播通道,向所述用户端发送所述RTP数据包,所述单播通道为所述用户端与服务器建立的用于传输RTP数据包的通道;Transmitting, by the unicast channel, the RTP data packet to the user end, where the unicast channel is a channel established by the user end and a server for transmitting an RTP data packet;
当满足停止下发RTP数据包条件时,停止发送所述RTP数据包。When the condition for stopping the delivery of the RTP data packet is satisfied, the transmission of the RTP data packet is stopped.
结合第一方面,在第一种可能的实现方式中,所述从缓存数据中确定与所述目的频道的标识对应的RTP数据包,包括:With reference to the first aspect, in a first possible implementation, the determining, by the cache data, an RTP data packet corresponding to the identifier of the destination channel, includes:
根据预设的I帧索引列表中所包含的所述RTP数据包的时间戳,确定所述RTP数据包的序号,所述预设的I帧索引列表为片类型为I帧的所述目的频道的RTP数据包的序号与时间戳的对应关系表;Determining a sequence number of the RTP data packet according to a timestamp of the RTP data packet included in a preset I frame index list, where the preset I frame index list is the target channel with a slice type of I frame a correspondence table between the sequence number and the time stamp of the RTP data packet;
根据所述RTP数据包的序号,从所述缓存数据中确定所述RTP数据包。Determining the RTP data packet from the cached data according to the sequence number of the RTP data packet.
结合第一方面第一种可能的实现方式,在第二种可能的实现方式中,所述从缓存数据中确定与所述目的频道的标识对应的RTP数据包之前,所述方法还包括:With the first possible implementation of the first aspect, in a second possible implementation, before the determining, by the cache data, the RTP data packet corresponding to the identifier of the destination channel, the method further includes:
接收直播广播LMB数据流,并从所述LMB数据流中确定所述目的频道的传输流;Receiving a live broadcast LMB data stream, and determining a transport stream of the destination channel from the LMB data stream;
根据所述目的频道的传输流中的时间信息,进行所述服务器端的系统时间校正;Performing system time correction of the server end according to time information in the transport stream of the destination channel;
将所述目的频道的传输流打包成所述目的频道的RTP数据包,所述目的频道的RTP数据包中包含校正后的时间戳;And compressing the transport stream of the destination channel into an RTP data packet of the destination channel, where the RTP data packet of the destination channel includes a corrected timestamp;
缓存所述目的频道的RTP数据包。Cache the RTP data packet of the destination channel.
结合第一方面第二种可能的实现方式,在第三种可能的实现方式中,所述缓存所述目的频道的RTP数据包之后,所述方法还包括:With the second possible implementation of the first aspect, in a third possible implementation, after the RTP data packet of the destination channel is cached, the method further includes:
从所述目的频道的RTP数据包中检测出片类型为I帧的数据包;And detecting, from the RTP data packet of the destination channel, a data packet whose slice type is an I frame;
建立所述片类型为I帧的数据包的序号和时间戳的对应关系,作为所述I帧索引列表。Establishing a correspondence between a sequence number and a time stamp of the data packet of the slice type I frame as the I frame index list.
结合第一方面,在第四种可能的实现方式中,所述当满足停止下发RTP数据包条件时,停止发送所述RTP数据包,包括:With reference to the first aspect, in a fourth possible implementation, when the condition for stopping the delivery of the RTP data packet is met, stopping sending the RTP data packet includes:
接收所述用户端发送的单播通道数据停发请求时,停止发送所述RTP数 据包;或,Stop receiving the RTP number when receiving the unicast channel data suspension request sent by the client According to the package; or,
当所述用户端拆除所述单播通道后,停止发送所述RTP数据包。After the user end tears down the unicast channel, the sending of the RTP data packet is stopped.
本发明第二方面提供一种频道切换的方法,包括:A second aspect of the present invention provides a method for channel switching, including:
向所述服务器发送频道切换请求,所述频道切换请求中携带待切换到的目的频道的标识,以使所述服务器从缓存数据中确定与所述目的频道的标识对应的实时传输协议RTP数据包;Sending a channel switching request to the server, where the channel switching request carries an identifier of a destination channel to be switched, so that the server determines, from the cached data, a real-time transport protocol RTP data packet corresponding to the identifier of the destination channel. ;
从单播通道接收所述服务器发送的所述RTP数据包,所述单播通道为所述用户端与服务器建立的用于传输RTP数据包的通道;Receiving, by the unicast channel, the RTP data packet sent by the server, where the unicast channel is a channel established by the client and the server for transmitting an RTP data packet;
当满足停止下发RTP数据包条件时,指示所述服务器停止发送所述RTP数据包;When the condition of stopping the delivery of the RTP data packet is satisfied, instructing the server to stop sending the RTP data packet;
将所述RTP数据包和从LMB通道接收到所述目的频道对应的节目数据包进行对接。The RTP data packet is docked with a program data packet corresponding to the destination channel received from the LMB channel.
结合第二方面,在第一种可能的实现方式中,所述向所述服务器发送频道切换请求之前,所述方法还包括:With reference to the second aspect, in a first possible implementation, before the sending a channel switching request to the server, the method further includes:
接收频道切换指令,所述频道切换指令中包含所述目的频道的标识;Receiving a channel switching instruction, where the channel switching instruction includes an identifier of the destination channel;
根据预设的节目地址表,确定与所述目的频道的标识对应的节目地址;Determining, according to a preset program address table, a program address corresponding to the identifier of the destination channel;
根据所述节目地址,建立从用户端到所述服务器的用于传输RTP数据包的单播通道。A unicast channel for transmitting RTP data packets from the client to the server is established according to the program address.
结合第二方面或第二方面第一种可能的实现方式,在第二种可能的实现方式中,所述从所述单播通道接收所述服务器发送的所述RTP数据包之后,所述方法还包括:With reference to the second aspect, or the first possible implementation manner of the second aspect, in a second possible implementation, after the receiving, by the unicast channel, the RTP data packet sent by the server, the method Also includes:
按照顺序解析每个RTP数据包,以获取所述每个RTP数据包中包含的时间戳;Parsing each RTP data packet in order to obtain a timestamp included in each of the RTP data packets;
所述当满足停止下发RTP数据包条件时,指示所述服务器停止发送所述RTP数据包,包括:When the condition of stopping the delivery of the RTP data packet is satisfied, the server is instructed to stop sending the RTP data packet, including:
在从所述LMB通道接收到第一个节目数据包后,判断最后一个解析的RTP数据包的时间戳是否满足所述单播通道的关闭条件;After receiving the first program data packet from the LMB channel, determining whether a timestamp of the last parsed RTP data packet satisfies a closing condition of the unicast channel;
当满足所述单播通道的关闭条件时,向所述服务器发送单播通道数据停发请求。 When the shutdown condition of the unicast channel is satisfied, a unicast channel data suspension request is sent to the server.
结合第二方面第二种可能的实现方式,在第三种可能的实现方式中,所述判断最后一个解析的RTP数据包的时间戳是否满足所述单播通道的关闭条件,包括:With reference to the second possible implementation of the second aspect, in a third possible implementation, the determining whether the timestamp of the last parsed RTP data packet meets the closing condition of the unicast channel includes:
计算所述最后一个解析的RTP数据包的时间戳和所述第一个节目数据包中包含的时间戳之间的差值;Calculating a difference between a timestamp of the last parsed RTP data packet and a timestamp included in the first program data packet;
当所述差值大于第一预置值时,确定满足所述单播通道的关闭条件。When the difference is greater than the first preset value, determining that the off condition of the unicast channel is satisfied.
结合第二方面第二种可能的实现方式,在第四种可能的实现方式中,所述判断最后一个解析的RTP数据包的时间戳是否满足所述单播通道的关闭条件,包括:With reference to the second possible implementation of the second aspect, in a fourth possible implementation, the determining whether the timestamp of the last parsed RTP data packet meets the closing condition of the unicast channel includes:
比较当前系统时间值和所述最后一个解析的RTP数据包的时间戳之间的差值;Comparing the difference between the current system time value and the timestamp of the last parsed RTP packet;
当所述差值大于第二预置值时,确定满足所述单播通道的关闭条件。When the difference is greater than the second preset value, determining that the off condition of the unicast channel is satisfied.
结合第二方面或第二方面第一种至第四种可能的任一种实现方式,在第五种可能的实现方式中,所述将所述RTP数据包和从所述LMB通道接收到所述目的频道对应的节目数据包进行对接,包括:With reference to the second aspect, or any one of the first to fourth possible implementations of the second aspect, in a fifth possible implementation, the receiving the RTP data packet from the LMB channel The program data packets corresponding to the target channel are docked, including:
丢弃从所述LMB通道接收到所述目的频道对应的节目数据包中序号与所述RTP数据包的序号重复的数据包;And discarding, from the LMB channel, a data packet whose sequence number corresponding to the target channel is duplicated with a sequence number of the RTP data packet;
将丢弃后剩余的从所述LMB通道接收到所述目的频道对应的节目数据包排列在所述RTP数据包之后进行播放。The program data packets corresponding to the destination channel received from the LMB channel remaining after being discarded are arranged after the RTP data packet to be played.
第三方面,本发明提供了一种频道切换的服务器,包括:In a third aspect, the present invention provides a server for channel switching, including:
第一接收模块,用于接收用户端发送的频道切换请求,所述频道切换请求中携带待切换到的目的频道的标识;The first receiving module is configured to receive a channel switching request sent by the user end, where the channel switching request carries an identifier of the destination channel to be switched to;
确定模块,用于从缓存数据中确定与所述第一接收模块接收的目的频道的标识对应的实时传输协议RTP数据包;a determining module, configured to determine, from the cache data, a real-time transport protocol RTP data packet corresponding to the identifier of the destination channel received by the first receiving module;
发送模块,用于通过单播通道,向所述用户端发送所述确定模块确定的RTP数据包,所述单播通道为所述用户端与服务器建立的用于传输RTP数据包的通道;a sending module, configured to send, by using a unicast channel, the RTP data packet determined by the determining module to the user end, where the unicast channel is a channel established by the user end and the server for transmitting an RTP data packet;
停发模块,用于当满足停止下发RTP数据包条件时,停止所述发送模块发送所述RTP数据包。 And a stop sending module, configured to stop the sending module from sending the RTP data packet when the condition for stopping the delivery of the RTP data packet is met.
结合第三方面,在第一种可能的实现方式中,所述确定模块包括:With reference to the third aspect, in a first possible implementation manner, the determining module includes:
第一确定单元,用于根据预设的I帧索引列表中所包含的所述RTP数据包的时间戳,确定所述RTP数据包的序号,所述预设的I帧索引列表为片类型为I帧的所述目的频道的RTP数据包的序号与时间戳的对应关系表;a first determining unit, configured to determine a sequence number of the RTP data packet according to a timestamp of the RTP data packet included in a preset I frame index list, where the preset I frame index list is a slice type a correspondence table between the sequence number and the timestamp of the RTP data packet of the destination channel of the I frame;
第二确定单元,用于根据所述第一确定单元确定的RTP数据包的序号,从所述缓存数据中确定所述RTP数据包。And a second determining unit, configured to determine the RTP data packet from the cached data according to the sequence number of the RTP data packet determined by the first determining unit.
结合第三方面第一种可能的实现方式,在第二种可能的实现方式中,所述服务器还包括:With reference to the first possible implementation manner of the third aspect, in a second possible implementation manner, the server further includes:
第二接收模块,用于在所述确定模块确定目的频道的标识对应的实时传输协议RTP数据包前,接收直播广播LMB数据流,并从所述LMB数据流中确定所述目的频道的传输流;a second receiving module, configured to receive a live broadcast LMB data stream, and determine a transport stream of the destination channel from the LMB data stream, before the determining module determines a real-time transport protocol RTP data packet corresponding to the identifier of the destination channel ;
校正模块,用于根据所述第二接收模块接收到的目的频道的传输流中的时间信息,进行所述服务器端的系统时间校正;a correction module, configured to perform system time correction of the server according to time information in a transport stream of the destination channel received by the second receiving module;
打包模块,用于将所述目的频道的传输流打包成所述目的频道的RTP数据包,所述目的频道的RTP数据包中包含所述校正模块校正后的时间戳;a packing module, configured to package the transport stream of the destination channel into an RTP data packet of the destination channel, where the RTP data packet of the destination channel includes a corrected time stamp of the correction module;
缓存模块,用于缓存所述打包模块打包后的目的频道的RTP数据包。a cache module, configured to cache an RTP data packet of the target channel after the packaging module is packaged.
结合第三方面第二种可能的实现方式,在第三种可能的实现方式中,所述服务器还包括:In conjunction with the second possible implementation of the third aspect, in a third possible implementation, the server further includes:
检测模块,用于在所述缓存模块缓存所述目的频道的RTP数据包之后,从所述目的频道的RTP数据包中检测出片类型为I帧的数据包;a detecting module, configured to: after the cache module caches the RTP data packet of the destination channel, detect a data packet of a slice type of an I frame from an RTP data packet of the destination channel;
建立模块,用于建立所述检测模块检测的片类型为I帧的数据包的序号和时间戳的对应关系,作为所述I帧索引列表。And a establishing module, configured to establish a correspondence between a sequence number and a timestamp of the data packet of the I frame detected by the detecting module, as the I frame index list.
结合第三方面,在第四种可能的实现方式中,所述停发模块包括:With reference to the third aspect, in a fourth possible implementation, the the suspension module includes:
停发单元,用于接收所述用户端发送的单播通道数据停发请求时,停止发送所述RTP数据包;或,当所述用户端拆除所述单播通道后,停止发送所述RTP数据包。a stop sending unit, configured to stop sending the RTP data packet when receiving the unicast channel data suspension request sent by the user terminal; or, after the user end tears down the unicast channel, stop sending the RTP data pack.
本发明第四方面提供一种频道切换的用户端,其特征在于,包括:A fourth aspect of the present invention provides a user terminal for channel switching, including:
发送模块,用于向所述服务器发送频道切换请求,所述频道切换请求中携带待切换到的目的频道的标识,以使所述服务器从缓存数据中确定与所述目的 频道的标识对应的实时传输协议RTP数据包;a sending module, configured to send a channel switching request to the server, where the channel switching request carries an identifier of a destination channel to be switched, so that the server determines the target from the cached data The real-time transport protocol RTP data packet corresponding to the identifier of the channel;
第一接收模块,用于在所述第一发送模块发送频道切换请求后,从单播通道接收所述服务器发送的所述RTP数据包,所述单播通道为所述用户端与服务器建立的用于传输RTP数据包的通道;a first receiving module, configured to receive, after the first sending module sends a channel switching request, the RTP data packet sent by the server from a unicast channel, where the unicast channel is established by the user end and the server a channel for transmitting RTP packets;
指示模块,用于当满足停止下发RTP数据包条件时,指示所述服务器停止所述第一接收模块接收的RTP数据包;The indication module is configured to: when the condition of stopping the delivery of the RTP data packet is satisfied, instructing the server to stop the RTP data packet received by the first receiving module;
对接模块,用于将所述第一接收模块接收的RTP数据包和从LMB通道接收到所述目的频道对应的节目数据包进行对接。And a docking module, configured to interface the RTP data packet received by the first receiving module with a program data packet corresponding to the destination channel received from the LMB channel.
结合第四方面,在第一种可能的实现方式中,所述用户端还包括:With reference to the fourth aspect, in a first possible implementation, the user terminal further includes:
第二接收模块,用于在所述发送模块向所述服务器发送频道切换请求之前,接收频道切换指令,所述频道切换指令中包含所述目的频道的标识;a second receiving module, configured to receive a channel switching instruction, where the channel switching instruction includes an identifier of the destination channel, before the sending module sends a channel switching request to the server;
确定模块,用于根据预设的节目地址表,确定与所述第二接收模块接收的目的频道的标识对应的节目地址;a determining module, configured to determine, according to the preset program address table, a program address corresponding to the identifier of the destination channel received by the second receiving module;
建立模块,用于根据所述确定模块确定的节目地址,建立从用户端到所述服务器的用于传输RTP数据包的单播通道。And a establishing module, configured to establish, according to the program address determined by the determining module, a unicast channel for transmitting an RTP data packet from the user end to the server.
结合第四方面或第四方面第一种可能的实现方式,在第二种可能的实现方式中,所述用户端还包括:With reference to the fourth aspect, or the first possible implementation manner of the fourth aspect, in a second possible implementation, the user terminal further includes:
获取模块,用于在所述第二发送模块从所述单播通道接收所述服务器发送的所述RTP数据包之后按照顺序解析每个RTP数据包,以获取所述每个RTP数据包中包含的时间戳;An obtaining module, configured to parse each RTP data packet in order after the second sending module receives the RTP data packet sent by the server from the unicast channel, to obtain the content included in each RTP data packet Timestamp
所述指示模块包括:The indication module includes:
判断单元,用于在从所述LMB通道接收到第一个节目数据包后,判断最后一个解析的RTP数据包的时间戳是否满足所述单播通道的关闭条件;a determining unit, configured to determine, after receiving the first program data packet from the LMB channel, whether a timestamp of the last parsed RTP data packet meets a closing condition of the unicast channel;
发送单元,用于当所述判断单元判断满足所述单播通道的关闭条件时,向所述服务器发送单播通道数据停发请求。And a sending unit, configured to send a unicast channel data suspension request to the server when the determining unit determines that the closing condition of the unicast channel is satisfied.
结合第四方面第二种可能的实现方式,在第三种可能的实现方式中,所述判断单元包括:With reference to the second possible implementation of the fourth aspect, in a third possible implementation, the determining unit includes:
计算子单元,用于计算所述最后一个解析的RTP数据包的时间戳和所述第一个节目数据包中包含的时间戳之间的差值; a calculating subunit, configured to calculate a difference between a timestamp of the last parsed RTP data packet and a timestamp included in the first program data packet;
第一确定子单元,用于当所述计算子单元计算的差值大于第一预置值时,确定满足所述单播通道的关闭条件。The first determining subunit is configured to determine that the closing condition of the unicast channel is satisfied when the calculated difference value of the calculating subunit is greater than the first preset value.
结合第四方面第二种可能的实现方式,在第四种可能的实现方式中,所述判断单元包括With reference to the second possible implementation manner of the fourth aspect, in a fourth possible implementation, the determining unit includes
比较子单元,用于比较当前系统时间值和所述最后一个解析的RTP数据包的时间戳之间的差值;Comparing subunits for comparing a difference between a current system time value and a timestamp of the last parsed RTP data packet;
第二确定子单元,用于当所述比较子单元比较的差值大于第二预置值时,确定满足所述单播通道的关闭条件。a second determining subunit, configured to determine that a closing condition of the unicast channel is satisfied when a difference value of the comparing subunit comparison is greater than a second preset value.
结合第四方面或第四方面第一种至第四种可能的任一种实现方式,在第五种可能的实现方式中,所述对接模块包括:With reference to the fourth aspect, or the first to fourth possible implementation manners of the fourth aspect, in a fifth possible implementation, the docking module includes:
丢弃单元,用于丢弃从所述LMB通道接收到所述目的频道对应的节目数据包中序号与所述RTP数据包的序号重复的数据包;a discarding unit, configured to discard, from the LMB channel, a data packet whose sequence number corresponding to the target channel is duplicated with a sequence number of the RTP data packet;
播放单元,用于将所述丢弃单元丢弃后剩余的从所述LMB通道接收到所述目的频道对应的节目数据包排列在所述RTP数据包之后进行播放。a playing unit, configured to: after the discarding unit discards, the program data packets corresponding to the destination channel received from the LMB channel are arranged after the RTP data packet to be played.
第五方面,本发明提供了一种频道切换的服务器,包括:收发装置、存储器和处理器,In a fifth aspect, the present invention provides a server for channel switching, including: a transceiver, a memory, and a processor.
其中,所述收发装置用于执行如下步骤:The transceiver device is configured to perform the following steps:
接收用户端发送的频道切换请求,所述频道切换请求中携带待切换到的目的频道的标识;Receiving, by the user terminal, a channel switching request, where the channel switching request carries an identifier of a destination channel to be switched to;
通过单播通道,向所述用户端发送所述RTP数据包,所述单播通道为所述用户端与服务器建立的用于传输RTP数据包的通道;Transmitting, by the unicast channel, the RTP data packet to the user end, where the unicast channel is a channel established by the user end and a server for transmitting an RTP data packet;
其中,所述处理器用于执行如下步骤:The processor is configured to perform the following steps:
从缓存数据中确定与所述目的频道的标识对应的实时传输协议RTP数据包;Determining, from the cached data, a real-time transport protocol RTP data packet corresponding to the identifier of the destination channel;
当满足停止下发RTP数据包条件时,停止发送所述RTP数据包。When the condition for stopping the delivery of the RTP data packet is satisfied, the transmission of the RTP data packet is stopped.
第六方面,本发明提供了一种频道切换的用户端包括:收发装置、存储器和处理器,In a sixth aspect, the present invention provides a user terminal for channel switching, including: a transceiver, a memory, and a processor.
其中,所述收发装置用于执行如下步骤:The transceiver device is configured to perform the following steps:
从单播通道接收所述服务器发送的所述RTP数据包,所述单播通道为所 述用户端与服务器建立的用于传输RTP数据包的通道;Receiving, by the unicast channel, the RTP data packet sent by the server, where the unicast channel is a channel established by the client and the server for transmitting the RTP data packet;
向所述服务器发送频道切换请求,所述频道切换请求中携带待切换到的目的频道的标识,以使所述服务器从缓存数据中确定与所述目的频道的标识对应的实时传输协议RTP数据包。Sending a channel switching request to the server, where the channel switching request carries an identifier of a destination channel to be switched, so that the server determines, from the cached data, a real-time transport protocol RTP data packet corresponding to the identifier of the destination channel. .
其中,所述处理器用于执行如下步骤:The processor is configured to perform the following steps:
当满足停止下发RTP数据包条件时,指示所述服务器停止发送所述RTP数据包;When the condition of stopping the delivery of the RTP data packet is satisfied, instructing the server to stop sending the RTP data packet;
将所述RTP数据包和从LMB通道接收到所述目的频道对应的节目数据包进行对接。The RTP data packet is docked with a program data packet corresponding to the destination channel received from the LMB channel.
第七方面,本发明提供了一种频道切换的系统,其特征在于,包括:服务器和用户端,In a seventh aspect, the present invention provides a system for channel switching, which includes: a server and a client.
所述服务器用于:接收用户端发送的频道切换请求,所述频道切换请求中携带待切换到的目的频道的标识;从缓存数据中确定与所述目的频道的标识对应的实时传输协议RTP数据包;通过单播通道,向所述用户端发送所述RTP数据包,所述单播通道为所述用户端与服务器建立的用于传输RTP数据包的通道;当满足停止下发RTP数据包条件时,停止发送所述RTP数据包;The server is configured to: receive a channel switching request sent by a user end, where the channel switching request carries an identifier of a destination channel to be switched; and determine, according to the real-time transmission protocol RTP data corresponding to the identifier of the destination channel, from the cached data. And sending, by the unicast channel, the RTP data packet to the user end, where the unicast channel is a channel established by the user end and the server for transmitting an RTP data packet; when the RTP data packet is stopped, the data packet is sent When the condition is met, the sending of the RTP data packet is stopped;
所述用户端用于:向所述服务器发送频道切换请求,所述频道切换请求中携带待切换到的目的频道的标识,以使所述服务器从缓存数据中确定与所述目的频道的标识对应的实时传输协议RTP数据包;从单播通道接收所述服务器发送的所述RTP数据包,所述单播通道为所述用户端与服务器建立的用于传输RTP数据包的通道;当满足停止下发RTP数据包条件时,指示所述服务器停止发送所述RTP数据包;将所述RTP数据包和从LMB通道接收到所述目的频道对应的节目数据包进行对接。The user end is configured to: send a channel switching request to the server, where the channel switching request carries an identifier of a destination channel to be switched, so that the server determines, from the cached data, that the identifier of the destination channel is a real-time transport protocol RTP data packet; receiving, by the unicast channel, the RTP data packet sent by the server, where the unicast channel is a channel established by the client and the server for transmitting an RTP data packet; When the RTP data packet condition is sent, the server is instructed to stop sending the RTP data packet; and the RTP data packet is compared with a program data packet corresponding to the destination channel received from the LMB channel.
从以上技术方案可以看出,本发明实施例具有以下优点:It can be seen from the above technical solutions that the embodiments of the present invention have the following advantages:
本发明实施例中,在IP网络前端部署FCC系统,不需要改造或升级现有的广播网络,而可以实现FCC技术在DVB领域中的应用,从而明显提高直播频道的切换速度,提升用户体验。In the embodiment of the present invention, the FCC system is deployed on the front end of the IP network, and the existing broadcast network does not need to be modified or upgraded, and the application of the FCC technology in the DVB field can be implemented, thereby significantly improving the switching speed of the live channel and improving the user experience.
附图说明DRAWINGS
为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述中所需 要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following description will be made in the description of the embodiments. The drawings to be used are briefly described, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and those skilled in the art can also use these without any creative work. The figure obtains other figures.
图1是本发明实施例中频道切换的方法一个实施例示意图;1 is a schematic diagram of an embodiment of a method for channel switching in an embodiment of the present invention;
图2是本发明实施例中频道切换的方法另一个实施例示意图;2 is a schematic diagram of another embodiment of a method for channel switching in an embodiment of the present invention;
图3本发明实施例中数字视频广播快速频道切换系统的服务器与用户端信息交互示意图;FIG. 3 is a schematic diagram of interaction between a server and a client end of a digital video broadcast fast channel switching system according to an embodiment of the present invention; FIG.
图4是本发明实施例中快速频道切换时的交互图示意图;4 is a schematic diagram of interaction diagrams during fast channel switching in an embodiment of the present invention;
图5是本发明实施例中数字视频广播系统前端快速频道切换系统示意图;5 is a schematic diagram of a front-end fast channel switching system of a digital video broadcasting system according to an embodiment of the present invention;
图6是本发明实施例中数字视频广播系统终端接收机示意图;6 is a schematic diagram of a terminal receiver of a digital video broadcasting system according to an embodiment of the present invention;
图7是本发明实施例中频道切换的服务器一个实施例示意图;7 is a schematic diagram of an embodiment of a server for channel switching in an embodiment of the present invention;
图8是本发明实施例中频道切换的服务器另一个实施例示意图;8 is a schematic diagram of another embodiment of a server for channel switching in an embodiment of the present invention;
图9是本发明实施例中频道切换的服务器另一个实施例示意图;9 is a schematic diagram of another embodiment of a server for channel switching in an embodiment of the present invention;
图10是本发明实施例中频道切换的服务器另一个实施例示意图;10 is a schematic diagram of another embodiment of a server for channel switching in an embodiment of the present invention;
图11是本发明实施例中频道切换的服务器另一个实施例示意图;11 is a schematic diagram of another embodiment of a server for channel switching in an embodiment of the present invention;
图12是本发明实施例中频道切换的用户端一个实施例示意图;FIG. 12 is a schematic diagram of an embodiment of a user terminal for channel switching in an embodiment of the present invention; FIG.
图13是本发明实施例中频道切换的用户端另一个实施例示意图;FIG. 13 is a schematic diagram of another embodiment of a user terminal for channel switching according to an embodiment of the present invention; FIG.
图14是本发明实施例中频道切换的用户端另一个实施例示意图;14 is a schematic diagram of another embodiment of a user terminal for channel switching in an embodiment of the present invention;
图15是本发明实施例中频道切换的用户端另一个实施例示意图;15 is a schematic diagram of another embodiment of a user terminal for channel switching in an embodiment of the present invention;
图16是本发明实施例中频道切换的用户端另一个实施例示意图;16 is a schematic diagram of another embodiment of a user terminal for channel switching in an embodiment of the present invention;
图17是本发明实施例中频道切换的用户端另一个实施例示意图;17 is a schematic diagram of another embodiment of a user terminal for channel switching in an embodiment of the present invention;
图18为本发明实施例中服务器一个结构示意图;FIG. 18 is a schematic structural diagram of a server according to an embodiment of the present invention; FIG.
图19为本发明实施例中用户端一个结构示意图;FIG. 19 is a schematic structural diagram of a user end according to an embodiment of the present invention;
图20为本发明实施例中频道切换系统一个实施例示意图。FIG. 20 is a schematic diagram of an embodiment of a channel switching system according to an embodiment of the present invention.
具体实施方式detailed description
本发明实施例提供一种频道切换的方法,可以在数字视频广播系统运用快速频道切换技术,从而加快频道切换时间。本发明实施例还提供了相应的频道切换的装置。以下分别进行详细说明Embodiments of the present invention provide a channel switching method, which can apply a fast channel switching technology in a digital video broadcasting system, thereby speeding up channel switching time. The embodiment of the invention also provides a device for corresponding channel switching. Detailed descriptions are as follows
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清 楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solution in the embodiment of the present invention will be clarified in the following with reference to the accompanying drawings in the embodiments of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS It is apparent that the described embodiments are only a part of the embodiments of the invention, and not all of the embodiments. All other embodiments obtained by a person skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
请参阅图1,本发明实施例中频道切换的方法一个实施例包括:Referring to FIG. 1, an embodiment of a method for channel switching in an embodiment of the present invention includes:
101、接收用户端发送的频道切换请求,频道切换请求中携带待切换到的目的频道的标识;101. Receive a channel switching request sent by the user end, where the channel switching request carries an identifier of the destination channel to be switched to;
本实施例中,DVB系统的服务器接收用户端发送的频道切换请求,频道切换请求中携带待切换到目的频道的标识,其中DVB系统还包括用户端,在用户端播放节目的时候,通过直播广播(LMB,Linear Media Broadcast)通道从服务器获取节目数据,在频道切换时,用户端与服务器还建立用于传输RTP数据包的单播通道。In this embodiment, the server of the DVB system receives the channel switching request sent by the user end, and the channel switching request carries the identifier to be switched to the destination channel, where the DVB system further includes the user terminal, and broadcasts the live broadcast when the user end plays the program. The (LMB, Linear Media Broadcast) channel acquires program data from the server. When the channel is switched, the client and the server also establish a unicast channel for transmitting RTP data packets.
其中,DVB是一种国际承认的数字电视标准,该标准是由欧洲电信标准化组织(ETSI,European Telecommunications Standards Institute)、欧洲电子标准化组织(CENELEC,European Committee for Electrotechnical Standardization)和欧洲广播联盟(EBU,European Broadcasting Union)联合组成的联合专家组(JTC,Joint Technical Committee)发起的,我国使用的数字电视标准采用的就是DVB标准。Among them, DVB is an internationally recognized digital television standard, which is composed of the European Telecommunications Standards Institute (ETSI), the European Committee for Electrotechnical Standardization (CENELEC), and the European Broadcasting Union (EBU). The European Broadcasting Union (JTC) was jointly launched by the Joint Technical Committee (JTC). The digital TV standard used in China is based on the DVB standard.
DVB系统可以分为卫星广播DVB-S系统、有线电视DVB-C系统、地面数字视频广播DVB-T系统,DVB系统主要完成数字电视信号的广播与传输。The DVB system can be divided into satellite broadcasting DVB-S system, cable television DVB-C system, terrestrial digital video broadcasting DVB-T system, and DVB system mainly completes the broadcasting and transmission of digital television signals.
102、从缓存数据中确定与目的频道的标识对应的实时传输协议RTP数据包;102. Determine, from the cached data, a real-time transport protocol RTP data packet corresponding to the identifier of the destination channel;
本实施例中,服务器根据目的频道的标识,从缓存数据中确定从单播通道传输来的数据包,RTP数据包是属于目的频道,并且满足发送条件的RTP数据包。In this embodiment, the server determines, according to the identifier of the destination channel, the data packet transmitted from the unicast channel from the cached data, and the RTP data packet is an RTP data packet that belongs to the destination channel and satisfies the transmission condition.
单播通道是在用户端与服务器之间建立的一个单独数据通道,从一台服务器送出的每个数据包只能传送给一个至用户端,这种传送方式称为单播。A unicast channel is a separate data channel established between a client and a server. Each packet sent from one server can only be transmitted to one to the client. This transmission method is called unicast.
103、通过单播通道,向用户端发送RTP数据包,单播通道为用户端与服务器建立的用于传输RTP数据包的通道;103. Send, by using a unicast channel, an RTP data packet to the UE, where the unicast channel is a channel established by the UE and the server for transmitting the RTP data packet;
本实施例中,服务器通过单播通道,一个一个地向用户端发送从单播通道 传输来的数据包。而该单播通道是用户端与服务器建立起来的,用于传输RTP数据包的通道。In this embodiment, the server sends the unicast channel to the client one by one through the unicast channel. The transmitted packet. The unicast channel is established by the client and the server to transmit the channel of the RTP data packet.
104、当满足停止下发RTP数据包条件时,停止发送RTP数据包。104. Stop the sending of the RTP data packet when the condition for stopping the delivery of the RTP data packet is satisfied.
本实施例中,当服务器得知满足停止下发RTP数据包的条件时,则会停止发送RTP数据包。In this embodiment, when the server knows that the condition for stopping the delivery of the RTP data packet is satisfied, the RTP data packet is stopped.
本发明实施例中,在IP网络前端部署FCC系统,不需要改造或升级现有的广播网络,而可以实现FCC技术在DVB领域中的应用,从而明显提高直播频道的切换速度,提升用户体验。In the embodiment of the present invention, the FCC system is deployed on the front end of the IP network, and the existing broadcast network does not need to be modified or upgraded, and the application of the FCC technology in the DVB field can be implemented, thereby significantly improving the switching speed of the live channel and improving the user experience.
可选地,在上述图1对应的实施例的基础上,本发明实施例提供的频道切换方法的第一个可选实施例中,从缓存数据中确定与目的频道的标识对应的RTP数据包,可以包括:Optionally, in the foregoing optional embodiment of the channel switching method provided by the embodiment of the present invention, the RTP data packet corresponding to the identifier of the destination channel is determined from the cached data. Can include:
根据预设的I帧索引列表中所包含的RTP数据包的时间戳,确定RTP数据包的序号,预设的I帧索引列表为片类型为I帧的目的频道的RTP数据包的序号与时间戳的对应关系表;Determining the sequence number of the RTP data packet according to the timestamp of the RTP data packet included in the preset I frame index list, and the preset I frame index list is the sequence number and time of the RTP data packet of the destination channel of the slice type I frame. a correspondence table of stamps;
根据RTP数据包的序号,从缓存数据中确定RTP数据包。The RTP data packet is determined from the cached data according to the sequence number of the RTP data packet.
本实施例中,服务器根据目的频道的标识,在服务器缓存区中的缓存数据里确定通过单播通道传输的RTP数据包。其中,RTP数据包的包头包含时间戳与RTP序号,时间戳是同步于服务器端的系统时间,而RTP序号则是用于识别每个不同RTP数据包,且RTP序号具有连续性。预设的I帧索引列表中包含片类型为I帧,且是从单播通道传输来的RTP数据包的时间戳与RTP序号对应关系表。根据预设的I帧索引表确定从单播通道传输来的RTP数据包的序号,再通过该序号与RTP数据包的对应关系,将对应的RTP数据包从缓存区的缓存数据中选取出来。In this embodiment, the server determines the RTP data packet transmitted through the unicast channel in the cache data in the server cache area according to the identifier of the destination channel. The RTP data packet header includes a timestamp and an RTP sequence number, the timestamp is synchronized with the system time of the server, and the RTP sequence number is used to identify each different RTP data packet, and the RTP sequence number has continuity. The preset I frame index list includes a slice type I frame, and is a correspondence table between the time stamp of the RTP data packet transmitted from the unicast channel and the RTP sequence number. The sequence number of the RTP data packet transmitted from the unicast channel is determined according to the preset I frame index table, and the corresponding RTP data packet is selected from the cache data of the buffer area by the corresponding relationship between the sequence number and the RTP data packet.
可以理解的是,动态图像专家组(MPEG,Moving Picture Experts Group)是一种视频压缩编码技术标准。该编码压缩属于有损压缩,最大压缩比为200:1。MPEG标准目前一共有五个:MPEG-1、MPEG-2、MPEG-4、MPEG-7及MPEG-21,而在DVB系统中采用的的标准是MPEG-2标准。It can be understood that the Moving Picture Experts Group (MPEG) is a video compression coding technology standard. The code compression is lossy compression with a maximum compression ratio of 200:1. There are currently five MPEG standards: MPEG-1, MPEG-2, MPEG-4, MPEG-7, and MPEG-21, and the standard adopted in the DVB system is the MPEG-2 standard.
TS文件是MPEG-2的数字电视标准格式,目前使用的最为广泛。在一些视频服务中,经常需要快速从TS中过滤出I帧的片类型,用于表示视频节目 的主题和部分内容而不是动态的细节。由于视频图像序列时间上具有冗余,MEPG采用帧间编码技术,其中I帧是B帧和P帧的参考帧,一般采用I帧足以提供视频内容的全部信息,因此I帧在视频图像内容的提取中占据了比较重要的地位。The TS file is the MPEG-2 digital TV standard format and is currently the most widely used. In some video services, it is often necessary to quickly filter the slice type of an I frame from the TS for representing a video program. The theme and part of the content rather than the dynamic details. Since the video image sequence has redundancy in time, the MPEG adopts an interframe coding technology, wherein the I frame is a reference frame of the B frame and the P frame, and generally the I frame is sufficient to provide all the information of the video content, so the I frame is in the video image content. Extraction takes up a more important position.
其次,本发明实施例中,通过增加I帧索引机制改进服务器端,服务器可以直接通过I帧索引机制快速确定I帧类型的视频,有效地减少了冗余数据的下发,同时节省了处理时间。In the embodiment of the present invention, the server is improved by adding an I frame indexing mechanism, and the server can quickly determine the I frame type video by using the I frame indexing mechanism, thereby effectively reducing the delivery of redundant data and saving processing time. .
可选地,在上述图1对应的第一个可选实施例的基础上,本发明实施例提供的频道切换方法的第二个可选实施例中,从缓存数据中确定与目的频道的标识对应的RTP数据包之前,还可以包括:Optionally, in the second optional embodiment of the channel switching method provided by the embodiment of the present invention, the identifier of the destination channel is determined from the cached data. Before the corresponding RTP data packet, it may also include:
接收直播广播LMB数据流,并从LMB数据流中确定目的频道的传输流;Receiving a live broadcast LMB data stream, and determining a transport stream of the destination channel from the LMB data stream;
根据目的频道的传输流中的时间信息,进行服务器端的系统时间校正;Performing system time correction on the server side according to time information in the transport stream of the destination channel;
将目的频道的传输流打包成目的频道的RTP数据包,目的频道的RTP数据包中包含校正后的时间戳;The transport stream of the destination channel is packed into an RTP data packet of the destination channel, and the corrected timestamp is included in the RTP data packet of the destination channel;
缓存目的频道的RTP数据包。The RTP packet of the destination channel is cached.
本实施例中,服务器接收LMB数据流,并从LMB数据流中过滤出目的频道的TS,锁频到支持FCC特性的直播频道频点,获取承载该目的频道的TS,可以根据目的频道TS中的时间信息,对服务器端的系统进行时间校正,使得服务器端的系统时间与TS中过滤得到的时间表(TOT,Time Offset Table)的时间信息同步。In this embodiment, the server receives the LMB data stream, and filters the TS of the destination channel from the LMB data stream, and locks the frequency to the live channel frequency of the FCC feature, and obtains the TS carrying the destination channel, which can be according to the destination channel TS. The time information is used to perform time correction on the server-side system, so that the system time of the server is synchronized with the time information of the time-lapse schedule (TOT, Time Offset Table) in the TS.
按照RFC2250标准定义,将TS过滤后得到的TS打包成RTP格式的包,TS数据包作为载荷封装在RTP数据包内,且RTP数据包封装整数个TS数据包,RTP数据包的包头部分含有校正后的时间戳,是根据获取到的绝对时间值转换为45KHz的RTP时间戳,可以假设系统之间值为HH:MM:SS:mm,转换为时间戳timesstamp=[(HH*3600+MM*60+SS)*45000+mm*45]。将这些目的频道的RTP数据包缓存在服务器端的缓冲区中,以便快速调用获取信息。According to the definition of RFC2250 standard, the TS obtained by TS filtering is packaged into a packet of RTP format, the TS data packet is encapsulated in the RTP data packet as a payload, and the RTP data packet encapsulates an integer number of TS data packets, and the header portion of the RTP data packet contains the correction. The post timestamp is converted to an RTP timestamp of 45KHz according to the obtained absolute time value. It can be assumed that the value between the systems is HH:MM:SS:mm, converted to timestamp timesstamp=[(HH*3600+MM* 60+SS)*45000+mm*45]. The RTP packets of these destination channels are cached in a server-side buffer to quickly call the get information.
再次,本发明实施例中,将目的频道的传输流打包成RTP数据包,且RTP数据包中包含有可以用于无缝拼接的RTP时间戳,如此不但可以视频RTP数据包实现FCC技术,还可以通过RTP时间戳实现单播码流与LMB广播码流 的无缝拼接,提升用户观看视频的流畅性。In addition, in the embodiment of the present invention, the transport stream of the destination channel is packaged into an RTP data packet, and the RTP data packet includes an RTP timestamp that can be used for seamless splicing, so that not only the FTP technology can be implemented by the video RTP data packet, but also Unicast code stream and LMB broadcast stream can be implemented by RTP timestamp The seamless stitching enhances the smoothness of the user watching the video.
可选地,在上述图1对应的第二个可选实施例的基础上,本发明实施例提供的频道切换方法的第三个可选实施例中,缓存目的频道的RTP数据包之后,还可以包括:Optionally, in the third optional embodiment of the channel switching method provided by the embodiment of the present invention, after the RTP data packet of the destination channel is cached, Can include:
从目的频道的RTP数据包中检测出片类型为I帧的数据包;Detecting a data packet whose slice type is an I frame from the RTP data packet of the destination channel;
建立片类型为I帧的数据包的序号和时间戳的对应关系,作为I帧索引列表。The correspondence between the sequence number and the time stamp of the data packet whose slice type is I frame is established as an I frame index list.
本实施例中,服务器缓存区缓存目的频道的RTP数据包后,可以从目的频道的RTP数据包中检测并确定片类型为I帧的数据包,建立起片类型为I帧的数据包的序号与时间戳的对应关系,作为I帧索引列表。In this embodiment, after the server buffer area buffers the RTP data packet of the destination channel, the data packet of the slice type I frame can be detected and determined from the RTP data packet of the destination channel, and the sequence number of the data packet with the slice type I frame is established. Correspondence with timestamps, as an I-frame index list.
检测并确定I帧视频类型片类型的方法,通常可以对该视频的TS打包后的TS数据包载荷进行检测,若TS数据包载荷中包含打包原始流(PES,Packetized Elementary Stream)的包头,则对PES包头进一步检测。如果PES包头部分设置了净荷单元起始指示符,可以再进一步的检测PES载荷。其中,净荷单元起始指示符是用来指示TS数据包中带有PES包或节目特定信息(PSI,Program Specific Information)时的情况,当TS数据包的载荷有PES包时,该为具有以下特性,“1”表示TS的载荷将以PES包的第一个字节开始;“0”表示在TS数据包的载荷不是以PES包为始的。检测PES载荷可以获取视频帧类型,如果PES打包前的原始流(ES,Elementary Stream)为I帧,则记录该TS数据包所在的RTP数据包的RTP序号以及对应的时间戳。The method for detecting and determining the I-frame video type slice type can generally detect the TS packet payload of the TS packet of the video. If the TS packet payload includes a packet header of a Packetized Elementary Stream (PES), Further testing of the PES packet header. If the PES header portion is set with a payload unit start indicator, the PES payload can be further detected. The payload unit start indicator is used to indicate that a PES packet or a Program Specific Information (PSI) is included in the TS packet. When the payload of the TS packet has a PES packet, the The following characteristics, "1" indicates that the load of the TS will start with the first byte of the PES packet; "0" indicates that the payload of the TS packet does not start with the PES packet. The PES payload can be used to obtain the video frame type. If the original stream (ES, Elementary Stream) before the PES packet is an I frame, the RTP sequence number of the RTP data packet in which the TS packet is located and the corresponding timestamp are recorded.
需要说明的是,上述快速确定I帧视频类型片类型的方法不唯一,还可以利用一种新型的I帧快速匹配搜索算法,或者一种快速帧内预测算法来获取I帧的视频,故此处不作限定。It should be noted that the method for quickly determining the I-frame video type slice type is not unique, and a new I-frame fast matching search algorithm or a fast intra prediction algorithm can be used to obtain the I-frame video. Not limited.
进一步地,本发明实施例中,从目的频道的RTP数据包中检测出视频类型片类型为I帧的数据包,并建立I帧索引列表,由此进入I帧索引机制,减少冗余数据下发,加快获取I帧类型视频的速度,进一步提升用户观看的体验。Further, in the embodiment of the present invention, a data packet of a video type slice type is an I frame is detected from an RTP data packet of a destination channel, and an I frame index list is established, thereby entering an I frame indexing mechanism, and reducing redundant data. Send, speed up the acquisition of I frame type video, further enhance the user experience.
可选地,在上述图1对应的实施例的基础上,本发明实施例提供的频道切换方法的第四个可选实施例中,当满足停止下发RTP数据包条件时,停止发送所述RTP数据包,可以包括: Optionally, in the fourth optional embodiment of the channel switching method provided by the embodiment of the present invention, when the condition for stopping the delivery of the RTP data packet is met, stopping sending the RTP packets, which can include:
接收用户端发送的单播通道数据停发请求时,停止发送RTP数据包;When receiving the unicast channel data suspension request sent by the client, stopping sending the RTP data packet;
或,or,
当用户端拆除单播通道后,停止发送RTP数据包。When the UE removes the unicast channel, it stops sending RTP packets.
本实施例中,服务器可以通过接收用户端发送的单播通道数据停发请求,服务器在收到该请求后,终止继续通过单播通道向用户端发送数据包。其中,该请求可以为一种快速获取组播RTP会话(RAMS,Rapid Acquisition of Multicast RTP sessions)请求,具体地,所述单播通道数据停发请求为RAMS-T请求,而RAMS-T请求是在用户端从LMB通道接收到目的频道对应的节目数据包后发送的。In this embodiment, the server may receive a unicast channel data suspension request sent by the client, and after receiving the request, the server terminates sending the data packet to the client through the unicast channel. The request may be a Rapid Acquisition of Multicast RTP sessions (RAMS) request. Specifically, the unicast channel data suspension request is a RAMS-T request, and the RAMS-T request is It is sent after the UE receives the program data packet corresponding to the destination channel from the LMB channel.
本实施例中,还有阐述了一种特殊情况,当用户端因为设备故障或者网络连接中断等问题,拆除用于传输RTP数据包的单播通道后,服务器也会终止继续通过单播通道发送RTP数据包。In this embodiment, a special case is also described. When the user terminal removes the unicast channel for transmitting the RTP data packet due to equipment failure or network connection interruption, the server also terminates sending through the unicast channel. RTP packet.
需要说明的是,上述两个例子仅作为服务器侧停止发送RTP数据包的两种可能性,而实际应用中,并不仅限于上述的两个例子,故此处不做限定。It should be noted that the above two examples are only two possibilities for stopping the transmission of the RTP data packet on the server side. However, the actual application is not limited to the above two examples, and thus is not limited herein.
又进一步地,本发明实施例中,分别针对一般情况和特殊情况下停止发送RTP数据包作了相应的条件分析,使得本方案在实际应用中可以面对更多的情况,扩大应用范围,同时增加方案的灵活性。Further, in the embodiment of the present invention, the condition analysis of stopping the transmission of the RTP data packet in the general case and the special case is respectively performed, so that the solution can face more situations and expand the application range in the actual application. Increase the flexibility of the program.
上面从服务器角度对本发明的频道切换的方法进行描述,下面从用户端角度对本发明中的频道切换的方法进行详细描述,请参阅图2,本发明实施例提供的一种频道道切换的方法实施例包括:The method for channel switching according to the present invention is described above from the perspective of a server. The method for channel switching in the present invention is described in detail from the perspective of the user. Referring to FIG. 2, a method for implementing channel channel switching according to an embodiment of the present invention is implemented. Examples include:
201、向服务器发送频道切换请求,频道切换请求中携带待切换到的目的频道的标识,以使服务器从缓存数据中确定与目的频道的标识对应的实时传输协议RTP数据包;201. Send a channel switching request to the server, where the channel switching request carries an identifier of the destination channel to be switched, so that the server determines, from the cached data, a real-time transport protocol RTP data packet corresponding to the identifier of the destination channel;
本实施例中,DVB系统的用户端向服务器发送频道切换请求,该频道切换请求中携带有切换到的目的频道的标识,服务器可以根据该标识从服务器缓冲区的缓存数据中确定从单播通道发送的RTP数据包,且该RTP数据包属于目的频道。其中DVB系统还包括服务器,在用户端播出节目的时候,可以通过LMB通道从该服务器获取相关的节目数据。In this embodiment, the UE of the DVB system sends a channel switching request to the server, where the channel switching request carries the identifier of the switched destination channel, and the server can determine the unicast channel from the cached data of the server buffer according to the identifier. The RTP packet sent, and the RTP packet belongs to the destination channel. The DVB system further includes a server, and when the user broadcasts the program, the related program data can be obtained from the server through the LMB channel.
202、从单播通道接收服务器发送的RTP数据包,单播通道为用户端与服 务器建立的用于传输RTP数据包的通道;202. Receive an RTP data packet sent by the server from a unicast channel, where the unicast channel is a client and a service. Channel established by the server for transmitting RTP data packets;
本实施例中,用户端建立与服务器之间进行媒体数据传输的单播通道,通过已经建立的单播通道一个一个陆续地接收由服务器发送的单播通道传送来的RTP数据包。In this embodiment, the UE establishes a unicast channel for media data transmission with the server, and successively receives the RTP data packets transmitted by the unicast channel sent by the server one by one through the established unicast channel.
203、当满足停止下发RTP数据包条件时,指示服务器停止发送RTP数据包;203. When it is satisfied that the condition for stopping the delivery of the RTP data packet is met, the server is instructed to stop sending the RTP data packet.
本实施例中,当满足停止下发RTP数据包的条件时,用户端会指示服务器停止发送RTP数据包,具体地,停止下发RTP数据包条件可以是在接收到用户端发送的单播通道数据停发请求(即RAMS-T请求)后,也可以是在用户端拆除单播通道后,停止下发RTP数据包。In this embodiment, when the condition for stopping the delivery of the RTP data packet is met, the UE may instruct the server to stop sending the RTP data packet. Specifically, the condition for stopping the delivery of the RTP data packet may be that the unicast channel sent by the user end is received. After the data suspension request (that is, the RAMS-T request), the RTP data packet may be stopped after the unicast channel is removed by the user.
204、将RTP数据包和从LMB通道接收到目的频道对应的节目数据包进行对接。204. Connect the RTP data packet with the program data packet corresponding to the destination channel received from the LMB channel.
本实施例中,用户端将从单播通道传输的RTP数据包和从LMB通道接收的目的频道对应的节目数据包进行无缝拼接,其中从单播通道传输来的RTP数据包可以去除包头,并拆分成若干个TS数据包,而从LMB通道接收到的目的频道对应的TS数据包可以与单播通道的TS数据包进行对接。In this embodiment, the UE seamlessly splices the RTP data packet transmitted from the unicast channel and the program data packet corresponding to the destination channel received from the LMB channel, wherein the RTP data packet transmitted from the unicast channel can remove the packet header. And split into a number of TS packets, and the TS packets corresponding to the destination channel received from the LMB channel can be connected to the TS packets of the unicast channel.
本发明实施例中,改进FCC技术,在IP网络前端部署FCC系统,与此同时,在用户端也相应的部署了与服务器前端关联的FCC系统,这样可以不需要改造或升级现有的广播网络,实现FCC技术在DVB领域中的应用,明显提高直播频道切换的速度,提升用户的体验。In the embodiment of the present invention, the FCC technology is improved, and the FCC system is deployed on the front end of the IP network. At the same time, the FCC system associated with the server front end is deployed on the user end, so that the existing broadcast network does not need to be modified or upgraded. To realize the application of FCC technology in the field of DVB, obviously improve the speed of live channel switching and enhance the user experience.
可选地,在上述图2对应的实施例的基础上,本发明实施例提供的频道切换方法的第一个可选实施例中,向服务器发送频道切换请求之前,还可以包括:Optionally, on the basis of the foregoing embodiment corresponding to FIG. 2, in the first optional embodiment of the channel switching method provided by the embodiment of the present invention, before the channel switching request is sent to the server, the method may further include:
接收频道切换指令,频道切换指令中包含目的频道的标识;Receiving a channel switching instruction, where the channel switching instruction includes an identifier of the destination channel;
根据预设的节目地址表,确定与目的频道的标识对应的节目地址;Determining, according to a preset program address table, a program address corresponding to the identifier of the destination channel;
根据节目地址,建立从用户端到服务器的用于传输RTP数据包的单播通道。A unicast channel for transmitting RTP data packets from the client to the server is established according to the program address.
本实施例中,用户端在向服务器发送频道切换请求之前,还可以接收用户输入的频道切换指令,且频道切换指令中包含有目的频道的标识,该标识是唯一的。用户端从预置的地址下载LMB节目频道和节目地址关系列表。当发送 频道切换请求时,根据频道唯一标识可以获取到节目地址,再由节目地址建立起从用户端到服务器的单播通道,该单播通道用于传输RTP数据包。In this embodiment, before sending the channel switching request to the server, the UE may also receive a channel switching instruction input by the user, and the channel switching instruction includes an identifier of the destination channel, and the identifier is unique. The client downloads the LMB program channel and program address relationship list from the preset address. When sending When the channel switching request is made, the program address can be obtained according to the unique identifier of the channel, and then the unicast channel from the user end to the server is established by the program address, and the unicast channel is used for transmitting the RTP data packet.
需要说明的是,唯一标识可以由网络身份识别码、服务器身份识别码与节目频道号码共同组成,也可以由其他具有唯一性的标识组成,故此处不作限定。It should be noted that the unique identifier may be composed of a network identifier, a server identifier, and a program channel number, or may be composed of other unique identifiers, and thus is not limited herein.
其次,本发明实施例中,通过目的频道的唯一标识确定与之对应的节目地址,标识的唯一性可以有效并准确的确定节目地址,使得本发明方案的实用性得以提升,且具有可操作性。Secondly, in the embodiment of the present invention, the program address corresponding to the destination channel is determined by the unique identifier of the destination channel, and the uniqueness of the identifier can effectively and accurately determine the program address, so that the utility of the solution of the present invention is improved and operable. .
可选地,在上述图2或图2对应的第一个可选实施例的基础上,本发明实施例提供的频道切换方法的第二个可选实施例中,从单播通道接收服务器发送的RTP数据包之后,还可以包括:Optionally, in the second optional embodiment of the channel switching method provided by the embodiment of the present invention, the unicast channel receiving server sends the singular channel. After the RTP packet, it can also include:
按照顺序解析每个RTP数据包,以获取每个RTP数据包中包含的时间戳;Parsing each RTP packet in order to obtain the timestamp contained in each RTP packet;
当满足停止下发RTP数据包条件时,指示服务器停止发送RTP数据包,可以包括:When the condition of stopping the delivery of the RTP data packet is satisfied, the server is instructed to stop sending the RTP data packet, which may include:
在从LMB通道接收到第一个节目数据包后,判断最后一个解析的RTP数据包的时间戳是否满足单播通道的关闭条件;After receiving the first program data packet from the LMB channel, determining whether the timestamp of the last parsed RTP data packet satisfies the closing condition of the unicast channel;
当满足单播通道的关闭条件时,向服务器发送单播通道数据停发请求。When the shutdown condition of the unicast channel is satisfied, a unicast channel data suspension request is sent to the server.
本实施例中,用户端从已经建立的单播通道一个一个按RTP数据包序号的先后顺序陆续接收服务器发送的RTP数据包后,通过解析RTP数据包的包头信息获取每个RTP数据包中包含的时间戳。In this embodiment, after receiving the RTP data packet sent by the server one by one in the order of the RTP data packet sequence number, the UE obtains each RTP data packet by parsing the packet header information of the RTP data packet. Timestamp.
而在从LMB通道接收到目的频道对应的节目数据包后,用户端需要向服务器发送单播通道数据停发请求需要进过判断才能实现,当判断得到解析后的最后一个单播通道RTP数据包的时间戳满足关闭单播通道的条件,才将单播通道关闭。After receiving the program data packet corresponding to the destination channel from the LMB channel, the user needs to send a unicast channel data suspension request to the server, which needs to be judged to be implemented, and when the judgment is obtained, the last unicast channel RTP data packet is parsed. The timestamp meets the conditions for closing the unicast channel before the unicast channel is closed.
再次,本发明实施例中,对单播通道的关闭设定了一定条件,在判断满足单播通道关闭的条件后,即可关闭该单播通道,这样可以更好的节约带宽资源,使方案的实用性得以进一步提升。In the embodiment of the present invention, a certain condition is set for the unicast channel to be closed. After the condition that the unicast channel is closed is determined, the unicast channel can be closed, which can save bandwidth resources and make the solution. The practicality has been further enhanced.
可选地,在上述图2对应的第二个可选实施例的基础上,本发明实施例提供的频道切换方法的第三个可选实施例中,判断最后一个解析的RTP数据包的时间戳是否满足单播通道的关闭条件,可以包括: Optionally, in the third optional embodiment of the channel switching method provided by the embodiment of the present invention, determining the time of the last parsed RTP data packet, based on the second optional embodiment corresponding to FIG. Whether the stamp meets the closing condition of the unicast channel may include:
计算最后一个解析的RTP数据包的时间戳和第一个节目数据包中包含的时间戳之间的差值;Calculating the difference between the timestamp of the last parsed RTP packet and the timestamp contained in the first program packet;
当差值大于第一预置值时,确定满足单播通道的关闭条件。When the difference is greater than the first preset value, it is determined that the off condition of the unicast channel is satisfied.
本实施例中,判断最后一个解析的RTP数据包的时间戳是否满足单播通道的关闭条件方式可以为,在从LMB接收的第一个节目数据包,即第一个TS数据包时,获取当前用户端与服务器系统的时间值,并且转换为45KHz的RTP时间戳,将该时间戳记录为rtp_ts_end。再解析单播通道的每个RTP数据包,由此获取相应的时间戳信息,同时,将该信息实时更新到rtp_ts_last,判断rtp_ts_last时间值与rtp_ts_end时间值之间的差值是否大于第一预置值,如果大于第一预置值时,说明单播通道传输来的数据包已经与LMB通道传输来的数据包开始在第一预置值的时间内出现重叠,也就是,用户已经可以观看从LMB通道发送来的目的频道的数据,此时可以关闭单播通道。In this embodiment, determining whether the timestamp of the last parsed RTP data packet satisfies the closing condition of the unicast channel may be obtained when the first program data packet received from the LMB, that is, the first TS data packet, is obtained. The current time value of the client and server system, and converted to an RTP timestamp of 45KHz, which is recorded as rtp_ts_end. The RTP data packet of the unicast channel is parsed, and the corresponding timestamp information is obtained, and the information is updated to rtp_ts_last in real time, and it is determined whether the difference between the rtp_ts_last time value and the rtp_ts_end time value is greater than the first preset. The value, if greater than the first preset value, indicates that the data packet transmitted by the unicast channel has overlapped with the data packet transmitted by the LMB channel starting within the first preset value, that is, the user has been able to view the data. The data of the destination channel sent by the LMB channel, at which point the unicast channel can be turned off.
需要说明的是,第一预置值可以设定为1秒,或其他合理的预置时间,故此处不对具体第一预置值做限定。It should be noted that the first preset value may be set to 1 second, or other reasonable preset time, so the specific first preset value is not limited herein.
进一步地,本发明实施例中,针对关闭单播通道的条件提出了一种可选方式,就此引入超时机制,当由直播通道传输的最新的RTP时间戳与LMB通道收到的TS数据包对应的RTP时间戳差值,大于第一预置值时,关闭单播通道,节约带宽资源,以此提升方案的灵活性。Further, in the embodiment of the present invention, an optional manner is proposed for the condition of closing the unicast channel, and a timeout mechanism is introduced. When the latest RTP timestamp transmitted by the live channel corresponds to the TS packet received by the LMB channel, When the RTP timestamp difference is greater than the first preset value, the unicast channel is closed, and bandwidth resources are saved, thereby improving the flexibility of the solution.
可选地,在上述图2对应的第二个可选实施例的基础上,本发明实施例提供的频道切换方法的第四个可选实施例中,判断最后一个解析的RTP数据包的时间戳是否满足单播通道的关闭条件,可以包括:Optionally, in the fourth optional embodiment of the channel switching method provided by the embodiment of the present invention, determining the time of the last parsed RTP data packet, based on the second optional embodiment corresponding to FIG. Whether the stamp meets the closing condition of the unicast channel may include:
比较当前系统时间值和最后一个解析的RTP数据包的时间戳之间的差值;Comparing the difference between the current system time value and the timestamp of the last parsed RTP packet;
当差值大于第二预置值时,确定满足所述单播通道的关闭条件。When the difference is greater than the second preset value, it is determined that the off condition of the unicast channel is satisfied.
本实施例中,判断解析的最后一个RTP数据包的时间戳是否满足单播通道的关闭条件方式还可以为,比较当前系统时间值和最后一个RTP数据包的时间戳之间的差值是否超过第二预置值,如果差值大于第二预置值时,确定满足单播通道的关闭条件。In this embodiment, it may be determined whether the time difference between the current system time value and the timestamp of the last RTP data packet exceeds whether the timestamp of the last RTP data packet of the parsing meets the closing condition of the unicast channel. The second preset value determines that the off condition of the unicast channel is satisfied if the difference is greater than the second preset value.
可以将当前系统时间值记录为rtp_ts_now,这个值是按照45KHz的时钟频率转换而来的,再解析单播通道的每个RTP数据包,由此获取相应的时间 戳信息,同时,将该信息实时更新到rtp_ts_last,判断rtp_ts_last时间值与rtp_ts_now时间值之间的差值是否大于第二预置值,如果大于第二预置值,则说明出现了广播信号异常的情况,导致时间戳rtp_ts_last对应的数据包未能正常到达用户端,此时可以关闭单播通道。The current system time value can be recorded as rtp_ts_now, which is converted according to the clock frequency of 45KHz, and then each RTP data packet of the unicast channel is parsed, thereby obtaining the corresponding time. The information is stamped, and the information is updated to rtp_ts_last in real time to determine whether the difference between the rtp_ts_last time value and the rtp_ts_now time value is greater than the second preset value. If the second preset value is greater than the second preset value, the broadcast signal is abnormal. In this case, the packet corresponding to the timestamp rtp_ts_last fails to reach the client normally, and the unicast channel can be closed at this time.
需要说明的是,第二预置值可以设定为5秒,或其他合理的预置时间,故此处不对具体第二预置值做限定。It should be noted that the second preset value may be set to 5 seconds, or other reasonable preset time, so the specific second preset value is not limited herein.
更进一步地,本发明实施例中,针对关闭单播通道的条件提出了另一种可选方式,目的是针对广播信号异常时进行处理,当切台超过第二预置值时,如果DVB系统中的用户端仍未接收到广播信号码流,则应该关闭单播通道,从而节约IP网络资源,由此进一步的提升了方案在实际应用中的灵活性。Further, in the embodiment of the present invention, another alternative manner is proposed for the condition of closing the unicast channel, and the purpose is to process when the broadcast signal is abnormal, and if the cut table exceeds the second preset value, if the DVB system If the user terminal still does not receive the broadcast signal stream, the unicast channel should be closed, thereby saving IP network resources, thereby further improving the flexibility of the scheme in practical applications.
可选地,在上述图2和图2对应的第一至第四个可选实施例中任意一项的基础上,本发明实施例提供的频道切换方法的第五个可选实施例中,将RTP数据包和从LMB通道接收到目的频道对应的节目数据包进行对接,可以包括:Optionally, in the fifth optional embodiment of the channel switching method provided by the embodiment of the present invention, based on any one of the first to fourth alternative embodiments corresponding to FIG. 2 and FIG. 2, The RTP data packet is matched with the program data packet corresponding to the destination channel received from the LMB channel, and may include:
丢弃从LMB通道接收到目的频道对应的节目数据包中序号与RTP数据包的序号重复的数据包;Discarding, from the LMB channel, a data packet whose sequence number corresponding to the destination channel corresponds to the sequence number of the RTP data packet;
将丢弃后剩余的从LMB通道接收到目的频道对应的节目数据包排列在RTP数据包之后进行播放。The program data packets corresponding to the destination channel received from the LMB channel remaining after being discarded are arranged in an RTP data packet for playback.
本实施例中,将RTP数据包和从LMB通道接收到目的频道对应的节目数据包进行无缝拼接的方法可以为,用户端接收从LMB通道获取到的第一个TS数据包,解析TS数据包的包头,由此获取该TS的序号,该序号是用于表示TS数据包连续性的节目时钟参考(PCR,Program Clock Reference),PCR是指示系统时钟本身的瞬时值的时间标签。对第一个TS数据包的包头解析后得到第一个PCR记录值ts_pcr(N),LMB通道接收到的TS数据包可以进行过滤,具体过滤方式为,丢弃所有PCR值为ts_pcr(N)的TS数据包,直到出现下一个PCR值为ts_pcr(N+1)的TS数据包,此时才将TS数据包缓存与缓冲区内。用户端将PCR值为ts_pcr(N)的TS数据包进行过滤,即丢弃PCR值为ts_pcr(N)的TS数据包,然后将丢弃后剩余的从LMB通道接收到目的频道对应的TS数据包排列在RTP数据包之后进行播放,也就是LMB通道将PCR值为ts_pcr(N+1)的TS数据包与单播通道中PCR值为ts_pcr(N)的TS数据包进行无 缝拼接。In this embodiment, the method for seamlessly splicing the RTP data packet and the program data packet corresponding to the destination channel received from the LMB channel may be: the UE receives the first TS data packet obtained from the LMB channel, and parses the TS data. The packet header of the packet, thereby obtaining the serial number of the TS, which is a program clock reference (PCR, Program Clock Reference) for indicating the continuity of the TS packet, and the PCR is a time stamp indicating the instantaneous value of the system clock itself. After the header of the first TS packet is parsed, the first PCR record value ts_pcr(N) is obtained, and the TS packet received by the LMB channel can be filtered. The specific filtering method is to discard all PCR values ts_pcr(N). The TS packet is not buffered into the buffer until the next TS packet with the next PCR value of ts_pcr(N+1). The UE filters the TS packets with the PCR value of ts_pcr(N), that is, discards the TS packets with the PCR value of ts_pcr(N), and then arranges the TS packets corresponding to the destination channel received from the LMB channel after the discarding. Play after the RTP data packet, that is, the LMB channel performs the TS packet with the PCR value ts_pcr(N+1) and the TS packet with the PCR value ts_pcr(N) in the unicast channel. Stitching.
再进一步地,本发明实施例中,利用TS码流中自带的时间戳解决单播码流与LMB广播码流之间无缝对接的问题,使目的频道保持播放的流畅性与连贯性,进一步提升用户的体验。Further, in the embodiment of the present invention, the problem of seamless docking between the unicast code stream and the LMB broadcast code stream is solved by using the time stamp provided in the TS code stream, so that the destination channel maintains the smoothness and consistency of the play. Further enhance the user experience.
下面将对本发明实施例中频道切换的方案进行整体性的描述,请参阅图3,图3为本发明实施例中数字视频广播快速频道切换系统的服务器与用户端信息交互示意图,本发明实施例中的频道切换过程在数字视频广播系统中进行。数字视频广播系统是由服务器和用户端组成。整体解决方案包括前端部署的DVB FCC系统和终端接收机的软件升级,DVB前端FCC系统中的服务器可以使用单播通道向DVB终端接收机中的用户端快速下发下发RTP数据包,而用户端通过实时传输控制协议(RTCP,Real-Time Transport Control Protocol)消息通道向服务器传输消息。The following is a description of the scheme of the channel switching in the embodiment of the present invention. Referring to FIG. 3, FIG. 3 is a schematic diagram of the interaction between the server and the user end of the digital video broadcast fast channel switching system according to the embodiment of the present invention. The channel switching process in is performed in a digital video broadcasting system. The digital video broadcasting system is composed of a server and a client. The overall solution includes the DVB FCC system of the front-end deployment and the software upgrade of the terminal receiver. The server in the DVB front-end FCC system can use the unicast channel to quickly deliver the RTP data packet to the user in the DVB terminal receiver, and the user The terminal transmits a message to the server through a Real-Time Transport Control Protocol (RTCP) message channel.
在DVB系统前端FCC系统接收到LMB信号,将接收到的LMB信号进行过滤,锁频到支持FCC特性的直播频道频点,获取该目的频道的标准格式的TS,再根据节目关联表(PAT,Program Association Table)、节目映射表(PMT,Program Map Table)和目的频道的媒体流,过滤出目的频道的TS数据包。这里所提到的目的频道的媒体流具体可以是指视频数据流、音频数据流或字幕数据流,也可以为其它媒体形式的数据流,此处不做限定。而媒体流中承载的数据在呈现给用户前,在DVB系统的核心技术是采用MPEG-2技术进行视频和音频的编码,使用统一的TS。然而TS需要封装后进行播放,所谓封装格式就是将已经编码压缩好的视频轨和音频轨按照一定的格式放到一个文件中。因此,对该TS进行封装,由定长的TS数据包组成,且每个TS数据包包含188个字节。The FCC system at the front end of the DVB system receives the LMB signal, filters the received LMB signal, locks the frequency to the live channel frequency that supports the FCC feature, obtains the TS of the standard format of the destination channel, and then according to the program association table (PAT, The Program Association Table, the Program Map Table (PMT), and the media stream of the destination channel filter out the TS packets of the destination channel. The media stream of the destination channel mentioned herein may specifically refer to a video data stream, an audio data stream, or a subtitle data stream, or may be a data stream in other media formats, which is not limited herein. Before the data carried in the media stream is presented to the user, the core technology of the DVB system is to use MPEG-2 technology for encoding video and audio, using a unified TS. However, the TS needs to be packaged and played. The so-called package format is to put the encoded video track and audio track into a file according to a certain format. Therefore, the TS is encapsulated, consisting of fixed length TS packets, and each TS packet contains 188 bytes.
对目的频道的TS进行打包后得到TS数据包,然后每7个TS数据包封装成一个RTP数据包,需要说明的是,一个RTP数据包可以由多个TS数据包封装而成,这里的7个只是一种常规模式,不排除其他的组成个数,故此处不做限定。FCC/超时重传(RET,retransmit-overtime)服务器模块向FCC/RET用户端模块快速下发RTP数据包,且两个模块都集成了RTCP协议栈,模块之间的请求消息通过RTCP通道进行传输,以此来控制RTP数据包传输的进 程。The TS packet of the destination channel is packaged to obtain a TS packet, and then every 7 TS packets are encapsulated into one RTP packet. It should be noted that an RTP packet may be encapsulated by multiple TS packets, where 7 They are just a regular pattern, and the number of other components is not excluded, so there is no limit here. The FCC/retransmit-overtime (RET, retransmit-overtime) server module quickly delivers RTP data packets to the FCC/RET client module, and both modules integrate the RTCP protocol stack, and request messages between modules are transmitted through the RTCP channel. In order to control the progress of RTP packet transmission Cheng.
请参阅图4,图4为快速频道切换时的交互图示意图,其中,FCC/RET服务器分为两个模块,突发脉冲序列目标模块用于接收由FCC/RET用户端发送的请求,该请求为从RTCP通道传输的一种RAMS请求,具体地,可以为RAMS-R请求,即为下发RTP数据包请求。信号源模块收到RAMS-R请求后,向FCC/RET用户端发送另一种RAMS请求,具体地,可以为RAMS-I请求,即处理RTP数据包请求,该响应中包含了最新的视频I帧的RTP数据包对应的序号,可以使FCC/RET用户端根据RTP数据包对应的序号和包含的时间戳确定关闭单播通道的时间。信号源目标在发送RAMS-I请求时,也同时将对应的RTP数据包通过单播通道下发至FCC/RET用户端,当FCC/RET用户端确定满足关闭单播通道的时间后,向FCC/RET服务器的信号源模块发送停止下发RTP数据包报文,由此完成服务器与用户端两侧的信息交互。Referring to FIG. 4, FIG. 4 is a schematic diagram of interaction diagrams during fast channel switching, where the FCC/RET server is divided into two modules, and the burst sequence target module is used to receive a request sent by the FCC/RET client, the request. A RAMS request for transmission from the RTCP channel, in particular, may be a RAMS-R request, that is, a request for delivering an RTP data packet. After receiving the RAMS-R request, the signal source module sends another RAMS request to the FCC/RET client. Specifically, the RAMS-I request may be processed, that is, the RTP data packet request is processed, and the response includes the latest video I. The sequence number corresponding to the RTP data packet of the frame may enable the FCC/RET client to determine the time to close the unicast channel according to the sequence number corresponding to the RTP data packet and the timestamp included. When the source object sends a RAMS-I request, the corresponding RTP data packet is sent to the FCC/RET client through the unicast channel. When the FCC/RET client determines that the unicast channel is closed, the FCC is sent to the FCC. The signal source module of the /RET server sends a message to stop the delivery of the RTP packet, thereby completing the information exchange between the server and the client.
请参阅图5,图5为数字视频广播系统前端快速频道切换系统示意图,在DVB前端FCC系统中,LMB信号接收和过滤模块用于实时接收LMB信号,并锁频到支持FCC特性的直播频道频点,获取承载该频道的TS,根据PAT、PMT和频道的媒体流,过滤出该FCC频道的TS数据包,其中媒体流包括视频、音频与字幕等。Please refer to FIG. 5. FIG. 5 is a schematic diagram of a fast channel switching system of a front end of a digital video broadcasting system. In a DVB front end FCC system, an LMB signal receiving and filtering module is used to receive an LMB signal in real time and lock the frequency to a live channel frequency supporting FCC characteristics. Point, obtain the TS carrying the channel, and filter out the TS packets of the FCC channel according to the media streams of the PAT, the PMT, and the channel, where the media stream includes video, audio, and subtitles.
系统时钟同步模块则从LMB信号接收和过滤模块中的TS过滤出TOT,并解析获取时间信息,根据获取到的时间信息校正DVB前端FCC系统的时钟,且同步到系统时钟,可以理解的是,这里的DVB前端FCC系统时钟时间与整个DVB系统的时钟时间保持同步。The system clock synchronization module filters out the TOT from the TS in the LMB signal receiving and filtering module, and parses the acquisition time information, and corrects the clock of the DVB front-end FCC system according to the acquired time information, and synchronizes to the system clock. It can be understood that The DVB front-end FCC system clock time here is kept in sync with the clock time of the entire DVB system.
系统时钟读取系统时间,同时RTP分组打包模块按照RFC2250标准定义,将LMB信号接收和过滤模块过滤得到的该频道TS数据包打包成RTP数据包格式,RTP数据包的包头部分时戳即为系统时钟读取的系统时间。The system clock reads the system time, and the RTP packet packing module defines the channel TS data packet filtered by the LMB signal receiving and filtering module into an RTP data packet format according to the RFC2250 standard, and the packet header time stamp of the RTP data packet is the system. The system time for clock reading.
RTP环形缓冲区将RTP分组打包模块打包的RTP数据包序列进行存储,并将这些RTP数据包序列发送至视频I帧索引模块与FCC/RET服务器。视频I帧索引模块根据视频的PES获取视频TS数据包并进行TS载荷检测,当通过视频I帧索引表检测得到片类型为I帧时,根据RTP数据包序列记录下片类型为I帧的TS所在的RTP数据包序号以及与系统时钟同步模块同步的时间戳。 The RTP ring buffer stores the RTP packet sequence packed by the RTP packet packing module, and sends the RTP packet sequence to the video I frame index module and the FCC/RET server. The video I frame indexing module acquires the video TS data packet according to the PES of the video and performs TS load detection. When the slice type is I frame detected by the video I frame index table, the TS type I frame is recorded according to the RTP data packet sequence. The RTP packet number and the timestamp synchronized with the system clock synchronization module.
FCC/RET服务器模块集成了RTCP协议栈,按照RFC4585标准处理来自接收机FCC用户端的RAMS-R和RAMS-T请求。当接收到RAMS-R请求时,该模块根据视频I帧索引模块确定的I帧片类型,从RTP环形缓冲区中查找包含了最新的I帧片类型的RTP包,将对应的RTP数据包序号通过RAMS-I请求反馈给FCC/RET用户端,同时通过单播通道从该RTP数据包开始向FCC/RET用户端快速发包。当满足单播通道的关闭条件时,向所述服务器发送RAMS-T请求。The FCC/RET server module integrates the RTCP protocol stack to process RAMS-R and RAMS-T requests from the receiver FCC client in accordance with the RFC4585 standard. When receiving the RAMS-R request, the module searches for the RTP packet containing the latest I-frame type from the RTP ring buffer according to the I-frame type determined by the video I-frame indexing module, and the corresponding RTP packet sequence number. The RAMS-I requests feedback to the FCC/RET client, and simultaneously starts to send packets from the RTP data packet to the FCC/RET client through the unicast channel. When the shutdown condition of the unicast channel is satisfied, a RAMS-T request is sent to the server.
FCC节目地址发布模块用于解析PAT、PMT和业务描述表(SDT,Service Description Table)并监控版本更新,维护LMB频道唯一标识和对应的FCC节目地址的关系列表,该标识可以是由网络身份识别号、服务器身份识别号和频道号码共同组成的一个唯一标识。终端的接收机可以通过下载该列表获取到对应的FCC节目地址。The FCC program address issuing module is configured to parse the PAT, the PMT, and the Service Description Table (SDT) and monitor the version update, and maintain a relationship list of the unique identifier of the LMB channel and the corresponding FCC program address, and the identifier may be identified by the network identity. A unique identifier consisting of a number, a server ID, and a channel number. The receiver of the terminal can obtain the corresponding FCC program address by downloading the list.
请参阅图6,图6为数字视频广播系统终端接收机示意图,在DVB终端接收机中,FCC节目地址下载模块从预置的地址下载LMB频道和FCC节目地址关系表,当LMB频道切换时,用户端可以根据频道唯一标识可获得FCC节目地址,并建立起与服务器通信的FCC信令通道和媒体数据传播的单播通道,同时服务器也会知晓到用户端的建立FCC信令通道与单播通道的需求,并配合用户端进行上述通道的建立。Please refer to FIG. 6. FIG. 6 is a schematic diagram of a terminal receiver of a digital video broadcasting system. In a DVB terminal receiver, an FCC program address downloading module downloads an LMB channel and an FCC program address relationship table from a preset address. When the LMB channel is switched, The client can obtain the FCC program address according to the unique identifier of the channel, and establish a FMC signaling channel for communication with the server and a unicast channel for media data transmission, and the server also knows that the FCC signaling channel and the unicast channel are established at the user end. The requirements, and with the user side to establish the above channels.
LMB信号接收和过滤模块接收LMB信号,并锁频到支持FCC特性的直播频道频点获取承载该频道的TS,系统时钟同步模块则从LMB信号接收和过滤模块中的TS过滤出TOT,并解析获取时间信息,校正DVB终端接收机的时间,且同步到接收机的系统时钟。同时LMB信号接收和过滤模块将节目的TS数据包发送到节目TS流合并模块,待该模块进行TS流的无缝拼接。The LMB signal receiving and filtering module receives the LMB signal, and locks the frequency to the live channel frequency point supporting the FCC characteristic to obtain the TS carrying the channel, and the system clock synchronization module filters out the TOT from the TS in the LMB signal receiving and filtering module, and parses the TOT. The time information is acquired, the time of the DVB terminal receiver is corrected, and the system clock of the receiver is synchronized. At the same time, the LMB signal receiving and filtering module sends the TS data packet of the program to the program TS stream merging module, and the module performs seamless splicing of the TS stream.
FCC/RET用户端模块按照RFC4585标准向FCC/RET服务器发送RAMS-R和RAMS-T请求并处理RAMS-I请求。当FCC/RET用户端模块接收到RAMS-I请求时,再解析单播通道的每个RTP数据包,由此获取相应的时间戳信息,同时,将该信息实时更新到rtp_ts_last,在从LMB接收的第一个节目数据包,即第一个TS数据包时,获取当前用户端与服务器系统的时间值,并且转换为45KHz的RTP时间戳,将该时间戳记录为rtp_ts_end。判断rtp_ts_last时间值 与rtp_ts_end时间值之间的差值是否大于第一预置值,如果大于第一预置值时,说明单播通道传输来的数据包已经与LMB通道传输来的数据包开始在第一预置值的时间内出现重叠,也就是,用户已经可以观看从LMB通道发送来的目的频道的数据,此时可以关闭单播通道。于是,发送RAMS-T请求来关闭单播通道。可以理解的是,第一预置值可以设定为1秒,或其他合理的预置时间,故此处不对具体第一预置值做限定。The FCC/RET client module sends RAMS-R and RAMS-T requests to the FCC/RET server in accordance with the RFC4585 standard and processes the RAMS-I request. When the FCC/RET client module receives the RAMS-I request, it parses each RTP packet of the unicast channel, thereby obtaining the corresponding timestamp information, and simultaneously updating the information to rtp_ts_last in real time, receiving from the LMB. The first program data packet, that is, the first TS data packet, acquires the current time value of the client and the server system, and converts it into an RTP timestamp of 45 KHz, and records the time stamp as rtp_ts_end. Determine the rtp_ts_last time value Whether the difference between the time value and the rtp_ts_end time value is greater than the first preset value, if it is greater than the first preset value, it indicates that the data packet transmitted by the unicast channel has been transmitted with the data packet transmitted by the LMB channel at the first preset. Overlap of the value time, that is, the user can already view the data of the destination channel sent from the LMB channel, and the unicast channel can be turned off at this time. Thus, a RAMS-T request is sent to close the unicast channel. It can be understood that the first preset value can be set to 1 second, or other reasonable preset time, so the specific first preset value is not limited herein.
或者,可以将当前系统时间值记录为rtp_ts_now,这个值是按照45KHz的时钟频率转换而来的,再解析单播通道的每个RTP数据包,由此获取相应的时间戳信息,同时,将该信息实时更新到rtp_ts_last,判断rtp_ts_last时间值与rtp_ts_now时间值之间的差值是否大于第二预置值,如果大于第二预置值,则说明出现了广播信号异常的情况,导致时间戳rtp_ts_last对应的数据包未能正常到达用户端时,也可以发送RAMS-T请求来关闭单播通道,同样,可以理解的是,第二预置值可以设定为5秒,或其他合理的预置时间,故此处不对具体第二预置值做限定。Alternatively, the current system time value may be recorded as rtp_ts_now, and the value is converted according to a clock frequency of 45 KHz, and each RTP data packet of the unicast channel is parsed, thereby obtaining corresponding timestamp information, and at the same time, The information is updated to rtp_ts_last in real time, and it is determined whether the difference between the rtp_ts_last time value and the rtp_ts_now time value is greater than the second preset value. If the second preset value is greater than the second preset value, the broadcast signal is abnormal, and the timestamp rtp_ts_last corresponds to When the data packet fails to reach the user terminal normally, it can also send a RAMS-T request to close the unicast channel. Similarly, it can be understood that the second preset value can be set to 5 seconds, or other reasonable preset time. Therefore, the specific second preset value is not limited here.
RTP数据包解析模块解析RTP数据包的包头信息获取RTP数据包序号以及时间戳,拆分RTP载荷获取TS,再将TS过滤出的TS数据包发送至节目TS流合并模块,以使得该模块将LMB信号接收和过滤模块过滤得到的节目的TS数据包,与RTP数据包解析模块解析和拆分得到的TS数据包进行无缝拼接。The RTP packet parsing module parses the header information of the RTP packet to obtain the RTP packet sequence number and the timestamp, splits the RTP payload to obtain the TS, and then sends the TS filtered TS packet to the program TS stream merge module, so that the module will The TS packet of the program filtered by the LMB signal receiving and filtering module is seamlessly spliced with the TS packet obtained by the RTP packet parsing module parsing and splitting.
无缝拼接后的节目TS数据包将存储在TS存储器中,由DVB节目播放模块从中获取TS数据包并进行播放。The seamlessly stitched program TS packets will be stored in the TS memory, from which the TS packets are acquired and played by the DVB program play module.
为便于理解,下面以一个具体应用场景对本发明中一种频道切换的方法进行详细描述,具体为:For ease of understanding, a method for channel switching in the present invention is described in detail in a specific application scenario, specifically:
用户A在北京时间9点59分58秒按下了遥控器的切台键,欲从中央一套切换至中央五套收看体育节目,此时发出了频道切换请求,该频道切换请求中携带了待切换到的中央五套的唯一标识,标识为(Network ID123+Service ID456+Program Number11),服务器根据该标识,确定这一路节目对应的TS,于是从该TS中过滤出TS数据包,而TS是由长度为188字节的TS数据包组成。再按照RFC2250标准定义,将TS数据包打包成RTP格式的RTP数据包, 且RTP数据包的包头中含有打包时的时间为9时59分58秒30,通过timesstamp=[(HH*3600+MM*60+SS)*45000+mm*45],可以得到时间戳为9719911350。服务器接收用户端发送的RAMS-R请求后,通过单播通道,陆续向用户端发送RTP数据包。User A pressed the cut-off button of the remote control at 9:59:58, Beijing time, and wanted to switch from the central set to the central five sets of sports programs. At this time, a channel switching request was issued, and the channel switching request was carried. The unique identifier of the central set of five to be switched, identified as (Network ID123+Service ID456+Program Number11), the server determines the TS corresponding to the program according to the identifier, and then filters out the TS packet from the TS, and the TS It consists of a TS packet of length 188 bytes. According to the RFC2250 standard definition, the TS data packet is packaged into an RTP data packet in the RTP format. And the time of the packet in the header of the RTP packet is 9:59:58:30, and the timestamp is 9719911350 by timesstamp=[(HH*3600+MM*60+SS)*45000+mm*45]. . After receiving the RAMS-R request sent by the UE, the server sends the RTP data packet to the UE through the unicast channel.
假设在9点59分58秒至10点00分01秒时,服务器向用户端发送了10个TS数据包,分别设定它们的序号为1至10,当10点整时,从LMB通道开始接收A、B、C、D等连续的数据包,当确定7号TS数据包PCR值为ts_pcr(N),与A号TS数据包的PCR值为ts_pcr(N+1)连续时,则完成无缝拼接。Assume that at 9:59:58 to 10:00:01, the server sends 10 TS packets to the client, setting them to 1 to 10 respectively. When 10 o'clock, starting from the LMB channel. Receiving consecutive data packets such as A, B, C, and D. When it is determined that the PCR value of the TS packet of the seventh TS is ts_pcr(N), and the PCR value of the TS packet of the A is consecutive ts_pcr(N+1), the completion is completed. Seamless stitching.
于此同时,当前时间值转化为RTP时间戳是36000,而通过公式timesstamp=[(HH*3600+MM*60+SS)*45000+mm*45],得到最新从单播通道下发是RTP数据包时间戳为30000,且从LMB通道下发的TS数据包对应的RTP时间戳为360000,因此可以下发发送单播通道数据停发请求,关闭单播通道,完成相应的频道切换。At the same time, the current time value is converted to an RTP timestamp of 36000, and the latest time from the unicast channel is RTP by the formula timesstamp=[(HH*3600+MM*60+SS)*45000+mm*45]. The data packet timestamp is 30000, and the RTP timestamp corresponding to the TS data packet sent from the LMB channel is 360000. Therefore, the unicast channel data suspension request can be sent, the unicast channel is closed, and the corresponding channel switching is completed.
上面对本发明实施例中的频道切换方法进行了描述,下面对本发明实施例中的服务器进行描述,请参阅图7,本发明实施例中的频道切换的服务器一个实施例包括:The channel switching method in the embodiment of the present invention is described above. The following describes the server in the embodiment of the present invention. Referring to FIG. 7, an embodiment of the server for channel switching in the embodiment of the present invention includes:
第一接收模块701,用于接收用户端发送的频道切换请求,所述频道切换请求中携带待切换到的目的频道的标识;The first receiving module 701 is configured to receive a channel switching request sent by the user end, where the channel switching request carries an identifier of the destination channel to be switched to;
确定模块702,用于从缓存数据中确定与所述第一接收模块701接收的目的频道的标识对应的实时传输协议RTP数据包;a determining module 702, configured to determine, from the cache data, a real-time transport protocol RTP data packet corresponding to the identifier of the destination channel received by the first receiving module 701;
发送模块703,用于通过单播通道,向所述用户端发送所述确定模块702确定的RTP数据包,所述单播通道为所述用户端与服务器建立的用于传输RTP数据包的通道;The sending module 703 is configured to send, by using a unicast channel, the RTP data packet determined by the determining module 702 to the user end, where the unicast channel is a channel established by the user end and the server for transmitting an RTP data packet. ;
停发模块704,用于当满足停止下发RTP数据包条件时,停止所述发送模块703发送所述RTP数据包。The suspension module 704 is configured to stop the sending module 703 from transmitting the RTP data packet when the condition for stopping the delivery of the RTP data packet is satisfied.
本实施例中,第一接收模块701接收用户端发送的频道切换请求,频道切换请求中携带待切换到的目的频道的标识,确定模块702从缓存数据中确定与第一接收模块701接收的目的频道的标识对应的实时传输协议RTP数据包,发送模块703通过单播通道,向用户端发送确定模块702确定的RTP数据包, 单播通道为用户端与服务器建立的用于传输RTP数据包的通道,当满足停止下发RTP数据包条件时,停发模块704停止发送模块703发送所述RTP数据包。In this embodiment, the first receiving module 701 receives the channel switching request sent by the user end, and the channel switching request carries the identifier of the destination channel to be switched, and the determining module 702 determines the destination received by the first receiving module 701 from the cached data. The real-time transport protocol RTP data packet corresponding to the identifier of the channel, and the sending module 703 sends the RTP data packet determined by the determining module 702 to the user end through the unicast channel. The unicast channel is a channel established by the client and the server for transmitting the RTP data packet. When the condition for stopping the delivery of the RTP data packet is satisfied, the suspension sending module 704 stops the sending module 703 from transmitting the RTP data packet.
本发明实施例中,在IP网络前端部署FCC系统,不需要改造或升级现有的广播网络,而可以实现FCC技术在DVB领域中的应用,从而明显提高直播频道的切换速度,提升用户体验。In the embodiment of the present invention, the FCC system is deployed on the front end of the IP network, and the existing broadcast network does not need to be modified or upgraded, and the application of the FCC technology in the DVB field can be implemented, thereby significantly improving the switching speed of the live channel and improving the user experience.
请参阅图8,本发明实施例中的频道切换的服务器另一个实施例包括:Referring to FIG. 8, another embodiment of the server for channel switching in the embodiment of the present invention includes:
第一接收模块701,用于接收用户端发送的频道切换请求,所述频道切换请求中携带待切换到的目的频道的标识;The first receiving module 701 is configured to receive a channel switching request sent by the user end, where the channel switching request carries an identifier of the destination channel to be switched to;
确定模块702,用于从缓存数据中确定与所述第一接收模块701接收的目的频道的标识对应的实时传输协议RTP数据包;a determining module 702, configured to determine, from the cache data, a real-time transport protocol RTP data packet corresponding to the identifier of the destination channel received by the first receiving module 701;
发送模块703,用于通过单播通道,向所述用户端发送所述确定模块702确定的RTP数据包,所述单播通道为所述用户端与服务器建立的用于传输RTP数据包的通道;The sending module 703 is configured to send, by using a unicast channel, the RTP data packet determined by the determining module 702 to the user end, where the unicast channel is a channel established by the user end and the server for transmitting an RTP data packet. ;
停发模块704,用于当满足停止下发RTP数据包条件时,停止所述发送模块703发送所述RTP数据包;The stop sending module 704 is configured to stop the sending module 703 from sending the RTP data packet when the condition for stopping the delivery of the RTP data packet is satisfied;
其中,所述确定模块702包括:The determining module 702 includes:
第一确定单元7021,用于根据预设的I帧索引列表中所包含的所述RTP数据包的时间戳,确定所述RTP数据包的序号,所述预设的I帧索引列表为片类型为I帧的所述目的频道的RTP数据包的序号与时间戳的对应关系表;a first determining unit 7021, configured to determine a sequence number of the RTP data packet according to a timestamp of the RTP data packet included in a preset I frame index list, where the preset I frame index list is a slice type a correspondence table between the sequence number and the timestamp of the RTP data packet of the destination channel of the I frame;
第二确定单元7022,用于根据所述第一确定单元7021确定的RTP数据包的序号,从所述缓存数据中确定所述RTP数据包。The second determining unit 7022 is configured to determine the RTP data packet from the cached data according to the sequence number of the RTP data packet determined by the first determining unit 7021.
其次,本发明实施例中,通过增加I帧索引机制改进服务器端,服务器可以直接通过I帧索引机制快速确定I帧类型的视频,有效地减少了冗余数据的下发,同时节省了处理时间。In the embodiment of the present invention, the server is improved by adding an I frame indexing mechanism, and the server can quickly determine the I frame type video by using the I frame indexing mechanism, thereby effectively reducing the delivery of redundant data and saving processing time. .
请参阅图9,本发明实施例中的频道切换的服务器另一个实施例包括:Referring to FIG. 9, another embodiment of the server for channel switching in the embodiment of the present invention includes:
第一接收模块701,用于接收用户端发送的频道切换请求,所述频道切换请求中携带待切换到的目的频道的标识;The first receiving module 701 is configured to receive a channel switching request sent by the user end, where the channel switching request carries an identifier of the destination channel to be switched to;
确定模块702,用于从缓存数据中确定与所述第一接收模块701接收的目 的频道的标识对应的实时传输协议RTP数据包;a determining module 702, configured to determine, from the cache data, a destination received by the first receiving module 701 The identifier of the channel corresponds to the real-time transport protocol RTP data packet;
发送模块703,用于通过单播通道,向所述用户端发送所述确定模块702确定的RTP数据包,所述单播通道为所述用户端与服务器建立的用于传输RTP数据包的通道;The sending module 703 is configured to send, by using a unicast channel, the RTP data packet determined by the determining module 702 to the user end, where the unicast channel is a channel established by the user end and the server for transmitting an RTP data packet. ;
停发模块704,用于当满足停止下发RTP数据包条件时,停止所述发送模块703发送所述RTP数据包;The stop sending module 704 is configured to stop the sending module 703 from sending the RTP data packet when the condition for stopping the delivery of the RTP data packet is satisfied;
第二接收模块705,用于在所述确定模块702确定目的频道的标识对应的实时传输协议RTP数据包前,接收直播广播LMB数据流,并从所述LMB数据流中确定所述目的频道的传输流;The second receiving module 705 is configured to receive a live broadcast LMB data stream, and determine the target channel from the LMB data stream, before the determining module 702 determines a real-time transport protocol RTP data packet corresponding to the identifier of the destination channel. Transport stream
校正模块706,用于根据所述第二接收模块705接收到的目的频道的传输流中的时间信息,进行所述服务器端的系统时间校正;The correcting module 706 is configured to perform system time correction of the server according to time information in a transport stream of the destination channel received by the second receiving module 705;
打包模块707,用于将所述目的频道的传输流打包成所述目的频道的RTP数据包,所述目的频道的RTP数据包中包含所述校正模块706校正后的时间戳;a packetizing module 707, configured to package the transport stream of the destination channel into an RTP data packet of the destination channel, where the RTP data packet of the destination channel includes the timestamp corrected by the correction module 706;
缓存模块708,用于缓存所述打包模块707打包后的目的频道的RTP数据包。The cache module 708 is configured to buffer the RTP data packet of the destination channel that is packaged by the packaging module 707.
再次,本发明实施例中,将目的频道的传输流打包成RTP数据包,且RTP数据包中包含有可以用于无缝拼接的RTP时间戳,如此不但可以视频RTP数据包实现FCC技术,还可以通过RTP时间戳实现单播码流与LMB广播码流的无缝拼接,提升用户观看视频的流畅性。In addition, in the embodiment of the present invention, the transport stream of the destination channel is packaged into an RTP data packet, and the RTP data packet includes an RTP timestamp that can be used for seamless splicing, so that not only the FTP technology can be implemented by the video RTP data packet, but also The RTP timestamp can be used to seamlessly splicing the unicast code stream and the LMB broadcast code stream, thereby improving the fluency of the user watching the video.
请参阅图10,本发明实施例中的频道切换的服务器另一个实施例包括:Referring to FIG. 10, another embodiment of the server for channel switching in the embodiment of the present invention includes:
第一接收模块701,用于接收用户端发送的频道切换请求,所述频道切换请求中携带待切换到的目的频道的标识;The first receiving module 701 is configured to receive a channel switching request sent by the user end, where the channel switching request carries an identifier of the destination channel to be switched to;
确定模块702,用于从缓存数据中确定与所述第一接收模块701接收的目的频道的标识对应的实时传输协议RTP数据包;a determining module 702, configured to determine, from the cache data, a real-time transport protocol RTP data packet corresponding to the identifier of the destination channel received by the first receiving module 701;
发送模块703,用于通过单播通道,向所述用户端发送所述确定模块702确定的RTP数据包,所述单播通道为所述用户端与服务器建立的用于传输RTP数据包的通道;The sending module 703 is configured to send, by using a unicast channel, the RTP data packet determined by the determining module 702 to the user end, where the unicast channel is a channel established by the user end and the server for transmitting an RTP data packet. ;
停发模块704,用于当满足停止下发RTP数据包条件时,停止所述发送模 块703发送所述RTP数据包;The stop sending module 704 is configured to stop the sending mode when the condition for stopping the delivery of the RTP data packet is met Block 703 sends the RTP data packet;
第二接收模块701,用于在所述确定模块702确定目的频道的标识对应的实时传输协议RTP数据包前,接收直播广播LMB数据流,并从所述LMB数据流中确定所述目的频道的传输流;The second receiving module 701 is configured to receive a live broadcast LMB data stream, and determine the target channel from the LMB data stream, before the determining module 702 determines a real-time transport protocol RTP data packet corresponding to the identifier of the destination channel. Transport stream
校正模块706,用于根据所述第一接收模块701接收到的目的频道的传输流中的时间信息,进行所述服务器端的系统时间校正;The correction module 706 is configured to perform system time correction of the server according to time information in a transport stream of the destination channel received by the first receiving module 701.
打包模块707,用于将所述目的频道的传输流打包成所述目的频道的RTP数据包,所述目的频道的RTP数据包中包含所述校正模块706校正后的时间戳;a packetizing module 707, configured to package the transport stream of the destination channel into an RTP data packet of the destination channel, where the RTP data packet of the destination channel includes the timestamp corrected by the correction module 706;
缓存模块708,用于缓存所述打包模块707打包后的目的频道的RTP数据包;The cache module 708 is configured to cache an RTP data packet of the destination channel that is packaged by the packaging module 707.
检测模块709,用于在所述缓存模块708缓存所述目的频道的RTP数据包之后,从所述目的频道的RTP数据包中检测出片类型为I帧的数据包;The detecting module 709 is configured to: after the cache module 708 buffers the RTP data packet of the destination channel, detect a data packet of the I type frame from the RTP data packet of the destination channel;
建立模块710,用于建立所述检测模块709检测的片类型为I帧的数据包的序号和时间戳的对应关系,作为所述I帧索引列表。The establishing module 710 is configured to establish, as the I frame index list, a correspondence between a sequence number and a time stamp of a data packet whose slice type is an I frame detected by the detecting module 709.
进一步地,本发明实施例中,从目的频道的RTP数据包中检测出视频类型片类型为I帧的数据包,并建立I帧索引列表,由此进入I帧索引机制,减少冗余数据下发,加快获取I帧类型视频的速度,进一步提升用户观看的体验。Further, in the embodiment of the present invention, a data packet of a video type slice type is an I frame is detected from an RTP data packet of a destination channel, and an I frame index list is established, thereby entering an I frame indexing mechanism, and reducing redundant data. Send, speed up the acquisition of I frame type video, further enhance the user experience.
请参阅图11,本发明实施例中的频道切换的服务器另一个实施例包括:Referring to FIG. 11, another embodiment of the server for channel switching in the embodiment of the present invention includes:
第一接收模块701,用于接收用户端发送的频道切换请求,所述频道切换请求中携带待切换到的目的频道的标识;The first receiving module 701 is configured to receive a channel switching request sent by the user end, where the channel switching request carries an identifier of the destination channel to be switched to;
确定模块702,用于从缓存数据中确定与所述第一接收模块701接收的目的频道的标识对应的实时传输协议RTP数据包;a determining module 702, configured to determine, from the cache data, a real-time transport protocol RTP data packet corresponding to the identifier of the destination channel received by the first receiving module 701;
发送模块703,用于通过单播通道,向所述用户端发送所述确定模块702确定的RTP数据包,所述单播通道为所述用户端与服务器建立的用于传输RTP数据包的通道;The sending module 703 is configured to send, by using a unicast channel, the RTP data packet determined by the determining module 702 to the user end, where the unicast channel is a channel established by the user end and the server for transmitting an RTP data packet. ;
停发模块704,用于当满足停止下发RTP数据包条件时,停止所述发送模块703发送所述RTP数据包。The suspension module 704 is configured to stop the sending module 703 from transmitting the RTP data packet when the condition for stopping the delivery of the RTP data packet is satisfied.
其中,所述停发模块704包括: The stop sending module 704 includes:
停发单元7041,用于接收所述用户端发送的单播通道数据停发请求时,停止发送所述RTP数据包;或,当所述用户端拆除所述单播通道后,停止发送所述RTP数据包。The suspension sending unit 7041 is configured to stop sending the RTP data packet when receiving the unicast channel data suspension request sent by the user terminal; or stop sending the RTP packet.
又进一步地,本发明实施例中,分别针对一般情况和特殊情况下停止发送RTP数据包作了相应的条件分析,使得本方案在实际应用中可以面对更多的情况,扩大应用范围,同时增加方案的灵活性。Further, in the embodiment of the present invention, the condition analysis of stopping the transmission of the RTP data packet in the general case and the special case is respectively performed, so that the solution can face more situations and expand the application range in the actual application. Increase the flexibility of the program.
下面对本发明中的用户端进行详细描述,请参阅图12,本发明实施例中的频道切换的用户端一个实施例包括:The user terminal in the present invention is described in detail below. Referring to FIG. 12, an embodiment of the user terminal for channel switching in the embodiment of the present invention includes:
发送模块801,用于向所述服务器发送频道切换请求,所述频道切换请求中携带待切换到的目的频道的标识,以使所述服务器从缓存数据中确定与所述目的频道的标识对应的实时传输协议RTP数据包;a sending module 801, configured to send a channel switching request to the server, where the channel switching request carries an identifier of a destination channel to be switched, so that the server determines, from the cached data, a identifier corresponding to the identifier of the destination channel. Real-time transport protocol RTP data packet;
第一接收模块802,用于在所述第一发送模块801发送频道切换请求后,从单播通道接收所述服务器发送的所述RTP数据包,所述单播通道为所述用户端与服务器建立的用于传输RTP数据包的通道;The first receiving module 802 is configured to receive, after the first sending module 801 sends a channel switching request, the RTP data packet sent by the server from a unicast channel, where the unicast channel is the client end and the server Established channel for transmitting RTP data packets;
指示模块803,用于当满足停止下发RTP数据包条件时,指示所述服务器停止所述第一接收模块802接收的RTP数据包;The indication module 803 is configured to instruct the server to stop the RTP data packet received by the first receiving module 802 when the condition of stopping the delivery of the RTP data packet is satisfied;
对接模块804,用于将所述第一接收模块802接收的RTP数据包和从LMB通道接收到所述目的频道对应的节目数据包进行对接。The docking module 804 is configured to interface the RTP data packet received by the first receiving module 802 with the program data packet corresponding to the destination channel received from the LMB channel.
本实施例中,发送模块801向服务器发送频道切换请求,频道切换请求中携带待切换到的目的频道的标识,以使服务器从缓存数据中确定与目的频道的标识对应的实时传输协议RTP数据包,第一接收模块802在第一发送模块801发送频道切换请求后,从单播通道接收服务器发送的RTP数据包,单播通道为用户端与服务器建立的用于传输RTP数据包的通道,指示模块803当满足停止下发RTP数据包条件时,指示服务器停止第一接收模块802接收的RTP数据包,对接模块804将第一接收模块802接收的RTP数据包和从LMB通道接收到目的频道对应的节目数据包进行对接。In this embodiment, the sending module 801 sends a channel switching request to the server, where the channel switching request carries the identifier of the destination channel to be switched, so that the server determines the real-time transport protocol RTP data packet corresponding to the identifier of the destination channel from the cached data. After the first sending module 801 sends the channel switching request, the first receiving module 802 receives the RTP data packet sent by the server from the unicast channel, and the unicast channel is a channel established by the user end and the server for transmitting the RTP data packet, and the indication is The module 803 instructs the server to stop the RTP data packet received by the first receiving module 802 when the condition for stopping the delivery of the RTP data packet is satisfied, and the docking module 804 corresponds the RTP data packet received by the first receiving module 802 to the destination channel received from the LMB channel. The program data packets are docked.
本发明实施例中,改进FCC技术,在IP网络前端部署FCC系统,与此同时,在用户端也相应的部署了与服务器前端关联的FCC系统,这样可以不需要改造或升级现有的广播网络,实现FCC技术在DVB领域中的应用,明显 提高直播频道切换的速度,提升用户的体验。In the embodiment of the present invention, the FCC technology is improved, and the FCC system is deployed on the front end of the IP network. At the same time, the FCC system associated with the server front end is deployed on the user end, so that the existing broadcast network does not need to be modified or upgraded. To realize the application of FCC technology in the field of DVB, obviously Improve the speed of live channel switching and enhance the user experience.
请参阅图13,本发明实施例中的频道切换的用户端另一个实施例包括:Referring to FIG. 13, another embodiment of the user terminal for channel switching in the embodiment of the present invention includes:
发送模块801,用于向所述服务器发送频道切换请求,所述频道切换请求中携带待切换到的目的频道的标识,以使所述服务器从缓存数据中确定与所述目的频道的标识对应的实时传输协议RTP数据包;a sending module 801, configured to send a channel switching request to the server, where the channel switching request carries an identifier of a destination channel to be switched, so that the server determines, from the cached data, a identifier corresponding to the identifier of the destination channel. Real-time transport protocol RTP data packet;
第一接收模块802,用于在所述第一发送模块801发送频道切换请求后,从单播通道接收所述服务器发送的所述RTP数据包,所述单播通道为所述用户端与服务器建立的用于传输RTP数据包的通道;The first receiving module 802 is configured to receive, after the first sending module 801 sends a channel switching request, the RTP data packet sent by the server from a unicast channel, where the unicast channel is the client end and the server Established channel for transmitting RTP data packets;
指示模块803,用于当满足停止下发RTP数据包条件时,指示所述服务器停止所述第一接收模块802接收的RTP数据包;The indication module 803 is configured to instruct the server to stop the RTP data packet received by the first receiving module 802 when the condition of stopping the delivery of the RTP data packet is satisfied;
对接模块804,用于将所述第一接收模块802接收的RTP数据包和从LMB通道接收到所述目的频道对应的节目数据包进行对接;The docking module 804 is configured to interface the RTP data packet received by the first receiving module 802 with the program data packet corresponding to the destination channel received from the LMB channel;
第二接收模块805,用于在所述发送模块801向所述服务器发送频道切换请求之前,接收频道切换指令,所述频道切换指令中包含所述目的频道的标识;The second receiving module 805 is configured to receive a channel switching instruction, where the channel switching instruction includes an identifier of the destination channel, before the sending module 801 sends a channel switching request to the server;
确定模块806,用于根据预设的节目地址表,确定与所述第二接收模块805接收的目的频道的标识对应的节目地址;The determining module 806 is configured to determine, according to the preset program address table, a program address corresponding to the identifier of the destination channel received by the second receiving module 805;
建立模块807,用于根据所述确定模块806确定的节目地址,建立从用户端到所述服务器的用于传输RTP数据包的单播通道。The establishing module 807 is configured to establish, according to the program address determined by the determining module 806, a unicast channel for transmitting an RTP data packet from the user end to the server.
其次,本发明实施例中,通过目的频道的唯一标识确定与之对应的节目地址,标识的唯一性可以有效并准确的确定节目地址,使得本发明方案的实用性得以提升,且具有可操作性。Secondly, in the embodiment of the present invention, the program address corresponding to the destination channel is determined by the unique identifier of the destination channel, and the uniqueness of the identifier can effectively and accurately determine the program address, so that the utility of the solution of the present invention is improved and operable. .
请参阅图14,本发明实施例中的频道切换的用户端另一个实施例包括:Referring to FIG. 14, another embodiment of the user terminal for channel switching in the embodiment of the present invention includes:
发送模块801,用于向所述服务器发送频道切换请求,所述频道切换请求中携带待切换到的目的频道的标识,以使所述服务器从缓存数据中确定与所述目的频道的标识对应的实时传输协议RTP数据包;a sending module 801, configured to send a channel switching request to the server, where the channel switching request carries an identifier of a destination channel to be switched, so that the server determines, from the cached data, a identifier corresponding to the identifier of the destination channel. Real-time transport protocol RTP data packet;
第一接收模块802,用于在所述第一发送模块801发送频道切换请求后,从单播通道接收所述服务器发送的所述RTP数据包,所述单播通道为所述用户端与服务器建立的用于传输RTP数据包的通道;The first receiving module 802 is configured to receive, after the first sending module 801 sends a channel switching request, the RTP data packet sent by the server from a unicast channel, where the unicast channel is the client end and the server Established channel for transmitting RTP data packets;
指示模块803,用于当满足停止下发RTP数据包条件时,指示所述服务器 停止所述第一接收模块802接收的RTP数据包;The indicating module 803 is configured to indicate the server when the condition for stopping the delivery of the RTP data packet is met Stopping the RTP data packet received by the first receiving module 802;
对接模块804,用于将所述第一接收模块802接收的RTP数据包和从LMB通道接收到所述目的频道对应的节目数据包进行对接;The docking module 804 is configured to interface the RTP data packet received by the first receiving module 802 with the program data packet corresponding to the destination channel received from the LMB channel;
第二接收模块805,用于在所述发送模块801向所述服务器发送频道切换请求之前,接收频道切换指令,所述频道切换指令中包含所述目的频道的标识;The second receiving module 805 is configured to receive a channel switching instruction, where the channel switching instruction includes an identifier of the destination channel, before the sending module 801 sends a channel switching request to the server;
确定模块806,用于根据预设的节目地址表,确定与所述第二接收模块805接收的目的频道的标识对应的节目地址;The determining module 806 is configured to determine, according to the preset program address table, a program address corresponding to the identifier of the destination channel received by the second receiving module 805;
建立模块807,用于根据所述确定模块806确定的节目地址,建立从用户端到所述服务器的用于传输RTP数据包的单播通道;The establishing module 807 is configured to establish, according to the program address determined by the determining module 806, a unicast channel for transmitting an RTP data packet from the user end to the server;
获取模块808,用于在所述第二发送模块805从所述单播通道接收所述服务器发送的所述RTP数据包之后按照顺序解析每个RTP数据包,以获取所述每个RTP数据包中包含的时间戳;The obtaining module 808 is configured to parse each RTP data packet in order after the second sending module 805 receives the RTP data packet sent by the server from the unicast channel, to obtain the RTP data packet. Timestamp contained in ;
其中,所述指示模块803包括:The indication module 803 includes:
判断单元8031,用于在从所述LMB通道接收到第一个节目数据包后,判断最后一个解析的RTP数据包的时间戳是否满足所述单播通道的关闭条件;The determining unit 8031 is configured to determine, after receiving the first program data packet from the LMB channel, whether a timestamp of the last parsed RTP data packet meets a closing condition of the unicast channel;
发送单元8032,用于当所述判断单元8031判断满足所述单播通道的关闭条件时,向所述服务器发送单播通道数据停发请求。The sending unit 8032 is configured to send a unicast channel data suspension request to the server when the determining unit 8031 determines that the closing condition of the unicast channel is satisfied.
再次,本发明实施例中,对单播通道的关闭设定了一定条件,在判断满足单播通道关闭的条件后,即可关闭该单播通道,这样可以更好的节约带宽资源,使方案的实用性得以进一步提升。In the embodiment of the present invention, a certain condition is set for the unicast channel to be closed. After the condition that the unicast channel is closed is determined, the unicast channel can be closed, which can save bandwidth resources and make the solution. The practicality has been further enhanced.
请参阅图15,本发明实施例中的频道切换的用户端另一个实施例包括:Referring to FIG. 15, another embodiment of the user terminal for channel switching in the embodiment of the present invention includes:
发送模块801,用于向所述服务器发送频道切换请求,所述频道切换请求中携带待切换到的目的频道的标识,以使所述服务器从缓存数据中确定与所述目的频道的标识对应的实时传输协议RTP数据包;a sending module 801, configured to send a channel switching request to the server, where the channel switching request carries an identifier of a destination channel to be switched, so that the server determines, from the cached data, a identifier corresponding to the identifier of the destination channel. Real-time transport protocol RTP data packet;
第一接收模块802,用于在所述第一发送模块801发送频道切换请求后,从单播通道接收所述服务器发送的所述RTP数据包,所述单播通道为所述用户端与服务器建立的用于传输RTP数据包的通道;The first receiving module 802 is configured to receive, after the first sending module 801 sends a channel switching request, the RTP data packet sent by the server from a unicast channel, where the unicast channel is the client end and the server Established channel for transmitting RTP data packets;
指示模块803,用于当满足停止下发RTP数据包条件时,指示所述服务器停止所述第一接收模块802接收的RTP数据包; The indication module 803 is configured to instruct the server to stop the RTP data packet received by the first receiving module 802 when the condition of stopping the delivery of the RTP data packet is satisfied;
对接模块804,用于将所述第一接收模块802接收的RTP数据包和从LMB通道接收到所述目的频道对应的节目数据包进行对接;The docking module 804 is configured to interface the RTP data packet received by the first receiving module 802 with the program data packet corresponding to the destination channel received from the LMB channel;
第二接收模块805,用于在所述发送模块801向所述服务器发送频道切换请求之前,接收频道切换指令,所述频道切换指令中包含所述目的频道的标识;The second receiving module 805 is configured to receive a channel switching instruction, where the channel switching instruction includes an identifier of the destination channel, before the sending module 801 sends a channel switching request to the server;
确定模块806,用于根据预设的节目地址表,确定与所述第二接收模块805接收的目的频道的标识对应的节目地址;The determining module 806 is configured to determine, according to the preset program address table, a program address corresponding to the identifier of the destination channel received by the second receiving module 805;
建立模块807,用于根据所述确定模块806确定的节目地址,建立从用户端到所述服务器的用于传输RTP数据包的单播通道;The establishing module 807 is configured to establish, according to the program address determined by the determining module 806, a unicast channel for transmitting an RTP data packet from the user end to the server;
获取模块808,用于在所述第二发送模块805从所述单播通道接收所述服务器发送的所述RTP数据包之后按照顺序解析每个RTP数据包,以获取所述每个RTP数据包中包含的时间戳;The obtaining module 808 is configured to parse each RTP data packet in order after the second sending module 805 receives the RTP data packet sent by the server from the unicast channel, to obtain the RTP data packet. Timestamp contained in ;
其中,所述指示模块803包括:The indication module 803 includes:
判断单元8031,用于在从所述LMB通道接收到第一个节目数据包后,判断最后一个解析的RTP数据包的时间戳是否满足所述单播通道的关闭条件;The determining unit 8031 is configured to determine, after receiving the first program data packet from the LMB channel, whether a timestamp of the last parsed RTP data packet meets a closing condition of the unicast channel;
发送单元8032,用于当所述判断单元8031判断满足所述单播通道的关闭条件时,向所述服务器发送单播通道数据停发请求;The sending unit 8032 is configured to: when the determining unit 8031 determines that the closing condition of the unicast channel is satisfied, send a unicast channel data suspension request to the server;
其中,所述判断单元8031包括:The determining unit 8031 includes:
计算子单元80311,用于计算所述最后一个解析的RTP数据包的时间戳和所述第一个节目数据包中包含的时间戳之间的差值;a calculating subunit 80311, configured to calculate a difference between a timestamp of the last parsed RTP data packet and a timestamp included in the first program data packet;
第一确定子单元80312,用于当所述计算子单元80311计算的差值大于第一预置值时,确定满足所述单播通道的关闭条件。The first determining sub-unit 80312 is configured to determine, when the difference calculated by the calculating sub-unit 80311 is greater than the first preset value, that the closing condition of the unicast channel is met.
进一步地,本发明实施例中,针对关闭单播通道的条件提出了一种可选方式,就此引入超时机制,当由直播通道传输的最新的RTP时间戳与LMB通道收到的TS数据包对应的RTP时间戳差值,大于第一预置值时,关闭单播通道,节约带宽资源,以此提升方案的灵活性。Further, in the embodiment of the present invention, an optional manner is proposed for the condition of closing the unicast channel, and a timeout mechanism is introduced. When the latest RTP timestamp transmitted by the live channel corresponds to the TS packet received by the LMB channel, When the RTP timestamp difference is greater than the first preset value, the unicast channel is closed, and bandwidth resources are saved, thereby improving the flexibility of the solution.
请参阅图16,本发明实施例中的频道切换的用户端另一个实施例包括:Referring to FIG. 16, another embodiment of the user terminal for channel switching in the embodiment of the present invention includes:
发送模块801,用于向所述服务器发送频道切换请求,所述频道切换请求中携带待切换到的目的频道的标识,以使所述服务器从缓存数据中确定与所述目的频道的标识对应的实时传输协议RTP数据包; a sending module 801, configured to send a channel switching request to the server, where the channel switching request carries an identifier of a destination channel to be switched, so that the server determines, from the cached data, a identifier corresponding to the identifier of the destination channel. Real-time transport protocol RTP data packet;
第一接收模块802,用于在所述第一发送模块801发送频道切换请求后,从单播通道接收所述服务器发送的所述RTP数据包,所述单播通道为所述用户端与服务器建立的用于传输RTP数据包的通道;The first receiving module 802 is configured to receive, after the first sending module 801 sends a channel switching request, the RTP data packet sent by the server from a unicast channel, where the unicast channel is the client end and the server Established channel for transmitting RTP data packets;
指示模块803,用于当满足停止下发RTP数据包条件时,指示所述服务器停止所述第一接收模块802接收的RTP数据包;The indication module 803 is configured to instruct the server to stop the RTP data packet received by the first receiving module 802 when the condition of stopping the delivery of the RTP data packet is satisfied;
对接模块804,用于将所述第一接收模块802接收的RTP数据包和从LMB通道接收到所述目的频道对应的节目数据包进行对接;The docking module 804 is configured to interface the RTP data packet received by the first receiving module 802 with the program data packet corresponding to the destination channel received from the LMB channel;
第二接收模块805,用于在所述发送模块801向所述服务器发送频道切换请求之前,接收频道切换指令,所述频道切换指令中包含所述目的频道的标识;The second receiving module 805 is configured to receive a channel switching instruction, where the channel switching instruction includes an identifier of the destination channel, before the sending module 801 sends a channel switching request to the server;
确定模块806,用于根据预设的节目地址表,确定与所述第二接收模块805接收的目的频道的标识对应的节目地址;The determining module 806 is configured to determine, according to the preset program address table, a program address corresponding to the identifier of the destination channel received by the second receiving module 805;
建立模块807,用于根据所述确定模块806确定的节目地址,建立从用户端到所述服务器的用于传输RTP数据包的单播通道;The establishing module 807 is configured to establish, according to the program address determined by the determining module 806, a unicast channel for transmitting an RTP data packet from the user end to the server;
获取模块808,用于在所述第二发送模块805从所述单播通道接收所述服务器发送的所述RTP数据包之后按照顺序解析每个RTP数据包,以获取所述每个RTP数据包中包含的时间戳;The obtaining module 808 is configured to parse each RTP data packet in order after the second sending module 805 receives the RTP data packet sent by the server from the unicast channel, to obtain the RTP data packet. Timestamp contained in ;
其中,所述指示模块803包括:The indication module 803 includes:
判断单元8031,用于在从所述LMB通道接收到第一个节目数据包后,判断最后一个解析的RTP数据包的时间戳是否满足所述单播通道的关闭条件;The determining unit 8031 is configured to determine, after receiving the first program data packet from the LMB channel, whether a timestamp of the last parsed RTP data packet meets a closing condition of the unicast channel;
发送单元8032,用于当所述判断单元8031判断满足所述单播通道的关闭条件时,向所述服务器发送单播通道数据停发请求;The sending unit 8032 is configured to: when the determining unit 8031 determines that the closing condition of the unicast channel is satisfied, send a unicast channel data suspension request to the server;
其中,所述判断单元8031包括:The determining unit 8031 includes:
比较子单元80313,用于比较当前系统时间值和所述最后一个解析的RTP数据包的时间戳之间的差值;a comparison subunit 80313, configured to compare a difference between a current system time value and a timestamp of the last parsed RTP data packet;
第二确定子单元80314,用于当所述比较子单元80313比较的差值大于第二预置值时,确定满足所述单播通道的关闭条件。The second determining sub-unit 80314 is configured to determine that the closing condition of the unicast channel is satisfied when the comparison value of the comparison sub-unit 80313 is greater than a second preset value.
更进一步地,本发明实施例中,针对关闭单播通道的条件提出了另一种可选方式,目的是针对广播信号异常时进行处理,当切台超过第二预置值时,如果DVB系统中的用户端仍未接收到广播信号码流,则应该关闭单播通道,从 而节约IP网络资源,由此进一步的提升了方案在实际应用中的灵活性。Further, in the embodiment of the present invention, another alternative manner is proposed for the condition of closing the unicast channel, and the purpose is to process when the broadcast signal is abnormal, and if the cut table exceeds the second preset value, if the DVB system If the client in the middle still does not receive the broadcast signal stream, the unicast channel should be closed. The IP network resources are saved, which further enhances the flexibility of the solution in practical applications.
请参阅图17,本发明实施例中的频道切换的用户端另一个实施例包括:Referring to FIG. 17, another embodiment of the user terminal for channel switching in the embodiment of the present invention includes:
发送模块801,用于向所述服务器发送频道切换请求,所述频道切换请求中携带待切换到的目的频道的标识,以使所述服务器从缓存数据中确定与所述目的频道的标识对应的实时传输协议RTP数据包;a sending module 801, configured to send a channel switching request to the server, where the channel switching request carries an identifier of a destination channel to be switched, so that the server determines, from the cached data, a identifier corresponding to the identifier of the destination channel. Real-time transport protocol RTP data packet;
第一接收模块802,用于在所述第一发送模块801发送频道切换请求后,从单播通道接收所述服务器发送的所述RTP数据包,所述单播通道为所述用户端与服务器建立的用于传输RTP数据包的通道;The first receiving module 802 is configured to receive, after the first sending module 801 sends a channel switching request, the RTP data packet sent by the server from a unicast channel, where the unicast channel is the client end and the server Established channel for transmitting RTP data packets;
指示模块803,用于当满足停止下发RTP数据包条件时,指示所述服务器停止所述第一接收模块802接收的RTP数据包;The indication module 803 is configured to instruct the server to stop the RTP data packet received by the first receiving module 802 when the condition of stopping the delivery of the RTP data packet is satisfied;
对接模块804,用于将所述第一接收模块802接收的RTP数据包和从LMB通道接收到所述目的频道对应的节目数据包进行对接;The docking module 804 is configured to interface the RTP data packet received by the first receiving module 802 with the program data packet corresponding to the destination channel received from the LMB channel;
其中,所述对接模块804包括:The docking module 804 includes:
丢弃单元8041,用于丢弃从所述LMB通道接收到所述目的频道对应的节目数据包中序号与所述RTP数据包的序号重复的数据包;a discarding unit 8041, configured to discard, from the LMB channel, a data packet whose sequence number corresponding to the target channel is duplicated with a sequence number of the RTP data packet;
播放单元8042,用于将所述丢弃单8041元丢弃后剩余的从所述LMB通道接收到所述目的频道对应的节目数据包排列在所述RTP数据包之后进行播放。The playing unit 8042 is configured to arrange the program data packets corresponding to the target channel received from the LMB channel and after the discarded single 8041 element is discarded, and play the data packet after the RTP data packet.
再进一步地,本发明实施例中,利用TS码流中自带的时间戳解决单播码流与LMB广播码流之间无缝对接的问题,使目的频道保持播放的流畅性与连贯性,进一步提升用户的体验。Further, in the embodiment of the present invention, the problem of seamless docking between the unicast code stream and the LMB broadcast code stream is solved by using the time stamp provided in the TS code stream, so that the destination channel maintains the smoothness and consistency of the play. Further enhance the user experience.
图18是本发明实施例提供的一种服务器结构示意图,该服务器900可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上中央处理器(CPU,central processing units)922(例如,一个或一个以上处理器)和存储器932,一个或一个以上存储应用程序942或数据944的存储介质930(例如一个或一个以上海量存储设备)。其中,存储器932和存储介质930可以是短暂存储或持久存储。存储在存储介质930的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对服务器中的一系列指令操作。更进一步地,中央处理器922可以设置为与存储介质930通信,在服务器900上执行 存储介质930中的一系列指令操作。FIG. 18 is a schematic structural diagram of a server according to an embodiment of the present invention. The server 900 may generate a large difference due to different configurations or performances, and may include one or more central processing units (CPU) (for example, One or more processors and memory 932, one or more storage media 930 storing application 942 or data 944 (eg, one or one storage device in Shanghai). Among them, the memory 932 and the storage medium 930 may be short-term storage or persistent storage. The program stored on storage medium 930 may include one or more modules (not shown), each of which may include a series of instruction operations in the server. Further, the central processing unit 922 can be configured to communicate with the storage medium 930 and execute on the server 900. A series of instruction operations in storage medium 930.
在本发明实施例中,该服务器所包括的中央处理器922还具有以下功能:In the embodiment of the present invention, the central processing unit 922 included in the server further has the following functions:
从缓存数据中确定与所述目的频道的标识对应的实时传输协议RTP数据包;Determining, from the cached data, a real-time transport protocol RTP data packet corresponding to the identifier of the destination channel;
当满足停止下发RTP数据包条件时,停止发送所述RTP数据包。When the condition for stopping the delivery of the RTP data packet is satisfied, the transmission of the RTP data packet is stopped.
服务器900还可以包括一个或一个以上电源926,一个或一个以上有线或无线网络接口950,一个或一个以上收发装置958,和/或,一个或一个以上操作系统941,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM等等。 Server 900 may also include one or more power supplies 926, one or more wired or wireless network interfaces 950, one or more transceivers 958, and/or one or more operating systems 941, such as Windows ServerTM, Mac OS XTM , UnixTM, LinuxTM, FreeBSDTM and more.
在本发明实施例中,该服务器所包括的收发装置958还具有以下功能:In the embodiment of the present invention, the transceiver 958 included in the server further has the following functions:
接收用户端发送的频道切换请求,所述频道切换请求中携带待切换到的目的频道的标识;Receiving, by the user terminal, a channel switching request, where the channel switching request carries an identifier of a destination channel to be switched to;
通过单播通道,向所述用户端发送所述RTP数据包,所述单播通道为所述用户端与服务器建立的用于传输RTP数据包的通道。And sending, by the unicast channel, the RTP data packet to the user end, where the unicast channel is a channel established by the user end and the server for transmitting an RTP data packet.
上述实施例中由服务器所执行的步骤可以基于该图18所示的服务器结构。The steps performed by the server in the above embodiment may be based on the server structure shown in FIG.
本发明实施例还提供了一种用户端,如图19所示,为了便于说明,仅示出了与本发明实施例相关的部分,具体技术细节未揭示的,请参照本发明实施例方法部分。该终端可以为包括手机、平板电脑、PDA(Personal Digital Assistant,个人数字助理)、POS(Point of Sales,销售终端)、车载电脑等任意终端设备,以终端为手机为例:The embodiment of the present invention further provides a user terminal. As shown in FIG. 19, for the convenience of description, only parts related to the embodiment of the present invention are shown. If the specific technical details are not disclosed, please refer to the method part of the embodiment of the present invention. . The terminal may be any terminal device including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), an in-vehicle computer, and the terminal is a mobile phone as an example:
图19示出的是与本发明实施例提供的终端相关的手机的部分结构的框图。参考图19,手机包括:射频(Radio Frequency,RF)电路1010、存储器1020、输入单元1030、显示单元1040、传感器1050、音频电路1060、无线保真(wireless fidelity,WiFi)模块1070、处理器1080、以及电源1090等部件。本领域技术人员可以理解,图19中示出的手机结构并不构成对手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。FIG. 19 is a block diagram showing a partial structure of a mobile phone related to a terminal provided by an embodiment of the present invention. Referring to FIG. 19, the mobile phone includes: a radio frequency (RF) circuit 1010, a memory 1020, an input unit 1030, a display unit 1040, a sensor 1050, an audio circuit 1060, a wireless fidelity (WiFi) module 1070, and a processor 1080. And power supply 1090 and other components. It will be understood by those skilled in the art that the structure of the handset shown in FIG. 19 does not constitute a limitation to the handset, and may include more or less components than those illustrated, or some components may be combined, or different components may be arranged.
下面结合图19对手机的各个构成部件进行具体的介绍:The following describes the components of the mobile phone in detail with reference to FIG. 19:
RF电路1010可用于收发信息或通话过程中,信号的接收和发送,特别地,将基站的下行信息接收后,给处理器1080处理;另外,将设计上行的数据发 送给基站。通常,RF电路1010包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low Noise Amplifier,LNA)、双工器等。此外,RF电路1010还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(Global System of Mobile communication,GSM)、通用分组无线服务(General Packet Radio Service,GPRS)、码分多址(Code Division Multiple Access,CDMA)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、长期演进(Long Term Evolution,LTE)、电子邮件、短消息服务(Short Messaging Service,SMS)等。The RF circuit 1010 can be used for receiving and transmitting signals during the transmission or reception of information or during a call. In particular, after receiving the downlink information of the base station, it is processed by the processor 1080. In addition, the uplink data is designed to be sent. Send to the base station. Generally, RF circuit 1010 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, RF circuit 1010 can also communicate with the network and other devices via wireless communication. The above wireless communication may use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (Code Division). Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), E-mail, Short Messaging Service (SMS), and the like.
存储器1020可用于存储软件程序以及模块,处理器1080通过运行存储在存储器1020的软件程序以及模块,从而执行手机的各种功能应用以及数据处理。存储器1020可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器1020可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 1020 can be used to store software programs and modules, and the processor 1080 executes various functional applications and data processing of the mobile phone by running software programs and modules stored in the memory 1020. The memory 1020 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may be stored according to Data created by the use of the mobile phone (such as audio data, phone book, etc.). Moreover, memory 1020 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
输入单元1030可用于接收输入的数字或字符信息,以及产生与手机的用户设置以及功能控制有关的键信号输入。具体地,输入单元1030可包括触控面板1031以及其他输入设备1032。触控面板1031,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板1031上或在触控面板1031附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触控面板1031可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器1080,并能接收处理器1080发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板1031。除了触控面板1031,输入单元1030还可以包括其他输入设备1032。具体地,其他输入设备1032可以包括但不限于物理 键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。The input unit 1030 can be configured to receive input numeric or character information and to generate key signal inputs related to user settings and function controls of the handset. Specifically, the input unit 1030 may include a touch panel 1031 and other input devices 1032. The touch panel 1031, also referred to as a touch screen, can collect touch operations on or near the user (such as the user using a finger, a stylus, or the like on the touch panel 1031 or near the touch panel 1031. Operation), and drive the corresponding connecting device according to a preset program. Optionally, the touch panel 1031 may include two parts: a touch detection device and a touch controller. Wherein, the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information. The processor 1080 is provided and can receive commands from the processor 1080 and execute them. In addition, the touch panel 1031 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 1031, the input unit 1030 may also include other input devices 1032. In particular, other input devices 1032 may include, but are not limited to, physics One or more of a keyboard, function keys (such as a volume control button, a switch button, etc.), a trackball, a mouse, a joystick, and the like.
显示单元1040可用于显示由用户输入的信息或提供给用户的信息以及手机的各种菜单。显示单元1040可包括显示面板1041,可选的,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板1041。进一步的,触控面板1031可覆盖显示面板1041,当触控面板1031检测到在其上或附近的触摸操作后,传送给处理器1080以确定触摸事件的类型,随后处理器1080根据触摸事件的类型在显示面板1041上提供相应的视觉输出。虽然在图18中,触控面板1031与显示面板1041是作为两个独立的部件来实现手机的输入和输入功能,但是在某些实施例中,可以将触控面板1031与显示面板1041集成而实现手机的输入和输出功能。The display unit 1040 can be used to display information input by the user or information provided to the user as well as various menus of the mobile phone. The display unit 1040 may include a display panel 1041. Alternatively, the display panel 1041 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like. Further, the touch panel 1031 may cover the display panel 1041, and when the touch panel 1031 detects a touch operation thereon or nearby, the touch panel 1031 transmits to the processor 1080 to determine the type of the touch event, and then the processor 1080 according to the touch event. The type provides a corresponding visual output on display panel 1041. Although the touch panel 1031 and the display panel 1041 are used as two independent components to implement the input and input functions of the mobile phone in FIG. 18, in some embodiments, the touch panel 1031 and the display panel 1041 may be integrated. Realize the input and output functions of the phone.
手机还可包括至少一种传感器1050,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板1041的亮度,接近传感器可在手机移动到耳边时,关闭显示面板1041和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于手机还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。The handset can also include at least one type of sensor 1050, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 1041 according to the brightness of the ambient light, and the proximity sensor may close the display panel 1041 and/or when the mobile phone moves to the ear. Or backlight. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (usually three axes). When it is stationary, it can detect the magnitude and direction of gravity. It can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for the mobile phone can also be configured with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors, no longer Narration.
音频电路1060、扬声器1061,传声器1062可提供用户与手机之间的音频接口。音频电路1060可将接收到的音频数据转换后的电信号,传输到扬声器1061,由扬声器1061转换为声音信号输出;另一方面,传声器1062将收集的声音信号转换为电信号,由音频电路1060接收后转换为音频数据,再将音频数据输出处理器1080处理后,经RF电路1010以发送给比如另一手机,或者将音频数据输出至存储器1020以便进一步处理。An audio circuit 1060, a speaker 1061, and a microphone 1062 can provide an audio interface between the user and the handset. The audio circuit 1060 can transmit the converted electrical data of the received audio data to the speaker 1061, and convert it into a sound signal output by the speaker 1061; on the other hand, the microphone 1062 converts the collected sound signal into an electrical signal, by the audio circuit 1060. After receiving, it is converted into audio data, and then processed by the audio data output processor 1080, sent to the other mobile phone via the RF circuit 1010, or outputted to the memory 1020 for further processing.
WiFi属于短距离无线传输技术,手机通过WiFi模块1070可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联 网访问。虽然图18示出了WiFi模块1070,但是可以理解的是,其并不属于手机的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。WiFi is a short-range wireless transmission technology, and the mobile phone can help users to send and receive emails, browse web pages, and access streaming media through the WiFi module 1070, which provides users with wireless broadband interconnection. Web access. Although FIG. 18 shows the WiFi module 1070, it can be understood that it does not belong to the essential configuration of the mobile phone, and may be omitted as needed within the scope of not changing the essence of the invention.
处理器1080是手机的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器1020内的软件程序和/或模块,以及调用存储在存储器1020内的数据,执行手机的各种功能和处理数据,从而对手机进行整体监控。可选的,处理器1080可包括一个或多个处理单元;优选的,处理器1080可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器1080中。The processor 1080 is the control center of the handset, which connects various portions of the entire handset using various interfaces and lines, by executing or executing software programs and/or modules stored in the memory 1020, and invoking data stored in the memory 1020, The phone's various functions and processing data, so that the overall monitoring of the phone. Optionally, the processor 1080 may include one or more processing units; preferably, the processor 1080 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application, and the like. The modem processor primarily handles wireless communications. It will be appreciated that the above described modem processor may also not be integrated into the processor 1080.
手机还包括给各个部件供电的电源1090(比如电池),优选的,电源可以通过电源管理系统与处理器1080逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The mobile phone also includes a power source 1090 (such as a battery) that supplies power to various components. Preferably, the power source can be logically coupled to the processor 1080 through a power management system to manage functions such as charging, discharging, and power management through the power management system.
尽管未示出,手机还可以包括摄像头、蓝牙模块等,在此不再赘述。Although not shown, the mobile phone may further include a camera, a Bluetooth module, and the like, and details are not described herein again.
在本发明实施例中,该用户端所包括的处理器1080还具有以下功能:In the embodiment of the present invention, the processor 1080 included in the client also has the following functions:
当满足停止下发RTP数据包条件时,指示所述服务器停止发送所述RTP数据包;When the condition of stopping the delivery of the RTP data packet is satisfied, instructing the server to stop sending the RTP data packet;
将所述RTP数据包和从LMB通道接收到所述目的频道对应的节目数据包进行对接。The RTP data packet is docked with a program data packet corresponding to the destination channel received from the LMB channel.
在本发明实施例中,该用户端所包括的收发装置还具有以下功能:In the embodiment of the present invention, the transceiver device included in the user terminal further has the following functions:
从单播通道接收所述服务器发送的所述RTP数据包,所述单播通道为所述用户端与服务器建立的用于传输RTP数据包的通道;Receiving, by the unicast channel, the RTP data packet sent by the server, where the unicast channel is a channel established by the client and the server for transmitting an RTP data packet;
向所述服务器发送频道切换请求,所述频道切换请求中携带待切换到的目的频道的标识,以使所述服务器从缓存数据中确定与所述目的频道的标识对应的实时传输协议RTP数据包。Sending a channel switching request to the server, where the channel switching request carries an identifier of a destination channel to be switched, so that the server determines, from the cached data, a real-time transport protocol RTP data packet corresponding to the identifier of the destination channel. .
下面对本发明实施例中的频道切换系统进行描述,请参阅图20,本发明实施例中的频道切换系统包括:The following describes the channel switching system in the embodiment of the present invention. Referring to FIG. 20, the channel switching system in the embodiment of the present invention includes:
服务器1101和用户端1102; Server 1101 and client 1102;
所述服务器1101用于:接收用户端1102发送的频道切换请求,所述频道切换请求中携带待切换到的目的频道的标识;服务器1101从缓存数据中确定 与所述目的频道的标识对应的实时传输协议RTP数据包;服务器1101通过单播通道,向所述用户端1102发送所述RTP数据包,所述单播通道为所述用户端1102与服务器1101建立的用于传输RTP数据包的通道;当满足停止下发RTP数据包条件时,服务器1101停止发送所述RTP数据包;The server 1101 is configured to: receive a channel switching request sent by the user end 1102, where the channel switching request carries an identifier of a destination channel to be switched; the server 1101 determines from the cached data. a real-time transport protocol RTP data packet corresponding to the identifier of the destination channel; the server 1101 sends the RTP data packet to the client terminal 1102 through a unicast channel, where the unicast channel is the client terminal 1102 and the server 1101 Establishing a channel for transmitting an RTP data packet; when it is satisfied that the condition of stopping the delivery of the RTP data packet is satisfied, the server 1101 stops transmitting the RTP data packet;
所述用户端1102用于:向所述服务器1101发送频道切换请求,所述频道切换请求中携带待切换到的目的频道的标识,以使所述服务器1101从缓存数据中确定与所述目的频道的标识对应的实时传输协议RTP数据包;从单播通道接收所述服务器1101发送的所述RTP数据包,所述单播通道为所述用户端1102与服务器1101建立的用于传输RTP数据包的通道;当满足停止下发RTP数据包条件时,指示所述服务器停止发送所述RTP数据包;将所述RTP数据包和从LMB通道接收到所述目的频道对应的节目数据包进行对接。The user terminal 1102 is configured to: send a channel switching request to the server 1101, where the channel switching request carries an identifier of a destination channel to be switched, so that the server 1101 determines the target channel from the cached data. Corresponding real-time transport protocol RTP data packet; receiving the RTP data packet sent by the server 1101 from a unicast channel, where the unicast channel is established by the user end 1102 and the server 1101 for transmitting RTP data packets The channel is instructed to stop transmitting the RTP data packet when the condition of stopping the delivery of the RTP data packet is satisfied; and the RTP data packet is compared with the program data packet corresponding to the destination channel received from the LMB channel.
本发明实施例改进FCC技术,在IP网络前端部署FCC系统,不需要改造或升级现有的广播网络,而可以实现FCC技术在DVB领域中的应用,从而明显提高直播频道的切换速度,提升用户体验。The embodiment of the present invention improves the FCC technology, and deploys the FCC system on the front end of the IP network, and does not need to modify or upgrade the existing broadcast network, but can implement the application of the FCC technology in the DVB field, thereby significantly improving the switching speed of the live channel and improving the user. Experience.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present application, it should be understood that the disclosed system, apparatus, and method may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。 In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium. A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .
以上对本发明所提供的一种频道切换的方法进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的技术人员,依据本发明实施例的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。 The method for channel switching provided by the present invention is described in detail above. The principles and implementations of the present invention are described in the following. The description of the above embodiments is only for helping to understand the method of the present invention. At the same time, those skilled in the art, according to the idea of the embodiments of the present invention, will have any changes in the specific embodiments and the scope of application. In summary, the content of the present specification should not be construed as the present invention. limits.

Claims (25)

  1. 一种频道切换的方法,其特征在于,包括:A method for channel switching, comprising:
    接收用户端发送的频道切换请求,所述频道切换请求中携带待切换到的目的频道的标识;Receiving, by the user terminal, a channel switching request, where the channel switching request carries an identifier of a destination channel to be switched to;
    从缓存数据中确定与所述目的频道的标识对应的实时传输协议RTP数据包;Determining, from the cached data, a real-time transport protocol RTP data packet corresponding to the identifier of the destination channel;
    通过单播通道,向所述用户端发送所述RTP数据包,所述单播通道为所述用户端与服务器建立的用于传输RTP数据包的通道;Transmitting, by the unicast channel, the RTP data packet to the user end, where the unicast channel is a channel established by the user end and a server for transmitting an RTP data packet;
    当满足停止下发RTP数据包条件时,停止发送所述RTP数据包。When the condition for stopping the delivery of the RTP data packet is satisfied, the transmission of the RTP data packet is stopped.
  2. 根据权利要求1所述的方法,其特征在于,所述从缓存数据中确定与所述目的频道的标识对应的RTP数据包,包括:The method according to claim 1, wherein the determining the RTP data packet corresponding to the identifier of the destination channel from the cache data comprises:
    根据预设的I帧索引列表中所包含的所述RTP数据包的时间戳,确定所述RTP数据包的序号,所述预设的I帧索引列表为片类型为I帧的所述目的频道的RTP数据包的序号与时间戳的对应关系表;Determining a sequence number of the RTP data packet according to a timestamp of the RTP data packet included in a preset I frame index list, where the preset I frame index list is the target channel with a slice type of I frame a correspondence table between the sequence number and the time stamp of the RTP data packet;
    根据所述RTP数据包的序号,从所述缓存数据中确定所述RTP数据包。Determining the RTP data packet from the cached data according to the sequence number of the RTP data packet.
  3. 根据权利要求2所述的方法,其特征在于,所述从缓存数据中确定与所述目的频道的标识对应的RTP数据包之前,所述方法还包括:The method according to claim 2, wherein the method further comprises: before determining the RTP data packet corresponding to the identifier of the destination channel from the cache data, the method further comprising:
    接收直播广播LMB数据流,并从所述LMB数据流中确定所述目的频道的传输流;Receiving a live broadcast LMB data stream, and determining a transport stream of the destination channel from the LMB data stream;
    根据所述目的频道的传输流中的时间信息,进行所述服务器端的系统时间校正;Performing system time correction of the server end according to time information in the transport stream of the destination channel;
    将所述目的频道的传输流打包成所述目的频道的RTP数据包,所述目的频道的RTP数据包中包含校正后的时间戳;And compressing the transport stream of the destination channel into an RTP data packet of the destination channel, where the RTP data packet of the destination channel includes a corrected timestamp;
    缓存所述目的频道的RTP数据包。Cache the RTP data packet of the destination channel.
  4. 根据权利要求3所述的方法,其特征在于,所述缓存所述目的频道的RTP数据包之后,所述方法还包括:The method according to claim 3, wherein after the buffering the RTP data packet of the destination channel, the method further comprises:
    从所述目的频道的RTP数据包中检测出片类型为I帧的数据包;And detecting, from the RTP data packet of the destination channel, a data packet whose slice type is an I frame;
    建立所述片类型为I帧的数据包的序号和时间戳的对应关系,作为所述I帧索引列表。 Establishing a correspondence between a sequence number and a time stamp of the data packet of the slice type I frame as the I frame index list.
  5. 根据权利要求1所述的方法,其特征在于,所述当满足停止下发RTP数据包条件时,停止发送所述RTP数据包,包括:The method according to claim 1, wherein the stopping the sending of the RTP data packet when the condition for stopping the delivery of the RTP data packet is satisfied comprises:
    接收所述用户端发送的单播通道数据停发请求时,停止发送所述RTP数据包;或,Stop receiving the RTP data packet when receiving the unicast channel data suspension request sent by the user terminal; or
    当所述用户端拆除所述单播通道后,停止发送所述RTP数据包。After the user end tears down the unicast channel, the sending of the RTP data packet is stopped.
  6. 一种频道切换的方法,其特征在于,包括:A method for channel switching, comprising:
    向所述服务器发送频道切换请求,所述频道切换请求中携带待切换到的目的频道的标识,以使所述服务器从缓存数据中确定与所述目的频道的标识对应的实时传输协议RTP数据包;Sending a channel switching request to the server, where the channel switching request carries an identifier of a destination channel to be switched, so that the server determines, from the cached data, a real-time transport protocol RTP data packet corresponding to the identifier of the destination channel. ;
    从单播通道接收所述服务器发送的所述RTP数据包,所述单播通道为所述用户端与服务器建立的用于传输RTP数据包的通道;Receiving, by the unicast channel, the RTP data packet sent by the server, where the unicast channel is a channel established by the client and the server for transmitting an RTP data packet;
    当满足停止下发RTP数据包条件时,指示所述服务器停止发送所述RTP数据包;When the condition of stopping the delivery of the RTP data packet is satisfied, instructing the server to stop sending the RTP data packet;
    将所述RTP数据包和从LMB通道接收到所述目的频道对应的节目数据包进行对接。The RTP data packet is docked with a program data packet corresponding to the destination channel received from the LMB channel.
  7. 根据权利要求6所述的方法,其特征在于,所述向所述服务器发送频道切换请求之前,所述方法还包括:The method according to claim 6, wherein the method further comprises: before the sending a channel switching request to the server, the method further comprises:
    接收频道切换指令,所述频道切换指令中包含所述目的频道的标识;Receiving a channel switching instruction, where the channel switching instruction includes an identifier of the destination channel;
    根据预设的节目地址表,确定与所述目的频道的标识对应的节目地址;Determining, according to a preset program address table, a program address corresponding to the identifier of the destination channel;
    根据所述节目地址,建立从用户端到所述服务器的用于传输RTP数据包的单播通道。A unicast channel for transmitting RTP data packets from the client to the server is established according to the program address.
  8. 根据权利要求6或7所述的方法,其特征在于,所述从所述单播通道接收所述服务器发送的所述RTP数据包之后,所述方法还包括:The method according to claim 6 or 7, wherein after the receiving, by the unicast channel, the RTP data packet sent by the server, the method further comprises:
    按照顺序解析每个RTP数据包,以获取所述每个RTP数据包中包含的时间戳;Parsing each RTP data packet in order to obtain a timestamp included in each of the RTP data packets;
    所述当满足停止下发RTP数据包条件时,指示所述服务器停止发送所述RTP数据包,包括:When the condition of stopping the delivery of the RTP data packet is satisfied, the server is instructed to stop sending the RTP data packet, including:
    在从所述LMB通道接收到第一个节目数据包后,判断最后一个解析的RTP数据包的时间戳是否满足所述单播通道的关闭条件; After receiving the first program data packet from the LMB channel, determining whether a timestamp of the last parsed RTP data packet satisfies a closing condition of the unicast channel;
    当满足所述单播通道的关闭条件时,向所述服务器发送单播通道数据停发请求。When the shutdown condition of the unicast channel is satisfied, a unicast channel data suspension request is sent to the server.
  9. 根据权利要求8所述的方法,其特征在于,所述判断最后一个解析的RTP数据包的时间戳是否满足所述单播通道的关闭条件,包括:The method according to claim 8, wherein the determining whether the timestamp of the last parsed RTP data packet satisfies the closing condition of the unicast channel comprises:
    计算所述最后一个解析的RTP数据包的时间戳和所述第一个节目数据包中包含的时间戳之间的差值;Calculating a difference between a timestamp of the last parsed RTP data packet and a timestamp included in the first program data packet;
    当所述差值大于第一预置值时,确定满足所述单播通道的关闭条件。When the difference is greater than the first preset value, determining that the off condition of the unicast channel is satisfied.
  10. 根据权利要求8所述的方法,其特征在于,所述判断最后一个解析的RTP数据包的时间戳是否满足所述单播通道的关闭条件,包括:The method according to claim 8, wherein the determining whether the timestamp of the last parsed RTP data packet satisfies the closing condition of the unicast channel comprises:
    比较当前系统时间值和所述最后一个解析的RTP数据包的时间戳之间的差值;Comparing the difference between the current system time value and the timestamp of the last parsed RTP packet;
    当所述差值大于第二预置值时,确定满足所述单播通道的关闭条件。When the difference is greater than the second preset value, determining that the off condition of the unicast channel is satisfied.
  11. 根据权利要求6-10任一所述的方法,其特征在于,所述将所述RTP数据包和从所述LMB通道接收到所述目的频道对应的节目数据包进行对接,包括:The method according to any one of claims 6 to 10, wherein the docking the RTP data packet with a program data packet corresponding to the destination channel received from the LMB channel comprises:
    丢弃从所述LMB通道接收到所述目的频道对应的节目数据包中序号与所述RTP数据包的序号重复的数据包;And discarding, from the LMB channel, a data packet whose sequence number corresponding to the target channel is duplicated with a sequence number of the RTP data packet;
    将丢弃后剩余的从所述LMB通道接收到所述目的频道对应的节目数据包排列在所述RTP数据包之后进行播放。The program data packets corresponding to the destination channel received from the LMB channel remaining after being discarded are arranged after the RTP data packet to be played.
  12. 一种频道切换的服务器,其特征在于,包括:A channel switching server, comprising:
    第一接收模块,用于接收用户端发送的频道切换请求,所述频道切换请求中携带待切换到的目的频道的标识;The first receiving module is configured to receive a channel switching request sent by the user end, where the channel switching request carries an identifier of the destination channel to be switched to;
    确定模块,用于从缓存数据中确定与所述第一接收模块接收的目的频道的标识对应的实时传输协议RTP数据包;a determining module, configured to determine, from the cache data, a real-time transport protocol RTP data packet corresponding to the identifier of the destination channel received by the first receiving module;
    发送模块,用于通过单播通道,向所述用户端发送所述确定模块确定的RTP数据包,所述单播通道为所述用户端与服务器建立的用于传输RTP数据包的通道;a sending module, configured to send, by using a unicast channel, the RTP data packet determined by the determining module to the user end, where the unicast channel is a channel established by the user end and the server for transmitting an RTP data packet;
    停发模块,用于当满足停止下发RTP数据包条件时,停止所述发送模块发送所述RTP数据包。 And a stop sending module, configured to stop the sending module from sending the RTP data packet when the condition for stopping the delivery of the RTP data packet is met.
  13. 根据权利要求12所述的服务器,其特征在于,所述确定模块包括:The server according to claim 12, wherein the determining module comprises:
    第一确定单元,用于根据预设的I帧索引列表中所包含的所述RTP数据包的时间戳,确定所述RTP数据包的序号,所述预设的I帧索引列表为片类型为I帧的所述目的频道的RTP数据包的序号与时间戳的对应关系表;a first determining unit, configured to determine a sequence number of the RTP data packet according to a timestamp of the RTP data packet included in a preset I frame index list, where the preset I frame index list is a slice type a correspondence table between the sequence number and the timestamp of the RTP data packet of the destination channel of the I frame;
    第二确定单元,用于根据所述第一确定单元确定的RTP数据包的序号,从所述缓存数据中确定所述RTP数据包。And a second determining unit, configured to determine the RTP data packet from the cached data according to the sequence number of the RTP data packet determined by the first determining unit.
  14. 根据权利要求13所述的服务器,其特征在于,所述服务器还包括:The server according to claim 13, wherein the server further comprises:
    第二接收模块,用于在所述确定模块确定目的频道的标识对应的实时传输协议RTP数据包前,接收直播广播LMB数据流,并从所述LMB数据流中确定所述目的频道的传输流;a second receiving module, configured to receive a live broadcast LMB data stream, and determine a transport stream of the destination channel from the LMB data stream, before the determining module determines a real-time transport protocol RTP data packet corresponding to the identifier of the destination channel ;
    校正模块,用于根据所述第二接收模块接收到的目的频道的传输流中的时间信息,进行所述服务器端的系统时间校正;a correction module, configured to perform system time correction of the server according to time information in a transport stream of the destination channel received by the second receiving module;
    打包模块,用于将所述目的频道的传输流打包成所述目的频道的RTP数据包,所述目的频道的RTP数据包中包含所述校正模块校正后的时间戳;a packing module, configured to package the transport stream of the destination channel into an RTP data packet of the destination channel, where the RTP data packet of the destination channel includes a corrected time stamp of the correction module;
    缓存模块,用于缓存所述打包模块打包后的目的频道的RTP数据包。a cache module, configured to cache an RTP data packet of the target channel after the packaging module is packaged.
  15. 根据权利要求14所述的服务器,其特征在于,所述服务器还包括:The server according to claim 14, wherein the server further comprises:
    检测模块,用于在所述缓存模块缓存所述目的频道的RTP数据包之后,从所述目的频道的RTP数据包中检测出片类型为I帧的数据包;a detecting module, configured to: after the cache module caches the RTP data packet of the destination channel, detect a data packet of a slice type of an I frame from an RTP data packet of the destination channel;
    建立模块,用于建立所述检测模块检测的片类型为I帧的数据包的序号和时间戳的对应关系,作为所述I帧索引列表。And a establishing module, configured to establish a correspondence between a sequence number and a timestamp of the data packet of the I frame detected by the detecting module, as the I frame index list.
  16. 根据权利要求12所述的服务器,其特征在于,所述停发模块包括:The server according to claim 12, wherein the suspension module comprises:
    停发单元,用于接收所述用户端发送的单播通道数据停发请求时,停止发送所述RTP数据包;或,当所述用户端拆除所述单播通道后,停止发送所述RTP数据包。a stop sending unit, configured to stop sending the RTP data packet when receiving the unicast channel data suspension request sent by the user terminal; or, after the user end tears down the unicast channel, stop sending the RTP data pack.
  17. 一种频道切换的用户端,其特征在于,包括:A user terminal for channel switching, comprising:
    发送模块,用于向所述服务器发送频道切换请求,所述频道切换请求中携带待切换到的目的频道的标识,以使所述服务器从缓存数据中确定与所述目的频道的标识对应的实时传输协议RTP数据包;a sending module, configured to send a channel switching request to the server, where the channel switching request carries an identifier of a destination channel to be switched, so that the server determines, in the cache data, a real-time corresponding to the identifier of the destination channel. Transport protocol RTP data packet;
    第一接收模块,用于在所述第一发送模块发送频道切换请求后,从单播通 道接收所述服务器发送的所述RTP数据包,所述单播通道为所述用户端与服务器建立的用于传输RTP数据包的通道;a first receiving module, configured to: after the first sending module sends a channel switching request, from the unicast Receiving, by the channel, the RTP data packet sent by the server, where the unicast channel is a channel established by the client and the server for transmitting an RTP data packet;
    指示模块,用于当满足停止下发RTP数据包条件时,指示所述服务器停止所述第一接收模块接收的RTP数据包;The indication module is configured to: when the condition of stopping the delivery of the RTP data packet is satisfied, instructing the server to stop the RTP data packet received by the first receiving module;
    对接模块,用于将所述第一接收模块接收的RTP数据包和从LMB通道接收到所述目的频道对应的节目数据包进行对接。And a docking module, configured to interface the RTP data packet received by the first receiving module with a program data packet corresponding to the destination channel received from the LMB channel.
  18. 根据权利要求17所述的用户端,其特征在于,所述用户端还包括:The client according to claim 17, wherein the client further comprises:
    第二接收模块,用于在所述发送模块向所述服务器发送频道切换请求之前,接收频道切换指令,所述频道切换指令中包含所述目的频道的标识;a second receiving module, configured to receive a channel switching instruction, where the channel switching instruction includes an identifier of the destination channel, before the sending module sends a channel switching request to the server;
    确定模块,用于根据预设的节目地址表,确定与所述第二接收模块接收的目的频道的标识对应的节目地址;a determining module, configured to determine, according to the preset program address table, a program address corresponding to the identifier of the destination channel received by the second receiving module;
    建立模块,用于根据所述确定模块确定的节目地址,建立从用户端到所述服务器的用于传输RTP数据包的单播通道。And a establishing module, configured to establish, according to the program address determined by the determining module, a unicast channel for transmitting an RTP data packet from the user end to the server.
  19. 根据权利要求17或18所述的用户端,其特征在于,所述用户端还包括:The client according to claim 17 or 18, wherein the client further comprises:
    获取模块,用于在所述第二发送模块从所述单播通道接收所述服务器发送的所述RTP数据包之后按照顺序解析每个RTP数据包,以获取所述每个RTP数据包中包含的时间戳;An obtaining module, configured to parse each RTP data packet in order after the second sending module receives the RTP data packet sent by the server from the unicast channel, to obtain the content included in each RTP data packet Timestamp
    所述指示模块包括:The indication module includes:
    判断单元,用于在从所述LMB通道接收到第一个节目数据包后,判断最后一个解析的RTP数据包的时间戳是否满足所述单播通道的关闭条件;a determining unit, configured to determine, after receiving the first program data packet from the LMB channel, whether a timestamp of the last parsed RTP data packet meets a closing condition of the unicast channel;
    发送单元,用于当所述判断单元判断满足所述单播通道的关闭条件时,向所述服务器发送单播通道数据停发请求。And a sending unit, configured to send a unicast channel data suspension request to the server when the determining unit determines that the closing condition of the unicast channel is satisfied.
  20. 根据权利要求19所述的用户端,其特征在于,所述判断单元包括:The user terminal according to claim 19, wherein the determining unit comprises:
    计算子单元,用于计算所述最后一个解析的RTP数据包的时间戳和所述第一个节目数据包中包含的时间戳之间的差值;a calculating subunit, configured to calculate a difference between a timestamp of the last parsed RTP data packet and a timestamp included in the first program data packet;
    第一确定子单元,用于当所述计算子单元计算的差值大于第一预置值时,确定满足所述单播通道的关闭条件。The first determining subunit is configured to determine that the closing condition of the unicast channel is satisfied when the calculated difference value of the calculating subunit is greater than the first preset value.
  21. 根据权利要求19所述的用户端,其特征在于,所述判断单元包括 The client according to claim 19, wherein said determining unit comprises
    比较子单元,用于比较当前系统时间值和所述最后一个解析的RTP数据包的时间戳之间的差值;Comparing subunits for comparing a difference between a current system time value and a timestamp of the last parsed RTP data packet;
    第二确定子单元,用于当所述比较子单元比较的差值大于第二预置值时,确定满足所述单播通道的关闭条件。a second determining subunit, configured to determine that a closing condition of the unicast channel is satisfied when a difference value of the comparing subunit comparison is greater than a second preset value.
  22. 根据权利要求17-21任一所述的用户端,其特征在于,所述对接模块包括:The client according to any one of claims 17 to 21, wherein the docking module comprises:
    丢弃单元,用于丢弃从所述LMB通道接收到所述目的频道对应的节目数据包中序号与所述RTP数据包的序号重复的数据包;a discarding unit, configured to discard, from the LMB channel, a data packet whose sequence number corresponding to the target channel is duplicated with a sequence number of the RTP data packet;
    播放单元,用于将所述丢弃单元丢弃后剩余的从所述LMB通道接收到所述目的频道对应的节目数据包排列在所述RTP数据包之后进行播放。a playing unit, configured to: after the discarding unit discards, the program data packets corresponding to the destination channel received from the LMB channel are arranged after the RTP data packet to be played.
  23. 一种频道切换的服务器,其特征在于,包括:收发装置、存储器和处理器,A channel switching server, comprising: a transceiver, a memory, and a processor,
    其中,所述收发装置用于执行如下步骤:The transceiver device is configured to perform the following steps:
    接收用户端发送的频道切换请求,所述频道切换请求中携带待切换到的目的频道的标识;Receiving, by the user terminal, a channel switching request, where the channel switching request carries an identifier of a destination channel to be switched to;
    通过单播通道,向所述用户端发送所述RTP数据包,所述单播通道为所述用户端与服务器建立的用于传输RTP数据包的通道;Transmitting, by the unicast channel, the RTP data packet to the user end, where the unicast channel is a channel established by the user end and a server for transmitting an RTP data packet;
    其中,所述处理器用于执行如下步骤:The processor is configured to perform the following steps:
    从缓存数据中确定与所述目的频道的标识对应的实时传输协议RTP数据包;Determining, from the cached data, a real-time transport protocol RTP data packet corresponding to the identifier of the destination channel;
    当满足停止下发RTP数据包条件时,停止发送所述RTP数据包。When the condition for stopping the delivery of the RTP data packet is satisfied, the transmission of the RTP data packet is stopped.
  24. 一种频道切换的用户端,其特征在于,包括:收发装置、存储器和处理器,A user terminal for channel switching, comprising: a transceiver, a memory, and a processor,
    其中,所述收发装置用于执行如下步骤:The transceiver device is configured to perform the following steps:
    从单播通道接收所述服务器发送的所述RTP数据包,所述单播通道为所述用户端与服务器建立的用于传输RTP数据包的通道;Receiving, by the unicast channel, the RTP data packet sent by the server, where the unicast channel is a channel established by the client and the server for transmitting an RTP data packet;
    向所述服务器发送频道切换请求,所述频道切换请求中携带待切换到的目的频道的标识,以使所述服务器从缓存数据中确定与所述目的频道的标识对应 的实时传输协议RTP数据包。Sending a channel switching request to the server, where the channel switching request carries an identifier of the destination channel to be switched, so that the server determines, from the cached data, that the identifier of the destination channel is Real-time transport protocol RTP packets.
    其中,所述处理器用于执行如下步骤:The processor is configured to perform the following steps:
    当满足停止下发RTP数据包条件时,指示所述服务器停止发送所述RTP数据包;When the condition of stopping the delivery of the RTP data packet is satisfied, instructing the server to stop sending the RTP data packet;
    将所述RTP数据包和从LMB通道接收到所述目的频道对应的节目数据包进行对接。The RTP data packet is docked with a program data packet corresponding to the destination channel received from the LMB channel.
  25. 一种频道切换的系统,其特征在于,包括:服务器和用户端,A channel switching system, comprising: a server and a client,
    所述服务器用于:接收用户端发送的频道切换请求,所述频道切换请求中携带待切换到的目的频道的标识;从缓存数据中确定与所述目的频道的标识对应的实时传输协议RTP数据包;通过单播通道,向所述用户端发送所述RTP数据包,所述单播通道为所述用户端与服务器建立的用于传输RTP数据包的通道;当满足停止下发RTP数据包条件时,停止发送所述RTP数据包;The server is configured to: receive a channel switching request sent by a user end, where the channel switching request carries an identifier of a destination channel to be switched; and determine, according to the real-time transmission protocol RTP data corresponding to the identifier of the destination channel, from the cached data. And sending, by the unicast channel, the RTP data packet to the user end, where the unicast channel is a channel established by the user end and the server for transmitting an RTP data packet; when the RTP data packet is stopped, the data packet is sent When the condition is met, the sending of the RTP data packet is stopped;
    所述用户端用于:向所述服务器发送频道切换请求,所述频道切换请求中携带待切换到的目的频道的标识,以使所述服务器从缓存数据中确定与所述目的频道的标识对应的实时传输协议RTP数据包;从单播通道接收所述服务器发送的所述RTP数据包,所述单播通道为所述用户端与服务器建立的用于传输RTP数据包的通道;当满足停止下发RTP数据包条件时,指示所述服务器停止发送所述RTP数据包;将所述RTP数据包和从LMB通道接收到所述目的频道对应的节目数据包进行对接。 The user end is configured to: send a channel switching request to the server, where the channel switching request carries an identifier of a destination channel to be switched, so that the server determines, from the cached data, that the identifier of the destination channel is a real-time transport protocol RTP data packet; receiving, by the unicast channel, the RTP data packet sent by the server, where the unicast channel is a channel established by the client and the server for transmitting an RTP data packet; When the RTP data packet condition is sent, the server is instructed to stop sending the RTP data packet; and the RTP data packet is compared with a program data packet corresponding to the destination channel received from the LMB channel.
PCT/CN2015/075491 2015-03-31 2015-03-31 Method and device for switching channels WO2016154890A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2015/075491 WO2016154890A1 (en) 2015-03-31 2015-03-31 Method and device for switching channels

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2015/075491 WO2016154890A1 (en) 2015-03-31 2015-03-31 Method and device for switching channels

Publications (1)

Publication Number Publication Date
WO2016154890A1 true WO2016154890A1 (en) 2016-10-06

Family

ID=57005493

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/075491 WO2016154890A1 (en) 2015-03-31 2015-03-31 Method and device for switching channels

Country Status (1)

Country Link
WO (1) WO2016154890A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080002630A1 (en) * 2006-06-30 2008-01-03 Samsung Electronics Co. Ltd. Digital broadcasting reception apparatus for quick channel switching and method thereof
CN101335883A (en) * 2007-06-29 2008-12-31 国际商业机器公司 Method and apparatus for processing video stream in digital video broadcast system
CN101827306A (en) * 2009-03-03 2010-09-08 中兴通讯股份有限公司 Switching method and device of unicast service
US20100296476A1 (en) * 2008-02-02 2010-11-25 Huawei Technologies Co., Ltd. Network switching method, device and system for mobile multimedia services

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080002630A1 (en) * 2006-06-30 2008-01-03 Samsung Electronics Co. Ltd. Digital broadcasting reception apparatus for quick channel switching and method thereof
CN101335883A (en) * 2007-06-29 2008-12-31 国际商业机器公司 Method and apparatus for processing video stream in digital video broadcast system
US20100296476A1 (en) * 2008-02-02 2010-11-25 Huawei Technologies Co., Ltd. Network switching method, device and system for mobile multimedia services
CN101827306A (en) * 2009-03-03 2010-09-08 中兴通讯股份有限公司 Switching method and device of unicast service

Similar Documents

Publication Publication Date Title
US10869081B2 (en) Image processing device, image reproduction device, and image reproduction system
KR101878279B1 (en) Video remote-commentary synchronization method and system, and terminal device
KR102499967B1 (en) TVs and electronic devices with external tuners and memory for personal video recording
JP2019532576A (en) Multimode synchronous rendering of audio and video
US9621949B2 (en) Method and apparatus for reducing latency in multi-media system
US11146611B2 (en) Lip synchronization of audio and video signals for broadcast transmission
WO2018023975A1 (en) Fast dvb channel switching method, apparatus, and system
KR102079837B1 (en) Identifying media on a mobile device
JP2016540450A (en) Broadcast signal transmission method, broadcast signal reception method, broadcast signal transmission device, broadcast signal reception device
CN107787586B (en) Method and apparatus for transmitting and receiving signal in multimedia system
CN112423076A (en) Audio screen projection synchronous control method and device and computer readable storage medium
CN110636337B (en) Video image intercepting method, device and system
CN111741352A (en) Screen projection control method, screen projection playing method and related device
EP3868116A1 (en) Television receiver application for tv and electronic devices
WO2016154890A1 (en) Method and device for switching channels
CN109587497B (en) Audio data transmission method, device and system for FLV (flash video) stream
JP2005020437A (en) Contents correction system and reception device
JP5843480B2 (en) Receiver and program
WO2007058067A1 (en) Mobile communication terminal, digital broadcast complementing device, and digital broadcast complementing system
JP2008283300A (en) Reception device
CN113542688A (en) Audio and video monitoring method, device, equipment, storage medium and system
CN106572115A (en) Screen image method of intelligent terminal playing network video, and emitter and receiver device
KR20080058993A (en) Device and method for displaying video data in digital broadcasting receiver
JP2019522389A (en) Transmission apparatus for wirelessly transmitting an MPEG-TS (transport stream) compatible data stream
JP2015029166A (en) Broadcast-communication coordination system and external terminal

Legal Events

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

Ref document number: 15886876

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: 15886876

Country of ref document: EP

Kind code of ref document: A1