CN102148813B - Media content transmission method and system - Google Patents

Media content transmission method and system Download PDF

Info

Publication number
CN102148813B
CN102148813B CN 201010505825 CN201010505825A CN102148813B CN 102148813 B CN102148813 B CN 102148813B CN 201010505825 CN201010505825 CN 201010505825 CN 201010505825 A CN201010505825 A CN 201010505825A CN 102148813 B CN102148813 B CN 102148813B
Authority
CN
Grant status
Grant
Patent type
Prior art keywords
tcp
media content
server
media
transmission
Prior art date
Application number
CN 201010505825
Other languages
Chinese (zh)
Other versions
CN102148813A (en )
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
Grant date

Links

Abstract

本发明实施例提供了一种媒体内容的传输方法和系统。 Embodiment of the present invention provides a method and system for transmitting media content. 该方法主要包括:控制服务器在接收用户终端发送的媒体内容的传输请求后,与用户终端建立传输控制协议TCP连接,向媒体服务器发送媒体内容的传输参数和媒体内容的传输指令,所述媒体内容的传输参数包括控制服务器的TCP连接的源地址、目的地址和TCP报文的当前序列号,以使所述媒体服务器根据所述媒体内容的传输参数构造媒体内容的TCP报文,根据所述媒体内容的传输指令向所述用户终端发送所述媒体内容的TCP报文。 The method comprises: a control server after receiving the media content transmission request sent by the user terminal, the user terminal establishes a transmission control protocol TCP connection, the server sends the media content to the media transmission parameters of the transmission instruction and media content, the media content transmission control parameters include the server TCP connection source address, destination address, and a TCP packet sequence number of the current, so that the media server according to the configuration of the media content transmission parameters of the media content of the TCP packet according to the media transmission instruction transmitting the content of the media content to the user terminal TCP packets. 本发明实施例实现了媒体服务器利用控制服务器和用户终端之间的TCP连接向用户终端传输媒体内容,从而规避了UDP方式交互时中的NAT穿越问题,克服了在控制服务器侧占用两份带宽和过度消耗控制服务器资源的问题。 Embodiment of the present invention implements a TCP connection between a media server and a user terminal by the control server to the user terminal transmit media content, thereby circumventing the problem NAT traversal of UDP interaction overcomes the occupied bandwidth and the control server side two excessive consumption of server resources control problem.

Description

媒体内容的传输方法和系统 Method and system for transmitting media content

技术领域 FIELD

[0001] 本发明涉及通信技术领域,尤其涉及一种媒体内容的传输方法和系统。 [0001] The present invention relates to communications technologies, and in particular, to a media content transmission method and system.

背景技术 Background technique

[0002] 作为“三网融合”的重要形式,交互电视已经成为通信行业发展的重点业务方向,其终端用户的规模正在迅速扩张。 [0002] as an important form of "triple play" of interactive television has become the focus of the business direction of the development of the telecommunications industry, the size of its end-users are rapidly expanding. 交互电视的主要业务形态是通过用户终端为用户提供基于IP网络的直播、点播、录播、时移等音视频服务和其它增值类媒体服务。 The main business is to provide a form of interactive television broadcast IP-based network through a user terminal users, on-demand, recording and broadcasting, time-shifted audio and video and other value-added services and other media services category.

[0003] 为了确保终端用户的业务体验,0)N(Content Delivery Network,内容分发网络)系统通常致力于将媒体内容推送到部署在网络边缘的媒体服务器,通过媒体服务器向边缘节点提供媒体内容的传输服务。 [0003] In order to ensure end-user service experience, 0) N (Content Delivery Network, the content distribution network) systems typically committed to push content to the media server deployed at the network edge of the media, providing media content to the media server via the edge node transmission services. 由于边缘节点数量巨大,所有的内容均在CDN的边缘节点进行存储将需要大量的存储资源。 Due to the large number of edge nodes, all of the contents were carried out in the CDN edge node storage will require a lot of storage resources. 由于长尾效应的存在,大约80%的用户请求会集中在20%的媒体内容之上。 Due to long tail effect, about 80% of user requests will be concentrated on the 20% of the media content. 基于这一现象,CDN往往在边缘节点仅存放那些热门内容。 Based on this phenomenon, CDN is often stored in the edge node only those popular content. 但是随着媒体数字化进程的不断深化,媒体内容的数量在爆炸性的增长,即使仅在CDN边缘节点存放前20%的热门内容仍然会消耗终大量的存储资源。 But with the deepening of the process of digital media, the number of media content in the explosive growth, even if only in front of the CDN edge node store 20% of the final consumption of popular content will still be a lot of storage resources. 进一步分析终端用户对媒体内容即媒体文件的访问模型可以发现,对媒体文件文件头的访问量大于对媒体文件文件尾的访问量,在这种情况下,将一个每一文件分割为多个片段,在边缘节点仅存储部分较热的片段能够进一步降低边缘节点的存储消耗。 Further analysis of end-user access to media content, i.e., the model can be found media file, access to the media files is greater than the first amount of access to the end of the media files, in this case, each file is divided into a plurality of segments , only in the edge node storage section hotter fragments can be further reduced in the edge node storage consumption. 采用分片存储的另一个优势是:一个媒体内容的分片片段能够均匀的分布在边缘节点的多台服务器上,这样能够在很大程度上实现边缘节点服务器的负载均衡,实现对服务器资源的充分利用。 Another advantage of using the slice is stored: a slice segments of media content can be uniformly distributed over multiple server edge nodes, load balancing can be achieved so that the edge node server to a large extent, to achieve the server resources Take advantage of.

[0004] 现有技术中的第一种媒体服务器向用户终端传输媒体内容的方法为:用户终端向控制服务器发送媒体内容即媒体文件的传输请求,控制服务器根据上述媒体文件的存储情况选择相应的媒体服务器,该媒体服务器向上述用户终端发送上述媒体文件分片的数据包,直到整个媒体文件发送完毕或用户终端主动选择退出媒体文件的接收。 Method [0004] The prior art of a first media server terminal transmits media content to users: a user terminal sends a media content transmission request to the control server i.e., media file, select the control server according to the above storage medium file media server, the media server transmits the media file to the user terminal fragmented packet until the entire media file has been sent or received user terminal actively exits selected media file.

[0005] 在实现本发明过程中,发明人发现现有技术中的第一种媒体服务器向用户终端传输媒体内容的方法至少存在如下问题:存在NAT (Network AddressTranslation,网络地址转换)穿越问题。 [0005] In implementing the present invention, the inventor finds that the prior art in the presence of a first media server transmitting media content to the user terminal method at least the following problems: the presence of NAT (Network AddressTranslation, Network Address Translation) traversal problem. 在该方法中,控制服务器和用户终端之间采用TCP (Transmission ControlProtocol,传输控制协议)方式交互,媒体服务器和用户终端之间采用UDP(User DatagramProtocol,用户数据报文协议)方式交互。 In this method, the control using TCP (Transmission ControlProtocol, transmission control protocol) mode interaction between servers and user terminals, using (User DatagramProtocol, User Datagram Protocol) UDP mode interaction between the media server and the user terminal. 在用户终端处于私网、媒体服务器处于公网的情况下,媒体服务器为NAT设备,如果不在NAT设备上预先设定公网地址和私网地址的映射关系,NAT设备将无法把UDP报文转发至用户终端。 In the case where the user terminal is in a private network, the media server in the public network, the NAT device as the media server, if the predetermined address mapping relationship between the public network and private network address is not on a NAT device, the NAT device will not forward the UDP packet to the user terminal. 此外,媒体服务器与用户终端之间采用UDP方式交互,媒体内容的传输质量还需要额外的机制去保障。 In addition, the use of UDP interaction between the media server and the user terminal, the transmission quality of media content also requires additional mechanism to guarantee.

