WO2019033910A1 - Multi-port multicast method and device, and computer readable storage medium - Google Patents

Multi-port multicast method and device, and computer readable storage medium Download PDF

Info

Publication number
WO2019033910A1
WO2019033910A1 PCT/CN2018/097125 CN2018097125W WO2019033910A1 WO 2019033910 A1 WO2019033910 A1 WO 2019033910A1 CN 2018097125 W CN2018097125 W CN 2018097125W WO 2019033910 A1 WO2019033910 A1 WO 2019033910A1
Authority
WO
WIPO (PCT)
Prior art keywords
multicast
port
packet
list
multicast packet
Prior art date
Application number
PCT/CN2018/097125
Other languages
French (fr)
Chinese (zh)
Inventor
梁建适
张晓渠
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2019033910A1 publication Critical patent/WO2019033910A1/en

Links

Images

Classifications

    • 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
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/16Multipoint routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/20Support for services
    • H04L49/201Multicast operation; Broadcast operation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms

Definitions

  • the present disclosure relates to the field of communications technologies, and in particular, to a multi-port multicast method, device, and computer readable storage medium.
  • multicast transmission technology In the field of Internet transmission, with the development of multimedia video technology, the application of multicast transmission technology is more and more extensive, such as IPTV channel transmission, emerging VR (Virtual Reality) live broadcast technology, all using multicast transmission media. data. Moreover, these multicast transmissions need to support one-way multicast transmission of multiple streams. For example, OTT (Over The Top) multicast transmission needs to transmit code streams of different code rates, and VR multicast transmission needs to support transmission of multi-view streams. .
  • the current windows and linux systems manage multicast groups by attaching to UDP sockets.
  • the UDP socket must specify the multicast IP address and port to join and leave the multicast group. In this case, the UDP socket can only receive multicast packets whose destination port is the binding port (or the default port of the system).
  • the present disclosure provides a multi-port multicast method, device, and computer readable storage medium for solving the problem that a multicast group cannot implement multi-port multicast communication in the related art.
  • a multi-port multicast method including: configuring a multi-port list locally after joining a multicast group; and, according to the multi-port list, a destination port in the received multicast packet Matching is performed, and when the matching is successful, the multicast packet is processed.
  • the locally configuring the multi-port list includes: pre-adding a port configuration interface in the multicast protocol stack; and adding, by using the port configuration interface, multiple ports to the multicast in a hash list In the protocol stack.
  • the matching by the multi-port list, the destination port in the received multicast packet, including: verifying the multicast address in the multicast packet; and, when the verification succeeds, determining the group Whether any destination port in the broadcast message is located in the multi-port list; if it is located, the match is successful, and the multicast message is added to the receive queue.
  • the method further includes: when the multicast address verification fails or when any destination port in the multicast packet is not in the multi-port list, the multicast packet is discarded.
  • the method further includes: when a multi-port multicast packet needs to be sent, configuring a different port into the destination port field in the multicast packet.
  • a multi-port multicast device including a memory and a processor; wherein the memory stores a multi-port multicast program, when the multi-port multicast program is executed by the processor
  • the following steps are performed: after the multicast group is added, the multi-port list is configured locally; and the destination port in the received multicast packet is matched according to the multi-port list, and when the matching is successful, the group is processed. Broadcast message.
  • the following steps are implemented: pre-adding a port configuration interface in the multicast protocol stack; and, by using the port configuration interface, multiple ports are A hash list form is added to the multicast protocol stack.
  • the following steps are performed: verifying a multicast address in the multicast packet; and, when the verification is successful, determining the multicast packet Whether any of the destination ports in the text is located in the multi-port list; when located, the matching is successful, and the multicast packet is added to the receiving queue.
  • the following steps are implemented: when a multi-port multicast packet needs to be sent, the port is configured to be in the multicast packet. In the port field.
  • a computer readable storage medium storing a multi-port multicast program when the multi-port multicast program is executed by the processor to implement the above The steps in the multi-port multicast method.
  • the multi-port multicast method, device, and computer readable storage medium configured by the embodiments of the present disclosure configure a multi-port list set to multi-port communication after establishing multicast group communication; and receive different port numbers when receiving When a multicast packet is received, the multicast packet can be processed according to the multi-port list to receive packets of different ports in the same multicast group. It can be seen that the configuration of the multi-port list does not need to establish multiple UDP sockets according to the disclosure, which reduces the creation of the socket and reduces the management complexity of the application layer socket.
  • FIG. 1 is a flowchart of a multi-port multicast method according to an embodiment of the present disclosure
  • FIG. 2 is a flowchart of a multi-port multicast method according to an embodiment of the present disclosure
  • FIG. 3 is a schematic block diagram of a multi-port multicast device according to an embodiment of the present disclosure.
  • the IGMP (Internet Group Management Protocol) protocol is used to control and manage multicast groups. Only the IGMP protocol directly contacts the multicast host. The router that runs IGMP is responsible for managing the joining, leaving, and maintaining group membership of the group members.
  • For the IGMP packet format see the following table, including the version field, including the IGMP version identifier.
  • the format of the UDP packet used by the multicast group when performing UDP socket communication is as follows:
  • UDP packets only the source and destination ports represent fields of data packet length, UDP data packet checksum, and UDP data.
  • the IGMP protocol has no relationship with the IP address of the multicast group and is not related to the port of the UDP protocol carried on the IP. Multicast packets are carried on the IP and UDP protocols. Therefore, it is feasible to transmit multi-port data flows on a multicast group, and it does not affect the normal operation of the IGMP protocol family. Based on the above ideas, the multi-port multicast method of the present disclosure is proposed.
  • the multi-port multicast method provided by the embodiment of the present disclosure, as shown in FIG. 1, includes the following steps.
  • step 101 after joining the multicast group, the multi-port list is configured locally.
  • UDP socket communication is established.
  • the multicast group protocol stack is improved, and a multi-port configuration interface is added to the protocol stack.
  • the port number can be configured through the multi-port configuration interface, and the port number is saved in the hash protocol form to the corresponding data structure of the UDP socket communication in the multicast protocol stack.
  • step 102 the port in the received multicast packet is matched according to the multi-port list, and when the matching is successful, the multicast packet is processed.
  • the multicast packets sent by the switch are matched according to the multi-port list in the UDP socket communication.
  • the IP protocol is used to carry the UDP protocol. Therefore, after receiving the multicast packet, the multicast address in the multicast packet is also the multicast IP address. Address) for verification. After the verification is passed, the next step of verifying the port number is performed. If the authentication fails, the current multicast packet is not in the group. The multicast packet is discarded.
  • the port number set in the multi-port list is matched with the destination port number in the multicast packet when the port in the received multicast packet is matched.
  • the multicast packet is a processable packet, and the packet is added to the receiving queue for subsequent processing in an embodiment. If the destination port number does not exist in the multi-port list, the multicast packet is directly discarded.
  • the packet when performing multicast group communication, the packet is not limited to the processing of the packet of the specific destination port, but the multi-port list is configured in the local protocol stack, and the multi-port list can be used for different purposes.
  • the processing of packets on the port enables the reception of data streams of different ports in the same multicast group.
  • multiple methods are not required, and the foregoing method can be implemented through a single socket, which effectively reduces communication complexity and saves multicast resources.
  • the method may further include sending a multicast message.
  • the multicast host may adopt a Linux protocol stack.
  • the disclosure is not limited to the Linux protocol stack, and may also be a Windows protocol stack.
  • the IGMP protocol packet is used to manage the joining and leaving the multicast group, and the multicast information is reported.
  • the multicast host uses the IP and UDP protocols to communicate, and carries the data content carried by the UDP protocol through the IP protocol. Specify the destination address as the multicast address (multicast IP address) in the IP packet header, and specify different destination ports in the UDP protocol header to indicate different data flows.
  • the multi-port multicast method of this embodiment may include the following steps.
  • step 201 the multicast host creates a UDP socket and sets the IP_ADD_MEMBERSHIP interface of the UDP socket IP layer.
  • the multicast host uses the Linux protocol stack to notify the local operating system of the occurrence of IGMP messages through the IP_ADD_MEMBERSHIP interface, and sends the packets to the switch to generate a multicast entry on the switch.
  • a multicast MAC address and a multicast IP address are created on the network port of the local system when the IGMP protocol packet is generated, and the IGMP protocol packet is sent to the switch.
  • step 203 after the multicast host joins the multicast group, multiple ports are configured to be added to the UDP socket through the IP_ADD_MEMBERPORT interface.
  • IP_ADD_MEMBERPORT interface needs to be added to the Linux protocol stack to notify the local operating system to add the specified port to the multicast UDP socket.
  • the __be16inet_sport field in the struct inet_sock data structure indicates the socket source port;
  • the struct ip_mc_socklist mc_list field indicates the list of joined multicast groups; in the struct ip_mc_socklist structure, the struct ip_mreqn multi field indicates the information of the multicast group.
  • a multicast multi-port hash table is added to the struct ip_mc_socklist data structure of the Linux protocol stack, that is, struct inet_mc_hashbucket port_bucket , store the port information of the multicast UDP socket.
  • the implementation code can be, for example:
  • step 205 the multicast host receives the multicast packet and matches the multi-port hash table of the multicast IP address to which the UDP socket belongs in the multicast packet. When the match is passed, the multicast packet is added to the receive queue.
  • the switch After the multicast group communication is established, the switch sends the multicast packets belonging to the multicast group to all multicast hosts that join the multicast group.
  • the switch uses UDP sockets to communicate, and only the packets are forwarded according to the multicast IP address. The processing of the packets is performed by the multicast host.
  • the Linux protocol stack can receive multicast packets containing multiple ports through the kernel receiving function.
  • receive a multicast packet check whether the UDP socket belongs to the multicast group by checking the multicast IP address to which the UDP socket belongs. If it belongs to the multicast group, it scans the multi-port hash table of the struct inet_sock member of the UDP socket and matches the destination port in the multicast packet.
  • the destination port of the multicast packet matches a port in the multi-port hash table of the UDP socket, the corresponding data packet is added to the receiving queue of the UDP socket, and the application layer program waits for the multicast packet of the UDP socket to be received. .
  • the device detects that any destination port is in the multi-port hash table, and then matches the packet to add the corresponding data packet to the receive queue.
  • a multicast host When a multicast host sends multicast packets through a UDP socket, it can be sent in the UDP protocol format. If the UDP socket needs to send UDP multicast packets containing multiple ports, you only need to fill in different port values in the destination port field, and encapsulate the multicast IP address through the IP protocol. This can implement UDP socket multi-port group. The transmission of the broadcast message.
  • the related resident operating system multicast group management application is extended.
  • the multicast group joins and leaves the IP_ADD_MEMBERSHIP command compatible with the Linux protocol stack UDP socket.
  • a multi-port multicast device configured to implement the multi-port multicast method described above. As shown in Figure 3.
  • the device includes a processor 32 and a memory 31 that stores instructions executable by the processor 32.
  • the processor 32 may be a general-purpose processor, such as a central processing unit (CPU), or may be a digital signal processor (DSP), an application specific integrated circuit (ASIC), or Is one or more integrated circuits configured to implement embodiments of the present disclosure.
  • CPU central processing unit
  • DSP digital signal processor
  • ASIC application specific integrated circuit
  • the memory 31 can be used to store program code and transfer the program code to the CPU.
  • the memory 31 may include a volatile memory such as a random access memory (RAM).
  • the memory 31 may also include a non-volatile memory such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state hard disk. (solid-state drive, SSD).
  • the memory 31 may also include a combination of memories of the above kind.
  • the multi-port multicast device may include a memory 31 and a processor 32.
  • a multi-port multicast program is stored in the memory 31.
  • the processor 32 executes the following steps: after joining the multicast group, the multi-port list is locally configured; and, according to the multi-port list The destination port is matched in the received multicast packet. When the match is successful, the multicast packet is processed.
  • the following steps are implemented: pre-adding a port configuration interface in the multicast protocol stack; and configuring multiple ports through the port configuration interface It is added to the multicast protocol stack in the form of a hash list.
  • the following steps are performed: verifying a multicast address in the multicast packet; and, when the verification is successful, determining the group Whether any destination port in the broadcast message is located in the multi-port list; if it is located, the match is successful, and the multicast message is added to the receive queue.
  • the multicast packet is discarded.
  • the following steps are performed: when a multi-port multicast message needs to be sent, different ports are configured in the multicast packet. In the destination port field.
  • the embodiment of the present disclosure also provides a computer readable storage medium.
  • the computer readable storage medium herein stores one or more programs.
  • the computer readable storage medium may include a volatile memory such as a random access memory; the memory may also include a non-volatile memory such as a read only memory, a flash memory, a hard disk or a solid state hard disk; the memory may also include the above categories a combination of memory.
  • One or more programs in a computer readable storage medium may be executed by one or more processors to implement all of the steps and steps in the multi-port multicast method provided by the method embodiments. For the implementation of the steps, reference may be made to the detailed description in the above embodiments, and details are not described in this embodiment.
  • the disclosure supplements the Linux protocol and effectively solves the problem that one multicast group can receive multiple multicast streams.
  • the IP_ADD_MEMBERPORT interface is added to the Linux protocol stack to enhance the receiving function of the UDP socket multicast packets in the Linux protocol stack.
  • the multicast packets containing different ports are received in the same multicast UDP socket.
  • the function of sending and receiving multicast packets on the port is effective. This reduces the complexity of socket management and reduces the complexity of application layer socket management. It reduces IGMP protocol packet exchange between the streaming server node and the switch, saving multicast on related devices. The number of occupations of the group entry.

