[go: up one dir, main page]

CN108270731A - A kind of data flow transmission method, device and relevant device - Google Patents

A kind of data flow transmission method, device and relevant device Download PDF

Info

Publication number
CN108270731A
CN108270731A CN201611260794.0A CN201611260794A CN108270731A CN 108270731 A CN108270731 A CN 108270731A CN 201611260794 A CN201611260794 A CN 201611260794A CN 108270731 A CN108270731 A CN 108270731A
Authority
CN
China
Prior art keywords
multicast
media source
data stream
address
udp
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN201611260794.0A
Other languages
Chinese (zh)
Inventor
张晓渠
梁建适
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201611260794.0A priority Critical patent/CN108270731A/en
Priority to PCT/CN2017/118912 priority patent/WO2018121584A1/en
Publication of CN108270731A publication Critical patent/CN108270731A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/61Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio
    • H04L65/611Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio for multicast or broadcast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/65Network streaming protocols, e.g. real-time transport protocol [RTP] or real-time control protocol [RTCP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/64Addressing
    • H04N21/6405Multicasting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/643Communication protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/643Communication protocols
    • H04N21/64322IP
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/835Generation of protective data, e.g. certificates
    • H04N21/8352Generation of protective data, e.g. certificates involving content or source identification data, e.g. Unique Material Identifier [UMID]

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

本发明公开了一种数据流传输方法,包括:针对第一媒体源的至少两路数据流,利用用户数据报协议(UDP)的不同端口号标识每路数据流;基于所述第一媒体源的组播互联网协议(IP)地址,将标识后的第一媒体源的至少两路数据流发出。本发明同时还公开了一种数据流传输装置、源设备、中间设备以及终端。

The invention discloses a data stream transmission method, comprising: for at least two data streams of a first media source, using different port numbers of the User Datagram Protocol (UDP) to identify each data stream; based on the first media source The multicast Internet Protocol (IP) address of the identified first media source sends at least two data streams. The invention also discloses a data stream transmission device, a source device, an intermediate device and a terminal.

Description

一种数据流传输方法、装置及相关设备A data stream transmission method, device and related equipment

技术领域technical field

本发明涉及互联网领域的组播传输技术,尤其涉及一种数据流传输方法、装置及相关设备。The present invention relates to multicast transmission technology in the Internet field, in particular to a data stream transmission method, device and related equipment.

背景技术Background technique

随着宽带互联网电视业务的飞速发展,组播传输技术在互联网传输中广泛应用,如在IPTV、OTT(Over The Top)技术中,经常使用组播传输技术来实现直播业务。With the rapid development of broadband Internet TV services, multicast transmission technology is widely used in Internet transmission. For example, in IPTV and OTT (Over The Top) technologies, multicast transmission technology is often used to realize live broadcast services.

在当前的直播业务中,一个组播组只能传输一种组播码流,同时一个频道会包含多路码流,所以一个频道的多路码流就需要多个组播组来传输。但是,组播组的资源是有限的,所以如何利用有限的组播组资源来传输多路数据流是目前亟待解决的问题。In the current live broadcast service, a multicast group can only transmit one kind of multicast stream, and a channel contains multiple streams, so multiple streams of a channel need to be transmitted by multiple multicast groups. However, the resources of the multicast group are limited, so how to use the limited multicast group resources to transmit multiple data streams is an urgent problem to be solved at present.

发明内容Contents of the invention

为解决现有存在的技术问题,本发明实施例提供一种数据流传输方法、装置及相关设备。In order to solve existing technical problems, embodiments of the present invention provide a data stream transmission method, device and related equipment.

本发明实施例的技术方案是这样实现的:The technical scheme of the embodiment of the present invention is realized like this:

本发明实施例提供了一种数据流传输方法,包括:An embodiment of the present invention provides a data stream transmission method, including:

针对第一媒体源的至少两路数据流,利用用户数据报协议(UDP,User DatagramProtocol)的不同端口号标识每路数据流;For at least two data streams of the first media source, use different port numbers of User Datagram Protocol (UDP, User Datagram Protocol) to identify each data stream;

基于所述第一媒体源的组播互联网协议IP地址,将标识后的第一媒体源的至少两路数据流发出。Based on the multicast Internet Protocol IP address of the first media source, at least two data streams of the identified first media source are sent out.

上述方案中,利用UDP的端口号标识每路数据流,包括:In the above scheme, the port number of UDP is used to identify each data flow, including:

在每路数据流的UDP报文头,封装一个目的端口号,所述至少两路数据流的目的端口号不同;Encapsulate a destination port number in the UDP packet header of each data flow, and the destination port numbers of the at least two data flows are different;

所述基于所述第一媒体源的组播IP地址,将标识后的第一媒体源的至少两路数据流发出,包括:The sending out at least two data streams of the identified first media source based on the multicast IP address of the first media source includes:

在IP报文头的目的地址添加所述第一媒体源对应的组播IP地址。Add the multicast IP address corresponding to the first media source to the destination address of the IP packet header.

上述方案中,所述第一媒体源的每路数据流的码率不同,或者,所述第一媒体源的每路数据流对应的场景画面的角度不同。In the above solution, the code rate of each data stream of the first media source is different, or the angles of the scenes corresponding to each data stream of the first media source are different.

本发明实施例还提供了一种数据流传输方法,包括:The embodiment of the present invention also provides a data stream transmission method, including:

接收数据流;receive data stream;

解析数据流,获得第一组播IP地址及UDP的至少两个端口号;Analyzing the data stream to obtain at least two port numbers of the first multicast IP address and UDP;

利用所述第一组播IP地址确定接收的数据流为第一媒体源的数据流;利用UDP的不同端口号识别第一媒体源的每路数据流;Utilize the first multicast IP address to determine that the data stream received is the data stream of the first media source; utilize the different port numbers of UDP to identify each data stream of the first media source;

针对接收的第一媒体源的至少两路数据流,利用UDP的不同端口号标识每路数据流;For at least two data streams of the first media source received, each data stream is identified by a different port number of UDP;

基于所述第一媒体源的第二组播IP地址,将标识后的第一媒体源的至少两路数据流发出。Based on the second multicast IP address of the first media source, at least two data streams of the identified first media source are sent out.

上述方案中,所述接收数据流,包括:In the above solution, the receiving data stream includes:

利用钩子函数,接收报文的IP报文头及UDP报文头、第一媒体源的至少两路数据流所形成的组播数据的完整报文;Utilize the hook function to receive the complete message of the multicast data formed by the IP message header and the UDP message header of the message, and at least two data streams of the first media source;

相应地,针对每个报文,解析所述IP报文头,获得第一组播IP地址;Correspondingly, for each message, analyze the IP message header to obtain the first multicast IP address;

解析所述UDP报文头,获得对应的一个UDP的端口号。The UDP packet header is parsed to obtain a corresponding UDP port number.

上述方案中,接收数据流之前,所述方法还包括:In the above solution, before receiving the data stream, the method further includes:

利用所述第一媒体源对应的第一组播IP地址,基于网际组管理协议(IGMP,Internet Group Management Protocol)加入所述第一媒体源的组播频道对应的组播组。Using the first multicast IP address corresponding to the first media source, join the multicast group corresponding to the multicast channel of the first media source based on Internet Group Management Protocol (IGMP, Internet Group Management Protocol).

上述方案中,基于IGMP加入所述第一媒体源的组播频道对应的组播组,包括:In the above solution, joining the multicast group corresponding to the multicast channel of the first media source based on IGMP includes:

利用所述第一媒体源对应的第一组播IP地址,生成IGMP报文;Using the first multicast IP address corresponding to the first media source to generate an IGMP message;

向交换机发送所述IGMP报文;所述IGMP报文用于请求加入所述第一媒体源的组播频道对应的组播组。Sending the IGMP message to the switch; the IGMP message is used to request to join the multicast group corresponding to the multicast channel of the first media source.

上述方案中,所述利用UDP的端口号标识每路数据流,包括:In the above scheme, the port number of UDP is used to identify each data flow, including:

在每路数据流的UDP报文头,封装一个目的端口号,所述至少两路数据流的目的端口号不同;Encapsulate a destination port number in the UDP packet header of each data flow, and the destination port numbers of the at least two data flows are different;

所述基于所述第一媒体源的第二组播IP地址,将标识后的第一媒体源的至少两路数据流发出,包括:The sending out at least two data streams of the identified first media source based on the second multicast IP address of the first media source includes:

在IP报文头的目的地址添加所述第一媒体源对应的第二组播IP地址。Add the second multicast IP address corresponding to the first media source to the destination address of the IP packet header.

上述方案中,所述第一媒体源的每路数据流的码率不同,或者,所述第一媒体源的每路数据流对应的场景画面的角度不同。In the above solution, the code rate of each data stream of the first media source is different, or the angles of the scenes corresponding to each data stream of the first media source are different.

本发明实施例又提供了一种数据流传输方法,包括:An embodiment of the present invention further provides a data stream transmission method, including:

接收数据流;receive data stream;

解析数据流,获得组播IP地址及UDP的至少两个端口号;Analyze the data stream to obtain at least two port numbers of the multicast IP address and UDP;

利用所述组播IP地址确定接收的数据流为第一媒体源的数据流;利用所述UDP的不同端口号识别第一媒体源的每路数据流。Using the multicast IP address to determine that the received data flow is the data flow of the first media source; using the different port numbers of the UDP to identify each data flow of the first media source.

上述方案中,所述接收数据流,包括:In the above solution, the receiving data stream includes:

利用钩子函数,接收报文的IP报文头及UDP报文头、第一媒体源的至少两路数据流所形成的组播数据的完整报文;Utilize the hook function to receive the complete message of the multicast data formed by the IP message header and the UDP message header of the message, and at least two data streams of the first media source;

相应地,针对每个报文,解析所述IP报文头,获得组播IP地址;Correspondingly, for each message, analyze the IP message header to obtain a multicast IP address;

解析所述UDP报文头,获得对应的一个UDP的端口号。The UDP packet header is parsed to obtain a corresponding UDP port number.

上述方案中,接收数据流之前,所述方法还包括:In the above solution, before receiving the data stream, the method further includes:

利用所述第一媒体源对应的组播IP地址,基于IGMP加入所述第一媒体源的组播频道对应的组播组。Join the multicast group corresponding to the multicast channel of the first media source based on IGMP by using the multicast IP address corresponding to the first media source.

上述方案中,基于IGMP加入所述第一媒体源的组播频道对应的组播组,包括:In the above solution, joining the multicast group corresponding to the multicast channel of the first media source based on IGMP includes:

利用所述第一媒体源对应的组播IP地址,生成IGMP报文;Using the multicast IP address corresponding to the first media source to generate an IGMP message;

向交换机发送所述IGMP报文;所述IGMP报文用于请求加入所述第一媒体源的组播频道对应的组播组。Sending the IGMP message to the switch; the IGMP message is used to request to join the multicast group corresponding to the multicast channel of the first media source.

上述方案中,所述第一媒体源的每路数据流的码率不同,或者,所述第一媒体源的每路数据流对应的场景画面的角度不同。In the above solution, the code rate of each data stream of the first media source is different, or the angles of the scenes corresponding to each data stream of the first media source are different.

本发明实施例还提供了一种数据流传输装置,包括:The embodiment of the present invention also provides a data stream transmission device, including:

第一标识模块,用于针对第一媒体源的至少两路数据流,利用UDP的不同端口号标识每路数据流;The first identification module is used for at least two data streams of the first media source, using different port numbers of UDP to identify each data stream;

第一发送单元,基于所述第一媒体源的IP地址,将标识后的第一媒体源的至少两路数据流发出。The first sending unit sends the identified at least two data streams of the first media source based on the IP address of the first media source.

上述方案中,所述第一标识模块,具体用于在每路数据流的UDP报文头,封装一个目的端口号,所述至少两路数据流的目的端口号不同;In the above scheme, the first identification module is specifically used to encapsulate a destination port number in the UDP header of each data flow, and the destination port numbers of the at least two data flows are different;

所述第一发送单元,具体用于在IP报文头的目的地址添加所述第一媒体源对应的组播IP地址。The first sending unit is specifically configured to add the multicast IP address corresponding to the first media source to the destination address of the IP packet header.

本发明实施例又提供了一种数据流传输装置,包括:An embodiment of the present invention further provides a data stream transmission device, including:

第一接收单元,用于接收数据流;a first receiving unit, configured to receive a data stream;

第一解析单元,用于解析数据流,获得第一组播IP地址及UDP的至少两个端口号;The first parsing unit is used for parsing the data flow to obtain the first multicast IP address and at least two port numbers of UDP;

第一识别单元,用于利用所述第一组播IP地址确定接收的数据流为第一媒体源的数据流;利用所述UDP的不同端口号识别第一媒体源的每路数据流;The first identifying unit is configured to use the first multicast IP address to determine that the received data stream is the data stream of the first media source; utilize the different port numbers of the UDP to identify each data stream of the first media source;

第二标识模块,用于针对接收的第一媒体源的至少两路数据流,利用UDP的不同端口号标识每路数据流;The second identification module is used for at least two data streams of the first media source received, using different port numbers of UDP to identify each data stream;

第二发送单元,用于基于所述第一媒体源的第二IP地址,将标识后的第一媒体源的至少两路数据流发出。The second sending unit is configured to send the identified at least two data streams of the first media source based on the second IP address of the first media source.

上述方案中,所述装置还包括:In the above scheme, the device also includes:

第一加入单元,用于利用所述第一媒体源对应的第一组播IP地址,基于IGMP加入所述第一媒体源的组播频道对应的组播组。The first joining unit is configured to use the first multicast IP address corresponding to the first media source to join the multicast group corresponding to the multicast channel of the first media source based on IGMP.

本发明实施例还提供了一种数据传输流装置,包括:The embodiment of the present invention also provides a data transmission stream device, including:

第二接收单元,用于接收数据流;a second receiving unit, configured to receive a data stream;

第二解析单元,用于解析数据流,获得组播IP地址及UDP的至少两个端口号;The second parsing unit is used for parsing the data flow to obtain at least two port numbers of the multicast IP address and UDP;

第二识别单元,用于利用所述组播IP地址确定接收的数据流为第一媒体源的数据流;利用所述UDP的不同端口号识别第一媒体源的每路数据流。The second identifying unit is configured to use the multicast IP address to determine that the received data flow is the data flow of the first media source; and use the different port numbers of the UDP to identify each data flow of the first media source.

上述方案中,所述装置还包括:In the above scheme, the device also includes:

第二加入单元,用于利用所述第一媒体源对应的组播IP地址,基于IGMP加入所述第一媒体源的组播频道对应的组播组。The second joining unit is configured to use the multicast IP address corresponding to the first media source to join the multicast group corresponding to the multicast channel of the first media source based on IGMP.

本发明实施例还提供了一种源设备,包括:The embodiment of the present invention also provides a source device, including:

第一处理器,用于针对第一媒体源的至少两路数据流,利用用户数据报UDP的不同端口号标识每路数据流;The first processor is used for at least two data streams of the first media source, using different port numbers of the user datagram UDP to identify each data stream;

第一通信接口,用于基于所述第一媒体源的组播IP地址,将标识后的第一媒体源的至少两路数据流发出。The first communication interface is configured to send out at least two data streams of the identified first media source based on the multicast IP address of the first media source.

本发明实施例又提供了一种中间设备,包括:An embodiment of the present invention provides an intermediate device, including:

第二通信接口,用于接收数据流;The second communication interface is used to receive the data stream;

第二处理器,用于解析数据流,获得第一组播IP地址及UDP的至少两个端口号;利用所述第一组播IP地址确定接收的数据流为第一媒体源的数据流;利用UDP的不同端口号识别第一媒体源的每路数据流;以及针对接收的第一媒体源的至少两路数据流,利用UDP的不同端口号标识每路数据流;The second processor is used to analyze the data flow, and obtain at least two port numbers of the first multicast IP address and UDP; use the first multicast IP address to determine that the received data flow is the data flow of the first media source; Using different port numbers of UDP to identify each data stream of the first media source; and for at least two data streams of the first media source received, using different port numbers of UDP to identify each data stream;

所述第二通信接口,还用于基于所述第一媒体源的第二组播IP地址,将标识后的第一媒体源的至少两路数据流发出。The second communication interface is further configured to send out at least two data streams of the identified first media source based on the second multicast IP address of the first media source.

本发明实施例还提供了一种终端,包括:The embodiment of the present invention also provides a terminal, including:

第三通信接口,用于接收数据流;The third communication interface is used to receive the data stream;

第三处理器,用于解析数据流,获得组播IP地址及UDP的至少两个端口号;利用所述组播IP地址确定接收的数据流为第一媒体源的数据流;以及利用所述UDP的不同端口号识别第一媒体源的每路数据流。The third processor is used to analyze the data flow to obtain at least two port numbers of the multicast IP address and UDP; use the multicast IP address to determine that the received data flow is the data flow of the first media source; Different port numbers of UDP identify each data stream of the first media source.

本发明实施例提供的数据流传输方法、装置及相关设备,针对第一媒体源的至少两路数据流,利用UDP的不同端口号标识每路数据流;基于所述第一媒体源的组播IP地址,将标识后的第一媒体源的至少两路数据流发出;接收数据流;解析数据流,获得组播IP地址及UDP的至少两个端口号;利用所述组播IP地址确定接收的数据流为第一媒体源的数据流;利用UDP的不同端口号识别第一媒体源的每路数据流,也就是说,传输媒体源的多路数据流时,采用组播IP地址区分不同的媒体源,采用不同的UDP端口号来区分一个媒体源即同一组播组下的不同路数据流,如此,大大减少了占用的组播组资源。同时,基于所述第一媒体源的组播IP地址,将标识后的第一媒体源的至少两路数据流发出,完全遵循IGMP,可以和现有的网络具有很好地兼容性。The data stream transmission method, device and related equipment provided by the embodiments of the present invention, for at least two data streams of the first media source, use different port numbers of UDP to identify each data stream; multicast based on the first media source The IP address sends at least two data streams of the identified first media source; receives the data stream; parses the data stream to obtain at least two port numbers of the multicast IP address and UDP; utilizes the multicast IP address to determine receiving The data stream of the first media source is the data stream of the first media source; use different port numbers of UDP to identify each data stream of the first media source, that is to say, when transmitting multiple data streams of the media source, the multicast IP address is used to distinguish different Different media sources use different UDP port numbers to distinguish a media source, that is, different data streams under the same multicast group. In this way, the occupied multicast group resources are greatly reduced. At the same time, based on the multicast IP address of the first media source, at least two data streams of the identified first media source are sent out, fully complying with IGMP, and having good compatibility with existing networks.

附图说明Description of drawings

在附图(其不一定是按比例绘制的)中,相似的附图标记可在不同的视图中描述相似的部件。具有不同字母后缀的相似附图标记可表示相似部件的不同示例。附图以示例而非限制的方式大体示出了本文中所讨论的各个实施例。In the drawings (which are not necessarily drawn to scale), like reference numerals may describe like parts in different views. Similar reference numbers with different letter suffixes may indicate different instances of similar components. The drawings generally illustrate the various embodiments discussed herein, by way of example and not limitation.

图1为本发明实施例一一种数据流的传输方法流程示意图;FIG. 1 is a schematic flow diagram of a data stream transmission method according to an embodiment of the present invention;

图2为本发明实施例一第二种数据流的传输方法流程示意图;2 is a schematic flowchart of a second data stream transmission method according to Embodiment 1 of the present invention;

图3为本发明实施例一第三种数据流的传输方法流程示意图;3 is a schematic flowchart of a third data stream transmission method according to Embodiment 1 of the present invention;

图4为本发明实施例二一种数据流传输装置结构示意图;FIG. 4 is a schematic structural diagram of a data stream transmission device according to Embodiment 2 of the present invention;

图5为本发明实施例二第二种数据流传输装置结构示意图;5 is a schematic structural diagram of a second data stream transmission device according to Embodiment 2 of the present invention;

图6为本发明实施例二第三种数据流传输装置结构示意图;6 is a schematic structural diagram of a third data stream transmission device according to Embodiment 2 of the present invention;

图7为本发明实施例三实现组播组支持多路数据流的传输装置结构示意图;7 is a schematic structural diagram of a transmission device for realizing multicast group support for multiple data streams according to Embodiment 3 of the present invention;

图8为本发明实施例三组播频道源设备到组播频道接入服务器之间的组网示意图;8 is a schematic diagram of a network between a multicast channel source device and a multicast channel access server according to Embodiment 3 of the present invention;

图9为本发明实施例三CDN节点之间的组网示意图;FIG. 9 is a schematic diagram of networking between CDN nodes in Embodiment 3 of the present invention;

图10为本发明实施例三CDN节点至终端之间的组网示意图;FIG. 10 is a schematic diagram of a network between a CDN node and a terminal according to Embodiment 3 of the present invention;

图11为本发明实施例三VR直播业务对应的组网示意图。FIG. 11 is a schematic diagram of a network corresponding to a VR live broadcast service according to Embodiment 3 of the present invention.

具体实施方式Detailed ways

下面结合附图及实施例对本发明再作进一步详细的描述。The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments.

在描述本发明实施例之前,先了解一下相关技术。Before describing the embodiments of the present invention, it is necessary to understand related technologies first.

在传统的IPTV应用中,频道直播往往使用组播传输,一般来说,一路频道只有一种码率,所以需要一个组播组(对应一条组播路由条目)传输一种组播码流。当同一名称频道(比如CCTV1)存在有标清和高清两种码率时,仍然按照两路频道来处理,所以这两种码率的数据流需要占用两个组播组进行传输。In traditional IPTV applications, multicast transmission is often used for channel live broadcast. Generally speaking, one channel has only one bit rate, so a multicast group (corresponding to a multicast routing entry) is required to transmit a multicast bit stream. When the same name channel (such as CCTV1) has two code rates of standard definition and high definition, it is still processed as two channels, so the data streams of these two code rates need to occupy two multicast groups for transmission.

同时,在OTT技术的应用中,一路频道有多种码率,但是这多种码率的数据流中的每种码率的数据流仍然是按照一路频道来处理的,由终端的播放器来选择使用相应码率的数据流。这种情况下,通常处理方法也是将每种码率的数据流单独做成一路组播组,这样一来,一路频道往往就占用了多个组播组,也就占用了多条组播路由条目。At the same time, in the application of OTT technology, one channel has multiple bit rates, but the data streams of each bit rate in the data streams of these multiple bit rates are still processed according to one channel, and the terminal player Select the data stream that uses the corresponding code rate. In this case, the usual processing method is to make the data stream of each code rate into a multicast group separately. In this way, one channel often occupies multiple multicast groups, and also occupies multiple multicast routes. entry.

另外,随着虚拟现实(VR,Virtual Reality)技术的快速发展,全景视频的应用也越来越广泛,这种应用给用户带来了真实感很强的视频体验。支持VR的全景直播越来越热门,组播技术在直播应用中有天然的优势,而全景直播中,存在不同角度的场景画面使用多路码流传输的情况,而且,有时候为了节省带宽,不同角度的场景画面需要使用不同的编码速率,那么就会存在一路直播需要传输多路码流的情况,在这种情况下,按照传统的组播传输方式,只能使用多个组播组来传输一个频道的多路码流。In addition, with the rapid development of virtual reality (VR, Virtual Reality) technology, the application of panoramic video is becoming more and more extensive, and this application brings a very realistic video experience to users. Panoramic live broadcast that supports VR is becoming more and more popular. Multicast technology has natural advantages in live broadcast applications. In panoramic live broadcast, scenes from different angles are transmitted using multiple streams. In addition, sometimes in order to save bandwidth, Scene pictures from different angles need to use different encoding rates, so there will be situations where multiple streams need to be transmitted for one live broadcast. In this case, according to the traditional multicast transmission method, only multiple multicast groups can be used. Transmit multiple streams of a channel.

然而,随着广播电视业务的大力发展,现在直播频道的数量越来越多,目前已经提出了需要支持上千路频道数量的需求,如果按照一路频道有超清、高清和标清三种码率,那么按照传统的组播传输方式,要占用的组播组数量就很大了。However, with the vigorous development of the radio and television business, the number of live channels is increasing, and the demand for supporting thousands of channels has been put forward. , then according to the traditional multicast transmission mode, the number of multicast groups to be occupied is very large.

进行组播传输时,需要内容分发网络(CDN,Content Delivery Networks)服务器接口网卡、协议栈的组播路由条目和承载网路由器上组播组的数量这些组播组资源,然而这些组播组资源(即组播路由条目数量)都是有限的,也就是说组播路由条目是紧缺资源。When performing multicast transmission, the multicast group resources such as the content distribution network (CDN, Content Delivery Networks) server interface network card, the multicast routing entries of the protocol stack, and the number of multicast groups on the bearer network router are required. However, these multicast group resources (That is, the number of multicast routing entries) is limited, that is to say, multicast routing entries are scarce resources.

所以如何在有限的组播组路由条目的基础上实现组播组传输多路数据流是目前需要解决的问题。So how to implement multicast group transmission of multiple data streams on the basis of limited multicast group routing entries is a problem that needs to be solved at present.

同时,一方面,在组播传输技术中,一般都是使用IGMP来控制和管理组播组,基于IGMP直接与组播主机联系,运行IGMP的路由器负责管理组成员的加入、离开,并维护组成员关系。At the same time, on the one hand, in the multicast transmission technology, IGMP is generally used to control and manage the multicast group. Based on IGMP, it directly contacts the multicast host. The router running IGMP is responsible for managing the joining and leaving of group members, and maintaining the group membership.

表1示出了IGMP报文的格式。从表1可以看出,在IGMP报文中,主要字段包含版本、类型、校验和以及组播地址。Table 1 shows the format of the IGMP message. It can be seen from Table 1 that in an IGMP message, the main fields include version, type, checksum and multicast address.

表1Table 1

其中,版本字段包含IGMP版本标识,目前有V1、V2和V3三个版本。Wherein, the version field includes the IGMP version identifier, currently there are three versions V1, V2 and V3.

类型字段包含:成员关系查询(0x11)以及成员关系报告(0x12)。The Type field includes: Membership Query (0x11) and Membership Report (0x12).

校验和,用于对IGMP报文进行校验。Checksum, used to check IGMP packets.

当类型字段表征一个成员关系报告时,组地址字段包含组播地址。当类型字段表征成员关系查询时,组地址字段为0,并被主机忽略。When the Type field represents a Membership Report, the Group Address field contains the multicast address. When the type field represents a membership query, the group address field is 0 and is ignored by the host.

另一方面,表2示出了UDP报文格式。On the other hand, Table 2 shows the UDP message format.

表2Table 2

从表2中可以看出,UDP报文包含:源端口和目的端口,表示数据报文长度的字段,UDP数据报文校验和,以及UDP数据。It can be seen from Table 2 that the UDP message includes: a source port and a destination port, a field indicating the length of the data message, a checksum of the UDP data message, and UDP data.

从IGMP规范和报文格式可以看出,在控制和管理组播组时,IGMP只跟组播组的IP地址有关系,跟IP上承载的UDP的端口没有关系。而组播组数据报文是承载在IP和UDP之上的,因此,在某个组播组上传输多端口的数据流是可行的,也不影响IGMP本身协议族的正常运行。It can be seen from the IGMP specification and message format that when controlling and managing a multicast group, IGMP is only related to the IP address of the multicast group, and has nothing to do with the UDP port carried by the IP. However, multicast group data packets are carried on IP and UDP. Therefore, it is feasible to transmit multi-port data streams on a certain multicast group, and it does not affect the normal operation of the IGMP protocol suite itself.

基于此,在本发明的各种实施例中:传输媒体源的多路数据流时,采用组播IP地址区分不同的媒体源,采用不同的UDP端口号来区分一个媒体源即同一组播组下的不同数据流。Based on this, in various embodiments of the present invention: when transmitting multiple data streams of media sources, multicast IP addresses are used to distinguish different media sources, and different UDP port numbers are used to distinguish one media source, that is, the same multicast group different streams of data.

实施例一Embodiment one

本发明实施例数据流的传输方法,具体来说是一种组播组多数路数据流的传输方法,应用于组播网络中组播频道源设备,如图1所示,包括以下步骤:The method for transmitting data streams in the embodiment of the present invention is specifically a method for transmitting multi-channel data streams in a multicast group, which is applied to a multicast channel source device in a multicast network, as shown in FIG. 1 , including the following steps:

步骤101:针对第一媒体源的至少两路数据流,利用UDP的不同端口号标识每路数据流;Step 101: For at least two data streams of the first media source, use different UDP port numbers to identify each data stream;

具体地,在每路数据流的UDP报文头,封装一个目的端口号,所述至少两路数据流的目的端口号不同。Specifically, a destination port number is encapsulated in the UDP packet header of each data flow, and the destination port numbers of the at least two data flows are different.

这里,实际应用时,所述第一媒体源的每路数据流的码率可以不同;或者,当在VR直播场景下时,所述第一媒体源的每路数据流对应的场景画面的角度不同。Here, in actual application, the code rate of each data stream of the first media source may be different; or, when in a VR live broadcast scene, the angle of the scene picture corresponding to each data stream of the first media source different.

实际应用时,可以根据需要设置不同的UDP的端口号,以标识第一媒体源的不同的数据流。举个例子来说,假设数据流有高清、标清、以及流畅三路数据流,可以根据业务需要,设置三个偶数的端口号,比如902、904、906,来分别标识高清、标清以及流畅三路数据流。In practical applications, different UDP port numbers may be set as required to identify different data streams of the first media source. For example, assuming that the data stream has three data streams: high-definition, standard-definition, and smooth, you can set three even-numbered port numbers, such as 902, 904, and 906, to identify the high-definition, standard-definition, and smooth three-way data streams according to business needs. road data flow.

步骤102:基于所述第一媒体源的组播IP地址,将标识后的第一媒体源的至少两路数据流发出。Step 102: Based on the multicast IP address of the first media source, send at least two data streams of the identified first media source.

具体地,在IP报文头的目的地址添加所述第一媒体源对应的组播IP地址,当在IP报文头的目的地址添加所述第一媒体源对应的组播IP地址后,第一媒体源的至少两路数据流以IP报文的方式呈现。Specifically, add the multicast IP address corresponding to the first media source at the destination address of the IP packet header, after adding the multicast IP address corresponding to the first media source at the destination address of the IP packet header, the second At least two data streams of a media source are presented in the form of IP packets.

相应地,本发明实施例还提供了一种数据流的传输方法,具体来说是一种组播组多数路数据流的传输方法,应用于组播网络中组播频道中间设备,比如组播频道接入流媒体服务器(比如CDN中心节点等)或者其下一级中间设备(除播放终端外的设备),如图2所示,包括以下步骤:Correspondingly, the embodiment of the present invention also provides a method for transmitting data streams, specifically a method for transmitting multi-channel data streams in a multicast group, which is applied to a multicast channel intermediate device in a multicast network, such as a multicast The channel access streaming media server (such as CDN central node, etc.) or its next-level intermediate equipment (equipment other than the playback terminal), as shown in Figure 2, includes the following steps:

步骤201:接收数据流;Step 201: receiving data stream;

具体地,利用钩子函数,接收报文的IP报文头及UDP报文头、第一媒体源的至少两路数据流所形成的组播数据的完整报文。Specifically, the hook function is used to receive the complete message of the multicast data formed by the IP message header and the UDP message header of the message, and at least two data streams of the first media source.

这里,实际应用时,在执行本步骤之前,该方法还可以包括:Here, in actual application, before performing this step, the method may also include:

利用所述第一媒体源对应的第一组播IP地址,基于IGMP加入所述第一媒体源的组播频道对应的组播组。Using the first multicast IP address corresponding to the first media source, join the multicast group corresponding to the multicast channel of the first media source based on IGMP.

具体地,利用所述第一媒体源对应的第一组播IP地址,生成IGMP报文;Specifically, using the first multicast IP address corresponding to the first media source to generate an IGMP message;

向交换机发送所述IGMP报文;所述IGMP报文(比如IGMP的加入(join)或报告(report)报文)用于请求加入所述第一媒体源的组播频道对应的组播组。Sending the IGMP message to the switch; the IGMP message (such as an IGMP join (join) or report (report) message) is used to request to join the multicast group corresponding to the multicast channel of the first media source.

当然,当要离开所述第一媒体源的组播频道对应的组播组时,可以利用所述第一媒体源对应的第一组播IP地址,生成IGMP报文;向交换机发送所述IGMP报文;所述IGMP报文(比如IGMP的离开(leave)报文)用于请求离开所述第一媒体源的组播频道对应的组播组。Of course, when leaving the multicast group corresponding to the multicast channel of the first media source, the first multicast IP address corresponding to the first media source can be used to generate an IGMP message; message: the IGMP message (such as an IGMP leave message) is used to request to leave the multicast group corresponding to the multicast channel of the first media source.

步骤202:解析数据流,获得第一组播IP地址及UDP的至少两个端口号;Step 202: Analyze the data stream to obtain at least two port numbers of the first multicast IP address and UDP;

这里,当利用钩子函数,接收报文的IP报文头及UDP报文头时,本步骤的具体实现包括:Here, when using the hook function to receive the IP header and the UDP header of the message, the specific implementation of this step includes:

针对每个报文,解析所述IP报文头,获得第一组播IP地址;For each message, analyze the IP message header to obtain the first multicast IP address;

解析所述UDP报文头,获得对应的一个UDP的端口号。The UDP packet header is parsed to obtain a corresponding UDP port number.

也就是说,每个报文指包含一个UDP的端口号。That is, each packet refers to a UDP port number.

步骤203:利用所述第一组播IP地址确定接收的数据流为第一媒体源的数据流;利用UDP的不同端口号识别第一媒体源的每路数据流;Step 203: Utilize the first multicast IP address to determine that the received data stream is the data stream of the first media source; utilize different port numbers of UDP to identify each data stream of the first media source;

这里,实际应用时,所述第一媒体源的每路数据流的码率可以不同;或者,当在VR直播场景下时,所述第一媒体源的每路数据流对应的场景画面的角度不同。Here, in actual application, the code rate of each data stream of the first media source may be different; or, when in a VR live broadcast scene, the angle of the scene picture corresponding to each data stream of the first media source different.

步骤204:针对接收的第一媒体源的至少两路数据流,利用UDP的不同端口号标识每路数据流;Step 204: For at least two data streams received from the first media source, use different UDP port numbers to identify each data stream;

其中,所述利用UDP的端口号标识每路数据流,包括:Wherein, the port number utilizing UDP to identify each data flow includes:

在每路数据流的UDP报文头,封装一个目的端口号,所述至少两路数据流的目的端口号不同。A destination port number is encapsulated in the UDP packet header of each data flow, and the destination port numbers of the at least two data flows are different.

步骤205:基于所述第一媒体源的第二组播IP地址,将标识后的第一媒体源的至少两路数据流发出。Step 205: Based on the second multicast IP address of the first media source, send at least two data streams of the identified first media source.

具体地,在IP报文头的目的地址添加所述第一媒体源对应的第二组播IP地址。Specifically, the second multicast IP address corresponding to the first media source is added to the destination address of the IP packet header.

在IP报文头的目的地址添加所述第一媒体源对应的第二组播IP地址后,第一媒体源的至少两路数据流以IP报文的方式呈现。After the second multicast IP address corresponding to the first media source is added to the destination address of the IP message header, at least two data streams of the first media source are presented in the form of IP messages.

实际应用时,作为组播网络中组播频道中间设备,一般接收第一媒体源时所在的组播组和其发出数据流时对应的组播组是不相同的,相应地,对应的组播组IP地址是不同的。也就是说,第一组播IP地址和第二组播IP地址一般情况下是不同的。In actual application, as a multicast channel intermediate device in a multicast network, generally the multicast group where the first media source is received is different from the corresponding multicast group when it sends out data streams. Correspondingly, the corresponding multicast The group IP addresses are different. That is to say, the first multicast IP address and the second multicast IP address are generally different.

相应地,本发明实施例又提供了一种数据流的传输方法,具体来说是一种组播组多数路数据流的传输方法,应用于组播网络中组播频道的播放终端,如图3所示,包括以下步骤:Correspondingly, the embodiment of the present invention provides a method for transmitting data streams, specifically a method for transmitting multi-channel data streams in a multicast group, which is applied to a playback terminal of a multicast channel in a multicast network, as shown in FIG. 3, including the following steps:

步骤301:接收数据流;Step 301: receiving data stream;

具体地,利用钩子函数,接收报文的IP报文头及UDP报文头、第一媒体源的至少两路数据流所形成的组播数据的完整报文。Specifically, the hook function is used to receive the complete message of the multicast data formed by the IP message header and the UDP message header of the message, and at least two data streams of the first media source.

这里,实际应用时,在执行本步骤之前,该方法还可以包括:Here, in actual application, before performing this step, the method may also include:

利用所述第一媒体源对应的组播IP地址,基于IGMP加入所述第一媒体源的组播频道对应的组播组。Join the multicast group corresponding to the multicast channel of the first media source based on IGMP by using the multicast IP address corresponding to the first media source.

具体地,利用所述第一媒体源对应的组播IP地址,生成IGMP报文;Specifically, using the multicast IP address corresponding to the first media source to generate an IGMP message;

向交换机发送所述IGMP报文;所述IGMP报文(比如IGMP的加入(join)或报告(report)报文)用于请求加入所述第一媒体源的组播频道对应的组播组。Sending the IGMP message to the switch; the IGMP message (such as an IGMP join (join) or report (report) message) is used to request to join the multicast group corresponding to the multicast channel of the first media source.

当然,当要离开所述第一媒体源的组播频道对应的组播组时,可以利用所述第一媒体源对应的组播IP地址,生成IGMP报文;向交换机发送所述IGMP报文;所述IGMP报文(比如IGMP的离开(leave)报文)用于请求离开所述第一媒体源的组播频道对应的组播组。Certainly, when leaving the multicast group corresponding to the multicast channel of the first media source, the multicast IP address corresponding to the first media source can be used to generate an IGMP message; the IGMP message is sent to the switch ; The IGMP message (such as an IGMP leave message) is used to request to leave the multicast group corresponding to the multicast channel of the first media source.

步骤302:解析数据流,获得组播IP地址及UDP的至少两个端口号;Step 302: analyzing the data flow to obtain at least two port numbers of the multicast IP address and UDP;

这里,当利用钩子函数,接收报文的IP报文头及UDP报文头时,本步骤的具体实现包括:Here, when using the hook function to receive the IP header and the UDP header of the message, the specific implementation of this step includes:

针对每个报文,解析所述IP报文头,获得组播IP地址;For each message, analyze the IP message header to obtain a multicast IP address;

解析所述UDP报文头,获得对应的一个UDP的端口号。The UDP packet header is parsed to obtain a corresponding UDP port number.

也就是说,每个报文指包含一个UDP的端口号。That is, each packet refers to a UDP port number.

步骤303:利用所述组播IP地址确定接收的数据流为第一媒体源的数据流;利用UDP的不同端口号识别第一媒体源的每路数据流。Step 303: Use the multicast IP address to determine that the received data flow is the data flow of the first media source; use different UDP port numbers to identify each data flow of the first media source.

这里,实际应用时,所述第一媒体源的每路数据流的码率可以不同;或者,当在VR直播场景下时,所述第一媒体源的每路数据流对应的场景画面的角度不同。Here, in actual application, the code rate of each data stream of the first media source may be different; or, when in a VR live broadcast scene, the angle of the scene picture corresponding to each data stream of the first media source different.

本发明实施例提供的数据流传输方法,针对第一媒体源的至少两路数据流,利用UDP的不同端口号标识每路数据流;基于所述第一媒体源的组播IP地址,将标识后的第一媒体源的至少两路数据流发出;接收数据流;解析数据流,获得组播IP地址及UDP的至少两个端口号;利用所述组播IP地址确定接收的数据流为第一媒体源的数据流;利用UDP的不同端口号识别第一媒体源的每路数据流,也就是说,传输媒体源的多路数据流时,采用组播IP地址区分不同的媒体源,采用不同的UDP端口号来区分一个媒体源即同一组播组下的不同路数据流,如此,大大减少了占用的组播组资源。同时,基于所述第一媒体源的组播IP地址,将标识后的第一媒体源的至少两路数据流发出,完全遵循IGMP,可以和现有的网络具有很好地兼容性。In the data stream transmission method provided by the embodiment of the present invention, for at least two data streams of the first media source, different port numbers of UDP are used to identify each data stream; based on the multicast IP address of the first media source, the identified At least two data streams of the first media source after that are sent out; receive the data stream; analyze the data stream to obtain at least two port numbers of the multicast IP address and UDP; utilize the multicast IP address to determine that the received data stream is the first A data stream of a media source; UDP different port numbers are used to identify each data stream of the first media source, that is to say, when transmitting multiple data streams of a media source, a multicast IP address is used to distinguish different media sources. Different UDP port numbers are used to distinguish a media source, that is, different data streams under the same multicast group, thus greatly reducing the occupied multicast group resources. At the same time, based on the multicast IP address of the first media source, at least two data streams of the identified first media source are sent out, fully complying with IGMP, and having good compatibility with existing networks.

另外,利用所述第一媒体源对应的组播IP地址,基于IGMP加入所述第一媒体源的组播频道对应的组播组,不需要使用设备的UDP套接字(socket)端口资源,也就不受限于设备的UDP socket端口,直接使用组播IP地址来与交换机进行交互,如此,进一步降低了占用的组播组资源,而且能够完全遵循IGMP,可以和现有的网络具有很好地兼容性。In addition, the multicast IP address corresponding to the first media source is used to join the multicast group corresponding to the multicast channel of the first media source based on IGMP, without using the UDP socket (socket) port resource of the device, It is not limited to the UDP socket port of the device, and directly uses the multicast IP address to interact with the switch. In this way, the occupied multicast group resources are further reduced, and it can fully comply with IGMP, which can be very similar to the existing network. Good compatibility.

除此以外,利用钩子函数,接收报文的IP报文头及UDP报文头、第一媒体源的至少两路数据流所形成的组播数据的完整报文,不通过协议栈就能获取到这些信息,解决了普通协议栈不能支持一个组播组的socket端口不能支持多个UDP端口的问题,和现有的网络具有很好地兼容性。In addition, using the hook function, the complete message of the multicast data formed by the IP message header and UDP message header of the received message, and at least two data streams of the first media source can be obtained without going through the protocol stack. With these information, the problem that the common protocol stack cannot support a multicast group socket port cannot support multiple UDP ports is solved, and it has good compatibility with the existing network.

实施例二Embodiment two

为实现本发明实施例的方法,本实施例提供一种数据流传输装置,设置在组播网络中组播频道源设备,如图4所示,该装置包括:In order to implement the method of the embodiment of the present invention, this embodiment provides a data stream transmission device, which is set in a multicast channel source device in a multicast network, as shown in FIG. 4 , the device includes:

第一标识模块41,用于针对第一媒体源的至少两路数据流,利用UDP的不同端口号标识每路数据流;The first identification module 41 is used for at least two data streams of the first media source, utilizing different port numbers of UDP to identify each data stream;

第一发送单元42,基于所述第一媒体源的IP地址,将标识后的第一媒体源的至少两路数据流发出。The first sending unit 42 sends the identified at least two data streams of the first media source based on the IP address of the first media source.

其中,所述第一标识模块41,具体用于:在每路数据流的UDP报文头,封装一个目的端口号,所述至少两路数据流的目的端口号不同。Wherein, the first identification module 41 is specifically configured to: encapsulate a destination port number in the UDP packet header of each data flow, and the destination port numbers of the at least two data flows are different.

这里,实际应用时,所述第一媒体源的每路数据流的码率可以不同;或者,当在VR直播场景下时,所述第一媒体源的每路数据流对应的场景画面的角度不同。Here, in actual application, the code rate of each data stream of the first media source may be different; or, when in a VR live broadcast scene, the angle of the scene picture corresponding to each data stream of the first media source different.

实际应用时,可以根据需要设置不同的UDP的端口号,以标识第一媒体源的不同的数据流。举个例子来说,假设数据流有高清、标清、以及流畅三路数据流,可以根据业务需要,设置三个偶数的端口号,比如902、904、906,来分别标识高清、标清以及流畅三路数据流。In practical applications, different UDP port numbers may be set as required to identify different data streams of the first media source. For example, assuming that the data stream has three data streams: high-definition, standard-definition, and smooth, you can set three even-numbered port numbers, such as 902, 904, and 906, to identify the high-definition, standard-definition, and smooth three-way data streams according to business needs. road data flow.

所述第一发送单元42,具体用于在IP报文头的目的地址添加所述第一媒体源对应的组播IP地址。当在IP报文头的目的地址添加所述第一媒体源对应的组播IP地址后,第一媒体源的至少两路数据流以IP报文的方式呈现。The first sending unit 42 is specifically configured to add the multicast IP address corresponding to the first media source to the destination address of the IP packet header. After the multicast IP address corresponding to the first media source is added to the destination address of the IP message header, at least two data streams of the first media source are presented in the form of IP messages.

实际应用时,所述第一标识模块41可由数据流传输装置中的处理器实现;所述第一发送单元42可由数据流传输装置中的收发机实现。In practical application, the first identification module 41 may be realized by a processor in the data stream transmission device; the first sending unit 42 may be realized by a transceiver in the data stream transmission device.

基于此,本发明实施例还提供了一种源设备,包括:Based on this, an embodiment of the present invention also provides a source device, including:

第一处理器,用于针对第一媒体源的至少两路数据流,利用用户数据报UDP的不同端口号标识每路数据流;The first processor is used for at least two data streams of the first media source, using different port numbers of the user datagram UDP to identify each data stream;

第一通信接口,用于基于所述第一媒体源的组播IP地址,将标识后的第一媒体源的至少两路数据流发出。The first communication interface is configured to send out at least two data streams of the identified first media source based on the multicast IP address of the first media source.

其中,第一处理器及第一通信接口的功能已在上文详述,这里不再赘述。Wherein, the functions of the first processor and the first communication interface have been described in detail above, and will not be repeated here.

相应地,本发明实施例还提供了一种数据流传输装置,应用于组播网络中组播频道中间设备,比如组播频道接入流媒体服务器(比如CDN中心节点等)或者其下一级中间设备(除播放终端外的设备),如图5所示,该装置包括:Correspondingly, the embodiment of the present invention also provides a data stream transmission device, which is applied to a multicast channel intermediate device in a multicast network, such as a multicast channel accessing a streaming media server (such as a CDN central node, etc.) or its lower level Intermediate equipment (equipment except the playback terminal), as shown in Figure 5, the device includes:

第一接收单元51,用于接收数据流;A first receiving unit 51, configured to receive a data stream;

第一解析单元52,用于解析数据流,获得第一组播IP地址及UDP的至少两个端口号;The first parsing unit 52 is configured to parse the data stream to obtain at least two port numbers of the first multicast IP address and UDP;

第一识别单元53,用于利用所述第一组播IP地址确定接收的数据流为第一媒体源的数据流;利用所述UDP的不同端口号识别第一媒体源的每路数据流;The first identification unit 53 is configured to utilize the first multicast IP address to determine that the received data stream is the data stream of the first media source; utilize the different port numbers of the UDP to identify each data stream of the first media source;

第二标识模块54,用于针对接收的第一媒体源的至少两路数据流,利用UDP的不同端口号标识每路数据流;The second identification module 54 is used for at least two data streams of the first media source received, using different port numbers of UDP to identify each data stream;

第二发送单元55,用于基于所述第一媒体源的第二组播IP地址,将标识后的第一媒体源的至少两路数据流发出。The second sending unit 55 is configured to send at least two data streams of the identified first media source based on the second multicast IP address of the first media source.

其中,所述第一接收单元51,具体用于:Wherein, the first receiving unit 51 is specifically used for:

利用钩子函数,接收报文的IP报文头及UDP报文头、第一媒体源的至少两路数据流所形成的组播数据的完整报文。The hook function is used to receive the complete message of the multicast data formed by the IP message header and the UDP message header of the message, and at least two data streams of the first media source.

这里,实际应用时,该装置还可以包括:Here, in actual application, the device may also include:

第一加入单元,用于利用所述第一媒体源对应的第一组播IP地址,基于IGMP加入所述第一媒体源的组播频道对应的组播组。The first joining unit is configured to use the first multicast IP address corresponding to the first media source to join the multicast group corresponding to the multicast channel of the first media source based on IGMP.

具体地,所述第一加入单元利用所述第一媒体源对应的第一组播IP地址,生成IGMP报文;Specifically, the first adding unit uses the first multicast IP address corresponding to the first media source to generate an IGMP message;

所述第一加入单元向交换机发送所述IGMP报文;所述IGMP报文(比如IGMP的加入(join)或报告(report)报文)用于请求加入所述第一媒体源的组播频道对应的组播组。The first joining unit sends the IGMP message to the switch; the IGMP message (such as an IGMP join (join) or report (report) message) is used to request to join the multicast channel of the first media source The corresponding multicast group.

当然,当要离开所述第一媒体源的组播频道对应的组播组时,所述第一加入单元可以利用所述第一媒体源对应的第一组播IP地址,生成IGMP报文;向交换机发送所述IGMP报文;所述IGMP报文(比如IGMP的离开(leave)报文)用于请求离开所述第一媒体源的组播频道对应的组播组。Of course, when leaving the multicast group corresponding to the multicast channel of the first media source, the first joining unit may use the first multicast IP address corresponding to the first media source to generate an IGMP message; Send the IGMP message to the switch; the IGMP message (such as an IGMP leave message) is used to request to leave the multicast group corresponding to the multicast channel of the first media source.

所述第一解析单元52,具体用于:The first parsing unit 52 is specifically used for:

针对每个报文,解析所述IP报文头,获得组播IP地址;For each message, analyze the IP message header to obtain a multicast IP address;

解析所述UDP报文头,获得对应的一个UDP的端口号。The UDP packet header is parsed to obtain a corresponding UDP port number.

也就是说,每个报文指包含一个UDP的端口号。That is, each packet refers to a UDP port number.

实际应用时,所述第一媒体源的每路数据流的码率可以不同;或者,当在VR直播场景下时,所述第一媒体源的每路数据流对应的场景画面的角度不同。In practical application, the code rate of each data stream of the first media source may be different; or, in a VR live broadcast scene, the angles of the scenes corresponding to each data stream of the first media source are different.

其中,所述第二标识模块54,具体用于:Wherein, the second identification module 54 is specifically used for:

在每路数据流的UDP报文头,封装一个目的端口号,所述至少两路数据流的目的端口号不同。A destination port number is encapsulated in the UDP packet header of each data flow, and the destination port numbers of the at least two data flows are different.

所述第二发送单元55,具体用于:The second sending unit 55 is specifically used for:

在IP报文头的目的地址添加所述第一媒体源对应的第二组播IP地址。Add the second multicast IP address corresponding to the first media source to the destination address of the IP packet header.

所述第二发送单元在IP报文头的目的地址添加所述第一媒体源对应的第二组播IP地址后,第一媒体源的至少两路数据流以IP报文的方式呈现。After the second sending unit adds the second multicast IP address corresponding to the first media source to the destination address of the IP message header, at least two data streams of the first media source are presented in the form of IP messages.

实际应用时,作为组播网络中组播频道中间设备,一般接收第一媒体源时所在的组播组和其发出数据流时对应的组播组是不相同的,相应地,对应的组播组IP地址是不同的。也就是说,第一组播IP地址和第二组播IP地址一般情况下是不同的。In actual application, as a multicast channel intermediate device in a multicast network, generally the multicast group where the first media source is received is different from the corresponding multicast group when it sends out data streams. Correspondingly, the corresponding multicast The group IP addresses are different. That is to say, the first multicast IP address and the second multicast IP address are generally different.

所述第一接收单元51、第二发送单元55可由数据流传输装置中的收发机实现;所述第一解析单元52、第一识别单元53、第二标识模块54可由数据流传输装置中的处理器实现;所述第一加入单元可由数据流传输装置中的处理器结合收发机实现。The first receiving unit 51 and the second sending unit 55 can be implemented by a transceiver in the data stream transmission device; the first parsing unit 52, the first identification unit 53, and the second identification module 54 can be implemented by a Implemented by a processor; the first adding unit may be implemented by a processor in the data streaming device combined with a transceiver.

基于此,本发明实施例还提供了一种中间设备,比如CDN节点等,包括:Based on this, the embodiment of the present invention also provides an intermediate device, such as a CDN node, etc., including:

第二通信接口,用于接收数据流;The second communication interface is used to receive the data stream;

第二处理器,用于解析数据流,获得第一组播IP地址及UDP的至少两个端口号;利用所述第一组播IP地址确定接收的数据流为第一媒体源的数据流;利用UDP的不同端口号识别第一媒体源的每路数据流;以及针对接收的第一媒体源的至少两路数据流,利用UDP的不同端口号标识每路数据流;The second processor is used to analyze the data flow, and obtain at least two port numbers of the first multicast IP address and UDP; use the first multicast IP address to determine that the received data flow is the data flow of the first media source; Using different port numbers of UDP to identify each data stream of the first media source; and for at least two data streams of the first media source received, using different port numbers of UDP to identify each data stream;

所述第二通信接口,还用于基于所述第一媒体源的第二组播IP地址,将标识后的第一媒体源的至少两路数据流发出。The second communication interface is further configured to send out at least two data streams of the identified first media source based on the second multicast IP address of the first media source.

其中,第二处理器及第二通信接口的功能已在上文详述,这里不再赘述。Wherein, the functions of the second processor and the second communication interface have been described in detail above, and will not be repeated here.

相应地,本发明实施例又提供了一种数据流传输装置,设置在组播网络中组播频道的播放终端,如图6所示,该装置包括:Correspondingly, an embodiment of the present invention provides a data stream transmission device, which is set as a playback terminal of a multicast channel in a multicast network. As shown in FIG. 6 , the device includes:

第二接收单元61,用于接收数据流;The second receiving unit 61 is configured to receive a data stream;

第二解析单元62,用于解析数据流,获得组播IP地址及UDP的至少两个端口号;The second parsing unit 62 is configured to parse the data stream to obtain at least two port numbers of the multicast IP address and UDP;

第二识别单元63,用于利用所述组播IP地址确定接收的数据流为第一媒体源的数据流;利用所述UDP的不同端口号识别第一媒体源的每路数据流。The second identifying unit 63 is configured to use the multicast IP address to determine that the received data flow is the data flow of the first media source; use the different port numbers of the UDP to identify each data flow of the first media source.

其中,所述第二接收单元61,具体用于:Wherein, the second receiving unit 61 is specifically used for:

利用钩子函数,接收报文的IP报文头及UDP报文头、第一媒体源的至少两路数据流所形成的组播数据的完整报文。The hook function is used to receive the complete message of the multicast data formed by the IP message header and the UDP message header of the message, and at least two data streams of the first media source.

相应地,针对每个报文,所述第二解析单元62解析所述IP报文头,获得组播IP地址;Correspondingly, for each packet, the second parsing unit 62 parses the IP packet header to obtain a multicast IP address;

所述第二解析单元62解析所述UDP报文头,获得对应的一个UDP的端口号。The second parsing unit 62 parses the UDP packet header to obtain a corresponding UDP port number.

也就是说,每个报文指包含一个UDP的端口号。That is, each packet refers to a UDP port number.

这里,实际应用时,该装置还可以包括:Here, in actual application, the device may also include:

第二加入单元,用于利用所述第一媒体源对应的组播IP地址,基于IGMP加入所述第一媒体源的组播频道对应的组播组。The second joining unit is configured to use the multicast IP address corresponding to the first media source to join the multicast group corresponding to the multicast channel of the first media source based on IGMP.

具体地,所述第二加入单元利用所述第一媒体源对应的组播IP地址,生成IGMP报文;Specifically, the second adding unit uses the multicast IP address corresponding to the first media source to generate an IGMP message;

所述第二加入单元向交换机发送所述IGMP报文;所述IGMP报文(比如IGMP的加入(join)或报告(report)报文)用于请求加入所述第一媒体源的组播频道对应的组播组。The second adding unit sends the IGMP message to the switch; the IGMP message (such as an IGMP join (join) or report (report) message) is used to request to join the multicast channel of the first media source The corresponding multicast group.

当然,当要离开所述第一媒体源的组播频道对应的组播组时,所述第二加入单元可以利用所述第一媒体源对应的组播IP地址,生成IGMP报文;向交换机发送所述IGMP报文;所述IGMP报文(比如IGMP的离开(leave)报文)用于请求离开所述第一媒体源的组播频道对应的组播组。Of course, when leaving the multicast group corresponding to the multicast channel of the first media source, the second joining unit can generate an IGMP message by using the multicast IP address corresponding to the first media source; Sending the IGMP message; the IGMP message (such as an IGMP leave message) is used to request to leave the multicast group corresponding to the multicast channel of the first media source.

实际应用时,所述第二接收单元61可由数据流传输装置中的收发机实现;所述第二解析单元62、第二识别单元63可由数据流传输装置中的处理器实现;所述第二加入单元可由数据流传输装置中的处理器结合收发机实现。In actual application, the second receiving unit 61 can be realized by a transceiver in the data stream transmission device; the second parsing unit 62 and the second identification unit 63 can be realized by a processor in the data stream transmission device; the second The joining unit can be implemented by combining a processor in the data stream transmission device with a transceiver.

基于此,本发明实施例还提供了一种终端,包括:Based on this, an embodiment of the present invention also provides a terminal, including:

第三通信接口,用于接收数据流;The third communication interface is used to receive the data stream;

第三处理器,用于解析数据流,获得组播IP地址及UDP的至少两个端口号;利用所述组播IP地址确定接收的数据流为第一媒体源的数据流;以及利用所述UDP的不同端口号识别第一媒体源的每路数据流。The third processor is used to analyze the data flow to obtain at least two port numbers of the multicast IP address and UDP; use the multicast IP address to determine that the received data flow is the data flow of the first media source; Different port numbers of UDP identify each data stream of the first media source.

其中,第三处理器及第三通信接口的功能已在上文详述,这里不再赘述。Wherein, the functions of the third processor and the third communication interface have been described in detail above, and will not be repeated here.

实施例三Embodiment Three

在实施例一、二的基础上,本实施例详细描述多路数据流的传输过程。On the basis of the first and second embodiments, this embodiment describes the transmission process of multiple data streams in detail.

从实施例一、二的描述可以看出,本发明实施例中,传输媒体源的多路数据流时,使用组播组(也就是组播IP地址,对应一个组播路由条目)来标识有相关性的多路数据流的媒体源,比如OTT里的直播频道、VR直播频道等,同时使用IP上承载的UDP的端口号来标识数据流,即采用不同的UDP端口号来区分一个媒体源的不同数据流。As can be seen from the description of Embodiments 1 and 2, in the embodiment of the present invention, when transmitting multiple data streams of a media source, a multicast group (that is, a multicast IP address, corresponding to a multicast routing entry) is used to identify The media sources of relevant multi-channel data streams, such as live channels in OTT, VR live channels, etc., use the UDP port number carried by IP to identify the data stream at the same time, that is, use different UDP port numbers to distinguish a media source different data streams.

所以,针对上述数据流的传输方法,实际应用时,可以采用图7所示的装置来实现组播组支持多路数据流的传输。Therefore, for the above data stream transmission method, in actual application, the device shown in FIG. 7 can be used to realize the multicast group supporting the transmission of multiple data streams.

如图7所示,该装置包括:组播用户信息模块、组播组管理模块、组播组多路数据流接收/发送模块。As shown in FIG. 7 , the device includes: a multicast user information module, a multicast group management module, and a multicast group multi-channel data stream receiving/sending module.

下面详细描述各模块的功能。The functions of each module are described in detail below.

(1)组播用户信息模块(1) Multicast user information module

组播用户信息模块用来管理组播用户媒体源(比如OTT直播频道、VR直播频道等),每个媒体源使用一个组播组,也就是对应使用一条组播路由条目,对应一个组播IP地址。同时,管理组播IP信息和相关的多路数据流使用的UDP端口信息;组播IP地址用于区分不同的媒体源,UDP端口信息用于区分同一组播组下的数据流,比如不同码率的流媒体等。The multicast user information module is used to manage multicast user media sources (such as OTT live channels, VR live channels, etc.), each media source uses a multicast group, that is, corresponds to a multicast routing entry, corresponding to a multicast IP address. At the same time, manage multicast IP information and UDP port information used by related multi-channel data streams; multicast IP addresses are used to distinguish different media sources, and UDP port information is used to distinguish data streams under the same multicast group, such as different codes Rate streaming, etc.

(2)组播组管理模块(2) Multicast group management module

组播组管理模块用于CDN服务器节点或者终端与交换机之间的组播IGMP报文的交互处理,完成CDN服务器节点或者终端加入和离开组播组,以及响应交换机的组播定期查询报文等功能。The multicast group management module is used for interactive processing of multicast IGMP messages between CDN server nodes or terminals and switches, to complete CDN server nodes or terminals to join and leave multicast groups, and to respond to multicast periodic query messages from switches, etc. Function.

在windows和linux这些通用操作系统的协议栈中,如果主机要加入某个组播组,需要创建UDP socket,然后设置该UDP socket IP层的IP_ADD_MEMBERSHIP属性,这样主机才会向交换机发送基于IGMP的join或report报文,以完成加入组播组的动作;如果主机要退出某个组播组,需要再次设置该UDP socket IP层的IP_DROP_MEMBERSHIP属性,这样主机才会向交换机发送基于IGMP的leave报文,以完成离开组播组的动作。由此可见,windows和linux等通用操作系统对组播组的管理是依附于UDP socket的,而UDP socket必须指定组播IP地址和端口,才能完成组播组的加入和离开。对于本发明实施例来说,基于现有操作系统的流程,通过UDP socket实现接收多路组播码流,这本身就是一个比较大的限制,所以需要扩展组播组的管理方式。In the protocol stacks of general operating systems such as windows and linux, if the host wants to join a multicast group, it needs to create a UDP socket, and then set the IP_ADD_MEMBERSHIP attribute of the UDP socket IP layer, so that the host will send an IGMP-based join to the switch or report message to complete the action of joining a multicast group; if the host wants to exit a multicast group, it is necessary to set the IP_DROP_MEMBERSHIP attribute of the UDP socket IP layer again, so that the host will send an IGMP-based leave message to the switch. To complete the action of leaving the multicast group. It can be seen that the management of multicast groups by general-purpose operating systems such as windows and linux is attached to UDP sockets, and UDP sockets must specify multicast IP addresses and ports to complete the joining and leaving of multicast groups. For the embodiment of the present invention, based on the flow of the existing operating system, receiving multi-channel multicast streams through the UDP socket is a relatively large limitation in itself, so it is necessary to expand the management method of the multicast group.

所以组播组管理模基于组播组IP地址向交换机发送IGMP加入报文,请求加入组播组,以完成主机加入组播组的动作。同时,组播组管理模块还会接收交换机的IGMP查询报文,并上报当前组播组信息;定时向交换机发送IGMP报告报文,以通知交换机有具体的组播组存在。Therefore, the multicast group management module sends an IGMP join message to the switch based on the multicast group IP address, requesting to join the multicast group, so as to complete the action of the host joining the multicast group. At the same time, the multicast group management module will also receive the IGMP query message of the switch, and report the current multicast group information; regularly send IGMP report messages to the switch to notify the switch that there is a specific multicast group.

从上面的描述可以看出,组播组的加入和离开,不再受限于UDP socket端口,而是直接使用组播组IP地址来完成与交换机之间的IGMP报文交互。这种方法是对现有驻留操作系统组播组管理应用的扩展。It can be seen from the above description that the joining and leaving of a multicast group is no longer limited to the UDP socket port, but directly uses the multicast group IP address to complete the exchange of IGMP messages with the switch. This method is an extension of the existing resident operating system multicast group management application.

(3)组播组多路数据流发送模块(3) Multicast group multi-channel data stream sending module

该模块主要实现发送同一组播组的多路数据流。综合IP和UDP报文的结构,所述组播组多路数据流发送模块主要利用IP报文头的目的地址字段和UDP报文头的目的端口字段实现组播组多路数据流的发送。在IP报文头的目的地址指定为组播IP地址,在UDP报文头中,封装不同的目的端口,一个目的端口代表一路数据流。例如,在实际应用中,不同的端口表示不同码率的数据流。This module mainly implements sending multiple data streams of the same multicast group. Combining the structures of IP and UDP messages, the multi-channel data stream sending module of the multicast group mainly uses the destination address field of the IP message header and the destination port field of the UDP message header to realize the sending of the multi-channel data streams of the multicast group. The destination address in the IP message header is designated as a multicast IP address. In the UDP message header, different destination ports are encapsulated, and one destination port represents one data stream. For example, in practical applications, different ports represent data streams with different code rates.

(4)组播组多路数据流接收模块(4) Multicast group multi-channel data stream receiving module

组播组多路数据流接收模块,主要实现接收同一组播频道(媒体源)包含的多路数据流。具体地,组播组多路数据流接收模块通过系统钩子函数,接收裸数据报文,即报文IP报文头和UDP报文头,以及组播数据的完整报文。接着,组播组多路数据流接收模块先根据组播报文(IP报文头及UDP报文头),解析出组播IP地址和表示不同数据流的端口信息;然后,根据组播用户信息模块中有关的组播IP和端口信息,即组播频道信息,分解出不同的数据流;最后,还可以对不同的流媒体做分发处理。The multi-channel data stream receiving module of the multicast group mainly implements receiving multiple data streams contained in the same multicast channel (media source). Specifically, the multicast group multi-channel data flow receiving module receives the bare data message, ie, the message IP message header and UDP message header, and the complete message of the multicast data through the system hook function. Then, the multicast group multi-channel data stream receiving module first analyzes the multicast IP address and the port information representing different data streams according to the multicast message (IP message header and UDP message header); then, according to the multicast user The relevant multicast IP and port information in the information module, that is, the multicast channel information, can be decomposed into different data streams; finally, different streaming media can be distributed.

在windows和linux这些通用操作系统的协议栈中,如果要接收组播码流,创建UDPsocket的时候,每个组播组只能支持捆绑一个UDP的端口,限制了一个UDP socket只能接收包含一对组播IP和端口的数据报文,限制了系统利用UDP socket接收组播多端口数据报文的能力。而在本发明实施例中,通过钩子函数直接接收裸数据报文,可以解决普通协议栈不能支持一个组播Socket不能支持多个UDP端口的问题。In the protocol stacks of general-purpose operating systems such as windows and linux, if you want to receive multicast streams, when creating a UDP socket, each multicast group can only support one UDP port, which limits that a UDP socket can only receive For multicast IP and port data packets, the system's ability to use UDP sockets to receive multicast multi-port data packets is limited. However, in the embodiment of the present invention, the hook function directly receives the raw data message, which can solve the problem that the common protocol stack cannot support one multicast Socket and cannot support multiple UDP ports.

基于上述装置,下面详细描述多路数据流的传输过程。Based on the above apparatus, the transmission process of multiple data streams will be described in detail below.

首先,如图8所示,描述从组播频道源设备到组播频道接入服务器(一般是CDN的中心节点)之间的组网示意图。结合图8可以看出,组播频道源设备将多路数据流发送至交换机,而组播频道接入服务器从交换机获得多路数据流。该过程具体包括:First, as shown in FIG. 8 , a schematic diagram of a network between a multicast channel source device and a multicast channel access server (generally a central node of a CDN) is described. It can be seen from FIG. 8 that the multicast channel source device sends multiple data streams to the switch, and the multicast channel access server obtains multiple data streams from the switch. Specifically, the process includes:

步骤一:组播频道源设备(可以是编码器或者组播源频道生成服务器)的组播用户信息模块建立组播频道,组播组多路数据流发送模块(相当于实施例二中第一标识模块及第一发送单元的功能)发送组播的多路数据流。Step 1: the multicast user information module of the multicast channel source device (which can be an encoder or a multicast source channel generation server) establishes a multicast channel, and the multicast group multi-channel data stream sending module (equivalent to the first in the second embodiment) function of the identification module and the first sending unit) to send multicast multi-channel data streams.