[0006] 现有技术中的第二种媒体服务器向用户终端传输媒体内容的方法为:用户终端向控制服务器发送媒体内容即媒体文件的传输请求,控制服务器根据上述媒体文件的存储情况选择相应的媒体服务器,该媒体服务器向控制服务器发送上述媒体文件的数据包,控制服务器将收到的数据包转发至用户终端,直到整个媒体文件发送完毕或用户终端主动选择退出媒体文件的接收。 Method [0006] A second prior art media server terminal transmits media content to a user: a user terminal sends a media content transmission request to the control server i.e., media file, select the control server according to the above storage medium file media server, the media server sends the packet to the control server of the above media file, the server will receive control packets forwarded to the user terminal, until the entire media file has been sent or received user terminal actively exits selected media file. [0007] 在实现本发明过程中,发明人发现现有技术中的第二种媒体服务器向用户终端传输媒体内容的方法至少存在如下问题:需要占用双倍带宽为一个用户终端提供媒体内容的传输服务,控制服务器还需要承担数据包的转发功能,限制了控制服务器的并发处理能力。 [0007] In implementing the present invention, the inventor finds that the prior art there is a problem the second media server to the user terminal at least the media content transmission method: take up double the bandwidth to provide media content to a user terminal transmission service control server also need for forwarding packets, limiting concurrency control server processing power.

发明内容 SUMMARY

[0008] 本发明的实施例提供了一种媒体内容的传输方法和系统,以实现媒体服务器利用控制服务器和用户终端之间的TCP连接向用户终端传输媒体内容。 Example [0008] The present invention provides a method and system for transmitting media content to the media server using TCP achieved between the control server and the user terminal is connected to the user terminal transmit media content.

[0009] 一种媒体内容的传输系统,包括:控制服务器,用于在接收用户终端发送的媒体内容的传输请求后,与所述用户终端之间建立传输控制协议TCP连接,并向媒体服务器发送所述媒体内容的传输参数;媒体服务器,用于根据所述控制服务器发送的所述媒体内容的传输参数构造所述媒体内容的TCP报文,向所述用户终端发送所述TCP报文。 [0009] A media content delivery system, comprising: a control server configured to, after receiving the media content transmission request sent by the user terminal, establishing a transmission control protocol between the user terminal and the TCP connection, and sends media server the transmission parameters of the media content; the media server, the TCP packet according to the transmission parameters configured by the control of the media content server sends the media content to the user terminal transmits the TCP packet.

[0010] 一种控制服务器,包括:传输控制协议TCP连接处理模块,用于当接收用户终端发送的媒体内容传输请求时,建立与用户终端的双向TCP连接;传输控制模块,用于根据所述传输请求中媒体内容信息选择向所述用户终端提供相应媒体内容的媒体服务器,并向所述媒体服务器发送所述媒体内容的传输指令;以及TCP流控模块,用于向所述媒体服务器发送所述媒体内容的传输参数,使得所述媒体服务器根据所述媒体内容的传输指令及传输参数向所述用户终端传输所述媒体内容。 [0010] A control server, comprising: a transmission control protocol TCP connection processing module, configured to, when receiving a media content transmission request sent by the user terminal, establishing a connection with a bidirectional TCP user terminal; transmission control module, according to the media content transmission request information selection provide media content to the user terminal a media server, and media server sends the transfer instruction of the media content; and TCP flow control means for transmitting to the media server the transmission parameters of said media content, such that the media server transmits the media content to the user terminal according to the media content transmission instruction and transmission parameters.

[0011] 一种媒体服务器,包括:传输控制协议TCP流控模块,用于接收控制服务器发送的媒体内容的传输参数和传输指令;TCP报文构造模块,用于根据所述媒体内容的传输参数构造媒体内容的TCP报文;以及传输控制模块,用于根据所述媒体内容的传输指令向用户终端发送所述媒体内容的TCP报文。 [0011] A media server, comprising: transmission control protocol (TCP) flow control means for controlling reception and transmission parameter transmission instruction sent by the media content server; TCP packet construction module, according to the transmission parameters for the media content configuration of the media content TCP packets; and a transmission control means for transmitting TCP packets according to the media content transmission instruction of the media content to the user terminal.

[0012] 由上述本发明的实施例提供的技术方案可以看出,本发明实施例实现了媒体服务器利用控制服务器和用户终端之间的TCP连接向用户终端传输媒体内容,既规避了媒体服务器和用户终端之间采用UDP方式交互时中的NAT穿越问题,又克服了在服务器侧占用两份带宽和过度消耗服务器资源的问题。 [0012] provided by embodiments of the present invention of the above it can be seen, the embodiment implements a TCP connection between a media server and a user terminal by the control server to the user terminal transmit media content according to the present invention, both the media server and the avoidance when using UDP way interaction between the user terminal in the NAT traversal problem, but also overcomes the problem of two occupied bandwidth server-side and over-consumption of server resources.

附图说明 BRIEF DESCRIPTION

[0013] 为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。 [0013] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, as briefly described in the introduction to the accompanying drawings required for describing the embodiments used Apparently, the drawings in the following description are only some embodiments of the present invention. embodiment, those of ordinary skill in the art is concerned, without any creative effort, and may also obtain other drawings based on these drawings.

[0014]图1为本发明实施例一提供的一种向用户终端传输媒体内容的系统的结构示意图; [0014] FIG. 1 is a schematic diagram of a structure of a terminal provided to a user media content transmission system of the embodiment of the present invention;

[0015] 图2为本发明实施例一提供的一种控制服务器的具体结构图; [0015] FIG. 2 diagram of a specific configuration of the control server according to a first embodiment of the present invention;

[0016] 图3为本发明实施例一提供的一种媒体服务器的具体结构图; [0016] FIG 3 a specific configuration diagram of a media server according to a first embodiment of the present invention;

[0017]图4为本发明实施例二提供的一种向用户终端传输媒体内容的方法的处理流程图; [0017] Figure 4 a process flow diagram according to a second method of transferring media content to the user terminal according to the present invention;

[0018]图5为本发明实施例三提供的一种向用户终端传输媒体内容的方法的处理流程图。 [0018] FIG. 5 is one kind of a process flow diagram according to a third method the user terminal communicating media content according to an example. 具体实施方式 detailed description

[0019] 为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。 [0019] In order that the invention object, technical solutions, and advantages of the embodiments more clearly, the following the present invention in the accompanying drawings, technical solutions of embodiments of the present invention are clearly and completely described, obviously, the described the embodiment is an embodiment of the present invention is a part, but not all embodiments. 基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。 Based on the embodiments of the present invention, those of ordinary skill in the art to make all other embodiments without creative work obtained by, it falls within the scope of the present invention.

[0020] 为便于对本发明实施例的理解,下面将结合附图以几个具体实施例为例做进一步的解释说明,且各个实施例并不构成对本发明实施例的限定。 [0020] To facilitate understanding of the embodiments of the present invention, following with reference to several specific embodiments Example embodiments further explanation, and not intended to limit the various embodiments embodiment of the present invention.

[0021] 实施例一 [0021] Example a

[0022] 该实施例提供的一种向用户终端传输媒体内容的系统结构示意图如图1所示,包括如下的设备: [0022] A schematic diagram of this embodiment provides the media content to the user terminal system shown in Figure 1, the apparatus comprising:

[0023] 控制服务器11,用于在接收用户终端13发送的媒体内容的传输请求后,与用户终端13建立双向的TCP连接,并向媒体服务器12发送媒体内容的传输参数以及媒体内容的传输指令,以实现媒体内容传输的控制。 [0023] The control server 11, the transmission request for the media content 13 sent from the receiving user terminal, the user terminal 13 to establish a two-way TCP connection, and transmission parameters and a media content transmission instruction of the media server sends the media content 12 to enable control of the media content transmission. 该媒体内容的传输参数:包括控制服务器11和用户终端13之间的TCP连接的源地址、目的地址和TCP报文的当前序列号。 The media content transmission parameters: the TCP connection includes a source address, destination address and TCP packets between the current sequence number 11 of the control server 13 and the user terminal. ,

[0024] 媒体服务器12,用于根据控制服务器11发送过来的所述媒体内容的传输参数构造媒体内容的TCP报文,根据控制服务器11发送过来的所述媒体内容的传输指令向所述用户终端13发送所述媒体内容的TCP报文。 [0024] The media server 12, the TCP packet according to the transmission parameters of the configuration of the media content sent from the control server 11 the media content, according to the transmission command sent from the control server 11 the media content to the user terminal sending the media content 13 of TCP packets. 该媒体服务器12具体可以是流服务器。 The media server 12 may be a particular streaming server.

[0025] 用户终端13,用于和控制服务器11建立双向的TCP连接,接收所述媒体服务器12发送的媒体内容的TCP报文。 [0025] The user terminal 13, and the control server 11 establishes a two-way TCP connection, receive the media content of the media server 12 transmits the TCP packets. 对于成功接收到的媒体内容的TCP报文,向控制服务器11发送TCP应答响应;对于网络传输中丢失的媒体内容的TCP报文,向控制服务器11发送TCP重传请求。 For TCP packets successfully received media content, in response to the control server sends a response TCP 11; transmission network for media content missing TCP packet, send a TCP retransmission request to the control server 11.