Abstract

The present disclosure relates to a multi-port multicast method and device, and a computer readable storage medium. The method comprises: after joining a multi-cast group, configuring a multi-port list locally; and matching, according to the multi-port list, destination ports in a received multi-cast packet, and processing the multi-cast packet when the matching is successful. The present disclosure does not require the establishment of multiple UDP sockets by configuring a multi-port list, thereby reducing the creation of sockets and reducing the management complexity of application layer sockets.

Description

多端口组播方法、设备及计算机可读存储介质Multi-port multicast method, device and computer readable storage medium 技术领域Technical field
本公开涉及通信技术领域,特别是涉及一种多端口组播方法、设备及计算机可读存储介质。The present disclosure relates to the field of communications technologies, and in particular, to a multi-port multicast method, device, and computer readable storage medium.
背景技术Background technique
在互联网传输领域,随着多媒体视频技术的发展,组播传输技术的应用越来越广泛,如,IPTV的频道传输,新兴的VR(Virtual Reality,虚拟现实)直播技术,都使用组播传输媒体数据。而且,这些组播传输需要支持一路组播传输多路码流,如,OTT(Over The Top)组播传输需要传输不同码率的码流,VR组播传输需要支持传输多视角的码流等。In the field of Internet transmission, with the development of multimedia video technology, the application of multicast transmission technology is more and more extensive, such as IPTV channel transmission, emerging VR (Virtual Reality) live broadcast technology, all using multicast transmission media. data. Moreover, these multicast transmissions need to support one-way multicast transmission of multiple streams. For example, OTT (Over The Top) multicast transmission needs to transmit code streams of different code rates, and VR multicast transmission needs to support transmission of multi-view streams. .
目前的windows和linux系统对组播组的管理是依附于UDP socket。而UDP socket必须指定组播IP和端口,才能完成组播组的加入和离开。这种情况下,UDP socket只能接收目的端口为绑定端口(或者系统默认端口)的组播报文。The current windows and linux systems manage multicast groups by attaching to UDP sockets. The UDP socket must specify the multicast IP address and port to join and leave the multicast group. In this case, the UDP socket can only receive multicast packets whose destination port is the binding port (or the default port of the system).
在传统协议栈实现情况下,如果同一组播组要接收不同端口的组播报文,需要创建多个UDP组播socket,每个socket接收包含一种端口的组播报文,增加了应用层UDP组播socket的管理复杂度。并且,由于CDN(Content Delivery Networks,内容分发网络)服务器接口网卡、协议栈的组播路由条目和承载网路由器上组播组的数量(即组播路由条目数量)都是有限的,组播资源是非常紧缺的。因此,亟需一种新的组播组的通信方法,以实现同一组播组中多端口组播通信。In the case of the implementation of the traditional protocol stack, if the same multicast group is to receive multicast packets of different ports, multiple UDP multicast sockets need to be created. Each socket receives multicast packets containing one type of port and adds the application layer. Management complexity of UDP multicast sockets. Moreover, because the number of multicast routing entries of the CDN (Content Delivery Network) server interface network card, the protocol stack, and the number of multicast groups on the bearer network router (that is, the number of multicast routing entries) are limited, the multicast resources are limited. It is very scarce. Therefore, a new multicast group communication method is needed to implement multi-port multicast communication in the same multicast group.
发明内容Summary of the invention
本公开提供一种多端口组播方法、设备及计算机可读存储介质,用以解决相关技术中组播组无法实现多端口组播通信的问题。The present disclosure provides a multi-port multicast method, device, and computer readable storage medium for solving the problem that a multicast group cannot implement multi-port multicast communication in the related art.
为实现上述发明目的,本公开采用下述的技术方案:In order to achieve the above object, the present disclosure adopts the following technical solutions:
依据本公开的一个方面,提供一种多端口组播方法,包括:在加入组播组后,在本地配置多端口列表;以及,根据所述多端口列表对接收到的组播报文中的目的端口进行匹配,当匹配成功时,处理所述组播报文。According to an aspect of the present disclosure, a multi-port multicast method is provided, including: configuring a multi-port list locally after joining a multicast group; and, according to the multi-port list, a destination port in the received multicast packet Matching is performed, and when the matching is successful, the multicast packet is processed.
可选的,所述在本地配置多端口列表,包括:在组播协议栈中预先增加端口配置接口;以及,通过所述端口配置接口将多个端口以哈希列表形式添加至所述组播协议栈中。Optionally, the locally configuring the multi-port list includes: pre-adding a port configuration interface in the multicast protocol stack; and adding, by using the port configuration interface, multiple ports to the multicast in a hash list In the protocol stack.
可选的,所述根据所述多端口列表对接收到的组播报文中目的端口进行匹配,包括:对所述组播报文中的组播地址进行验证;以及,当验证成功时,判断所述组播报文中的任一目的端口是否位于所述多端口列表中;当位于时,则匹配成功,将所述组播报文添加至接收队列中。Optionally, the matching, by the multi-port list, the destination port in the received multicast packet, including: verifying the multicast address in the multicast packet; and, when the verification succeeds, determining the group Whether any destination port in the broadcast message is located in the multi-port list; if it is located, the match is successful, and the multicast message is added to the receive queue.
可选的,所述方法还包括:当所述组播地址验证失败或者当所述组播报文中的任一目的端口不在所述多端口列表中时,则将所述组播报文丢弃。Optionally, the method further includes: when the multicast address verification fails or when any destination port in the multicast packet is not in the multi-port list, the multicast packet is discarded.
可选的,所述方法还包括:当需要发送多端口的组播报文时,将不同的端口配置至所述组播报文中的目的端口字段中。Optionally, the method further includes: when a multi-port multicast packet needs to be sent, configuring a different port into the destination port field in the multicast packet.
依据本公开的一个方面,提供一种多端口组播设备,包括存储器和处理器;其中,所述存储器中存储有多端口组播程序,当所述多端口组播程序被所述处理器执行时,以实现如下步骤:在加入组播组后,在本地配置多端口列表;以及,根据所述多端口列表对接收到的组播报文中目的端口进行匹配,当匹配成功时,处理所述组播报文。According to an aspect of the present disclosure, a multi-port multicast device including a memory and a processor; wherein the memory stores a multi-port multicast program, when the multi-port multicast program is executed by the processor The following steps are performed: after the multicast group is added, the multi-port list is configured locally; and the destination port in the received multicast packet is matched according to the multi-port list, and when the matching is successful, the group is processed. Broadcast message.
可选的,当所述多端口组播程序被所述处理器执行时,以实现如下步骤:在组播协议栈中预先增加端口配置接口;以及,通过所述端口配置接口将多个端口以哈希列表形式添加至所述组播协议栈中。Optionally, when the multi-port multicast program is executed by the processor, the following steps are implemented: pre-adding a port configuration interface in the multicast protocol stack; and, by using the port configuration interface, multiple ports are A hash list form is added to the multicast protocol stack.
可选的,当所述多端口组播程序被所述处理器执行时,以实现如下步骤:对所述组播报文中的组播地址进行验证;以及,当验证成功时,判断所述组播报文中的任一目的端口是否位于所述多端口列表中;当位于时,则匹配成功,将所述组播报文添加至接收队列中。Optionally, when the multi-port multicast program is executed by the processor, the following steps are performed: verifying a multicast address in the multicast packet; and, when the verification is successful, determining the multicast packet Whether any of the destination ports in the text is located in the multi-port list; when located, the matching is successful, and the multicast packet is added to the receiving queue.
可选的,当所述多端口组播程序被所述处理器执行时,以实现如下步骤:当需要发送多端口的组播报文时,将不同的端口配置至所述组播报文中的目的端口字段中。Optionally, when the multi-port multicast program is executed by the processor, the following steps are implemented: when a multi-port multicast packet needs to be sent, the port is configured to be in the multicast packet. In the port field.
依据本公开的一个方面,提供一种计算机可读存储介质,所述计算机可读存储介质存储有多端口组播程序,当所述多端口组播程序被所述处理器执行时,以实现上述所述的多端口组播方法中的步骤。According to an aspect of the present disclosure, a computer readable storage medium storing a multi-port multicast program when the multi-port multicast program is executed by the processor to implement the above The steps in the multi-port multicast method.
本公开实施例所提供的多端口组播方法、设备及计算机可读存储介质,通过在建立组播组通信后,配置设置为多端口通信的多端口列表;在接收到携带不同的端口号的组播报文时,根据该多端口列表可以确定组播报文是否需要处理,以实现同一组播组中不同端口报文的接收。可知,基于本公开通过配置多端口列表无需建立多个UDP socket,减少socket的创建,降低了应用层socket的管理复杂度。The multi-port multicast method, device, and computer readable storage medium provided by the embodiments of the present disclosure configure a multi-port list set to multi-port communication after establishing multicast group communication; and receive different port numbers when receiving When a multicast packet is received, the multicast packet can be processed according to the multi-port list to receive packets of different ports in the same multicast group. It can be seen that the configuration of the multi-port list does not need to establish multiple UDP sockets according to the disclosure, which reduces the creation of the socket and reduces the management complexity of the application layer socket.
上述说明仅是本公开技术方案的概述,为了能够更清楚了解本公开的技术手段,而可依照说明书的内容予以实施,并且为了让本公开的上述和其它目的、特征和优点能够更明显易懂,以下提供本公开的示例性实施方式。The above description is only an overview of the technical solutions of the present disclosure, and the above-described and other objects, features and advantages of the present disclosure can be more clearly understood. Exemplary embodiments of the present disclosure are provided below.
附图说明DRAWINGS
为了更清楚地说明本公开实施例或相关中的方案,下面将对实施例或相关描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图仅仅是本公开的一些实施例,对于本领域普通人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present disclosure or related aspects, the drawings used in the embodiments or the related description will be briefly described below. It is obvious that the drawings in the following description are only the disclosure of the present disclosure. In some embodiments, other drawings may be obtained from those of ordinary skill in the art without departing from the scope of the invention.
图1为本公开一实施例中多端口组播方法的流程图;1 is a flowchart of a multi-port multicast method according to an embodiment of the present disclosure;
图2为本公开一实施例中多端口组播方法的流程图;2 is a flowchart of a multi-port multicast method according to an embodiment of the present disclosure;
图3为本公开一实施例中多端口组播设备的原理框图。FIG. 3 is a schematic block diagram of a multi-port multicast device according to an embodiment of the present disclosure.
具体实施方式Detailed ways
以下结合附图以及示例性实施例,对本公开进行详细说明。应当理解,此处所描述的示例性实施例仅仅用以解释本公开,而不对本公开构成任何限制。The present disclosure is described in detail below in conjunction with the drawings and exemplary embodiments. It is to be understood that the exemplary embodiments described herein are merely illustrative of the disclosure and are not intended to be limiting.
在windows和linux这些通用操作系统的协议栈中,通过IGMP(Internet Group Management Protocol)协议来控制和管理组播组。只有IGMP协议直接与组播主机联系,运行IGMP的路由器负责管理组成员的加入、离开,维护组成员关系。对于IGMP报文格式参见下表,包括版本字段,包含IGMP版本标识,目前有V1、V2和V3三个版本;类型字段,包括成员关系查询(0x11),成员关系报告(0x12);校验和字段,设置为IGMP协议报文的校验和;组地址;当一个成员关系报告正被发送时,组地址字段包含组播地址。当设置为成员关系查询时,本字段为0,并被主机忽略。In the protocol stack of the general operating systems such as windows and linux, the IGMP (Internet Group Management Protocol) protocol is used to control and manage multicast groups. Only the IGMP protocol directly contacts the multicast host. The router that runs IGMP is responsible for managing the joining, leaving, and maintaining group membership of the group members. For the IGMP packet format, see the following table, including the version field, including the IGMP version identifier. Currently, there are three versions of V1, V2, and V3. Type fields, including membership query (0x11), membership report (0x12), checksum. Field, set to the checksum of IGMP protocol packets; group address; when a membership report is being sent, the group address field contains the multicast address. When set to a membership query, this field is 0 and is ignored by the host.
Figure PCTCN2018097125-appb-000001
Figure PCTCN2018097125-appb-000001
表1Table 1
而组播组在进行UDP socket通信时,采用的UDP报文格式如下:The format of the UDP packet used by the multicast group when performing UDP socket communication is as follows:
在UDP报文中,只有源和目的端口,表示数据报文长度的字段,UDP数据报文校验和,以及UDP数据。In UDP packets, only the source and destination ports represent fields of data packet length, UDP data packet checksum, and UDP data.
Figure PCTCN2018097125-appb-000002
Figure PCTCN2018097125-appb-000002
表2Table 2
从IGMP协议规范和报文格式可以看到,IGMP协议在控制和管理组播组的时候,只与组播组的IP地址有关系,与IP上承载的UDP协议的端口没有关系。组播报文是承载在IP和UDP协议之上的,因此,在某个组播组上传输多端口的数据流是可行的,也不影响IGMP本身协议族的正常运行。基于上述的思路,提出了本公开的多端口组播方法。As shown in the IGMP protocol specification and the packet format, the IGMP protocol has no relationship with the IP address of the multicast group and is not related to the port of the UDP protocol carried on the IP. Multicast packets are carried on the IP and UDP protocols. Therefore, it is feasible to transmit multi-port data flows on a multicast group, and it does not affect the normal operation of the IGMP protocol family. Based on the above ideas, the multi-port multicast method of the present disclosure is proposed.
本公开实施例所提供的多端口组播方法,如图1所示,包括以下步骤。The multi-port multicast method provided by the embodiment of the present disclosure, as shown in FIG. 1, includes the following steps.
在步骤101中,在加入组播组后,在本地配置多端口列表。In step 101, after joining the multicast group, the multi-port list is configured locally.
在该步骤中,在组播主机要加入某个组播组时,需要创建UDP socket,设置组播协议栈中的IP_ADD_MEMBERSHIP属性。然后向交换机发送IGMP协议加入报文,用于完成加入组播组的动作。如果主机要退出某个组播组,需要再次设置该UDP socket IP层的IP_DROP_MEMBERSHIP属性,向交换机发送IGMP协议的离开报文,用于完成离开组播组的动作。In this step, when a multicast host wants to join a multicast group, you need to create a UDP socket and set the IP_ADD_MEMBERSHIP attribute in the multicast protocol stack. Then, an IGMP protocol join message is sent to the switch to complete the action of joining the multicast group. If the host wants to leave the multicast group, you need to set the IP_DROP_MEMBERSHIP attribute of the IP layer of the UDP socket to send the IGMP Leave message to the switch to complete the action of leaving the multicast group.
其中,组播主机加入组播组后,建立了UDP socket通信。在该实施例中,对组播组协议栈进行了改进,在协议栈中增加了多端口配置接口。在建立组播组通信后,通过多端口配置接口来配置可接收的端口号,并将端口号以哈希列表的形式保存至组播协议栈中针对UDP socket通信相应的数据结构中。After the multicast host joins the multicast group, UDP socket communication is established. In this embodiment, the multicast group protocol stack is improved, and a multi-port configuration interface is added to the protocol stack. After the multicast group communication is established, the port number can be configured through the multi-port configuration interface, and the port number is saved in the hash protocol form to the corresponding data structure of the UDP socket communication in the multicast protocol stack.
在步骤102,根据多端口列表对接收到的组播报文中的端口进行匹配,当匹配成功时, 处理组播报文。In step 102, the port in the received multicast packet is matched according to the multi-port list, and when the matching is successful, the multicast packet is processed.
在加入组播组进行通信后,当接收到交换机发送的组播报文中,根据UDP socket通信中的多端口列表对组播报文进行匹配。After the multicast group is added to the multicast group, the multicast packets sent by the switch are matched according to the multi-port list in the UDP socket communication.
由于在组播组内进行通信(组播主机与交换机间)时,采用IP协议进行承载UDP协议,因此当接收到组播报文后,首先对组播报文中的组播地址(也是组播IP地址)进行验证。当验证通过后,再进行下一步的端口号的验证处理。如果验证失败,说明当前的组播报文并非所属组内的报文,则丢弃该组播报文即可。When the communication is performed in the multicast group (between the multicast host and the switch), the IP protocol is used to carry the UDP protocol. Therefore, after receiving the multicast packet, the multicast address in the multicast packet is also the multicast IP address. Address) for verification. After the verification is passed, the next step of verifying the port number is performed. If the authentication fails, the current multicast packet is not in the group. The multicast packet is discarded.
其中,在对接收到的组播报文中的端口进行匹配时,通过扫描多端口列表中设置的端口号与组播报文中的目的端口号进行匹配。当目的端口号为多端口列表中的任一端口号时,说明该组播报文为可处理报文,则将该报文添加至接收队列中,以供后续在一实施例中处理。当目的端口号不存在于多端口列表中时,则将该组播报文直接丢弃接口。The port number set in the multi-port list is matched with the destination port number in the multicast packet when the port in the received multicast packet is matched. When the destination port number is any port number in the multi-port list, the multicast packet is a processable packet, and the packet is added to the receiving queue for subsequent processing in an embodiment. If the destination port number does not exist in the multi-port list, the multicast packet is directly discarded.
基于上述内容可知,在进行组播组通信时,不再局限于对特定目的端口的报文进行处理,而是通过在本地的协议栈中配置多端口列表,根据该多端口列表可以实现不同目的端口的报文的处理,从而实现同一组播组中不同端口数据流的接收。在该实施例中,无需配置多个socket,通过单个socket即可实现上述方法,有效降低通信的复杂度,节省组播资源。Based on the above, it is known that when performing multicast group communication, the packet is not limited to the processing of the packet of the specific destination port, but the multi-port list is configured in the local protocol stack, and the multi-port list can be used for different purposes. The processing of packets on the port enables the reception of data streams of different ports in the same multicast group. In this embodiment, multiple methods are not required, and the foregoing method can be implemented through a single socket, which effectively reduces communication complexity and saves multicast resources.
可选地,该方法还可包括组播报文的发送。Optionally, the method may further include sending a multicast message.
当需要发送多端口的组播报文时,在组播报文中的目的端口字段中配置不同的端口即可。当需要发送多端口的组播报文时,可以根据实际需要配置所需发送的端口号,将该携带多端口号的数据报文,通过组播地址所用的协议进行封装,而后发送至组播组中即可。When you need to send multi-port multicast packets, you can configure different ports in the destination port field of the multicast packets. When you need to send a multi-port multicast packet, you can configure the port number to be sent as required. The data packet carrying the multi-port number is encapsulated by the protocol used by the multicast address and then sent to the multicast. Just in the group.
下面结合附图和实施例对本公开的技术内容做详细说明。The technical content of the present disclosure will be described in detail below with reference to the accompanying drawings and embodiments.
在该实施例中,作为例子,组播主机可采用Linux协议栈,当然本公开不局限于Linux协议栈,还可以为Windows协议栈。在本实施例中,利用IGMP协议报文管理加入和离开组播组,并上报组播信息。组播主机利用IP和UDP协议进行通信,通过IP协议承载UDP协议携带的数据内容。在IP协议报文头中指定目的地址为组播地址(组播IP地址),在UDP协议报文头中指定不同的目的端口,以表示不同的数据流。如图2所示,该实施例的多端口组播方法可包括以下步骤。In this embodiment, as an example, the multicast host may adopt a Linux protocol stack. Of course, the disclosure is not limited to the Linux protocol stack, and may also be a Windows protocol stack. In this embodiment, the IGMP protocol packet is used to manage the joining and leaving the multicast group, and the multicast information is reported. The multicast host uses the IP and UDP protocols to communicate, and carries the data content carried by the UDP protocol through the IP protocol. Specify the destination address as the multicast address (multicast IP address) in the IP packet header, and specify different destination ports in the UDP protocol header to indicate different data flows. As shown in FIG. 2, the multi-port multicast method of this embodiment may include the following steps.
在步骤201,组播主机创建UDP socket,设置该UDP socket IP层的IP_ADD_MEMBERSHIP接口。In step 201, the multicast host creates a UDP socket and sets the IP_ADD_MEMBERSHIP interface of the UDP socket IP layer.
在步骤202,组播主机采用Linux协议栈,通过IP_ADD_MEMBERSHIP接口通知本地的操作系统发生IGMP协议报文,发送至交换机,以使交换机上生成一个组播条目。In step 202, the multicast host uses the Linux protocol stack to notify the local operating system of the occurrence of IGMP messages through the IP_ADD_MEMBERSHIP interface, and sends the packets to the switch to generate a multicast entry on the switch.
可选地,在发生IGMP协议报文时,在本地系统的网口上创建组播MAC和组播IP地址,并携带至IGMP协议报文发送至交换机中。Optionally, a multicast MAC address and a multicast IP address are created on the network port of the local system when the IGMP protocol packet is generated, and the IGMP protocol packet is sent to the switch.
在步骤203,组播主机加入组播组后,通过IP_ADD_MEMBERPORT接口将配置多个端口添加至UDP socket中。In step 203, after the multicast host joins the multicast group, multiple ports are configured to be added to the UDP socket through the IP_ADD_MEMBERPORT interface.
在Linux协议栈中需要增加一个IP_ADD_MEMBERPORT接口,通过该接口通知本地的操作系统添加指定的端口到该组播UDP socket中。An IP_ADD_MEMBERPORT interface needs to be added to the Linux protocol stack to notify the local operating system to add the specified port to the multicast UDP socket.
在Linux协议栈中,struct inet_sock数据结构中__be16inet_sport字段表示socket源端口;struct ip_mc_socklist mc_list字段表示加入的组播组列表;在struct ip_mc_socklist结构体中,struct ip_mreqn multi字段表示组播组的信息。In the Linux protocol stack, the __be16inet_sport field in the struct inet_sock data structure indicates the socket source port; the struct ip_mc_socklist mc_list field indicates the list of joined multicast groups; in the struct ip_mc_socklist structure, the struct ip_mreqn multi field indicates the information of the multicast group.
为了使得组播UDP socket能够接收多个端口的组播报文,本公开实施例中,在Linux协议栈的struct ip_mc_socklist数据结构中,添加组播多端口哈希(hash)表,即struct inet_mc_hashbucket port_bucket,存放能该组播UDP socket的端口信息。实现代码方式可以为,例如:In order to enable the multicast UDP socket to receive multicast packets of multiple ports, in the embodiment of the present disclosure, a multicast multi-port hash table is added to the struct ip_mc_socklist data structure of the Linux protocol stack, that is, struct inet_mc_hashbucket port_bucket , store the port information of the multicast UDP socket. The implementation code can be, for example:
Figure PCTCN2018097125-appb-000003
Figure PCTCN2018097125-appb-000003
在步骤205,组播主机接收组播报文,匹配组播报文中UDP socket所属的组播IP地址多端口hash表,当匹配通过时,将组播报文添加至接收队列中。In step 205, the multicast host receives the multicast packet and matches the multi-port hash table of the multicast IP address to which the UDP socket belongs in the multicast packet. When the match is passed, the multicast packet is added to the receive queue.
在建立组播组通信后,交换机将属于该组播组的组播报文发送到加入组播组的所有组播主机中。这里,交换机采用UDP socket进行通信,只根据组播IP地址完成报文的转发,对于报文的处理则由组播主机完成。After the multicast group communication is established, the switch sends the multicast packets belonging to the multicast group to all multicast hosts that join the multicast group. Here, the switch uses UDP sockets to communicate, and only the packets are forwarded according to the multicast IP address. The processing of the packets is performed by the multicast host.
Linux协议栈通过内核接收函数可以接收包含多端口的组播报文。当接收到组播报文时,通过检查UDP socket所属的组播IP地址,确认该UDP socket是否属于所属组播组的报文。若属于所属组播组,再扫描UDP socket的struct inet_sock成员的多端口hash表,并匹配组播报文中的目的端口。The Linux protocol stack can receive multicast packets containing multiple ports through the kernel receiving function. When receiving a multicast packet, check whether the UDP socket belongs to the multicast group by checking the multicast IP address to which the UDP socket belongs. If it belongs to the multicast group, it scans the multi-port hash table of the struct inet_sock member of the UDP socket and matches the destination port in the multicast packet.
若组播报文中目的端口与UDP socket的多端口hash表中的某个端口匹配,则把相应的数据报文添加到UDP socket的接收队列上,等待应用层程序接收该UDP socket的组播报文。If the destination port of the multicast packet matches a port in the multi-port hash table of the UDP socket, the corresponding data packet is added to the receiving queue of the UDP socket, and the application layer program waits for the multicast packet of the UDP socket to be received. .
当组播报文中目的端口包括多个时,则检测到任一目的端口位于多端口hash表中,则匹配通过,将相应的数据报文添加至接收队列中。If the destination port of the multicast packet is multiple, the device detects that any destination port is in the multi-port hash table, and then matches the packet to add the corresponding data packet to the receive queue.
当组播主机通过UDP socket发送组播报文时,可以按照UDP协议报文格式发送。如果UDP socket需要发送包含多个端口的UDP组播报文,只需要在目的端口字段填写不同的端口值即可,通过IP协议将组播IP地址进行封装,这样可以实现UDP socket多端口的组播报文的发送。When a multicast host sends multicast packets through a UDP socket, it can be sent in the UDP protocol format. If the UDP socket needs to send UDP multicast packets containing multiple ports, you only need to fill in different port values in the destination port field, and encapsulate the multicast IP address through the IP protocol. This can implement UDP socket multi-port group. The transmission of the broadcast message.
基于上述可知,在该实施例中对相关驻留操作系统组播组管理应用进行了扩展。在该实施例中,组播组的加入和离开兼容Linux协议栈UDP socket的IP_ADD_MEMBERSHIP命令。同时,增加IP_ADD_MEMBERPORT接口,可以向组播UDP socket中添加多个端口,并且修改UDP socket接收组播报文的流程,使得Linux协议栈可以接收多个包含不同端口的组播报文。Based on the above, in the embodiment, the related resident operating system multicast group management application is extended. In this embodiment, the multicast group joins and leaves the IP_ADD_MEMBERSHIP command compatible with the Linux protocol stack UDP socket. At the same time, by adding the IP_ADD_MEMBERPORT interface, you can add multiple ports to the multicast UDP socket and modify the process of receiving UDP sockets for multicast packets, so that the Linux protocol stack can receive multiple multicast packets containing different ports.
根据本公开的实施例,提供了一种多端口组播设备,设置为实现上述的多端口组播方法。如图3所示。该设备包括处理器32以及存储有处理器32可执行指令的存储器31。According to an embodiment of the present disclosure, there is provided a multi-port multicast device configured to implement the multi-port multicast method described above. As shown in Figure 3. The device includes a processor 32 and a memory 31 that stores instructions executable by the processor 32.
处理器32可以是通用处理器,例如,中央处理器(central processing unit,CPU),还可以是数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC),或者是被配置成实施本公开实施例的一个或多个集成电路。The processor 32 may be a general-purpose processor, such as a central processing unit (CPU), or may be a digital signal processor (DSP), an application specific integrated circuit (ASIC), or Is one or more integrated circuits configured to implement embodiments of the present disclosure.
存储器31可用于存储程序代码,并将该程序代码传输给CPU。存储器31可以包括易失性存储器(volatile memory),例如,随机存取存储器(random access memory,RAM)。存储器31也可以包括非易失性存储器(non-volatile memory),例如,只读存储器(read-only memory,ROM)、快闪存储器(flash memory)、硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD)。存储器31还可以包括上述种类的存储器的组合。The memory 31 can be used to store program code and transfer the program code to the CPU. The memory 31 may include a volatile memory such as a random access memory (RAM). The memory 31 may also include a non-volatile memory such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state hard disk. (solid-state drive, SSD). The memory 31 may also include a combination of memories of the above kind.
本公开所提供的多端口组播设备,可以包括存储器31和处理器32。存储器31中存储有多端口组播程序,当多端口组播程序被处理器32执行时,实现以下步骤:在加入组播组后,在本地配置多端口列表;以及,根据所述多端口列表对接收到的组播报文中目的端口进行匹配,当匹配成功时,处理所述组播报文。The multi-port multicast device provided by the present disclosure may include a memory 31 and a processor 32. A multi-port multicast program is stored in the memory 31. When the multi-port multicast program is executed by the processor 32, the following steps are performed: after joining the multicast group, the multi-port list is locally configured; and, according to the multi-port list The destination port is matched in the received multicast packet. When the match is successful, the multicast packet is processed.
可选的,当所述多端口组播程序被所述处理器32执行时,以实现如下步骤:在组播协议栈中预先增加端口配置接口;以及,通过所述端口配置接口将多个端口以哈希列表形式添加至所述组播协议栈中。Optionally, when the multi-port multicast program is executed by the processor 32, the following steps are implemented: pre-adding a port configuration interface in the multicast protocol stack; and configuring multiple ports through the port configuration interface It is added to the multicast protocol stack in the form of a hash list.
可选的,当所述多端口组播程序被所述处理器32执行时,以实现如下步骤:对所述组播报文中的组播地址进行验证;以及,当验证成功时,判断所述组播报文中的任一目的端口是否位于所述多端口列表中;当位于时,则匹配成功,将所述组播报文添加至接收队列中。Optionally, when the multi-port multicast program is executed by the processor 32, the following steps are performed: verifying a multicast address in the multicast packet; and, when the verification is successful, determining the group Whether any destination port in the broadcast message is located in the multi-port list; if it is located, the match is successful, and the multicast message is added to the receive queue.
当所述组播地址验证失败或者当所述组播报文中的任一目的端口不在所述多端口列表中时,则将所述组播报文丢弃。When the multicast address verification fails or when any destination port in the multicast packet is not in the multi-port list, the multicast packet is discarded.
可选的,当所述多端口组播程序被所述处理器32执行时,以实现如下步骤:当需要发送多端口的组播报文时,将不同的端口配置至所述组播报文中的目的端口字段中。Optionally, when the multi-port multicast program is executed by the processor 32, the following steps are performed: when a multi-port multicast message needs to be sent, different ports are configured in the multicast packet. In the destination port field.
需要说明的是,在设备实施例中,仅对各个步骤进行简单的说明,对于实现方法,上文已经参照图1和图2进行了详细说明,在该实施例中不再重复。It should be noted that, in the device embodiment, only the respective steps are briefly described. For the implementation method, the foregoing has been described in detail with reference to FIG. 1 and FIG. 2, and is not repeated in this embodiment.
本公开实施例还提供了一种计算机可读存储介质。这里的计算机可读存储介质存储有一个或者多个程序。其中,计算机可读存储介质可以包括易失性存储器,例如随机存取存储器;存储器也可以包括非易失性存储器,例如只读存储器、快闪存储器、硬盘或固态硬盘;存储器还可以包括上述种类的存储器的组合。当计算机可读存储介质中一个或者多个程序可被一个或者多个处理器执行,以实现方法实施例所提供的多端口组播方法中的全部步骤和部分步 骤。对于步骤的实现,可以参见上文实施例中的详细说明,在该实施例中不再进行赘述。The embodiment of the present disclosure also provides a computer readable storage medium. The computer readable storage medium herein stores one or more programs. The computer readable storage medium may include a volatile memory such as a random access memory; the memory may also include a non-volatile memory such as a read only memory, a flash memory, a hard disk or a solid state hard disk; the memory may also include the above categories a combination of memory. One or more programs in a computer readable storage medium may be executed by one or more processors to implement all of the steps and steps in the multi-port multicast method provided by the method embodiments. For the implementation of the steps, reference may be made to the detailed description in the above embodiments, and details are not described in this embodiment.
本公开对Linux协议进行了补充,有效解决一路组播组可以接收多路组播流的问题。通过Linux协议栈增加IP_ADD_MEMBERPORT接口,使得Linux协议栈UDP socket组播报文的接收功能增强,在同一个组播UDP socket下接收包含不同端口的组播报文;采用单个UDP socket通信,可以实现多端口组播报文的发送和接收,有效减少socket的创建,同时降低了应用层socket管理的复杂度,减少流媒体服务器节点与交换机之间的IGMP协议报文交互,节省了相关设备上组播组条目的占用数量。The disclosure supplements the Linux protocol and effectively solves the problem that one multicast group can receive multiple multicast streams. The IP_ADD_MEMBERPORT interface is added to the Linux protocol stack to enhance the receiving function of the UDP socket multicast packets in the Linux protocol stack. The multicast packets containing different ports are received in the same multicast UDP socket. The function of sending and receiving multicast packets on the port is effective. This reduces the complexity of socket management and reduces the complexity of application layer socket management. It reduces IGMP protocol packet exchange between the streaming server node and the switch, saving multicast on related devices. The number of occupations of the group entry.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。A person skilled in the art can understand that all or part of the process of implementing the above embodiment method can be completed by a computer program to instruct related hardware, and the program can be stored in a computer readable storage medium. The flow of an embodiment of the methods as described above may be included.
虽然通过实施例描述了本申请,本领域的技术人员知道,本申请有许多变形和变化而不脱离本公开的精神和范围。这样,倘若本公开的这些修改和变型属于本公开权利要求及其等同技术的范围之内,则本公开也意图包含这些改动和变型在内。While the present invention has been described by the embodiments of the invention, it will be understood that Thus, it is intended that the present invention cover the modifications and the modifications