这里,如果组播的多路数据流是多种码率,比如分别生成高清、标清和流畅三路码流时,那么组播组多路数据流发送模块使用一个组播IP地址来发送组播频道码流,并使用不同的UDP端口来区分发送不同码率的码流。Here, if the multi-channel data streams of the multicast are multiple bit rates, such as when generating high-definition, standard-definition, and smooth three-way bit streams, then the multicast group multi-channel data stream sending module uses a multicast IP address to send the multicast Channel code stream, and use different UDP ports to distinguish code streams with different code rates.

步骤二:组播频道接入服务器的组播用户信息模块建立对应的组播频道,管理组播频道的IP地址和频道相关的多路码流和UDP端口的对应关系。Step 2: The multicast user information module of the multicast channel access server establishes a corresponding multicast channel, manages the IP address of the multicast channel, and the corresponding relationship between the channel-related multiple code streams and UDP ports.

步骤三:组播频道接入服务器的组播组管理模块向交换机发送IGMP报文以加入频道的组播组(相当于实施例二中第一加入单元的功能),从而使节点准备接收组播源的多路数据流。Step 3: the multicast group management module of the multicast channel access server sends an IGMP message to the switch to join the multicast group of the channel (equivalent to the function of the first joining unit in embodiment two), so that the node is ready to receive the multicast Source multiplex data stream.