[0026] 上述控制服务器11的具体结构如图2所示,上述控制服务器11具体可以包括: [0026] The specific configuration of the control server 11 of FIG. 2, the control server 11 may specifically comprise:

[0027] TCP连接处理模块111,用于在接收用户终端13发送的媒体内容的传输请求后,通过和用户终端进行TCP协商,与用户终端建立双向的TCP连接。 [0027] TCP connection processing module 111, the transmission request for the media content 13 sent from the receiving user terminal and the user terminal via a TCP negotiation with the user terminal to establish a two-way TCP connection.

[0028] 传输控制模块112,用于在所述TCP连接处理模块111建立了和用户终端13之间的TCP连接后,根据所述传输请求中的媒体内容信息选择向用户终端13提供相应媒体内容的媒体服务器12,向所述媒体服务器12发送媒体内容的传输指令。 [0028] The transmission control module 112 for the TCP connection processing module 111 to establish a TCP connection between the post 13 and the user terminal is connected, according to the information of the media content transmission request in the selected media content to provide a user terminal 13 the media server 12, to the media server 12 sends the media content transmission instruction.

[0029] TCP流控模块113,用于向所述传输控制模块112选择的媒体服务器12发送媒体内容的传输参数,所述传输参数包括控制服务器11和用户终端13之间的TCP连接的源地址、目的地址和TCP报文的当前序列号。 [0029] TCP flow control module 113, the transmission parameters for the transmission control selection module 112 of the media server 12 sends the media content, the transmission parameter comprises a source address of the TCP connection between the control server 13 and the user terminal 11 , destination address and current TCP packet sequence number.

[0030] 进一步地,所述的TCP连接处理模块111,还用于和用户终端13之间进行心跳检测,检测和用户终端之间的TCP连接是否正常。 [0030] Further, the TCP connection handling module 111, and a user terminal is further configured to detect heartbeat 13 is between, between the TCP and a user terminal connected to the detection is normal.

[0031] 进一步地,所述的传输控制模块112,还用于根据和用户终端13之间的交互信息向媒体服务器12发送相应的状态切换指令,控制所述媒体服务器12在快进、快退、跳转、暂停、播放等状态间切换。 [0031] Preferably, the transmission control module 112, further instruction for switching the state of interaction and the user terminal 13 transmits information between the media server 12 to the respective, controlling the media server 12 in fast forward, rewind between states, jump, pause, play, etc. switch.

[0032] 进一步地,所述的传输控制模块112,还用于接收用户终端13发送的TCP应答响应或TCP重传请求后,将所述TCP应答响应或TCP重传请求发送给所述媒体服务器12 ;在进行媒体服务器12切换的过程中,当接到用户终端13发送的TCP应答响应或TCP重传请求后,若TCP应答响应或TCP重传请求对应的TCP序列号小于或等于切换前的媒体服务器12的最后TCP序列号,则将TCP应答响应或TCP重传请求发送给切换前的媒体服务器12 ;若TCP应答响应或TCP重传请求对应的TCP序列号大于切换前的媒体服务器12的最后TCP序列号,则将TCP应答响应或TCP重传请求发送给切换后的媒体服务器12。 After [0032] Preferably, the transmission control module 112 is also configured to receive a user terminal 13 transmits a TCP acknowledgment response or retransmission request TCP, the TCP TCP acknowledgment response or a retransmission request to the media server 12; the media server process 12 handover is performed, when the user terminal 13 transmits to the TCP of TCP acknowledgment response or retransmission request, if the TCP acknowledgment response or a retransmission request corresponding to TCP TCP sequence number less than or equal to the pre-handover Finally, the media server's TCP sequence number 12, then the TCP TCP acknowledgment response or a retransmission request is sent to the media server 12 before the handover; if TCP TCP acknowledgment response or a retransmission request corresponding to the TCP sequence number greater than before switching media server 12 Finally, TCP sequence number, then the TCP TCP acknowledgment response or a retransmission request is sent to the media server 12 after the switching.

[0033] 当上述用户终端13所请求的媒体内容的分片存储在多个媒体服务器12上时: [0033] When the slice when the user terminal 13 stores the requested media content in the media server 12 a plurality of:

[0034] 进一步地,所述的传输控制模块112,还用于选择多个媒体服务器12向所述用户终端13发送媒体内容,当控制服务器11接收到上一个媒体服务器12发送的携带最后一个TCP报文的序列号的通知消息后,向下一个媒体服务器12发送所述媒体内容的传输指令。 [0034] Preferably, the transmission control module 112 is further configured to select a plurality of media server 12 to the user terminal 13 sends the media content, control when carrying the last TCP server 11 receives a media server 12 to transmit the after the notification message sequence number of the packet, the next media server sends the media content transmission instruction 12.

[0035] 进一步地,所述的TCP流控模块113,还用于当控制服务器11接收到上一个媒体服务器12发送的携带最后一个TCP报文的序列号的通知消息后,向下一个媒体服务器12发送媒体内容的传输参数,所述传输参数包括控制服务器11和用户终端13之间的TCP连接的源地址、目的地址和上述通知消息中携带的最后一个TCP报文的序列号。 [0035] Further, the TCP flow control module 113 is further configured to control when the server 11 receives the notification message carries the sequence number of the last TCP packet sent by a media server 12, a media server downwardly 12 sends the media content transmission parameter, the transmission parameter comprises a control server 11 and the user terminal address of the TCP connection between the source 13 and the destination address of the notification message carries the last TCP packet sequence number.

[0036] 从而使得上述下一个媒体服务器12根据接收到的媒体内容的传输指令和媒体内容的传输参数,接替上述上一个媒体服务器12继续向所述用户终端13发送媒体内容的TCP报文。 [0036] such that said next media server 12 according to the received transmission instruction to the transmission parameters of the media content and media content to replace the upper one media server 12 continues to send the media content to the user terminal 13 TCP packets.

[0037] 上述媒体服务器12的具体结构如图3所示,上述媒体服务器12具体可以包括: [0037] The specific configuration of the media server 12 shown in Figure 3, the media server 12 described above may specifically include:

[0038] TCP流控模块121,用于接收所述控制服务器11发送的上述媒体内容的传输参数,所述传输参数包括控制服务器11和用户终端13之间的TCP连接的源地址、目的地址和TCP报文的当前序列号。 Transmission parameters [0038] TCP flow control module 121, for receiving the above-described control of the media content transmitted from the server 11 of the transmission parameters of the TCP connection includes a source address, destination address 13 between the control server 11 and the user terminal and current TCP packet sequence number. 将上述媒体内容的传输参数传输给TCP报文构造模块122。 Transmitting the above transmission parameters of the media content to the TCP packet construction module 122.

[0039] TCP报文构造模块122,用于根据接收到的所述TCP流控模块121发送的媒体内容的传输参数构造媒体内容的TCP报文。 [0039] TCP packet construction module 122 for TCP packet according to the transmission parameter configuration of the media content of the media content received by the TCP flow control module 121 sends. TCP报文构造模块121所构造的第一个TCP报文的序列号为上述媒体内容的传输参数中的TCP报文的当前序列号加一,TCP报文构造模块121所构造的TCP报文的源地址、目的地址为所述媒体内容的传输参数中的源地址、目的地址。 TCP packets constructing module 121 constructed in the first TCP packet sequence number parameter of the media content is transmitted in the TCP packet plus a current sequence number, TCP message constructing module 121 constructed of a TCP packet the source address of the source address, destination address of the media content transmission parameters, and the destination address.

[0040] 传输控制模块123,用于接收所述控制服务器11发送的上述媒体内容的传输指令,根据上述传输指令以控制服务器11的身份向所述用户终端13发送所述TCP报文构造模块122所构造的TCP报文。 [0040] The transmission control module 123, for receiving the control command of the media content transmission sent by the server 11, based on the transmission instructions to control the server 11 transmits the identity of the TCP packet construction module 122 to the user terminal 13 the structure of TCP packets.

[0041] 进一步地,所述的传输控制模块123,还用于根据控制服务器11发送的状态切换指令,在快进、快退、跳转、暂停、播放等状态间切换。 [0041] Preferably, the transmission control module 123, further instruction for switching the transmission according to the state of the control server 11, the switching between the fast forward, rewind, skip, pause, playback status.