Claims (10)

  1. 一种多端口组播方法,包括:A multi-port multicast method includes:
    在加入组播组后,在本地配置多端口列表;After joining a multicast group, configure a multi-port list locally.
    根据所述多端口列表对接收到的组播报文中的目的端口进行匹配,当匹配成功时,处理所述组播报文。The destination port in the received multicast packet is matched according to the multi-port list. When the matching succeeds, the multicast packet is processed.
  2. 如权利要求1所述的多端口组播方法,其中,所述在本地配置多端口列表,包括:The multi-port multicast method of claim 1, wherein the locally configuring the multi-port list comprises:
    在组播协议栈中预先增加端口配置接口;Add a port configuration interface in advance in the multicast protocol stack;
    通过所述端口配置接口将多个端口以哈希列表形式添加至所述组播协议栈中。A plurality of ports are added to the multicast protocol stack in a hash list through the port configuration interface.
  3. 如权利要求1或2所述的多端口组播方法,其中,所述根据所述多端口列表对接收到的组播报文中目的端口进行匹配,包括:The multi-port multicast method according to claim 1 or 2, wherein the matching the destination port in the received multicast packet according to the multi-port list comprises:
    对所述组播报文中的组播地址进行验证;Verifying the multicast address in the multicast packet;
    当验证成功时,判断所述组播报文中的任一目的端口是否位于所述多端口列表中;当位于时,则匹配成功,将所述组播报文添加至接收队列中。When the verification succeeds, it is determined whether any of the destination ports in the multicast packet are located in the multi-port list; when located, the matching succeeds, and the multicast packet is added to the receiving queue.
  4. 如权利要求3所述的多端口组播方法,其中,所述方法还包括:The multi-port multicast method of claim 3, wherein the method further comprises:
    当所述组播地址验证失败或者当所述组播报文中的任一目的端口不在所述多端口列表中时,则将所述组播报文丢弃。When the multicast address verification fails or when any destination port in the multicast packet is not in the multi-port list, the multicast packet is discarded.
  5. 如权利要求1所述的多端口组播方法,其中,所述方法还包括:The multi-port multicast method of claim 1, wherein the method further comprises:
    当需要发送多端口的组播报文时,将不同的端口配置至所述组播报文中的目的端口字段中。When a multi-port multicast packet needs to be sent, configure a different port to the destination port field in the multicast packet.
  6. 一种多端口组播设备,包括存储器和处理器;其中,所述存储器中存储有多端口组播程序,当所述多端口组播程序被所述处理器执行时,以实现如下步骤:A multi-port multicast device includes a memory and a processor; wherein the memory stores a multi-port multicast program, and when the multi-port multicast program is executed by the processor, the following steps are implemented:
    在加入组播组后,在本地配置多端口列表;After joining a multicast group, configure a multi-port list locally.
    根据所述多端口列表对接收到的组播报文中目的端口进行匹配,当匹配成功时,处理所述组播报文。The destination port in the received multicast packet is matched according to the multi-port list. When the matching succeeds, the multicast packet is processed.
  7. 如权利要求6所述的多端口组播设备,其中,当所述多端口组播程序被所述处理器执行时,以实现如下步骤:The multi-port multicast device of claim 6, wherein when said multi-port multicast program is executed by said processor, the following steps are implemented:
    在组播协议栈中预先增加端口配置接口;Add a port configuration interface in advance in the multicast protocol stack;
    通过所述端口配置接口将多个端口以哈希列表形式添加至所述组播协议栈中。A plurality of ports are added to the multicast protocol stack in a hash list through the port configuration interface.
  8. 如权利要求6或7所述的多端口组播设备,其中,当所述多端口组播程序被所述处理器执行时,以实现如下步骤:The multi-port multicast device according to claim 6 or 7, wherein when said multi-port multicast program is executed by said processor, the following steps are implemented:
    对所述组播报文中的组播地址进行验证;Verifying the multicast address in the multicast packet;
    当验证成功时,判断所述组播报文中的任一目的端口是否位于所述多端口列表中;当位于时,则匹配成功,将所述组播报文添加至接收队列中。When the verification succeeds, it is determined whether any of the destination ports in the multicast packet are located in the multi-port list; when located, the matching succeeds, and the multicast packet is added to the receiving queue.
  9. 如权利要求6所述的多端口组播设备,其中,当所述多端口组播程序被所述处理器执行时,以实现如下步骤:The multi-port multicast device of claim 6, wherein when said multi-port multicast program is executed by said processor, the following steps are implemented:
    当需要发送多端口的组播报文时,将不同的端口配置至所述组播报文中的目的端口字段中。When a multi-port multicast packet needs to be sent, configure a different port to the destination port field in the multicast packet.
  10. 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有多端口组播程序,当所述多端口组播程序被所述处理器执行时,以实现权利要求1~5任一项所述多端口组播方法中的步骤。A computer readable storage medium, wherein the computer readable storage medium stores a multi-port multicast program, when the multi-port multicast program is executed by the processor, to implement any of claims 1 to 5 The steps in the multi-port multicast method described in the item.