步骤四:组播频道接入服务器的组播组多路数据流接收模块(相当于实施例二第一接收单元、第一解析单元及第一识别单元的功能)接收交换机发来的组播码流。Step 4: the multicast group multi-channel data stream receiving module of the multicast channel access server (equivalent to the functions of the first receiving unit, the first analyzing unit and the first identifying unit in embodiment two) receives the multicast code sent by the switch flow.

具体地,组播组多路数据流接收模块接收组播源提供的所有组播数据流。Specifically, the multicast group multiplex data stream receiving module receives all multicast data streams provided by the multicast source.

组播频道接入服务器的组播组多路数据流接收模块使用UDP端口号来区别不同的数据流,将接收的数据流送给组播用户信息模块做相应的业务处理,比如对频道处理后,向下级节点或者终端发送组播码流。The multicast group multi-channel data stream receiving module of the multicast channel access server uses UDP port numbers to distinguish different data streams, and sends the received data streams to the multicast user information module for corresponding business processing, such as channel processing , to send the multicast code stream to the lower node or terminal.

如图9所示,当组播频道接入服务器至终端之间还存在下级CDN节点,或者说,从组播频道源设备到终端之间存在至少两个CDN节点时,两个CDN节点之间的多路数据流的传输过程是:上级CDN节点将多路数据流发送至交换机,而下级CDN节点从交换机获得多路数据流。该过程具体包括:As shown in Figure 9, when there are lower-level CDN nodes between the multicast channel access server and the terminal, or in other words, when there are at least two CDN nodes between the multicast channel source device and the terminal, the connection between the two CDN nodes The transmission process of the multiple data streams is: the upper-level CDN node sends the multiple data streams to the switch, and the lower-level CDN node obtains the multiple data streams from the switch. Specifically, the process includes:

步骤一:上级CDN节点(类似上述的组播频道接入服务器)的组播组多路数据流接收模块接收组播源的多路数据流,上级CDN节点的组播组多路数据流发送模块发送组播的多路数据流。Step 1: The multicast group multi-channel data stream receiving module of the upper-level CDN node (similar to the above-mentioned multicast channel access server) receives the multi-channel data stream of the multicast source, and the multicast group multi-channel data stream sending module of the upper-level CDN node Send multicast data streams.

具体地,上级CDN节点的组播组多路数据流发送模块(相当于实施例二中第二标识模块及第二发送单元的功能)使用一个组播IP地址来发送组播频道码流,并使用不同的UDP端口来区分发送不同的数据流。Specifically, the multicast group multi-channel data stream sending module of the superior CDN node (equivalent to the functions of the second identification module and the second sending unit in the second embodiment) uses a multicast IP address to send the multicast channel code stream, and Use different UDP ports to distinguish and send different data streams.

步骤二:下级CDN节点的组播用户信息模块建立对应的组播频道,管理组播频道的IP地址和频道相关的多路码流和UDP端口的对应关系。Step 2: The multicast user information module of the lower-level CDN node establishes a corresponding multicast channel, and manages the IP address of the multicast channel and the corresponding relationship between the channel-related multiple code streams and UDP ports.