[0042] 进一步地,所述的传输控制模块123,还用于接收到控制服务器11转发的来自用户终端13的TCP应答响应后,向所述用户终端13发送下一个TCP报文;还用于接收到控制服务器11转发的来自用户终端13的TCP重传请求后,向所述用户终端13重传相应的TCP报文。 [0042] Preferably, the transmission control module 123 is also configured to receive the control server 11 forwards the TCP acknowledgment response from the user terminal 13, the transmission to the user terminal 13 a TCP packet; for further the control server 11 receives the forwarded TCP retransmission request from the user terminal 13, corresponding to the user terminal 13 TCP packet retransmission.

[0043] 进一步地,所述的传输控制模块123,还用于当媒体内容的分片存储在多个媒体服务器12上时,在向用户终端13发送了所述媒体服务器12存储的分片中的所有媒体内容后,向控制服务器11发送携带其发送的最后一个TCP报文的序列号的通知消息。 [0043] Preferably, the transmission control module 123 is further configured to when the media content is stored on the slice 12, the slice 13 in the transmission of the media server to the user terminal 12 stores a plurality of media servers after all the media content is sent to the control server 11 a notification message carrying the last sequence number of the TCP packet it sends.

[0044] 该实施例实现了媒体服务器利用控制服务器和用户终端之间的TCP连接的源地址、目的地址,以控制服务器的身份向所述用户终端发送TCP报文。 [0044] This embodiment enables the source address of the TCP connection between the control server and the user terminal using the connection of the media server, a destination address, to control the identity of the server transmits TCP packets to the user terminal. 由于媒体服务器和用户终端之间没有采用UDP方式进行交互,从而规避了UDP方式交互时中的NAT穿越问题,媒体内容的传输质量也不需要额外的机制去保障。 In the absence of the use of UDP between media servers and user terminals to interact, thereby circumventing when UDP mode interaction NAT traversal problem, the transmission quality of media content does not require additional mechanisms to safeguard. 由于是通过媒体服务器而不是控制服务器向用户终端发送媒体数据,从而克服了在控制服务器侧占用两份带宽和过度消耗控制服务器资源的问题。 Since the media server is sent by the control server instead of the media data to the user terminal, thereby overcoming the problem of two occupied bandwidth control server-side control server and the excessive consumption of resources.

[0045] 该实施例通过将媒体内容的分片存储在多个媒体服务器上与TCP连接相互结合的方式向用户终端传输媒体内容的TCP报文,从而实现了多个媒体服务器接替向用户终端发送媒体内容的TCP报文,能够实现媒体服务器的负载均衡,实现对媒体服务资源的充分利用。 [0045] By this embodiment, on the plurality of media servers connected to the TCP segments to storing media content bonded to each other way of the media content to the user terminal transmits the TCP packets to achieve a plurality of media server transmits to the user terminal succeed TCP packets of media content, media server load balancing can be achieved, to achieve full utilization of the media service resources.

[0046] 该实施例通过控制服务器将接收到的用户终端发送的TCP应答响应或TCP重传请求都转发给媒体服务器,实现了媒体服务器根据用户终端的TCP报文的接收情况,向用户终端发送后续的或者重传媒体内容的TCP报文。 [0046] TCP to the embodiment by the control server the received user terminal transmits the acknowledgment response or TCP retransmission requests are forwarded to the media server, implements the media server based on the received case of TCP packets of the user terminal, transmits to the user terminal subsequent retransmission of media or content of TCP packets.

[0047] 实施例二 [0047] Second Embodiment

[0048] 基于上述图1所示的向用户终端传输媒体内容的系统,该实施例提供的一种向用户终端传输媒体内容的方法的处理流程如图4所示,包括如下的处理步骤: [0048] Based on the user terminal to the system for transferring media content shown in FIG. 1 A provided in the embodiment shown in FIG 4 includes the following processing steps to the processing flow of the method of transmission of the media content the user terminal shown in FIG:

[0049] 步骤41、控制服务器11在接收到用户终端13发送的媒体内容的传输请求后,与用户终端13之间建立TCP连接,向媒体服务器12发送媒体内容的传输参数和媒体内容的传输指令。 [0049] Step 41, the control server after receiving the media content transmission request transmitted from the user terminal 13, the user 13 establishes a TCP connection between the terminal 11, a transmission instruction to the media server and the media content transmission parameter transmitted media content 12 .

[0050] 控制服务器11在接收到用户终端13发送的媒体内容的传输请求后,和用户终端13协商用于传输媒体内容的协议,确定采用何种协议传输媒体内容。 [0050] The control server 11 after receiving the media content transmission request transmitted from the user terminal 13 and user terminal 13 negotiation protocol for transmission of media content, media content to determine which protocol employed. 上述传输媒体内容的协议可以为TCP协议或者UDP协议,当协商采用TCP协议传输媒体内容时,上述控制服务器11和用户终端13之间通过TCP协商建立TCP连接。 Said transmission protocol media content may be a TCP protocol or UDP protocol, the TCP protocol when the negotiation using the media content, the control server 11 and the user terminal 13 establishes a TCP connection between the TCP through negotiation.

[0051] 控制服务器11确定媒体内容的传输参数,该传输参数包括:控制服务器11和用户终端13之间的TCP连接的TCP源地址、TCP目的地址以及TCP连接的TCP报文的当前序列 [0051] The control unit 11 determines transmission parameters of the media content server, the transmission parameter comprises: a control server 11 and the source address of the user terminal TCP connection between the TCP 13 is, TCP destination addresses and the TCP packet sequence current TCP connection

县坐 County seat

V寸O Inch V O

[0052] 上述控制服务器11根据接收到的上述传输请求中的媒体内容信息选择向用户终端13提供媒体内容的媒体服务器12,向该媒体服务器12发送上述媒体内容的传输参数和媒体内容的传输指令。 Transmission instruction [0052] The control server 11 based on the selected transmission request received in the media content information providing media content to the user terminal 13 media server 12 transmits the media content to the media server 12 and the media content transmission parameters .

[0053] 步骤42,媒体服务器12根据接收到的媒体内容的传输参数构造媒体内容的TCP报文,根据接收到的媒体内容的传输指令向所述用户终端13发送媒体内容的TCP报文。 [0053] Step 42, the media server 12 according to the TCP packet transmission parameter configuration of the media content received media content, media content transmitted to the user terminal 13 is the TCP packet according to the received transmission instruction to the media content.

[0054] 上述媒体服务器12接收到上述媒体内容的传输指令和媒体内容的传输参数后,根据上述媒体内容的传输参数构造TCP报文。 After [0054] The media server 12 receives the transmission parameters of the media content and media content transmission instruction, configured TCP packet according to the transmission parameter of the media content. 上述媒体服务器12所构造的第一个TCP报文的序列号为上述媒体内容的传输参数中的TCP报文的当前序列号加一,所构造的TCP报文的源地址和目的地址为所述媒体内容的传输参数中的源地址和目的地址。 The transmission parameter of the media server 12 is constructed of a TCP packet sequence number in the media content above the TCP packets of the current sequence number plus one, the source and destination addresses are constructed as a TCP packet source and destination addresses of the transmission parameters of the media content.

[0055] 然后,上述媒体服务器12根据上述媒体内容的传输指令,以控制服务器11的身份向用户终端13发送上述构造的TCP报文。 [0055] Then, the media server 12 according to the above-described transmission command of the media content, to control the identity of the server 11 to the user terminal 13 transmits the configured TCP packets.

[0056] 该实施例实现了媒体服务器利用控制服务器和用户终端之间的TCP连接的源地址、目的地址,以控制服务器的身份向所述用户终端发送TCP报文。 [0056] This embodiment enables the source address of the TCP connection between the control server and the user terminal using the connection of the media server, a destination address, to control the identity of the server transmits TCP packets to the user terminal. 由于媒体服务器和用户终端之间没有采用UDP方式进行交互,从而规避了UDP方式交互时中的NAT穿越问题。 In the absence of the use of UDP between media servers and user terminals to interact, thereby circumventing when UDP mode interaction NAT traversal problem. 由于是通过媒体服务器而不是控制服务器向用户终端发送媒体数据,从而克服了在控制服务器侧占用两份带宽和过度消耗控制服务器资源的问题。 Since the media server is sent by the control server instead of the media data to the user terminal, thereby overcoming the problem of two occupied bandwidth control server-side control server and the excessive consumption of resources.