PCT/CN2018/097125 2017-08-14 2018-07-25 Multi-port multicast method and device, and computer readable storage medium WO2019033910A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710692526.4A CN109391551B (en) 2017-08-14 2017-08-14 Multi-port multicast method, equipment and computer readable storage medium
CN201710692526.4 2017-08-14

Publications (1)

Publication Number Publication Date
WO2019033910A1 true WO2019033910A1 (en) 2019-02-21

Family

ID=65361940

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/097125 WO2019033910A1 (en) 2017-08-14 2018-07-25 Multi-port multicast method and device, and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN109391551B (en)
WO (1) WO2019033910A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114339487A (en) * 2021-12-23 2022-04-12 广州芯德通信科技股份有限公司 Multi-port GPON OLT system and management control method thereof
CN114666241A (en) * 2022-05-18 2022-06-24 浙江国利网安科技有限公司 Method and device for identifying industrial control asset information
CN114697411A (en) * 2020-12-29 2022-07-01 北京达佳互联信息技术有限公司 Data processing method, device, server and storage medium
CN115242733A (en) * 2022-06-24 2022-10-25 北京百度网讯科技有限公司 Message multicast method, multicast gateway, electronic device and storage medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112583472B (en) * 2020-12-28 2023-05-19 四川安迪科技实业有限公司 Multicast file sending, receiving and transmitting method and device for batch upgrading satellite equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101110730A (en) * 2007-06-25 2008-01-23 中兴通讯股份有限公司 Method for implementing Ethernet multicast based on internetwork grouping management agreement
US7813286B2 (en) * 2006-08-30 2010-10-12 Hewlett-Packard Development Company, L.P. Method and system of distributing multicast group join request in computer systems operating with teamed communication ports
US20140185613A1 (en) * 2012-12-28 2014-07-03 Fujitsu Limited Multiple path control for multicast communication
CN104009926A (en) * 2013-02-26 2014-08-27 杭州华三通信技术有限公司 Multicast method in EVI network and edge device ED

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102420774B (en) * 2012-01-06 2014-04-30 深圳市共进电子股份有限公司 Method for realizing intranet penetration by using Internet group management protocol (IGMP) and intranet penetration system
CN103716189B (en) * 2013-12-24 2017-01-04 深圳市共进电子股份有限公司 A kind of configuration management method for local area network terminal gateway equipment
JP2015192407A (en) * 2014-03-28 2015-11-02 ソニー株式会社 Transmitter, transmission method, receiver, reception method, and program
CN105992167B (en) * 2015-02-12 2019-06-25 成都鼎桥通信技术有限公司 The implementation method and device of long term evolution LTE cluster multicast
CN106302188A (en) * 2015-05-18 2017-01-04 中兴通讯股份有限公司 The multicast message transmission control method of a kind of switch device and device
US9774461B2 (en) * 2015-10-21 2017-09-26 Oracle International Corporation Network switch with dynamic multicast queues
CN105610590B (en) * 2015-12-18 2018-12-11 新华三技术有限公司 A kind of multicast message transmission method and device
CN107528781A (en) * 2016-06-22 2017-12-29 中兴通讯股份有限公司 Retransmission method and device, the router of multicast message
CN106961426B (en) * 2017-03-09 2020-04-24 深圳创维-Rgb电子有限公司 Communication method and device of intelligent equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7813286B2 (en) * 2006-08-30 2010-10-12 Hewlett-Packard Development Company, L.P. Method and system of distributing multicast group join request in computer systems operating with teamed communication ports
CN101110730A (en) * 2007-06-25 2008-01-23 中兴通讯股份有限公司 Method for implementing Ethernet multicast based on internetwork grouping management agreement
US20140185613A1 (en) * 2012-12-28 2014-07-03 Fujitsu Limited Multiple path control for multicast communication
CN104009926A (en) * 2013-02-26 2014-08-27 杭州华三通信技术有限公司 Multicast method in EVI network and edge device ED

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114697411A (en) * 2020-12-29 2022-07-01 北京达佳互联信息技术有限公司 Data processing method, device, server and storage medium
CN114339487A (en) * 2021-12-23 2022-04-12 广州芯德通信科技股份有限公司 Multi-port GPON OLT system and management control method thereof
CN114666241A (en) * 2022-05-18 2022-06-24 浙江国利网安科技有限公司 Method and device for identifying industrial control asset information
CN114666241B (en) * 2022-05-18 2022-09-30 浙江国利网安科技有限公司 Method and device for identifying industrial control asset information
CN115242733A (en) * 2022-06-24 2022-10-25 北京百度网讯科技有限公司 Message multicast method, multicast gateway, electronic device and storage medium
CN115242733B (en) * 2022-06-24 2023-10-20 北京百度网讯科技有限公司 Message multicast method, multicast gateway, electronic device and storage medium