步骤三:下级CDN节点上的组播组管理模块向交换机发送IGMP报文以加入频道的组播组,从而使节点准备接收组播源的多路数据流。Step 3: The multicast group management module on the lower-level CDN node sends an IGMP message to the switch to join the multicast group of the channel, so that the node is ready to receive multiple data streams from the multicast source.

步骤四:下级节点的组播组多路数据流接收模块接收交换机发来的组播码流。Step 4: The multicast group multi-channel data stream receiving module of the lower node receives the multicast code stream sent by the switch.

具体地,下级CDN节点的组播组多路数据流接收模块接收的组播码流是上级CDN节点提供的所有组播数据流。Specifically, the multicast streams received by the multicast data stream receiving module of the lower-level CDN node are all multicast data streams provided by the upper-level CDN node.

下级CDN节点的组播组多路数据流接收模块使用UDP端口号来区别不同的数据流,将接收的数据流送给下级CDN节点的组播用户信息模块做相应的业务处理,比如对频道处理后,向下级节点或者终端发送组播码流。The multicast group multi-channel data stream receiving module of the lower-level CDN node uses the UDP port number to distinguish different data streams, and sends the received data stream to the multicast user information module of the lower-level CDN node for corresponding business processing, such as channel processing After that, the multicast code stream is sent to the lower node or terminal.