[0057] 实施例三[0058] 基于上述图1所示的向用户终端传输媒体内容的系统,以及上述图2所示的控制服务器和图3所示的媒体服务器的具体结构图,该实施例提供的ー种向用户终端传输媒体内容的方法的处理流程如图5所示,包括如下的处理步骤: [0057] Third Embodiment [0058] The specific configuration shown in FIG media server and the server based on the control system shown in FIG. 2 to the user terminal for transferring media content shown in Figure 1 above, and the above-described FIG. 3, this embodimentー seed processing flow to the user terminal a method for transferring media content shown in Figure 5 is provided, comprising the processing steps of:

[0059] 步骤51、控制服务器11在接收到用户终端13发送的媒体内容的传输请求后,与用户终端13之间建立TCP连接。 [0059] Step 51, the control server after receiving the media content transmission request transmitted from the user terminal 13, the user 13 establishes a TCP connection between the terminal 11.

[0060] 控制服务器11中的TCP连接处理模块111在接收到用户终端13发送的媒体内容的传输请求后,上述TCP连接处理模块111和用户终端13协商用于传输媒体内容的协议,确定采用何种协议传输媒体内容。 [0060] The control server 11 in the TCP connection processing module 111 after receiving a media content transmission request transmitted from the user terminal 13, the above TCP connection processing module 111 and the user terminal 13 negotiation protocol for communicating media content, determined using any kind of protocol to transmit media content. 上述传输媒体内容的协议可以为TCP协议或者UDP协议,当协商采用TCP协议传输媒体内容吋,上述TCP连接处理模块111和用户终端13之间通过TCP协商建立TCP连接。 Said transmission media content protocol may be the TCP protocol or UDP protocol, when the negotiated protocol transmission media content using TCP inches above TCP connection processing module 111 and the user terminal 13 establishes a TCP connection between the TCP through negotiation.

[0061]上述媒体内容可以包括:RTSP (Real-time Transport StreamingProtocol,实时流媒体传输协议)、HTTP(Hypertext Transfer Protocol,超文本传输协议)流等媒体内容。 [0061] The media content may include: RTSP (Real-time Transport StreamingProtocol, real-time streaming protocol), HTTP (Hypertext Transfer Protocol, Hypertext Transfer Protocol) streaming media content and the like.

[0062] 用户终端13需要定期向控制服务器11发送心跳消息,控制服务器11中的TCP连接处理模块111向用户终端13返回心跳响应,通过上述用户终端13和控制服务器11之间的心跳检测来检测上述用户终端11和控制服务器13之间的TCP连接的状态。 [0062] The user terminal 13 needs to periodically send a heartbeat message to the control server 11, the server 11 controls TCP connection processing module 111 returns to the user terminal 13 in response to a heartbeat by heartbeat between said user terminal 13 and the control server 11 to detect TCP connections between said user terminals 11 and 13 control server.

[0063] 步骤52、控制服务器11向媒体服务器13发送媒体内容的传输參数和媒体内容的传输指令。 [0063] Step 52, the control server 11 transmits the media content to the media server 13 transmit the transmission parameters and commands the media content.

[0064] 上述控制服务器11中的TCP流控模块113确定媒体内容的传输參数,该传输參数包括:控制服务器11和用户终端13之间的TCP连接的TCP源地址、TCP目的地址以及TCP连接的TCP报文的当前序列号等。 [0064] 113 determines transmission parameters of the media content 11 in the control server TCP flow control module, wherein the transmission parameter comprises: a control server 11 and the source address of the user terminal TCP connection between the TCP 13 is, the destination address and TCP TCP TCP connection packets of the current serial number.

[0065] 上述控制服务器11中的传输控制模块112根据接收到的上述传输请求中的媒体内容信息选择向用户终端13提供相应媒体内容的媒体服务器12,向该媒体服务器12发送上述媒体内容的传输參数和媒体内容的传输指令。 [0065] The control server 11 in the transmission control module 112 selects provide media content to the user terminal 13 based on the received transmission request to the media content information in the media server 12 transmits the media content to the media server 12 transmit transfer command parameter and media content.

[0066] 在实际应用中,当上述用户终端13请求传输的媒体内容的分片存储在多个媒体服务器12上时,控制服务器11中的传输控制模块112选择上述多个媒体服务器12向用户終端13发送媒体内容,向上述多个媒体服务器12中的存储上述媒体内容的起始分片的第ー个媒体内容服务器12发送上述媒体内容的传输參数和媒体内容的传输指令。 [0066] In practice, when the slice 13 stores media content transmission request to the user terminal 12. When a plurality of the media server, the control server 11 in the transmission control module 112 selects the plurality of the media server 12 to the user terminal 13 sends the media content, the media content 12 for storing the beginning segment to said second plurality of media servers ー media content server transmits the media content transmission command and transmission parameters of the media content 12.

[0067] 步骤53、上述媒体服务器12根据接收到的媒体内容的传输參数构造媒体内容的TCP报文,根据接收到的媒体内容的传输指令向所述用户終端13发送媒体内容的TCP报文。 [0067] Step 53, the media server 12 according to the above-described TCP packet transmission parameter configuration of the media content received media content according to the received transmission instruction to transmit media content in the media content to the user terminal 13 of the TCP packets .

[0068] 上述媒体服务器12中的TCP流控模块121接收到上述传输媒体内容的传输參数后,将上述传输參数传输给上述媒体服务器12中的TCP报文构造模块122。 After the TCP packet construction module [0068] The media server 12 in the TCP flow control module 121 receives the transmission parameters of the transmission of the media content, the above transmission parameters are transmitted to said media server 12 122. 上述TCP报文构造模块122根据上述媒体内容的传输參数构造TCP报文,所构造的第一个TCP报文的序列号为上述媒体内容的传输參数中的TCP报文的当前序列号加一,所构造的TCP报文的源地址和目的地址为所述媒体内容的传输參数中的源地址和目的地址。 Above TCP packet construction module 122 configured TCP packet according to the transmission parameters of the media content described above, the configuration of the first TCP packet sequence number parameter of the media content is transmitted in the TCP packet plus the current sequence number First, the configuration of the source address and destination address of the TCP packet as a source address and a destination address of the media content transmission parameters.

[0069] 然后,上述媒体服务器12中的传输控制模块123根据上述媒体内容的传输指令,以控制服务器11的身份向用户终端13发送上述构造的TCP报文。 [0069] Then, the above-described transmission control module 123 the media server 12 according to a transmission command of the media content, to control the identity of the server 11 to the user terminal 13 transmits the configured TCP packets.

[0070] 当上述用户终端13请求传输的媒体内容的分片存储在多个媒体服务器12上吋,当ー个媒体服务器12完成其保存的媒体内容的分片的发送后,则上述媒体服务器12中的传输控制模块123向控制服务器11发送携带其发送的最后ー个TCP报文的序列号的通知消息。 [0070] When the plurality of media servers 12 inches, when ー media server 12 completes its transmission of media content stored fragment, the fragment storage medium 13 above the media content transmission request to the server 12 the user terminal the transmission control module 123 transmits to the control server 11 transmits a notification message carrying the last ー a TCP packet sequence number. 控制服务器11根据上述通知消息中携帯的最后ー个TCP报文的序列号和上述媒体内容的所有分片在各个媒体服务器12中的存储情况,选择其他的媒体服务器12继续向上述用户终端发送媒体内容,并向该其他的媒体服务器12发送包含上述最后ー个TCP报文的序列号的媒体内容的传输參数和媒体内容的传输指令。 The control server 11 according to the notification message carrying Bands last ー a TCP packet sequence number and all the parts of the above-described media content in the storage case 12 in each of the media server, select a different media server 12 continues to send the media to the user terminal content, and other media server sends the transmission instruction and transmission parameters of the media content of the media content including the last ー a TCP packet sequence number is 12. 上述其它的媒体服务器12根据所述媒体内容的传输參数构造TCP报文,并根据上述媒体内容的传输指令向用户终端13发送所述TCP报文。 The another media server 12 configured TCP packet according to the transmission parameters of the media content, and transmits the TCP packet to the user terminal 13 according to the command of the media content transmission.

[0071] 上述控制服务器11中的传输控制模块112还用于根据和用户终端13之间的交互信息向媒体服务器12发送相应的状态切换指令,所述媒体服务器12中的传输控制模块123根据接收到的上述状态切换指令,在快进、快退、跳转、暂停、播放等状态间切換。 [0071] The control server 11 in the transmission control module 112 is further configured to transmit according to the state switching instruction to the media server 12 and the corresponding interaction information between the user terminal 13, the media server 12 according to the received transmission control module 123 to the state switching instruction, the switching between the fast forward, rewind, skip, pause, playback status.