Also Published As

Publication number Publication date
CN109391551B (en) 2021-10-12
CN109391551A (en) 2019-02-26

Similar Documents

Publication Publication Date Title
WO2019033910A1 (en) Multi-port multicast method and device, and computer readable storage medium
EP3677013B1 (en) Replication with dedicated metal deployment in a cloud
CN106293957B (en) Flexible command and control in content-centric networks
US8184628B2 (en) Network based multicast stream duplication and merging
JP2019134461A (en) System and method for preventing denial of service (dos) attack on system designed for middleware and application execution, and system and method for supporting reliable connection (rc) based on subnet administrator (sa) access in system designed for middleware and application execution
US10523464B2 (en) Multi-homed access
WO2017143723A1 (en) Method, device, and system for controlling service quality
WO2018214809A1 (en) Message transmission method and device, and storage medium
TWI543565B (en) Method for retransmitting packet, data server using the same, and packet retransmitting system
WO2021174958A1 (en) Message forwarding method, device, system, network device and storage medium
WO2021233327A1 (en) Message processing method and apparatus, announcement method and apparatus, network bridge node, source device, storage medium, and message processing system
WO2018068588A1 (en) Method and software-defined networking (sdn) controller for providing multicast service
CN110545395B (en) Video networking conference switching method and device
US20140241351A1 (en) Dynamic determination of the root node of an mldp tunnel
WO2018171396A1 (en) Data transmission method, device and system
WO2018121584A1 (en) Data stream transmission method, apparatus, related devices and storage medium
US7660906B1 (en) Data delivery system and method
CN113162855B (en) Multicast message detection method, network equipment and system
WO2018233632A1 (en) Forwarding of video-on-demand stream
WO2021082818A1 (en) Method and apparatus for adjusting transmission rate
WO2008141516A1 (en) Message transmitting method, transmitting device and transmitting system
CN110062259B (en) Video acquisition method, system, device and computer readable storage medium
CN110809023B (en) Communication connection establishing method and device based on video networking
CN109451030B (en) Method and system for downloading video network file
CN103139085A (en) Method for implementation of multicast service in network, access device and system

Legal Events

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

Ref document number: 18846019

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 14/09/2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18846019

Country of ref document: EP

Kind code of ref document: A1