如图10所示,到达CDN节点后,组播组的多路数据流会传输给终端。CDN节点和终端之间的多路数据流的传输过程是:CDN节点将多路数据流发送至交换机,而终端从家庭网关获得多路数据流。下面以终端为OTT终端为例,来详细说明该传输过程。As shown in FIG. 10 , after reaching the CDN node, the multiple data streams of the multicast group will be transmitted to the terminal. The transmission process of the multiple data streams between the CDN node and the terminal is: the CDN node sends the multiple data streams to the switch, and the terminal obtains the multiple data streams from the home gateway. Taking the terminal as an example of an OTT terminal, the transmission process will be described in detail below.

在OTT业务里,OTT频道需要支持多码率,传统处理机制里,OTT终端(比如OTT机顶盒或者IPAD等)跟CDN节点之间一般都是走的单播,终端根据自身设备能力或者网络传输能力来决定获取哪种码率,使用超文本传输协议(HTTP)来获取单播码流。In the OTT business, the OTT channel needs to support multiple bit rates. In the traditional processing mechanism, OTT terminals (such as OTT set-top boxes or IPADs, etc.) To determine which bit rate to obtain, use Hypertext Transfer Protocol (HTTP) to obtain unicast bit stream.

而随着OTT频道直播的大量应用,组播在直播业务里存在着节省网络传输能力的优势,所以业界都在推广应用组播来实现OTT直播,因此采用本发明实施例的方案传输多码率的码流是非常有效的。With the extensive application of OTT channel live broadcast, multicast has the advantage of saving network transmission capacity in the live broadcast service, so the industry is promoting the application of multicast to realize OTT live broadcast, so the scheme of the embodiment of the present invention is adopted to transmit multi-bit rate The bitstream is very efficient.

在OTT组播直播业务中,为了兼容终端(一般都是走HTTP单播的方式),一般在终端上集成一个应用(APP)模块来处理组播,接收组播码流,而APP模块跟终端的播放模块之间仍然走HTTP模拟单播,所以可以理解为OTT终端内部模块间模拟单播直播。In the OTT multicast live broadcast service, in order to be compatible with the terminal (usually HTTP unicast), an application (APP) module is generally integrated on the terminal to process multicast and receive multicast streams, and the APP module is connected with the terminal The playback modules still use HTTP to simulate unicast, so it can be understood as a simulated unicast live broadcast between internal modules of the OTT terminal.

这样的话,可以在终端的APP模块里集成图7所示的装置。In this case, the device shown in FIG. 7 can be integrated in the APP module of the terminal.

CDN节点至OTT终端之间多路数据流传输的过程,包括:The process of multi-channel data stream transmission between CDN nodes and OTT terminals, including:

步骤一:边缘CDN节点的组播组多路数据流接收模块接收上级CDN节点的频道组播码流。Step 1: The multicast data stream receiving module of the edge CDN node receives the channel multicast code stream of the upper CDN node.

这里,在执行步骤一之前,边缘CDN节点已经按照图9所描述的方式加入组播组。Here, before step 1 is performed, the edge CDN node has joined the multicast group in the manner described in FIG. 9 .

且边缘CDN节点的组播组多路数据流接收模块按照图9所描述的方式来区分不同码率的数据流。And the multicast group multi-channel data stream receiving module of the edge CDN node distinguishes data streams of different code rates in the manner described in FIG. 9 .

步骤二:边缘CDN节点的组播组多路数据流发送模块向OTT终端发送组播码流。Step 2: The multicast data stream sending module of the edge CDN node sends the multicast code stream to the OTT terminal.

这里,发送的组播码流可能有以下两种情况:Here, the multicast code stream sent may have the following two situations:

第一种情况是:边缘CDN节点跟OTT终端之间有足够的网络传输带宽,在这种情况下,边缘CDN节点的组播组多路数据流发送模块就可以将一个频道的所有码率的数据流都发送给OTT终端,使用一路组播IP地址来发送组播频道码流,使用不同的UDP端口来区分发送不同码率的码流。The first case is that there is sufficient network transmission bandwidth between the edge CDN node and the OTT terminal. In this case, the multicast group multi-channel data stream sending module of the edge CDN node can transmit All data streams are sent to OTT terminals, using one multicast IP address to send multicast channel code streams, and using different UDP ports to distinguish and send code streams with different code rates.

第二种情况是:边缘CDN节点跟OTT终端之间的网络传输带宽有限,OTT终端分析自身情况和网络传输情况,确定需要的码率码流,并由APP使用控制信令来通知边缘CDN节点,那么边缘CDN节点就使用组播组将需要的码流发给OTT终端。在这种情况下,当需要进行码率切换时,不需要切换组播组,APP直接通知边缘CDN节点,边缘CDN节点直接使用原来的组播组,切换发送对应码率的码流即可。The second situation is: the network transmission bandwidth between the edge CDN node and the OTT terminal is limited, the OTT terminal analyzes its own situation and the network transmission situation, determines the required code rate and stream, and the APP uses control signaling to notify the edge CDN node , then the edge CDN node uses the multicast group to send the required code stream to the OTT terminal. In this case, when it is necessary to switch the code rate, there is no need to switch the multicast group. The APP directly notifies the edge CDN node, and the edge CDN node directly uses the original multicast group to switch and send the code stream of the corresponding code rate.

下面描述第一种情况的处理过程。The processing procedure of the first case is described below.

步骤三:OTT终端APP里的组播用户信息模块建立对应的组播频道,管理组播频道的IP地址和频道相关的多路码流和UDP端口的对应关系。Step 3: The multicast user information module in the OTT terminal APP establishes a corresponding multicast channel, and manages the IP address of the multicast channel and the corresponding relationship between the channel-related multiple streams and UDP ports.

步骤四:OTT终端APP里的组播组管理模块向家庭网关发送IGMP报文以加入频道的组播组(相当于实施例二中第二加入单元的功能),从而使节点准备接收组播源的多路数据流。Step 4: The multicast group management module in the OTT terminal APP sends an IGMP message to the home gateway to join the multicast group of the channel (equivalent to the function of the second joining unit in Embodiment 2), so that the node is ready to receive the multicast source multiple data streams.

步骤四:OTT终端APP里的组播组多路数据流接收模块(相当于实施例二中第二接收单元、第二解析单元及第二识别单元的功能)接收家庭网关发来的组播码流。Step 4: The multicast group multi-channel data stream receiving module in the OTT terminal APP (equivalent to the functions of the second receiving unit, the second analyzing unit and the second identifying unit in the second embodiment) receives the multicast code sent by the home gateway flow.

具体地,OTT终端APP里的组播组多路数据流接收模块接收的组播码流是边缘CDN节点提供的所有组播数据流。Specifically, the multicast code streams received by the multicast group multi-channel data stream receiving module in the OTT terminal APP are all multicast data streams provided by the edge CDN nodes.

OTT终端APP里的组播组多路数据流接收模块使用UDP端口号来区别不同码率的码流。The multicast group multi-channel data stream receiving module in the OTT terminal APP uses UDP port numbers to distinguish code streams of different code rates.