[0072] 步骤54、用户终端13接收到媒体服务器12发送的媒体内容的TCP报文后,向控制服务器11返回TCP应答响应或TCP重传请求,上述控制服务器11将上述TCP应答响应或TCP重传请求转发给媒体服务器12。 After [0072] Step 54, the user terminal 13 receives the media content of the media server sends 12 a TCP packet, return to the TCP to the control server 11 an acknowledgment response or TCP retransmission request, the control server 11 the above TCP acknowledgment response or TCP weight request forwarded to the media server 12.

[0073] 用户终端13接收到媒体服务器12发送的媒体内容的TCP报文后,对于成功接收到的TCP报文,向控制服务器11发送TCP应答响应;对于网络传输中丢失的TCP报文,向控制服务器11发送TCP重传请求。 After [0073] the user terminal 13 receives the media content of the media server sends 12 a TCP packet, for the successfully received TCP packet, a response in response to the control server transmits TCP. 11; the network transmission loss of a TCP packet, the The control server 11 sends a TCP retransmission request. 控制服务器11中的传输控制模块112将接收到的用户终端13发送的TCP应答响应或TCP重传请求都转发给媒体服务器12。 Control server. 11 TCP transmission control module 13 sends 112 to the user terminal receives an acknowledgment response or TCP retransmission requests are forwarded to the media server 12.

[0074] 在进行媒体服务器切换的过程中,控制服务器11仍然会接到用户终端13发送的TCP应答响应或TCP重传请求。 [0074] handover procedure is performed the media server, the control server 11 to the TCP 13 is still transmitted from the user terminal an acknowledgment response or retransmission request TCP. 在这种情况下,控制服务器11将根据如下原则对上述TCP应答响应或TCP重传请求进行转发: In this case, the control server 11 to acknowledge response or TCP retransmission request is forwarded to the TCP based on the following principles described above:

[0075] 1、若TCP应答响应或TCP重传请求对应的TCP序列号小于或等于切换前的媒体服务器12的最后TCP序列号,则控制服务器11中的传输控制模块112将TCP应答响应或TCP重传请求发送给切換前的媒体服务器12 ; [0075] 1, if the TCP acknowledgment response or TCP retransmission request corresponding to the TCP sequence number is less than or equal to the before-switching media server last TCP sequence number 12, then control 11 in the server transmission control module 112 TCP acknowledgment response or TCP a retransmission request is sent to the media server 12 before the handover;

[0076] 2、若TCP应答响应或TCP重传请求对应的TCP序列号大于切换前的媒体服务器12的最后TCP序列号,则控制服务器11中的传输控制模块112将TCP应答响应或TCP重传请求发送给切換后的媒体服务器12。 [0076] 2, if the TCP acknowledgment response or TCP retransmission request corresponding to the TCP sequence number greater than before switching media server last TCP sequence number 12, then control 11 in the server transmission control module 112 TCP acknowledgment response or TCP retransmit request to the media server 12 after the switching.

[0077] 步骤55、媒体服务器12根据接收到的TCP应答响应或TCP重传请求,向用户终端13发送后续的或者重传媒体内容的TCP报文。 [0077] Step 55, the media server 12 based on the received TCP acknowledgment response or retransmission request TCP transmission or a subsequent retransmission of TCP packet of the media content to the user terminal 13.

[0078] 媒体服务器12中的传输控制模块123在接收到控制服务器11转发的TCP应答响应后,继续向用户终端发送后续的媒体内容的TCP报文;在接收到TCP重传请求后,向用户终端重传相应的媒体内容的TCP报文。 [0078] The media server to transmit the control module 12, 123, after receiving the control server 11 forwards a TCP acknowledgment response, continues to send the subsequent media content to the user terminal TCP packet; after receiving the TCP retransmission request to the user terminal corresponding media content retransmitted TCP packets.

[0079] 在进行媒体服务器12切换的过程中,控制服务器12接收到控制服务器11发送的包含上ー个媒体服务器12发送的最后ー个TCP报文的序列号的媒体内容的传输參数和媒体内容的传输指令,上述媒体服务器12根据所述媒体内容的传输參数构造TCP报文,并接替上ー个媒体服务器12向用户终端13发送TCP报文。 [0079] The media server process 12 handover is performed, the control server 12 receives the media transmission parameters comprise the ー media server 12 transmits a TCP packet ー last sequence number of the media content control server 11 transmits the transmission instruction content of the media server 12 configured TCP packet according to the transmission parameters of the media content, and to replace the ー media server 12 sends a TCP packet to the user terminal 13.

[0080] 该实施例实现了媒体服务器利用控制服务器和用户终端之间的TCP连接的源地址、目的地址,以控制服务器的身份向所述用户终端发送TCP报文。 [0080] This embodiment enables the source address of the TCP connection between the control server and the user terminal using the connection of the media server, a destination address, to control the identity of the server transmits TCP packets to the user terminal. 由于媒体服务器和用户終端之间没有采用UDP方式进行交互,从而规避了UDP方式交互时中的NAT穿越问题。 In the absence of the use of UDP between media servers and user terminals to interact, thereby circumventing when UDP mode interaction NAT traversal problem. 由于是通过媒体服务器而不是控制服务器向用户终端发送媒体数据,从而克服了在控制服务器侧占用两份带宽和过度消耗控制服务器资源的问题。 Since the media server is sent by the control server instead of the media data to the user terminal, thereby overcoming the problem of two occupied bandwidth control server-side control server and the excessive consumption of resources. [0081] 该实施例通过将媒体内容的分片存储在多个媒体服务器上与TCP连接相互结合的方式向用户终端传输媒体内容的TCP报文,从而实现了多个媒体服务器接替向用户终端发送媒体内容的TCP报文,能够实现媒体服务器的负载均衡,实现对媒体服务资源的充分利用。 [0081] By this embodiment, on the plurality of media servers connected to the TCP segments to storing media content bonded to each other way of the media content to the user terminal transmits the TCP packets to achieve a plurality of media server transmits to the user terminal succeed TCP packets of media content, media server load balancing can be achieved, to achieve full utilization of the media service resources.

[0082] 该实施例通过控制服务器将接收到的用户终端发送的TCP应答响应或TCP重传请求都转发给媒体服务器,实现了媒体服务器根据用户终端的TCP报文的接收情況,向用户终端发送后续的或者重传媒体内容的TCP报文。 [0082] TCP to the embodiment by the control server the received user terminal transmits the acknowledgment response or TCP retransmission requests are forwarded to the media server, implements the media server based on the received case of TCP packets of the user terminal, transmits to the user terminal subsequent retransmission of media or content of TCP packets.

[0083] 本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。 [0083] Those of ordinary skill in the art may understand that the above-described method embodiments all or part of the processes may be related hardware instructed by a computer program, the program may be stored in a computer readable storage medium. when the program is executed, the processes of the foregoing method embodiments. 其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory, ROM)或随机存储记忆体(Random AccessMemory, RAM)等。 Wherein the storage medium may be a magnetic disk, an optical disk, read-only memory (Read-Only Memory, ROM) or a random access memory (Random AccessMemory, RAM) and the like.

[0084] 综上所述,本发明实施例实现了媒体服务器利用控制服务器和用户终端之间的TCP连接的源地址、目的地址,以控制服务器的身份向所述用户终端发送TCP报文。 [0084] In summary, the embodiment implements TCP connection between the source address of the control server and the user terminal using the connection of the media server, the destination address of the present invention to control the identity of the server transmits TCP packets to the user terminal. 由于媒体服务器和用户终端之间没有采用UDP方式进行交互,从而规避了UDP方式交互时中的NAT穿越问题。 In the absence of the use of UDP between media servers and user terminals to interact, thereby circumventing when UDP mode interaction NAT traversal problem. 由于是通过媒体服务器而不是控制服务器向用户终端发送媒体数据,从而克服了在控制服务器侧占用两份带宽和过度消耗控制服务器资源的问题。 Since the media server is sent by the control server instead of the media data to the user terminal, thereby overcoming the problem of two occupied bandwidth control server-side control server and the excessive consumption of resources.

[0085] 该实施例通过将媒体内容的分片存储在多个媒体服务器上与TCP连接相互结合的方式向用户终端传输媒体内容的TCP报文,从而实现了多个媒体服务器接替向用户终端发送媒体内容的TCP报文,能够实现媒体服务器的负载均衡,实现对媒体服务资源的充分利用。 [0085] By this embodiment, on the plurality of media servers connected to the TCP segments to storing media content bonded to each other way of the media content to the user terminal transmits the TCP packets to achieve a plurality of media server transmits to the user terminal succeed TCP packets of media content, media server load balancing can be achieved, to achieve full utilization of the media service resources.

[0086] 该实施例通过控制服务器将接收到的用户终端发送的TCP应答响应或TCP重传请求都转发给媒体服务器,实现了媒体服务器根据用户终端的TCP报文的接收情況,向用户终端发送后续的或者重传媒体内容的TCP报文。 [0086] TCP to the embodiment by the control server the received user terminal transmits the acknowledgment response or TCP retransmission requests are forwarded to the media server, implements the media server based on the received case of TCP packets of the user terminal, transmits to the user terminal subsequent retransmission of media or content of TCP packets.

[0087] 本发明实施例无需额外引入应用层的可靠性机制,对用户終端和网络设备没有额外的要求,降低了实现的复杂度,适用于RTSP、HTTP和HTTPStreaming等多种媒体文件的传输。 Embodiment [0087] embodiment of the present invention, no additional reliability mechanism into the application layer, no additional requirements on the user terminal and network equipment, reducing the complexity of implementation, suitable for transmitting RTSP, HTTP HTTPStreaming and other media files.

[0088] 以上所述,仅为本发明较佳的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本发明的保护范围之内。 [0088] The above are only the preferred specific embodiments of the invention, but the scope of the present invention is not limited thereto, any skilled in the art in the art within the scope of the invention disclosed can be easily thought variations or replacements shall fall within the protection scope of the present invention. 因此,本发明的保护范围应该以权利要求的保护范围为准。 Accordingly, the scope of the present invention should be defined by the scope of the claims.

Claims (11)

  1. 1.一种媒体内容的传输系统,其特征在于,包括: 控制服务器,用于在接收用户终端发送的媒体内容的传输请求后,与所述用户终端之间建立传输控制协议TCP连接,并向媒体服务器发送所述媒体内容的传输参数; 媒体服务器,用于根据所述控制服务器发送的所述媒体内容的传输参数构造所述媒体内容的TCP报文,向所述用户终端发送所述TCP报文; 所述媒体内容的传输参数包括:所述控制服务器与所述用户终端之间建立的TCP连接的源地址、目的地址和TCP报文的当前序列号。 1. A system for the transmission of media content, characterized by comprising: a control server configured to, after receiving the media content transmission request sent by the user terminal, establishing a transmission control protocol between the user terminal and the TCP connection, and media server sends the media content transmission parameters; media server for controlling transmission parameters according to the configuration of the media content server sends the media content TCP packet, the TCP packet sent by the terminal to the user text; the transmission parameters of the media content comprises: controlling the source address of the TCP connection established between the server and the user terminal, the destination address and the current TCP packet sequence number.
  2. 2.一种控制服务器,其特征在于,包括: 传输控制协议TCP连接处理模块,用于当接收用户终端发送的媒体内容传输请求时,建立与用户终端的双向TCP连接; 传输控制模块,用于根据所述传输请求中媒体内容信息选择向所述用户终端提供相应媒体内容的媒体服务器,并向所述媒体服务器发送所述媒体内容的传输指令;以及TCP流控模块,用于向所述媒体服务器发送所述媒体内容的传输参数,使得所述媒体服务器根据所述媒体内容的传输指令及传输参数向所述用户终端传输所述媒体内容; 所述的媒体内容的传输参数包括:所述控制服务器与所述用户终端之间建立的TCP连接的源地址、目的地址和TCP报文的当前序列号。 A control server, comprising: transmission control protocol TCP connection processing module, configured to, when receiving a media content transmission request sent by the user terminal, establishing a connection with a bidirectional TCP user terminal; transmission control means for the media content transmission request information selection provide media content to the user terminal according to the media server, the media server to send the media content transmission instruction; and TCP flow control module, to the media for the server sends the media content transmission parameters, such that the media server terminal transmits the media content to the user according to the media content transmission instruction and transmission parameters; transmission parameters of the media content comprises: the control source address to the user terminal between the server and the TCP connection, TCP packet destination address and the current sequence number.
  3. 3.根据权利要求2所述的控制服务器,其特征在于: 所述TCP连接处理模块,还用于和用户终端之间进行心跳检测,检测控制服务器和用户终端之间的TCP连接是否正常。 3. The control server according to claim 2, wherein: detecting heartbeat TCP connection between the processing module is further configured and the user terminal, the TCP detection control between servers and user terminals connected properly.
  4. 4.根据权利要求2所述的控制服务器,其特征在于: 所述传输控制模块,还用于接收所述用户终端发送的TCP应答响应或TCP重传请求后,并将所述TCP应答响应或TCP重传请求发送给所述媒体服务器; 在进行媒体服务器切换的过程中,当接到用户终端发送的TCP应答响应或TCP重传请求后,若所述TCP应答响应或TCP重传请求对应的TCP序列号小于或等于切换前的媒体服务器的最后TCP序列号,则将所述TCP应答响应或TCP重传请求发送给切换前的媒体服务器;若所述TCP应答响应或TCP重传请求对应的TCP序列号大于切换前的媒体服务器的最后TCP序列号,则将所述TCP应答响应或TCP重传请求发送给切换后的媒体服务器。 4. The control server according to claim 2, wherein: the transmission control module is further used for receiving the TCP acknowledgment response transmitted by the user terminal or TCP retransmission request, and the TCP acknowledgment response or TCP retransmission request is sent to the media server; the media server handover process is performed, when the user terminal transmits the TCP receiving a TCP acknowledgment response or retransmission request, if the TCP acknowledgment response or a retransmission request corresponding to TCP TCP sequence number is less than or equal to the last TCP sequence number before the switching of the media server, then the TCP TCP acknowledgment response or a retransmission request is sent to the media server before the switching; if the TCP acknowledgment response or a retransmission request corresponding to TCP TCP sequence number greater than before switching media server TCP sequence number of the last, then the TCP TCP acknowledgment response or a retransmission request is sent to the media server after the handover.
  5. 5.根据权利要求2所述的控制服务器,其特征在于,当所述用户终端所请求的媒体内容的分片存储在多个媒体服务器上时: 所述传输控制模块,还用于选择多个媒体服务器向所述用户终端发送媒体内容,当所述传输控制模块接收到上一个媒体服务器发送的携带最后一个TCP报文的序列号的通知消息后,向下一个媒体服务器发送所述媒体内容的传输指令; 所述TCP流控模块,还用于传输控制模块接收到上一个媒体服务器发送的携带最后一个TCP报文的序列号的通知消息后,向下一个媒体服务器发送所述媒体内容的传输参数。 The control server according to claim 2, wherein, when the plurality of the media server storing the user terminal fragments requested media content: the transmission control module is further configured to select a plurality of the media server transmits the media content to the end user, when the transmission control module receives the notification message carries the sequence number of the last TCP packet sent by a media server, a media server sends down the media content transmission instruction; the TCP flow control module, a transmission control module is further configured to, after receiving the notification message carries the sequence number of the last TCP packet sent by a media server, a media server sends down the transmission of the media content parameter.
  6. 6.—种媒体服务器,其特征在于,包括: 传输控制协议TCP流控模块,用于接收控制服务器发送的媒体内容的传输参数和传输指令; TCP报文构造模块,用于根据所述媒体内容的传输参数构造媒体内容的TCP报文;以及传输控制模块,用于根据所述媒体内容的传输指令向用户终端发送所述媒体内容的TCP报文; 所述的媒体内容的传输参数包括:所述控制服务器与所述用户终端之间建立的TCP连接的源地址、目的地址和TCP报文的当前序列号。 6.- kinds of media server, characterized by comprising: a transmission control protocol TCP flow control means for receiving control parameters and transmission media content transmission instruction sent by the server; TCP packet construction module, according to the media content for the configuration of the media content transmission parameter TCP packets; and a transmission control module for transmission instruction sent by the terminal according to the media content to the user TCP packets of the media content; transmission parameters of the media content comprises: the said control source address of the TCP connection established between the server and the user terminal, the destination address and the current TCP packet sequence number.
  7. 7.根据权利要求6所述的媒体服务器,其特征在于: 所述传输控制模块,还用于接收到所述控制服务器转发的来自所述用户终端的TCP应答响应后,向所述用户终端发送后续的TCP报文;接收到所述控制服务器转发的来自所述用户终端的TCP重传请求后,向所述用户终端重传相应的TCP报文。 The media server according to claim 6, wherein: after the transmitting control module is further configured to receive a TCP acknowledgment response to the control from the server forwards the user terminal transmits to the user terminal subsequent TCP packet; receiving at the control server forwards the TCP retransmission from the user terminal the request, the user terminal to retransmit the corresponding TCP packet.
  8. 8.一种媒体内容的传输方法,其特征在于,包括: 控制服务器接收用户终端发送的媒体内容的传输请求; 建立所述控制服务器与用户终端的传输控制协议TCP连接; 向媒体服务器发送所述媒体内容的传输参数和所述媒体内容的传输指令,以使所述媒体服务器根据所述媒体内容的传输参数构造所述媒体内容的TCP报文,根据所述媒体内容的传输指令向所述用户终端发送所述媒体内容的TCP报文; 所述媒体内容的传输参数包括:所述控制服务器与所述用户终端之间建立的TCP连接的源地址、目的地址和TCP报文的当前序列号。 A method of transmitting media content, characterized by comprising: a control server receives the media content transmission request transmitted from the user terminal; establishing a transmission control protocol TCP control server and the user terminal; transmitting to the media server transmission instruction and transmission parameters of the media content of the media content to the media server according to the configuration of the media content transmission parameters of the TCP packet of the media content, the media content transmission instruction according to the user the terminal transmits the TCP packets of the media content; the transmission parameters of the media content comprises: controlling the source address of the TCP connection established between the server and the user terminal, the destination address and the current TCP packet sequence number.
  9. 9.根据权利要求8所述的媒体内容的传输方法,其特征在于,所述的方法还包括: 接收用户终端发送的TCP应答响应或TCP重传请求后,将所述TCP应答响应或TCP重传请求发送给所述媒体服务器。 9. The transmission method of claim 8 according to claim media content, wherein said method further comprises: TCP receiving user terminal after sending TCP acknowledgment response or retransmission request, the TCP acknowledgment response or TCP weight transmission request to the media server.
  10. 10.根据权利要求8所述的媒体内容的传输方法,其特征在于,所述方法还包括: 当接到用户终端发送的TCP应答响应或TCP重传请求后,若所述TCP应答响应或TCP重传请求对应的TCP序列号小于或等于切换前的媒体服务器的最后TCP序列号,则将所述TCP应答响应或TCP重传请求发送给切换前的媒体服务器;若所述TCP应答响应或TCP重传请求对应的TCP序列号大于切换前的媒体服务器的最后TCP序列号,则将所述TCP应答响应或TCP重传请求发送给切换后的媒体服务器。 10. The transmission method of claim 8 according to claim media content, wherein said method further comprises: receiving the user terminal when the TCP transmits a TCP acknowledgment response or retransmission request, if the TCP acknowledgment response or TCP retransmission request corresponding to the TCP sequence number less than or equal to the last TCP sequence number before the switching of the media server, then the TCP TCP acknowledgment response or a retransmission request is sent to the media server before the switching; if the TCP acknowledgment response or TCP retransmission request corresponding to the TCP sequence number TCP sequence number greater than the last before the switching of the media server, then the TCP TCP acknowledgment response or a retransmission request is sent to the media server after the handover.
  11. 11.根据权利要求8所述的媒体内容的传输方法,其特征在于,所述的方法还包括: 当所述用户终端所请求的媒体内容的分片存储在多个媒体服务器上时,选择多个媒体服务器向所述用户终端发送媒体内容,当接收到上一个媒体服务器发送的携带最后一个TCP报文的序列号的通知消息后,向下一个媒体服务器发送所述媒体内容的传输指令和所述媒体内容的传输参数,所述传输参数包括所述控制服务器和所述用户终端之间的TCP连接的源地址、目的地址和所述通知消息中携带的最后一个TCP报文的序列号。 11. The transmission method of claim 8 according to claim media content, wherein said method further comprises: when the user terminal fragment storage requested media content on multiple media servers, select multiple media server transmits the media content to the terminal user, after receiving the notification message carries the sequence number of the last TCP packet sent by a media server, the next transfer command of the media server sends the media content and said media content transmission parameter, the transmission parameter comprises a source address of the TCP connection between the control server and the user terminal is connected to the destination address and the notification last TCP packet sequence number carried in the message.