步骤五:OTT终端APP里的组播组多路数据流接收模块将接收的码流发送给OTT终端APP里的组播用户信息模块,由OTT终端APP里的组播用户信息模块对码流作相关的业务处理,比如发送给相关的解码模块,进行解码播放处理。Step 5: The multicast group multi-channel data stream receiving module in the OTT terminal APP sends the received code stream to the multicast user information module in the OTT terminal APP, and the multicast user information module in the OTT terminal APP processes the code stream Relevant business processing, such as sending to the relevant decoding module for decoding and playback processing.

也就是说,OTT终端APP里的组播组多路数据流接收模块通过OTT终端APP里的组播用户信息模块与终端的解码模块选择确定使用哪种码率的码流,并将把对应的码流发给解码模块。That is to say, the multicast group multi-channel data stream receiving module in the OTT terminal APP selects which code stream to use through the multicast user information module in the OTT terminal APP and the decoding module of the terminal, and will send the corresponding The code stream is sent to the decoding module.

另外,VR全景直播是目前的热门业务,组播技术在直播应用中有天然的优势,而全景直播中,存在不同角度的场景画面使用多路码流传输的情况,因此VR直播业务中也可以采用本发明实施例提供的方案。如图11所示,VR直播服务器(也可以是CDN节点)与VR终端之间的多路数据流的传输过程是:VR直播服务器将多路数据流发送至交换机,而终端从家庭网关获得多路数据流,该过程具体包括:In addition, VR panoramic live broadcast is currently a popular business. Multicast technology has natural advantages in live broadcast applications. In panoramic live broadcast, there are situations where scenes from different angles are transmitted using multiple streams. Therefore, VR live broadcast services can also The solution provided by the embodiment of the present invention is adopted. As shown in Figure 11, the transmission process of multiple data streams between the VR live server (which can also be a CDN node) and the VR terminal is: the VR live server sends multiple data streams to the switch, and the terminal obtains multiple data streams from the home gateway. data flow, the process specifically includes:

步骤一:VR组播服务器制作VR组播直播源,由VR组播服务器的组播组多路数据流发送模块发送VR直播组播码流。Step 1: The VR multicast server creates a VR multicast live source, and the multicast group multi-channel data stream sending module of the VR multicast server sends the VR live multicast code stream.

这里,VR组播服务器的组播组多路数据流发送模块使用一路组播IP地址来发送VR组播频道码流,使用不同的UDP端口来区分发送不同角度的场景画面的码流。Here, the multicast group multi-channel data stream sending module of the VR multicast server uses one multicast IP address to send the VR multicast channel code stream, and uses different UDP ports to distinguish and send the code stream of scene images from different angles.

步骤二:VR终端的组播用户信息模块建立对应的组播频道,管理组播频道的IP地址和频道相关的多路码流和UDP端口的对应关系。Step 2: The multicast user information module of the VR terminal establishes a corresponding multicast channel, manages the IP address of the multicast channel, and the corresponding relationship between the channel-related multiple code streams and UDP ports.

步骤三:VR终端的组播组管理模块向家庭网关发送IGMP报文以加入VR频道的组播组,准备接收VR组播频道的组播码流。Step 3: The multicast group management module of the VR terminal sends an IGMP message to the home gateway to join the multicast group of the VR channel, and is ready to receive the multicast stream of the VR multicast channel.

步骤四:VR终端的组播组多路数据流接收模块接收家庭网关发来的组播码流。Step 4: The multicast data stream receiving module of the VR terminal receives the multicast code stream sent by the home gateway.

具体地,组播组多路数据流接收模块接收VR组播服务器提供的VR频道的所有组播数据流。Specifically, the multicast group multiplex data stream receiving module receives all multicast data streams of the VR channel provided by the VR multicast server.

VR终端的组播组多路数据流接收模块使用UDP端口号来区别不同角度场景的码流。The multicast group multi-channel data stream receiving module of the VR terminal uses the UDP port number to distinguish the streams of different angle scenarios.

步骤五:VR终端的组播组多路数据流接收模块将接收的码流送给VR终端的组播用户信息模块做相应的业务处理,比如送给相关的解码模块做解码处理,实施VR播放。Step 5: The multicast group multi-channel data stream receiving module of the VR terminal sends the received code stream to the multicast user information module of the VR terminal for corresponding business processing, such as sending it to the relevant decoding module for decoding processing, and implementing VR playback .

从上面的描述中可以看出,本发明实施例的方案,传输媒体源的多路数据流时,使用组播组(也就是组播IP地址,对应一个组播路由条目)来标识有相关性的多路数据流的媒体源,比如OTT里的直播频道、VR直播频道等,同时使用IP上承载的UDP的端口号来标识数据流,实现了一个组播组传输多路数据流,从而节省了相关设备上组播组条目的占用数量。As can be seen from the above description, in the solution of the embodiment of the present invention, when transmitting multiple data streams of a media source, a multicast group (that is, a multicast IP address, corresponding to a multicast routing entry) is used to identify a relevant The media sources of multiple data streams, such as live channels in OTT, VR live channels, etc., use the UDP port number carried by IP to identify the data streams, and realize a multicast group to transmit multiple data streams, thereby saving The number of occupied multicast group entries on the relevant device.

具体来说,表现在以下几个方面:Specifically, it is manifested in the following aspects:

1、采用本发明实施例提供的方案,能够解决同一路组播业务下多路组播数据流占用不同组播IP地址和UDP端口的限制,减少CDN节点组播UDP socket的使用,也就是说,减少了占用的组播IP地址和UDP端口的资源;1. The solution provided by the embodiments of the present invention can solve the restriction that multi-channel multicast data streams occupy different multicast IP addresses and UDP ports under the same multicast service, and reduce the use of CDN node multicast UDP sockets, that is to say , reducing the occupied multicast IP address and UDP port resources;

2、直接使用组播IP地址来完成与交换机之间的IGMP报文交互,不依赖主机的操作系统,不再受限于UDP socket端口,所以是对TCP/IP协议栈的一个很好的扩展,而且完全遵循IGMP。2. Directly use the multicast IP address to complete the IGMP message interaction with the switch, does not depend on the operating system of the host, and is no longer limited by the UDP socket port, so it is a good extension of the TCP/IP protocol stack , and fully follow IGMP.

3、接收多路数据流的具体实现是对协议栈一个很好的补充,支持了一路组播组可以接收多路组播流的问题。3. The implementation of receiving multiple data streams is a good supplement to the protocol stack, and supports the problem that one multicast group can receive multiple multicast streams.

4、由于采用组播IP地址来标识媒体源,而媒体源的多路数据流是用UDP的端口来区分的,这样,在传输多路数据流时可以减少服务器节点或者终端与交换机之间的IGMP报文交互。4. Since the multicast IP address is used to identify the media source, and the multi-channel data streams of the media source are distinguished by UDP ports, in this way, the communication between the server node or the terminal and the switch can be reduced when transmitting multiple data streams. IGMP packet exchange.

本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present invention may be provided as methods, systems, or computer program products. Accordingly, the present invention can take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) having computer-usable program code embodied therein.

本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor, or processor of other programmable data processing equipment to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing equipment produce a An apparatus for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions The device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby The instructions provide steps for implementing the functions specified in the flow chart or blocks of the flowchart and/or the block or blocks of the block diagrams.

以上所述,仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention.

Claims (23)