CN 201010505825 2010-09-30 2010-09-30 Media content transmission method and system CN102148813B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201010505825 CN102148813B (en) 2010-09-30 2010-09-30 Media content transmission method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201010505825 CN102148813B (en) 2010-09-30 2010-09-30 Media content transmission method and system

Publications (2)

Publication Number Publication Date
CN102148813A true CN102148813A (en) 2011-08-10
CN102148813B true CN102148813B (en) 2014-02-26

Family

ID=44422810

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201010505825 CN102148813B (en) 2010-09-30 2010-09-30 Media content transmission method and system

Country Status (1)

Country Link
CN (1) CN102148813B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102946389A (en) * 2012-11-01 2013-02-27 上海文广互动电视有限公司 Media service pushing system
WO2014117775A1 (en) * 2013-01-31 2014-08-07 Codemate A/S Network content delivery method using a delivery helper node

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0782072A1 (en) 1995-12-26 1997-07-02 Mitsubishi Denki Kabushiki Kaisha File server load distribution system and method
CN101123527A (en) 2007-02-25 2008-02-13 华为技术有限公司 A stream media system, signaling forward device and stream media transmission method
CN101137027A (en) 2006-11-23 2008-03-05 中兴通讯股份有限公司 Media slicing memory method
CN101365103A (en) 2007-08-06 2009-02-11 中国科学院声学研究所 Interactive service management method for cable television network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0782072A1 (en) 1995-12-26 1997-07-02 Mitsubishi Denki Kabushiki Kaisha File server load distribution system and method
CN101137027A (en) 2006-11-23 2008-03-05 中兴通讯股份有限公司 Media slicing memory method
CN101123527A (en) 2007-02-25 2008-02-13 华为技术有限公司 A stream media system, signaling forward device and stream media transmission method
CN101365103A (en) 2007-08-06 2009-02-11 中国科学院声学研究所 Interactive service management method for cable television network

Also Published As

Publication number Publication date Type
CN102148813A (en) 2011-08-10 application

Similar Documents

Publication Publication Date Title
US8386630B1 (en) Video-aware P2P streaming and download with support for real-time content alteration
US20120144445A1 (en) Method and apparatus for distributing video
US20120155464A1 (en) Communication node and communication method
US20090024754A1 (en) Assisted peer-to-peer media streaming
US20100284275A1 (en) Reliable network streaming of a single data stream over multiple physical interfaces
US20100268789A1 (en) Network caching for multiple contemporaneous requests
US20120300747A1 (en) Caching in mobile networks
US20100198979A1 (en) Media streaming through a network address translation (nat) device
US20090119734A1 (en) Distributed Cache Algorithms and System for Time-Shifted, and Live, Peer-to-Peer Video Streaming
CN101060427A (en) A system and method for realizing the remote software updating
US20130346562A1 (en) Data transmission method and apparatus for mobile terminal
CN102377823A (en) Method and system for realizing interactive sharing among multiple screens and multiple users by sliding screens
CN101534204A (en) Streaming media information distribution system and method thereof and user end
CN102802048A (en) Multi-screen interaction system and method
CN1909509A (en) System, method and user terminal for realizing video live broadcast in media distributing network
US20110302320A1 (en) Systems and methods for network content delivery
US20070239879A1 (en) Method and apparatus for router recovery
US20070160048A1 (en) Method for providing data and data transmission system
CN102355448A (en) Cloud streaming media data transmission method and system
US20150334153A1 (en) Low-Latency Streaming
CN101018318A (en) A stream media system, signaling forward device and stream media transmission method
CN101075948A (en) Method for realizing realtime fluid-medium programm reliable transmission
US9021134B1 (en) Media stream transport conversion within an intermediate network device
CN103813213A (en) Real-time video sharing platform and method based on mobile cloud computing
CN1468002A (en) Flow media compression, transmission and storage system based on internet

Legal Events

Date Code Title Description
C06 Publication
C10 Request of examination as to substance
C14 Granted