1.一种数据流传输方法,其特征在于,所述方法包括:1. A data stream transmission method, characterized in that the method comprises: 针对第一媒体源的至少两路数据流,利用用户数据报协议UDP的不同端口号标识每路数据流;For at least two data streams of the first media source, use different port numbers of the User Datagram Protocol UDP to identify each data stream; 基于所述第一媒体源的组播互联网协议IP地址,将标识后的第一媒体源的至少两路数据流发出。Based on the multicast Internet Protocol IP address of the first media source, at least two data streams of the identified first media source are sent out. 2.根据权利要求1所述的方法,其特征在于,利用UDP的端口号标识每路数据流,包括:2. The method according to claim 1, characterized in that, utilizing the port number of UDP to identify each data flow, comprising: 在每路数据流的UDP报文头,封装一个目的端口号,所述至少两路数据流的目的端口号不同;Encapsulate a destination port number in the UDP packet header of each data flow, and the destination port numbers of the at least two data flows are different; 所述基于所述第一媒体源的组播IP地址,将标识后的第一媒体源的至少两路数据流发出,包括:The sending out at least two data streams of the identified first media source based on the multicast IP address of the first media source includes: 在IP报文头的目的地址添加所述第一媒体源对应的组播IP地址。Add the multicast IP address corresponding to the first media source to the destination address of the IP packet header. 3.根据权利要求1所述的方法,其特征在于,所述第一媒体源的每路数据流的码率不同,或者,所述第一媒体源的每路数据流对应的场景画面的角度不同。3. The method according to claim 1, wherein the code rate of each data stream of the first media source is different, or the angle of the scene picture corresponding to each data stream of the first media source different. 4.一种数据流传输方法,其特征在于,所述方法包括:4. A data stream transmission method, characterized in that the method comprises: 接收数据流;receive data stream; 解析数据流,获得第一组播IP地址及UDP的至少两个端口号;Analyzing the data stream to obtain at least two port numbers of the first multicast IP address and UDP; 利用所述第一组播IP地址确定接收的数据流为第一媒体源的数据流;利用UDP的不同端口号识别第一媒体源的每路数据流;Utilize the first multicast IP address to determine that the data stream received is the data stream of the first media source; utilize the different port numbers of UDP to identify each data stream of the first media source; 针对接收的第一媒体源的至少两路数据流,利用UDP的不同端口号标识每路数据流;For at least two data streams of the first media source received, each data stream is identified by a different port number of UDP; 基于所述第一媒体源的第二组播IP地址,将标识后的第一媒体源的至少两路数据流发出。Based on the second multicast IP address of the first media source, at least two data streams of the identified first media source are sent out. 5.根据权利要求4所述的方法,其特征在于,所述接收数据流,包括:5. The method according to claim 4, wherein the receiving data stream comprises: 利用钩子函数,接收报文的IP报文头及UDP报文头、第一媒体源的至少两路数据流所形成的组播数据的完整报文;Utilize the hook function to receive the complete message of the multicast data formed by the IP message header and the UDP message header of the message, and at least two data streams of the first media source; 相应地,针对每个报文,解析所述IP报文头,获得第一组播IP地址;Correspondingly, for each message, analyze the IP message header to obtain the first multicast IP address; 解析所述UDP报文头,获得对应的一个UDP的端口号。The UDP packet header is parsed to obtain a corresponding UDP port number. 6.根据权利要求4所述的方法,其特征在于,接收数据流之前,所述方法还包括:6. The method according to claim 4, wherein before receiving the data stream, the method further comprises: 利用所述第一媒体源对应的第一组播IP地址,基于网际组管理协议IGMP加入所述第一媒体源的组播频道对应的组播组。Using the first multicast IP address corresponding to the first media source, join the multicast group corresponding to the multicast channel of the first media source based on IGMP. 7.根据权利要求6所述的方法,其特征在于,基于IGMP加入所述第一媒体源的组播频道对应的组播组,包括:7. The method according to claim 6, wherein, based on IGMP, joining the multicast group corresponding to the multicast channel of the first media source comprises: 利用所述第一媒体源对应的第一组播IP地址,生成IGMP报文;Using the first multicast IP address corresponding to the first media source to generate an IGMP message; 向交换机发送所述IGMP报文;所述IGMP报文用于请求加入所述第一媒体源的组播频道对应的组播组。Sending the IGMP message to the switch; the IGMP message is used to request to join the multicast group corresponding to the multicast channel of the first media source. 8.根据权利要求4所述的方法,其特征在于,所述利用UDP的端口号标识每路数据流,包括:8. The method according to claim 4, wherein said utilizing the UDP port number to identify each data stream comprises: 在每路数据流的UDP报文头,封装一个目的端口号,所述至少两路数据流的目的端口号不同;Encapsulate a destination port number in the UDP packet header of each data flow, and the destination port numbers of the at least two data flows are different; 所述基于所述第一媒体源的第二组播IP地址,将标识后的第一媒体源的至少两路数据流发出,包括:The sending out at least two data streams of the identified first media source based on the second multicast IP address of the first media source includes: 在IP报文头的目的地址添加所述第一媒体源对应的第二组播IP地址。Add the second multicast IP address corresponding to the first media source to the destination address of the IP packet header. 9.根据权利要求4所述的方法,其特征在于,所述第一媒体源的每路数据流的码率不同,或者,所述第一媒体源的每路数据流对应的场景画面的角度不同。9. The method according to claim 4, wherein the code rate of each data stream of the first media source is different, or the angle of the scene picture corresponding to each data stream of the first media source different. 10.一种数据流传输方法,其特征在于,所述方法包括:10. A data stream transmission method, characterized in that the method comprises: 接收数据流;receive data stream; 解析数据流,获得组播IP地址及UDP的至少两个端口号;Analyze the data stream to obtain at least two port numbers of the multicast IP address and UDP; 利用所述组播IP地址确定接收的数据流为第一媒体源的数据流;利用所述UDP的不同端口号识别第一媒体源的每路数据流。Using the multicast IP address to determine that the received data flow is the data flow of the first media source; using the different port numbers of the UDP to identify each data flow of the first media source. 11.根据权利要求10所述的方法,其特征在于,所述接收数据流,包括:11. The method according to claim 10, wherein the receiving data stream comprises: 利用钩子函数,接收报文的IP报文头及UDP报文头、第一媒体源的至少两路数据流所形成的组播数据的完整报文;Utilize the hook function to receive the complete message of the multicast data formed by the IP message header and the UDP message header of the message, and at least two data streams of the first media source; 相应地,针对每个报文,解析所述IP报文头,获得组播IP地址;Correspondingly, for each message, analyze the IP message header to obtain a multicast IP address; 解析所述UDP报文头,获得对应的一个UDP的端口号。The UDP packet header is parsed to obtain a corresponding UDP port number. 12.根据权利要求10所述的方法,其特征在于,接收数据流之前,所述方法还包括:12. The method according to claim 10, wherein before receiving the data stream, the method further comprises: 利用所述第一媒体源对应的第一组播IP地址,基于IGMP加入所述第一媒体源的组播频道对应的组播组。Using the first multicast IP address corresponding to the first media source, join the multicast group corresponding to the multicast channel of the first media source based on IGMP. 13.根据权利要求12所述的方法,其特征在于,基于IGMP加入所述第一媒体源的组播频道对应的组播组,包括:13. The method according to claim 12, wherein, based on IGMP, joining the multicast group corresponding to the multicast channel of the first media source comprises: 利用所述第一媒体源对应的第一组播IP地址,生成IGMP报文;Using the first multicast IP address corresponding to the first media source to generate an IGMP message; 向交换机发送所述IGMP报文;所述IGMP报文用于请求加入所述第一媒体源的组播频道对应的组播组。Sending the IGMP message to the switch; the IGMP message is used to request to join the multicast group corresponding to the multicast channel of the first media source. 14.根据权利要求10所述的方法,其特征在于,所述第一媒体源的每路数据流的码率不同,或者,所述第一媒体源的每路数据流对应的场景画面的角度不同。14. The method according to claim 10, wherein the code rate of each data stream of the first media source is different, or the angle of the scene picture corresponding to each data stream of the first media source different. 15.一种数据流传输装置,其特征在于,所述装置包括:15. A data stream transmission device, characterized in that the device comprises: 第一标识模块,用于针对第一媒体源的至少两路数据流,利用UDP的不同端口号标识每路数据流;The first identification module is used for at least two data streams of the first media source, using different port numbers of UDP to identify each data stream; 第一发送单元,基于所述第一媒体源的IP地址,将标识后的第一媒体源的至少两路数据流发出。The first sending unit sends the identified at least two data streams of the first media source based on the IP address of the first media source. 16.根据权利要求15所述的装置,其特征在于,所述第一标识模块,具体用于在每路数据流的UDP报文头,封装一个目的端口号,所述至少两路数据流的目的端口号不同;16. The device according to claim 15, wherein the first identification module is specifically configured to encapsulate a destination port number in the UDP packet header of each data flow, and the at least two data flows The destination port numbers are different; 所述第一发送单元,具体用于在IP报文头的目的地址添加所述第一媒体源对应的组播IP地址。The first sending unit is specifically configured to add the multicast IP address corresponding to the first media source to the destination address of the IP packet header. 17.一种数据流传输装置,其特征在于,所述装置包括:17. A data stream transmission device, characterized in that the device comprises: 第一接收单元,用于接收数据流;a first receiving unit, configured to receive a data stream; 第一解析单元,用于解析数据流,获得第一组播IP地址及UDP的至少两个端口号;The first parsing unit is used for parsing the data flow to obtain the first multicast IP address and at least two port numbers of UDP; 第一识别单元,用于利用所述第一组播IP地址确定接收的数据流为第一媒体源的数据流;利用所述UDP的不同端口号识别第一媒体源的每路数据流;The first identifying unit is configured to use the first multicast IP address to determine that the received data stream is the data stream of the first media source; utilize the different port numbers of the UDP to identify each data stream of the first media source; 第二标识模块,用于针对接收的第一媒体源的至少两路数据流,利用UDP的不同端口号标识每路数据流;The second identification module is used for at least two data streams of the first media source received, using different port numbers of UDP to identify each data stream; 第二发送单元,用于基于所述第一媒体源的第二IP地址,将标识后的第一媒体源的至少两路数据流发出。The second sending unit is configured to send the identified at least two data streams of the first media source based on the second IP address of the first media source. 18.根据权利要求17所述的装置,其特征在于,所述装置还包括:18. The device according to claim 17, further comprising: 第一加入单元,用于利用所述第一媒体源对应的第一组播IP地址,基于IGMP加入所述第一媒体源的组播频道对应的组播组。The first joining unit is configured to use the first multicast IP address corresponding to the first media source to join the multicast group corresponding to the multicast channel of the first media source based on IGMP. 19.一种数据传输流装置,其特征在于,所述装置包括:19. A data transport stream device, characterized in that the device comprises: 第二接收单元,用于接收数据流;a second receiving unit, configured to receive a data stream; 第二解析单元,用于解析数据流,获得组播IP地址及UDP的至少两个端口号;The second parsing unit is used for parsing the data flow to obtain at least two port numbers of the multicast IP address and UDP; 第二识别单元,用于利用所述组播IP地址确定接收的数据流为第一媒体源的数据流;利用所述UDP的不同端口号识别第一媒体源的每路数据流。The second identifying unit is configured to use the multicast IP address to determine that the received data flow is the data flow of the first media source; and use the different port numbers of the UDP to identify each data flow of the first media source. 20.根据权利要求19所述的装置,其特征在于,所述装置还包括:20. The device of claim 19, further comprising: 第二加入单元,用于利用所述第一媒体源对应的组播IP地址,基于IGMP加入所述第一媒体源的组播频道对应的组播组。The second joining unit is configured to use the multicast IP address corresponding to the first media source to join the multicast group corresponding to the multicast channel of the first media source based on IGMP. 21.一种源设备,其特征在于,所述设备包括:21. A source device, characterized in that the device comprises: 第一处理器,用于针对第一媒体源的至少两路数据流,利用用户数据报UDP的不同端口号标识每路数据流;The first processor is used for at least two data streams of the first media source, using different port numbers of the user datagram UDP to identify each data stream; 第一通信接口,用于基于所述第一媒体源的组播IP地址,将标识后的第一媒体源的至少两路数据流发出。The first communication interface is configured to send out at least two data streams of the identified first media source based on the multicast IP address of the first media source. 22.一种中间设备,其特征在于,所述设备包括:22. An intermediate device, characterized in that the device comprises: 第二通信接口,用于接收数据流;The second communication interface is used to receive the data stream; 第二处理器,用于解析数据流,获得第一组播IP地址及UDP的至少两个端口号;利用所述第一组播IP地址确定接收的数据流为第一媒体源的数据流;利用UDP的不同端口号识别第一媒体源的每路数据流;以及针对接收的第一媒体源的至少两路数据流,利用UDP的不同端口号标识每路数据流;The second processor is used to analyze the data flow, and obtain at least two port numbers of the first multicast IP address and UDP; use the first multicast IP address to determine that the received data flow is the data flow of the first media source; Using different port numbers of UDP to identify each data stream of the first media source; and for at least two data streams of the first media source received, using different port numbers of UDP to identify each data stream; 所述第二通信接口,还用于基于所述第一媒体源的第二组播IP地址,将标识后的第一媒体源的至少两路数据流发出。The second communication interface is further configured to send out at least two data streams of the identified first media source based on the second multicast IP address of the first media source. 23.一种终端,其特征在于,所述终端包括:23. A terminal, characterized in that the terminal comprises: 第三通信接口,用于接收数据流;The third communication interface is used to receive the data stream; 第三处理器,用于解析数据流,获得组播IP地址及UDP的至少两个端口号;利用所述组播IP地址确定接收的数据流为第一媒体源的数据流;以及利用所述UDP的不同端口号识别第一媒体源的每路数据流。The third processor is used to analyze the data flow to obtain at least two port numbers of the multicast IP address and UDP; use the multicast IP address to determine that the received data flow is the data flow of the first media source; Different port numbers of UDP identify each data stream of the first media source.
CN201611260794.0A 2016-12-30 2016-12-30 A kind of data flow transmission method, device and relevant device Pending CN108270731A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201611260794.0A CN108270731A (en) 2016-12-30 2016-12-30 A kind of data flow transmission method, device and relevant device
PCT/CN2017/118912 WO2018121584A1 (en) 2016-12-30 2017-12-27 Data stream transmission method, apparatus, related devices and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611260794.0A CN108270731A (en) 2016-12-30 2016-12-30 A kind of data flow transmission method, device and relevant device

Publications (1)

Publication Number Publication Date
CN108270731A true CN108270731A (en) 2018-07-10

Family

ID=62710273

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611260794.0A Pending CN108270731A (en) 2016-12-30 2016-12-30 A kind of data flow transmission method, device and relevant device

Country Status (2)

Country Link
CN (1) CN108270731A (en)
WO (1) WO2018121584A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110876070A (en) * 2018-08-29 2020-03-10 中国电信股份有限公司 Content distribution system, processing method, and storage medium
CN112491909A (en) * 2020-12-01 2021-03-12 北京鸿腾智能科技有限公司 Flow identification method, device, equipment and storage medium based on DOH protocol

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113490162B (en) * 2021-07-04 2022-05-17 芯河半导体科技(无锡)有限公司 Optimization method for multicast data stream forwarding
CN116033365B (en) * 2023-03-22 2023-06-20 新华三技术有限公司 Communication method, device, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1825944A (en) * 2005-02-25 2006-08-30 华为技术有限公司 A mobile video broadcasting system and mobile video broadcasting method
CN101110814A (en) * 2006-07-17 2008-01-23 中兴通讯股份有限公司 Method for implementing authority control of user multicast
CN101360217A (en) * 2007-07-30 2009-02-04 Lg电子株式会社 Host apparatus, point of deployment and method for recognizing operation mode
CN101494763A (en) * 2008-01-24 2009-07-29 华为技术有限公司 Method, system and equipment for switching channel
US20100165859A1 (en) * 2008-12-31 2010-07-01 Herve Marc Carruzzo Sorting flow records into analysis buckets
CN102265553A (en) * 2008-12-22 2011-11-30 汤姆森特许公司 Method and apparatus for reliable multicast data streaming
CN104346135A (en) * 2013-08-08 2015-02-11 腾讯科技(深圳)有限公司 Method, device and system for parallel processing of data flows

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7876768B2 (en) * 2006-06-30 2011-01-25 Ver Steeg William C Systems and methods of assembling an elementary stream from an encapsulated multimedia transport stream
CN106302566B (en) * 2015-05-12 2019-07-23 华为技术有限公司 The method, apparatus and system of live media data

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1825944A (en) * 2005-02-25 2006-08-30 华为技术有限公司 A mobile video broadcasting system and mobile video broadcasting method
CN101110814A (en) * 2006-07-17 2008-01-23 中兴通讯股份有限公司 Method for implementing authority control of user multicast
CN101360217A (en) * 2007-07-30 2009-02-04 Lg电子株式会社 Host apparatus, point of deployment and method for recognizing operation mode
CN101494763A (en) * 2008-01-24 2009-07-29 华为技术有限公司 Method, system and equipment for switching channel
CN102265553A (en) * 2008-12-22 2011-11-30 汤姆森特许公司 Method and apparatus for reliable multicast data streaming
US20100165859A1 (en) * 2008-12-31 2010-07-01 Herve Marc Carruzzo Sorting flow records into analysis buckets
CN104346135A (en) * 2013-08-08 2015-02-11 腾讯科技(深圳)有限公司 Method, device and system for parallel processing of data flows

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110876070A (en) * 2018-08-29 2020-03-10 中国电信股份有限公司 Content distribution system, processing method, and storage medium
CN112491909A (en) * 2020-12-01 2021-03-12 北京鸿腾智能科技有限公司 Flow identification method, device, equipment and storage medium based on DOH protocol
CN112491909B (en) * 2020-12-01 2023-09-01 三六零数字安全科技集团有限公司 Flow identification method, device, equipment and storage medium based on DOH protocol

Also Published As

Publication number Publication date
WO2018121584A1 (en) 2018-07-05

Similar Documents

Publication Publication Date Title
CN109167960B (en) Method and system for processing video stream data
CN109168064B (en) Synchronous display method and system of electronic data
CN110475102B (en) Monitoring data processing method and system based on video network
CN110049271B (en) Video networking conference information display method and device
CN109640028B (en) Method and device for carrying out conference combining on multiple video networking terminals and multiple Internet terminals
CN108737768B (en) Monitoring method and monitoring device based on monitoring system
CN110475090B (en) Conference control method and system
CN110022295B (en) Data transmission method and video networking system
CN109474715B (en) Resource configuration method and device based on video network
CN109120879B (en) Video conference processing method and system
WO2018121584A1 (en) Data stream transmission method, apparatus, related devices and storage medium
CN109005378B (en) Video conference processing method and system
CN110650171B (en) Video networking service scheduling system and method
CN110266577B (en) A tunnel establishment method and video networking system
CN109768964B (en) Audio and video display method and device
CN110049268B (en) Video telephone connection method and device
CN111787261B (en) Method, device, electronic device and storage medium for transmitting audio and video data
CN110740087B (en) Message transmission method, terminal, gateway device, electronic device and storage medium
CN110289974B (en) Data stream processing method, system and device and storage medium
CN109922300B (en) Method and server for inviting video network MCU conference to Internet MCU conference
CN112104835B (en) Video transmission method, device, equipment and readable storage medium
CN110149306B (en) Media data processing method and device
CN111614921B (en) A communication method and device
CN110177244B (en) Method and system for polling conference terminal
CN110401807B (en) Communication method and device for videophone system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20180710

WD01 Invention patent application deemed withdrawn after publication