WO2024255629A1 - Multicast communication method and related apparatus - Google Patents

Multicast communication method and related apparatus Download PDF

Info

Publication number
WO2024255629A1
WO2024255629A1 PCT/CN2024/096987 CN2024096987W WO2024255629A1 WO 2024255629 A1 WO2024255629 A1 WO 2024255629A1 CN 2024096987 W CN2024096987 W CN 2024096987W WO 2024255629 A1 WO2024255629 A1 WO 2024255629A1
Authority
WO
WIPO (PCT)
Prior art keywords
multicast
communication device
node
information
message
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.)
Ceased
Application number
PCT/CN2024/096987
Other languages
French (fr)
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of WO2024255629A1 publication Critical patent/WO2024255629A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/48Routing tree calculation
    • 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

Definitions

  • the present application relates to the field of communication technology, and in particular to a multicast communication method and related devices.
  • Multicast technology provides a point-to-multiple point (P2MP) data communication method, which realizes an efficient data transmission method in which one source end (or source node) sends and multiple destination ends (or destination nodes) receive in the network.
  • Multicast technology can save a lot of network bandwidth and reduce network load.
  • Multicast technology includes two key technologies: first, multicast member management protocol technology; second, multicast routing protocol technology.
  • the multicast member management protocol is a protocol that acts between the multicast host and the communication device connected to the multicast host, and is used to construct member information in the multicast group and network information of the members in the multicast group.
  • the multicast routing protocol is a protocol that acts between the communication devices in the multicast group, and is used to construct a multicast distribution tree (MDT) based on the relationship information of the members in the multicast group.
  • MDT multicast distribution tree
  • the multicast routing protocol establishes a multicast routing state in the communication device, and the communication device forwards multicast data packets according to the multicast routing state.
  • Typical multicast routing protocols include: Protocol Independent Multicast Dense Mode (PIM-DM) and Protocol Independent Multicast Sparse Mode (PIM-SM), which are respectively applied to scenarios where multicast members are densely distributed or sparsely distributed.
  • PIM-DM Protocol Independent Multicast Dense Mode
  • PIM-SM Protocol Independent Multicast Sparse Mode
  • the communication device located in the MDT will construct a multicast group forwarding table entry. Therefore, the communication device forwards the received multicast data message based on the multicast group forwarding table entry.
  • the construction process of the multicast distribution tree MDT is usually as follows: the multicast destination node sends an Internet Group Management Protocol (IGMP) join message to the communication device (the communication device is regarded as the designated router (DR) device of the multicast destination node), and informs the communication device through the IGMP join message that the multicast destination node wants to join a multicast group.
  • the communication device will send a Protocol Independent Multicast (PIM) protocol join message to other upstream communication devices, and inform the upstream communication device through the PIN join message that the multicast destination node wants to join a multicast group.
  • PIM Protocol Independent Multicast
  • the hop-by-hop communication device performs a similar processing flow to complete the construction of the multicast MDT.
  • the current multicast routing protocol requires a large number of message interactions in the process of building MDT.
  • a large number of messages that need to be interacted with place high demands on the performance of the communication device.
  • it also causes a high occupancy rate of network bandwidth resources, affecting communication efficiency.
  • a large number of messages that need to be interacted with often leads to slow convergence of MDT construction and inability to quickly build MDT.
  • the embodiment of the present application proposes a multicast communication method, which realizes efficient construction of a multicast distribution tree MDT by carrying a first message of first multicast information.
  • the performance requirements for communication devices can be effectively reduced.
  • the occupancy rate of network bandwidth resources is reduced, and communication efficiency is improved.
  • the construction convergence rate of MDT is improved, and MDT can be quickly constructed.
  • an embodiment of the present application proposes a multicast communication method, comprising: first, a first communication device constructs a first message, the first message carries first multicast information, the first multicast information indicates the communication devices included in the first multicast group, and the first communication device is a multicast source node in the first multicast group; then, the first communication device sends the first message to a second communication device, the first message indicates that the second communication device constructs a first multicast distribution tree MDT, and the multicast data in the first multicast group is forwarded along the multicast forwarding path indicated by the first multicast distribution tree MDT.
  • the second communication device belongs to a forwarding node in the multicast forwarding path indicated by the first MDT or a multicast destination node included in the first multicast group.
  • the first communication device constructs and forwards the first message, so that the second communication device belonging to the first multicast distribution tree MDT constructs the first MDT. Since the first message carries the first multicast information, the first multicast information indicates the communication devices included in the first multicast group. Therefore, the first message can be forwarded along the multicast forwarding path indicated by the first MDT, so that all communication devices on the multicast forwarding path can be forwarded.
  • the first MDT is constructed according to the first message.
  • the first message carrying the first multicast information realizes efficient construction of the MDT. Compared with the current method for constructing the MDT, the performance requirements for the communication device can be effectively reduced. The occupancy rate of network bandwidth resources is reduced, and the communication efficiency is improved. In addition, the construction convergence rate of the MDT is improved, and the MDT is quickly constructed.
  • the first multicast information includes: address information of the multicast source node, address information of the first multicast group, and address information of the multicast destination node in the first multicast group.
  • the multicast source node refers to the multicast source node in the first multicast group.
  • the address information of the multicast source node may also be identification information of the multicast source node.
  • the address information of the first multicast group may also be identification information of the first multicast group.
  • the address information of the multicast destination node may also be identification information of the multicast destination node.
  • the address information of the multicast source node is the Internet Protocol IP address of the multicast source node
  • the address information of the first multicast group is a Class D multicast IP address
  • the address information of the multicast destination node is the IP address of the multicast destination node.
  • the address information of the multicast source node is "192.168.100.1”
  • the address information of the first multicast group is "224.12.1.1”
  • the address information of the multicast destination node includes "192.168.3.1", "192.168.6.1”, “192.168.7.1”, “192.168.9.1” and "192.168.10.1”.
  • the first multicast information may also include other information, such as: the number of multicast destination nodes in the first multicast group, which is not limited in the embodiments of the present application.
  • the first multicast information is carried in the payload portion of the first message. It is understandable that the first multicast information may also be carried in other portions of the first message, which is not limited in the embodiment of the present application.
  • the first message carries a first identifier
  • the first identifier indicates that the first message is used to construct the first MDT.
  • the next hop node determines that the MDT needs to be constructed according to the first message according to the first identifier.
  • the efficiency of the second communication device in identifying and processing the first message is improved through the first identifier.
  • the first identifier is a User Datagram Protocol (UDP) destination port number.
  • the special UDP destination port number indicates that the first message is used to construct the first MDT.
  • the UDP destination port number is 4799.
  • the first identifier may also be carried in an IP header.
  • a first communication device obtains a node information set, the node information set including node information of multiple nodes, wherein the multiple nodes belong to the first multicast group, and the address information of the multicast destination node belongs to the node information set; then, the first communication device constructs the first message according to the node information set.
  • the first communication device obtains the node information set, including: after the first communication device creates the communication domain corresponding to the first multicast group, the node information set is obtained; or, the first communication device obtains a configuration file of the node information in the first multicast group, and the configuration file of the node information in the first multicast group includes the node information set.
  • the first communication device can obtain the node information set after creating the communication domain corresponding to the first multicast group; it can also obtain the configuration information of the nodes in the first multicast group, and then obtain the node information set included in the configuration file, which improves the implementation flexibility of the solution.
  • the first communication device determines the address information of the second communication device from the routing table of the first communication device according to the first multicast information, and the address information of the second communication device is used as the destination address of the first message.
  • the first communication device may also use the gateway address of the first communication device as the destination address of the first message, and the gateway connected to the first communication device forwards the first message to the second communication device.
  • the first communication device determines the address information of the second communication device from a routing table of the first communication device according to the address information of the multicast destination node.
  • the first communication device after the first communication device creates the communication domain corresponding to the first multicast group, it obtains the address information of the first multicast group; or, the first communication device determines the address information of the first multicast group according to a configuration file of the node information in the first multicast group. Specifically, the first communication device can also obtain the address information of the first multicast group in multiple ways to improve the implementation flexibility of the solution.
  • the method further includes: the first communication device determines that the multicast destination node included in the first multicast group changes; in response to the change in the multicast destination node included in the first multicast group, the first communication device modifies the first message, and the first multicast information carried by the modified first message corresponds to the changed first multicast group.
  • the first communication device modifies the first message, and the first multicast information carried by the modified first message corresponds to the changed first multicast group, including: in response to a first node going offline, the first communication device modifies the first message, and the first multicast information carried by the modified first message does not include address information of the first node, wherein the first node belongs to the first multicast group; or, in response to a second node going online, the first communication device modifies the first message, and the first multicast information carried by the modified first message includes address information of the second node, wherein before the second node goes online, the second node does not belong to the first multicast group.
  • an embodiment of the present application proposes a multicast communication method, comprising: first, a second communication device receives a first message from a previous hop node, the first message carries first multicast information, the first multicast information indicates the communication devices included in the first multicast group, the multicast data in the first multicast group is forwarded along a multicast forwarding path indicated by a first multicast distribution tree MDT, and the first communication device is a multicast source node in the first multicast group; then, the second communication device determines the multicast forwarding path indicated by the first MDT according to the first multicast information; finally, the second communication device sends the first message to a third communication device according to the multicast forwarding path corresponding to the first MDT, wherein the third communication device is the next hop node of the second communication device in the multicast forwarding path indicated by the first MDT, and the first message instructs the third communication device to construct the first MDT.
  • the second communication device after receiving the first message from the previous hop node, determines the multicast forwarding path indicated by the first multicast distribution tree MDT according to the first message. Then, the second communication device forwards the first message to the next hop node (third communication device) according to the multicast forwarding path indicated by the first MDT, and the first message instructs the third communication device to build the first MDT.
  • the second communication device constructs the first MDT by processing and forwarding the first message, thereby obtaining the multicast forwarding path indicated by the first MDT.
  • the previous hop node can be the n-1th second communication device, where n is a positive integer.
  • the previous hop node is the first communication device.
  • the third communication device may be a forwarding node, and the third communication device may also be a multicast destination node.
  • the third communication device may be the n+1th second communication device, that is, the nth second communication device forwards the first message to the n+1th second communication device (the third communication device).
  • the third communication device receives the first message, the related method of the second aspect is executed.
  • the third communication device is a multicast destination node, then after the third communication device receives the first message, it terminates the first message.
  • the first multicast information includes: the address information of the multicast source node, the address information of the first multicast group, and the address information of the multicast destination node in the first multicast group.
  • the multicast source node refers to the multicast source node in the first multicast group.
  • the address information of the multicast source node may also be the identification information of the multicast source node.
  • the address information of the first multicast group may also be the identification information of the first multicast group.
  • the address information of the multicast destination node may also be the identification information of the multicast destination node.
  • the address information of the multicast source node is "192.168.100.1”
  • the address information of the first multicast group is "224.12.1.1”
  • the address information of the multicast destination node includes "192.168.3.1”, “192.168.6.1”, “192.168.7.1”, “192.168.9.1” and "192.168.10.1”.
  • the first multicast information may further include other information, such as: the number of multicast destination nodes in the first multicast group, which is not limited in the embodiment of the present application.
  • the second communication device determines the multicast forwarding path indicated by the first MDT based on the first multicast information, specifically including: the second communication device determines a first multicast forwarding table based on the first multicast information, the first multicast forwarding table includes a target outbound interface, the target outbound interface can reach the multicast host node included in the first multicast group, and the first multicast forwarding table indicates the multicast forwarding path corresponding to the first MDT.
  • the multicast distribution tree reflected on each multicast router is actually the relevant table entries in the multicast forwarding table (also called multicast routing table).
  • Each multicast router maintains a multicast forwarding table, which is used to guide the forwarding of multicast traffic.
  • the multicast forwarding table may contain multiple entries, each of which has four key information: multicast source address, multicast group address, upstream interface (or inbound interface), downstream interface (or outbound interface), timer and flag, etc.
  • the multicast forwarding table related to the first multicast group is referred to as the first multicast forwarding table.
  • the first message needs to be forwarded according to the multicast forwarding path indicated by the first MDT so that the network
  • the first MDT is constructed for each node in the communication device.
  • the second communication device may also include other multicast forwarding tables, each of which corresponds to the multicast forwarding path of a multicast group.
  • the multicast forwarding table includes: a key and a value, and the key and value constitute a key-value pair.
  • the key value has a unique corresponding relationship with the multicast group.
  • the corresponding key-value pair is determined by the key value, and then the outgoing interface of the multicast message in this node (for example, the second communication device) is determined according to the value included in the key-value pair.
  • the outgoing interface may also be the address of the next hop node.
  • the multicast message is forwarded to the node corresponding to the outgoing interface (for example, the third communication device).
  • the target outgoing interface is determined in the routing table of the second communication device according to the first multicast information.
  • the second communication device updates the first multicast forwarding table according to the determined target outgoing interface, and the updated first multicast forwarding table includes the target outgoing interface.
  • the second communication device determines the first multicast forwarding table based on the first multicast information, including: the second communication device determines a first key value from the first multicast information, and the first key value includes part of the first multicast information; the second communication device searches the second communication device for the first key value based on the first key value to determine whether the first multicast forwarding table associated with the first key value exists; if not, the first multicast forwarding table is created; if so, the first multicast forwarding table is determined.
  • the first key value includes the address information of the multicast source node and the address information of the multicast group; in another example, the first key value includes the address information of the multicast group. This embodiment of the application is not limited to this.
  • the second communication device locally stores one or more multicast forwarding tables, each of which indicates a multicast group at an outbound interface of the second communication device. Since the multicast forwarding table is composed of key-value pairs, it is possible to find out whether the second communication device has a first multicast forwarding table associated with the first key value according to the first key value, and the first multicast forwarding table includes the first key value.
  • the second communication device may query whether there is a first multicast forwarding table associated with the first key value locally.
  • the second communication device sends a query request to a third-party device, and the query request carries a first key value.
  • the third-party device queries whether there is a first multicast forwarding table related to the second communication device and associated with the first key value according to the query request.
  • the third-party device includes but is not limited to: a network manager that manages the second communication device, or a cloud server that manages the second communication device.
  • the multicast forwarding table involved in the embodiment of the present application may also have other implementation methods, and the embodiment of the present application does not limit this.
  • it is an index and data corresponding to the index, wherein the index is composed of data associated with the multicast group, and the data corresponding to the index includes the outbound interface of the multicast group in this jump.
  • the second communication device determines the target outbound interface in the routing table of the second communication device according to the first multicast information, including: the second communication device determines a first outbound interface set from the routing table of the second communication device according to the first multicast information, the outbound interfaces included in the first outbound interface set can reach the multicast host node, and the first outbound interface set includes at least one outbound interface; the second communication device detects whether there is a third outbound interface set, the third outbound interface set is the intersection of the first outbound interface set and the second outbound interface set, the third outbound interface set includes at least one outbound interface, and the second outbound interface set is the outbound interface included in the first multicast forwarding table; if the third outbound interface set exists, the target outbound interface is determined from the third outbound interface set; if the third outbound interface set does not exist, the target outbound interface is determined from the first outbound interface set.
  • the second communication device performs a table lookup in the routing table of the second communication device according to the address information of the multicast destination node included in the first multicast information, and determines the outbound interface of the second communication device that can reach the multicast destination node (the multicast destination node is indicated by the first multicast information).
  • the outbound interface of the second communication device that can reach the multicast destination node is called the first outbound interface set, and the first outbound interface set includes one or more outbound interfaces.
  • the second communication device uses the one or more outbound interfaces included in the first multicast forwarding table as the second outbound interface set.
  • the second communication device determines whether there is an intersection between the first outbound interface set and the second outbound interface set, and the intersection is called the third outbound interface set. If there is, the target outbound interface is determined from the third outbound interface set; if not, the target outbound interface is determined from the first outbound interface set.
  • the target outbound interface is determined to be the outbound interface that can reach the multicast destination node, so as to ensure that the first message can be forwarded according to the multicast forwarding path indicated by the first MDT, and ensure that the first MDT can be successfully constructed.
  • the second communication device sending the first message to the third communication device according to the multicast forwarding path corresponding to the first MDT includes: the second communication device sending the first message to the third communication device according to the multicast forwarding path corresponding to the first MDT
  • the method comprises the steps of: classifying the plurality of multicast destination nodes included in the first multicast group according to the multicast forwarding path corresponding to the first multicast group to obtain a first classification result, wherein the first classification result indicates one or more groups of the multicast destination nodes, wherein the same group of the multicast destination nodes corresponds to the same target outbound interface in the second communication device; the second communication device updates the first message according to the first classification result, wherein the updated first message carries second multicast information, and the second multicast information includes address information of the same group of the multicast destination nodes indicated by the first classification result; and the second communication device forwards the updated first message to the third communication device, wherein the third communication device is the next hop node
  • the multiple multicast destination nodes included in the first multicast group can also be classified according to the target outbound interface corresponding to the multicast destination node to obtain a first classification result.
  • the first classification result indicates one or more types of multicast destination nodes, and the same group of multicast destination nodes corresponds to the same target outbound interface in the second communication device.
  • the second communication device determines the first classification result, it copies the first message on the target outbound interface corresponding to the same group, and then updates the copied first message. Specifically, the address information of the multicast destination node carried by the first message is updated, and the multicast information carried by the updated first message is called the second multicast information.
  • the address information of the multicast destination node included in the second multicast information is only the address information of the multicast destination node corresponding to the group. So that the updated first message is forwarded to the multicast destination node of the group along the multicast forwarding path indicated by the first MDT. According to the second multicast information carried by the updated first message, the next hop node indicated by the second multicast information is determined, that is, the third communication device is determined. Then, the updated first message is forwarded to the third communication device. All forwarding nodes on the forwarding path indicated by the first MDT receive the first message and construct a first multicast forwarding table according to the first message. The first MDT is constructed by the above method. It should be noted that the second multicast information also includes: the address information of the multicast source node and the address information of the first multicast group.
  • the second communication device classifies the multiple multicast destination nodes included in the first multicast group according to the multicast forwarding path corresponding to the first MDT, and obtains the first classification result, including: the second communication device determines the multiple outbound interface information corresponding to the multicast destination node in the second communication device according to the multicast forwarding path corresponding to the first MDT; the second communication device determines the target outbound interface corresponding to the multicast destination node according to the multiple outbound interface information corresponding to the multicast destination node, wherein, when the forwarding path of the second communication device to reach the multicast destination node includes multiple equal-cost paths, the forwarding path corresponding to the target outbound interface is determined from the multiple equal-cost paths according to a preset rule.
  • the second communication device can reach multiple multicast destination nodes included in the first multicast group through multiple forwarding nodes, and there are multiple forwarding paths for the second communication device to reach the multiple multicast destination nodes included in the first multicast group.
  • the second communication device selects a path with the smallest path cost based on the multiple outbound interface information, and then uses the outbound interface information corresponding to the path with the smallest path cost as the target outbound interface.
  • a forwarding path can be randomly selected from the multiple equivalent paths as the target path, and the output interface corresponding to the target path on the second communication device is used as the target output interface. It is also possible to select a path from the multiple equivalent paths as the target path according to a preset rule, and determine the target output interface.
  • the preset rule includes but is not limited to: determining the forwarding path corresponding to the target output interface according to a modulo 2 operation, determining the forwarding path corresponding to the target output interface according to a hash process, or randomly selecting a path from multiple equivalent paths as the target path, etc.
  • an embodiment of the present application provides a communication device, which is used as a first communication device, and includes:
  • a processing module configured to construct a first message, wherein the first message carries first multicast information, the first multicast information indicates a communication device included in a first multicast group, and the first communication device is a multicast source node in the first multicast group;
  • the transceiver module is used to send the first message to the second communication device, wherein the first message instructs the second communication device to build a first multicast distribution tree MDT, and the multicast data in the first multicast group is forwarded along the multicast forwarding path indicated by the first multicast distribution tree MDT.
  • the first multicast information includes: address information of the multicast source node, address information of the first multicast group, and address information of the multicast destination node in the first multicast group.
  • the address information of the multicast source node is the Internet Protocol IP address of the multicast source node
  • the address information of the first multicast group is a Class D multicast IP address
  • the address information of the multicast destination node is the IP address of the multicast destination node.
  • the first message carries a first identifier, and the first identifier indicates that the first message is used to construct the first MDT.
  • the first identifier is a User Datagram Protocol UDP destination port number.
  • the transceiver module is further used to obtain a node information set, wherein the node information set includes node information of multiple nodes, wherein the multiple nodes belong to the first multicast group, and the address information of the multicast sink node belongs to the node information set;
  • the processing module is further used to construct the first message according to the node information set.
  • the processing module is further configured to obtain the node information set after creating the communication domain corresponding to the first multicast group;
  • the processing module is further configured to obtain a configuration file of node information in the first multicast group, wherein the configuration file of node information in the first multicast group includes the node information set.
  • the processing module is further used to determine the address information of the second communication device from the routing table of the first communication device according to the first multicast information, and the address information of the second communication device is used as the destination address of the first message.
  • the processing module is further used to determine the address information of the second communication device from the routing table of the first communication device according to the address information of the multicast destination node.
  • the transceiver module is further configured to obtain the address information of the first multicast group after creating the communication domain corresponding to the first multicast group;
  • the processing module is further configured to determine the address information of the first multicast group according to a configuration file of the node information in the first multicast group.
  • the processing module is further configured to determine that the multicast destination node included in the first multicast group changes
  • the processing module is further configured to modify the first message in response to a change in a multicast destination node included in the first multicast group, wherein the first multicast information carried by the modified first message corresponds to the changed first multicast group.
  • the processing module is further configured to modify the first message in response to the first node going offline, wherein the first multicast information carried by the modified first message does not include the address information of the first node, wherein the first node belongs to the first multicast group;
  • the processing module is further used to modify the first message in response to the second node coming online, and the first multicast information carried by the modified first message includes the address information of the second node, wherein before the second node comes online, the second node does not belong to the first multicast group.
  • an embodiment of the present application provides a communication device, which is used as a second communication device, and includes:
  • a transceiver module configured to receive a first message from a previous hop node, wherein the first message carries first multicast information, the first multicast information indicates a communication device included in a first multicast group, multicast data in the first multicast group is forwarded along a multicast forwarding path indicated by a first multicast distribution tree MDT, and the first communication device is a multicast source node in the first multicast group;
  • a processing module configured to determine a multicast forwarding path indicated by the first MDT according to the first multicast information
  • the transceiver module is also used to send the first message to a third communication device according to the multicast forwarding path corresponding to the first MDT, wherein the third communication device is the next hop node of the second communication device in the multicast forwarding path indicated by the first MDT, and the first message instructs the third communication device to construct the first MDT.
  • the first multicast information includes: address information of the multicast source node, address information of the first multicast group, and address information of the multicast destination node in the first multicast group.
  • the processing module is further used to determine a first multicast forwarding table according to the first multicast information, wherein the first multicast forwarding table includes a target outbound interface, the target outbound interface can reach the multicast destination node included in the first multicast group, and the first multicast forwarding table indicates a multicast forwarding path corresponding to the first MDT.
  • the processing module is further used to determine the first multicast forwarding table according to the first multicast information
  • the processing module is further used to determine the target outbound interface in the routing table of the second communication device according to the first multicast information
  • the processing module is further configured to update the first multicast forwarding table according to the target outbound interface, wherein the updated first multicast forwarding table includes the target outbound interface.
  • the processing module is further configured to determine a first key value from the first multicast information, where the first key value includes a portion of the first multicast information;
  • the processing module is further used to search, according to the first key value, whether the second communication device has the first multicast forwarding table associated with the first key value;
  • the processing module is further configured to create the first multicast forwarding table if it does not exist;
  • the processing module is further configured to determine the first multicast forwarding table if it exists.
  • the processing module is further configured to determine a first outbound interface set from a routing table of the second communication device according to the first multicast information, wherein the outbound interfaces included in the first outbound interface set can reach the multicast destination node, and the first outbound interface set includes at least one outbound interface;
  • the processing module is further used to detect whether there is a third outbound interface set, the third outbound interface set is the intersection of the first outbound interface set and the second outbound interface set, the third outbound interface set includes at least one outbound interface, and the second outbound interface set is the outbound interface included in the first multicast forwarding table;
  • the processing module is further configured to determine the target outbound interface from the third outbound interface set if the third outbound interface set exists;
  • the processing module is further configured to determine the target outbound interface from the first outbound interface set if the third outbound interface set does not exist.
  • the processing module is further configured to classify the plurality of multicast sink nodes included in the first multicast group according to the multicast forwarding path corresponding to the first MDT, to obtain a first classification result, wherein the first classification result indicates one or more groups of the multicast sink nodes, wherein the same group of the multicast sink nodes corresponds to the same target outbound interface in the second communication device;
  • the processing module is further configured to update the first message according to the first classification result, wherein the updated first message carries second multicast information, and the second multicast information includes address information of the same group of multicast sink nodes indicated by the first classification result;
  • the transceiver module is further used to forward the updated first message to the third communication device, wherein the third communication device is the next hop node indicated by the second multicast information.
  • the processing module is further configured to determine, according to the multicast forwarding path corresponding to the first MDT, information of multiple outbound interfaces corresponding to the multicast sink node in the second communication device;
  • the processing module is further used to determine the target outbound interface corresponding to the multicast destination node according to the multiple outbound interface information corresponding to the multicast destination node, wherein, when the forwarding path for the second communication device to reach the multicast destination node includes multiple equal-cost paths, the forwarding path corresponding to the target outbound interface is determined from the multiple equal-cost paths according to a preset rule.
  • an embodiment of the present application provides a communication device, which is used as a first communication device, and includes:
  • a processor configured to construct a first message, wherein the first message carries first multicast information, the first multicast information indicates a communication device included in a first multicast group, and the first communication device is a multicast source node in the first multicast group;
  • the communication interface is used to send the first message to the second communication device, wherein the first message instructs the second communication device to build a first multicast distribution tree MDT, and the multicast data in the first multicast group is forwarded along the multicast forwarding path indicated by the first multicast distribution tree MDT.
  • the first multicast information includes: address information of the multicast source node, address information of the first multicast group, and address information of the multicast destination node in the first multicast group.
  • the address information of the multicast source node is the Internet Protocol IP address of the multicast source node
  • the address information of the first multicast group is a Class D multicast IP address
  • the address information of the multicast destination node is the IP address of the multicast destination node.
  • the first message carries a first identifier, and the first identifier indicates that the first message is used to construct the first MDT.
  • the first identifier is a User Datagram Protocol UDP destination port number.
  • the communication interface is further used to obtain a node information set, wherein the node information set includes node information of multiple nodes, wherein the multiple nodes belong to the first multicast group, and the address information of the multicast sink node belongs to the node information set;
  • the processor is further configured to construct the first message according to the node information set.
  • the processor is further configured to obtain the node information set after creating the communication domain corresponding to the first multicast group;
  • the processor is further configured to obtain a configuration file of node information in the first multicast group, where the configuration file of node information in the first multicast group includes the node information set.
  • the processor is further configured to determine, according to the first multicast information, address information of the second communication device from a routing table of the first communication device, and use the address information of the second communication device as a destination address of the first message.
  • the processor is further configured to determine the address information of the second communication device from a routing table of the first communication device according to the address information of the multicast destination node.
  • the communication interface is further used to obtain the address information of the first multicast group after creating the communication domain corresponding to the first multicast group;
  • the processor is further configured to determine the address information of the first multicast group according to a configuration file of the node information in the first multicast group.
  • the processor is further configured to determine that the multicast destination node included in the first multicast group changes
  • the processor is further configured to modify the first message in response to a change in a multicast destination node included in the first multicast group, wherein the first multicast information carried by the modified first message corresponds to the changed first multicast group.
  • the processor is further configured to modify the first message in response to the first node going offline, wherein the first multicast information carried by the modified first message does not include the address information of the first node, wherein the first node belongs to the first multicast group;
  • the processor is further used to modify the first message in response to the second node coming online, wherein the first multicast information carried by the modified first message includes the address information of the second node, wherein before the second node comes online, the second node does not belong to the first multicast group.
  • an embodiment of the present application provides a communication device, which is used as a second communication device, and includes:
  • a communication interface configured to receive a first message from a previous hop node, wherein the first message carries first multicast information, the first multicast information indicates a communication device included in a first multicast group, multicast data in the first multicast group is forwarded along a multicast forwarding path indicated by a first multicast distribution tree MDT, and the first communication device is a multicast source node in the first multicast group;
  • a processor configured to determine, according to the first multicast information, a multicast forwarding path indicated by the first MDT;
  • the communication interface is also used to send the first message to a third communication device according to the multicast forwarding path corresponding to the first MDT, wherein the third communication device is the next hop node of the second communication device in the multicast forwarding path indicated by the first MDT, and the first message instructs the third communication device to construct the first MDT.
  • the first multicast information includes: address information of the multicast source node, address information of the first multicast group, and address information of the multicast destination node in the first multicast group.
  • the processor is further configured to determine a first multicast forwarding table according to the first multicast information, wherein the first multicast forwarding table includes a target outbound interface, the target outbound interface can reach a multicast destination node included in the first multicast group, and the first multicast forwarding table indicates a multicast forwarding path corresponding to the first MDT.
  • the processor is further configured to determine the first multicast forwarding table according to the first multicast information
  • the processor is further configured to determine the target outbound interface in a routing table of the second communication device according to the first multicast information
  • the processor is further configured to update the first multicast forwarding table according to the target outbound interface, wherein the updated first multicast forwarding table contains The target output interface is included.
  • the processor is further configured to determine a first key value from the first multicast information, where the first key value includes a portion of the first multicast information;
  • the processor is further configured to search, according to the first key value, whether the second communication device has the first multicast forwarding table associated with the first key value;
  • the processor is further configured to create the first multicast forwarding table if it does not exist;
  • the processor is further configured to determine the first multicast forwarding table if it exists.
  • the processor is further configured to determine a first outbound interface set from a routing table of the second communication device according to the first multicast information, wherein the outbound interfaces included in the first outbound interface set can reach the multicast destination node, and the first outbound interface set includes at least one outbound interface;
  • the processor is further used to detect whether there is a third outbound interface set, where the third outbound interface set is the intersection of the first outbound interface set and the second outbound interface set, the third outbound interface set includes at least one outbound interface, and the second outbound interface set is the outbound interface included in the first multicast forwarding table;
  • the processor is further configured to determine the target outbound interface from the third outbound interface set if the third outbound interface set exists;
  • the processor is further configured to determine the target outbound interface from the first outbound interface set if the third outbound interface set does not exist.
  • the processor is further configured to classify the plurality of multicast sink nodes included in the first multicast group according to the multicast forwarding path corresponding to the first MDT, to obtain a first classification result, wherein the first classification result indicates one or more groups of the multicast sink nodes, wherein the same group of the multicast sink nodes corresponds to the same target outbound interface in the second communication device;
  • the processor is further configured to update the first message according to the first classification result, where the updated first message carries second multicast information, where the second multicast information includes address information of the same group of multicast sink nodes indicated by the first classification result;
  • the communication interface is further used to forward the updated first message to the third communication device, wherein the third communication device is the next hop node indicated by the second multicast information.
  • the processor is further configured to determine, according to the multicast forwarding path corresponding to the first MDT, information of multiple outbound interfaces corresponding to the multicast sink node in the second communication device;
  • the processor is further used to determine the target outbound interface corresponding to the multicast destination node based on multiple outbound interface information corresponding to the multicast destination node, wherein when the forwarding path for the second communication device to reach the multicast destination node includes multiple equal-cost paths, the forwarding path corresponding to the target outbound interface is determined from the multiple equal-cost paths according to a preset rule.
  • an embodiment of the present application provides a computer-readable storage medium storing one or more computer-executable instructions.
  • the processor executes any possible implementation method as described in the first aspect above.
  • an embodiment of the present application provides a computer program product (or computer program) storing one or more computer execution instructions.
  • the processor executes any possible implementation method of the aforementioned first aspect.
  • the present application provides a chip system, which includes a processor for supporting a computer device to implement the functions involved in the above aspects.
  • the chip system also includes a memory, which is used to store program instructions and data necessary for the computer device.
  • the chip system can be composed of a chip, or it can include a chip and other discrete devices.
  • an embodiment of the present application provides a chip system, which includes at least one processor and a communication interface, the communication interface and at least one processor are interconnected through lines, and the at least one processor is used to run computer programs or instructions to perform the method of the first aspect.
  • the communication interface in the chip system can be an input/output interface, a pin or a circuit, etc.
  • FIG1 is a schematic diagram of a multicast communication scenario
  • FIG2 is a schematic diagram of a multicast communication scenario
  • FIG3 is a schematic diagram of a communication domain scenario
  • FIG4 is a schematic diagram of a multicast communication scenario
  • FIG5 is a schematic diagram of a communication scenario involved in an embodiment of the present application.
  • FIG6 is a schematic diagram of an embodiment of a multicast communication method in an embodiment of the present application.
  • FIG7 is a schematic diagram of the structure of a first message in an embodiment of the present application.
  • FIG8 is a schematic diagram of another embodiment of the multicast communication method in the embodiment of the present application.
  • FIG9 is a schematic diagram of another embodiment of the multicast communication method in the embodiment of the present application.
  • FIG10 is a schematic diagram of a multicast forwarding table involved in an embodiment of the present application.
  • FIG11 is a schematic diagram of another embodiment of the multicast communication method in the embodiment of the present application.
  • FIG12 is a schematic diagram of another embodiment of the multicast communication method in the embodiment of the present application.
  • FIG13 is a schematic diagram of another embodiment of the multicast communication method in the embodiment of the present application.
  • FIG14 is a schematic diagram of a communication scenario involved in an embodiment of the present application.
  • FIG15 is a schematic diagram of another communication scenario involved in an embodiment of the present application.
  • FIG16 is a schematic diagram of another communication scenario involved in an embodiment of the present application.
  • FIG17 is a schematic diagram of another communication scenario involved in an embodiment of the present application.
  • FIG18 is a schematic diagram of another communication scenario involved in an embodiment of the present application.
  • FIG19 is a schematic diagram of another communication scenario involved in an embodiment of the present application.
  • FIG20 is a schematic diagram of another communication scenario involved in an embodiment of the present application.
  • FIG21 is a schematic diagram of the structure of a communication device 2100 provided in an embodiment of the present application.
  • FIG22 is a schematic diagram of the structure of a communication device 2200 provided in an embodiment of the present application.
  • FIG. 23 is a schematic diagram of the structure of a communication device 2300 provided in an embodiment of the present application.
  • the naming or numbering of the steps that appear in the present application does not mean that the steps in the method flow must be executed in the time/logical sequence indicated by the naming or numbering.
  • the process steps that have been named or numbered can change the execution order according to the technical purpose to be achieved, as long as the same or similar technical effects can be achieved.
  • the division of units in this application is a logical division. There may be other division methods when it is implemented in actual applications. For example, multiple units can be combined or integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection between units can be electrical or other similar forms, which are not limited in this application.
  • the units or sub-units described as separate components may or may not be physically separated, may or may not be physical units, or may be distributed in multiple circuit units, and some or all of the units may be selected according to actual needs to achieve the purpose of the present application.
  • Multicast is a one-to-many communication mode between hosts.
  • Multicast is a technology that allows one or more multicast sources (or multicast source nodes, or source nodes) to send the same message to multiple multicast destinations (or multicast destination nodes, or destination nodes).
  • Multicast means that a message is sent from a multicast and forwarded to a specific group of receivers. The same message can only be sent to one copy on each link.
  • the multicast source sends a message to a specific multicast address.
  • the multicast address is different from the unicast address. It does not belong to a specific host, but to a group of hosts.
  • a multicast group address represents a group. All receivers who need to receive multicast messages join this group.
  • FIG. 1 is a schematic diagram of a multicast communication scenario
  • FIG. 2 is a schematic diagram of a multicast communication scenario.
  • multicast can effectively save network bandwidth and reduce network load, so it is widely used in network services such as interactive Internet Protocol TV or Interactive Personal TV (IPTV), real-time data transmission and multimedia conferencing.
  • a typical application of multicast is high performance computing (HPC) or artificial intelligence (AI) business scenarios.
  • HPC/AI applications create communication domains and specify communication member information within the communication domain by calling the message passing interface (MPI) "MPI_Comm_create()" based on business processing requirements.
  • MPI message passing interface
  • Any communication member/node/instance within the communication domain can be used as a data source to send multicast data to other nodes within the communication domain by calling the MPI_Bcast() interface.
  • Figure 3 is a schematic diagram of a communication domain scenario. In Figure 3, nodes 1, 2, 5 and 6 belong to communication domain 1; nodes A, B, 7 and 8 belong to communication domain 2.
  • the sender does not care about the location of the receiver. As long as the data is sent to the agreed destination address, the rest of the work is left to the network.
  • the multicast devices in the network must collect the receiver's information and forward and replicate the multicast message along the correct path. In the development of multicast, a complete set of protocols has been formed to complete this task.
  • IGMP Internet Group Management Protocol
  • PIM Protocol Independent Multicast
  • IGMP is a protocol responsible for IPv4 multicast member management. It runs in the last segment of the multicast network, that is, the segment where the Layer 3 network device connects to the user host.
  • the IGMP protocol implements the joining and leaving of multicast group members on the host side, and implements the maintenance and management of group membership in the upstream Layer 3 device. It also supports information exchange with the upper-layer multicast routing protocol.
  • PIM is a multicast routing protocol in IPv4 networks. It is mainly used to send multicast data streams in the network to multicast devices connected to group members with multicast data requests, thereby realizing routing search and forwarding of multicast data.
  • the PIM protocol includes Protocol Independent Multicast Sparse Mode (PIM-SM) and Protocol Independent Multicast Dense Mode (PIM-DM).
  • PIM-SM is suitable for large-scale networks with relatively dispersed group members;
  • PIM-DM is suitable for small-scale networks with relatively concentrated multicast group members.
  • the PIM-DM protocol uses the following assumption: When a multicast source starts to send multicast data, all nodes in the domain need to receive the data, so the "diffusion/pruning" method is used to forward multicast data packets. When the multicast source starts to send data, the nodes along the way forward the multicast data packets to all interfaces except the Reverse Path Forwarding (RPF) interface corresponding to the multicast source. In this way, all nodes in the PIM-DM domain will receive these multicast data packets.
  • RPF Reverse Path Forwarding
  • the nodes in the area will send a prune message to prune the forwarding interface leading to the area and establish a pruning state.
  • the pruning state corresponds to the timeout timer. When the timer times out, the pruning state changes back to the forwarding state, and multicast data can flow down along these branches again.
  • the pruning state contains information about the multicast source and multicast group. When a multicast group member appears in the pruning area, in order to reduce the reaction time, the protocol does not have to wait for the upstream pruning state to time out, but actively sends a graft message to the upstream to change the pruning state to the forwarding state.
  • multicast routing protocol In a multicast network, one of the most important tasks of the multicast routing protocol is to generate a loop-free tree for the multicast network. This tree is also the transmission path of multicast traffic in the network (or the forwarding path of multicast data in the network). This tree is called the multicast distribution tree (MDT), or multicast tree for short.
  • MDT multicast distribution tree
  • SPT shortest-path tree
  • RPT shared tree
  • SPT is also called source tree because it is a multicast distribution tree with the multicast source as the root, and the receivers of the multicast group can be regarded as the leaves of the tree.
  • Multicast traffic starts from the root (multicast source), propagates along the branches, and finally reaches the leaves, which are the terminal networks where the receivers are located.
  • the multicast distribution tree is reflected on each multicast router as the relevant table entries in the multicast forwarding table (also called the multicast routing table).
  • Each multicast router maintains a multicast forwarding table, which is used to guide the forwarding of multicast traffic.
  • a multicast forwarding table may contain multiple entries, each of which contains four key information: multicast source address, multicast group address, upstream interface (or inbound interface), downstream interface (or outbound interface), timer, and flag.
  • the (S, G) multicast forwarding table entry is used, where "S" is the address information of the multicast source node (referred to as the multicast source) and "G" is the multicast group address information.
  • S is the IP address of the multicast source (10.1.1.1).
  • the (S, G) entry maintained by the router is (10.1.1.1, 239.1.1.13).
  • Each router's (10.1.1.1, 239.1.1.13) entry contains upstream and downstream interface information.
  • the upstream interface is the interface of the device facing the multicast source.
  • multicast traffic takes the shortest path from the source to the receiver, which is why the multicast distribution tree is called the shortest path tree.
  • RPT Shared tree
  • RPT is different from SPT. It does not take the multicast source as the root, but the RP (Rendezvous Point) as the root. RP can be understood as the concept of a convergence point. In a typical multicast network, it is usually a network device with good performance. Multiple multicast groups can share one RP.
  • the router that expects to receive multicast traffic (connected to the multicast receiving terminal) establishes a branch of RPT between itself and RP through the multicast routing protocol. Multicast traffic first needs to be sent from the source to RP, and then RP distributes the multicast traffic. The multicast traffic follows the RPT and finally reaches the terminal network where each receiver is located.
  • IGMP Internet Group Management Protocol
  • the multicast source node builds the members of the multicast group by sending IGMP messages such as joining the multicast group or leaving the multicast group.
  • IGMPv2 IGMP processing flow is introduced: 3.1.
  • Querier election When there are multiple multicast routers (or multicast nodes) in the same network segment, IGMPv2 elects a unique querier from them through the querier election mechanism.
  • Multicast group member query The querier periodically sends a general group query message to query the membership relationship; the multicast node sends a report message to respond to the query.
  • Member query message suppression The time when the multicast node sends a report message is random.
  • Member joining If a new multicast node wants to join the multicast group, it does not have to wait for the query message from the querier, but actively sends a report message.
  • Member leaving When a multicast group member (multicast node) leaves the multicast group, the multicast node sends a leave group message; after receiving the leave group message, the querier sends a specific group query message to determine whether all group members have left.
  • the process of constructing MDT using the IGMP protocol is as follows: the multicast destination node sends an Internet Group Management Protocol (IGMP) join message to the communication device (the communication device is regarded as the designated router (DR) device of the multicast destination node), and informs the communication device through the IGMP join message that the multicast destination node wishes to join a certain multicast group.
  • the communication device will send a Protocol Independent Multicast (PIM) protocol join message to other upstream communication devices, and inform the upstream communication device through the PIN join message that the multicast destination node wishes to join a certain multicast group.
  • PIM Protocol Independent Multicast
  • the hop-by-hop communication device performs a similar processing flow to complete the construction of the multicast MDT.
  • FIG4, is a schematic diagram of a multicast communication scenario.
  • the communication scenario includes: multicast source node (referred to as source node) 0, multicast sink node (referred to as sink node) 1, multicast sink node 2, multicast sink node 3, multicast sink node 4, multicast sink node 5, multicast sink node 6, multicast sink node 7, multicast sink node 8, multicast sink node 9, multicast sink node A and multicast sink node B, forwarding node 0, forwarding node 1, forwarding node 2, forwarding node 3, forwarding node 4, forwarding node 5, forwarding node 6, forwarding node 7, forwarding node 8, forwarding node 9, forwarding node A and forwarding node B.
  • multicast source node 0, multicast sink node 3, multicast sink node 6, multicast sink node 7, multicast sink node 9 and multicast sink node A join a multicast group.
  • PIM-DM or PIM-SM is used to construct the multicast distribution tree MDT corresponding to the multicast group
  • a large number of protocol messages need to be exchanged between various nodes.
  • the sink node 3, the sink node 6, the sink node 7, the sink node 9 and the sink node A join a multicast group of the source node 0.
  • the above sink nodes 3, 6, 7, 9 and A send IGMP join messages to join the multicast group.
  • the forwarding nodes (such as forwarding nodes 3, forwarding nodes 9, forwarding nodes A and forwarding nodes B) send PIM join messages to the upper hop forwarding nodes hop by hop to construct the MDT.
  • forwarding node 9 sends a PIM join message to the upper hop node, and can choose to send it to forwarding node 4 or forwarding node 5.
  • each node randomly selects an equal-cost path to send an IGMP join/PIM join message.
  • the MDT forwarding path finally constructed is shown in Figure 4.
  • the multicast distribution tree needs to copy the multicast data as far away from the multicast source node as possible to realize the "forked" forwarding of multicast data.
  • the MDT forwarding path shown in Figure 4 is not an optimal MDT.
  • the multicast traffic from source node 0 to destination node A passes through the forwarding path: forwarding node 6-forwarding node 2-forwarding node 1-forwarding node 4-forwarding node B is the optimal path.
  • a non-optimal MDT may be constructed, for example: forwarding node 6-forwarding node 2-forwarding node 1-forwarding node 5-forwarding node B, resulting in a waste of network bandwidth.
  • the applicant found that in the current process of constructing MDT, a large number of messages that need to be interacted with put forward high requirements on the performance of the communication device. In addition, it also causes the problem of high occupancy rate of network bandwidth resources, affecting communication efficiency. A large number of messages that need to be interacted with often lead to slow convergence of MDT construction and inability to quickly construct MDT.
  • the embodiment of the present application proposes a multicast communication method, in which the first communication device constructs and forwards the first message so that The first MDT is constructed on the second communication device of the first multicast distribution tree MDT. Since the first message carries the first multicast information, the first multicast information indicates the communication devices included in the first multicast group. Therefore, the first message can be forwarded along the multicast forwarding path indicated by the first MDT, so that all the communication devices on the multicast forwarding path can construct the first MDT according to the first message.
  • efficient construction of MDT is achieved. Compared with the current method for constructing MDT, the performance requirements for communication devices can be effectively reduced. The occupancy rate of network bandwidth resources is reduced, and communication efficiency is improved. In addition, the construction convergence rate of MDT is improved, and rapid construction of MDT is achieved.
  • a communication scenario proposed in the embodiments of the present application includes: a first communication device, a second communication device, and a third communication device.
  • the first communication device is a multicast source node in a multicast group
  • the second communication device is a forwarding node (or intermediate node) in the multicast group
  • the third communication device is a forwarding node (or intermediate node) in the multicast group
  • the next hop node of the first communication device is the second communication device
  • the next hop of the second communication device is the third communication device.
  • the communication scenario includes multiple second communication devices. Taking the communication scenario including N second communication devices as an example, N is a positive integer greater than 1. For the nth second communication device, there is a previous hop node, the previous hop node is the n-1th second communication device, and n is a positive integer less than or equal to N.
  • the communication device in the embodiment of the present application includes but is not limited to: a tablet computer (pad) or a folding screen mobile phone, a non-folding screen mobile phone, a smart watch, a smart headset, a smart speaker, a smart home appliance terminal, a smart car, a smart street lamp, a smart glasses, a smart bracelet, a portable game console, a personal digital assistant (PDA), a laptop computer, an ultra mobile personal computer (UMPC), a handheld computer, a netbook, a car media player, a wearable electronic device (for example: a watch, a bracelet, glasses), a virtual reality (VR) terminal device, or an augmented reality (AR) terminal device.
  • PDA personal digital assistant
  • UMPC ultra mobile personal computer
  • a wearable electronic device for example: a watch, a bracelet, glasses
  • VR virtual reality
  • AR augmented reality
  • the communication device in the embodiment of the present application may also be: a switch, a router, a server, or other equipment or network element that supports forwarding messages or data.
  • the communication device may be a physical entity in a network or a device in a physical entity (for example, a chip or a functional module).
  • the communication device may be a virtual device (such as a virtual machine or a container) running in a physical entity.
  • the virtual device may be a virtual router or a virtual switch, etc.
  • FIG. 6 is a schematic diagram of an embodiment of the multicast communication method in the embodiment of the present application.
  • a multicast communication method proposed in the embodiment of the present application includes:
  • a first communication device constructs a first message, where the first message carries first multicast information, and the first multicast information indicates communication devices included in a first multicast group.
  • step S1 the first communication device obtains information related to the first multicast group, and then constructs a first message according to the information related to the first multicast group.
  • the information related to the first multicast group includes node information of multiple nodes in the first multicast group.
  • the node information of multiple nodes in the first multicast group is referred to as a node information set.
  • the first communication device after the first communication device creates a communication domain corresponding to the first multicast group, it obtains the address information of the first multicast group.
  • the first communication device creates a communication domain and specifies the communication member information in the communication domain by calling the message passing interface (MPI) "MPI_Comm_create()", and the multicast corresponding to the communication domain is called the first multicast group.
  • the communication domain includes a multicast source node (the multicast source node includes the first communication device) and a multicast destination node (the multicast destination node includes the second communication device).
  • the first communication device After the first communication device creates a communication domain through the interface "MPI_Comm_create()", the first communication device obtains the node information of all nodes in the communication domain.
  • All nodes included in the communication domain are regarded as all nodes included in the first multicast group, and the node information of all nodes in the communication domain is called a node information set.
  • the node information set includes the node information of the multicast destination node in the first multicast group.
  • the first communication device obtains a configuration file of node information in the first multicast group, and then determines the node information of each node included in the first multicast group based on the configuration file of node information in the first multicast group.
  • the node information of multiple nodes included in the first multicast group is called a node information set.
  • the node information set includes the node information of the multicast host node in the first multicast group.
  • the configuration file of the node information can be constructed by a network manager that manages the first multicast group based on business demand information, and can also be constructed by a business platform that manages the first multicast group based on business demand, and the embodiments of the present application do not limit this.
  • the first communication device After the first communication device obtains the configuration file of the node information in the first multicast group, it can also obtain the address information of the first multicast group from the configuration file.
  • the first communication device constructs a first message according to information related to the first multicast group.
  • the first message carries first multicast information.
  • the first multicast information indicates the communication devices included in the first multicast group (i.e., the nodes included in the first multicast group).
  • the first multicast information includes: address information of the multicast source node, address information of the first multicast group, and address information of the multicast destination node in the first multicast group.
  • the multicast source node refers to the multicast source node in the first multicast group.
  • the address information of the multicast source node may also be the identification information of the multicast source node.
  • the address information of the first multicast group may also be the identification information of the first multicast group.
  • the address information of the multicast sink node may also be the identification information of the multicast sink node.
  • the address information of the multicast source node is the Internet Protocol (IP) address of the multicast source node
  • the address information of the first multicast group is a Class D multicast IP address
  • the address information of the multicast destination node is the IP address of the multicast destination node.
  • IP Internet Protocol
  • the address information of the multicast source node is "192.168.100.1”
  • the address information of the first multicast group is "224.12.1.1”
  • the address information of the multicast destination node includes "192.168.3.1", "192.168.6.1”, “192.168.7.1”, “192.168.9.1” and "192.168.10.1”.
  • the first multicast information may also include other information, such as: the number of multicast destination nodes in the first multicast group, which is not limited in the embodiments of the present application.
  • the first multicast information is carried in the payload portion of the first message. It is understandable that the first multicast information may also be carried in other portions of the first message, which is not limited in the embodiment of the present application.
  • the first message also carries a first identifier, which indicates that the first message is used to construct a first MDT.
  • the first identifier may be a destination port number in the first message, such as a destination port number of a user datagram protocol (UDP). Through a special UDP destination port number, it is indicated that the first message is used to construct a first MDT. Exemplarily, the UDP destination port number is 4799.
  • the first identifier may also be carried in an IP header. Through the first identifier, the efficiency of the second communication device in identifying and processing the first message is improved.
  • the destination address of the first message is a gateway address, and the gateway assists in forwarding the first message.
  • the destination address of the first message is the address of the next-hop communication device (for example, the address of the second communication device).
  • the next-hop communication device may also be referred to as an intermediate node, a transit node, an access network device, or a network device.
  • the source address of the first message is the address of the first communication device.
  • the first message includes: destination address: address information of the next hop node; source address: address information of the current node; first multicast information: address information of the multicast source node, address information of the multicast group, and address information of the multicast destination node.
  • the first communication device sends a first message to the second communication device.
  • step S2 after the first communication device completes constructing the first message, the first communication device sends the first message to the second communication device.
  • the communication scenario includes: multicast source node (referred to as source node) 0, multicast destination node (referred to as destination node) 1, multicast destination node 2, multicast destination node 3, multicast destination node 4, multicast destination node 5, multicast destination node 6, multicast destination node 7, multicast destination node 8, multicast destination node 9, multicast destination node A and multicast destination node B, forwarding node 0, forwarding node 1, forwarding node 2, forwarding node 3, forwarding node 4, forwarding node 5, forwarding node 6, forwarding node 7, forwarding node 8, forwarding node 9, forwarding node A and forwarding node B.
  • the multicast source node 0 (first communication device) generates the first message
  • the first multicast information carried by the first message includes: the address information of the multicast source node 0, the address information of the first multicast group, the address information of the multicast sink node 3, the address information of the multicast sink node 6, the address information of the multicast sink node 7, the address information of the multicast sink node 9 and the address information of the multicast sink node A.
  • the access network device of the multicast source node is the forwarding node 6 (the forwarding node 6 is regarded as the second communication device)
  • the destination address of the first message is determined to be the address of the forwarding node 6. Then, the first communication device sends the first message to the forwarding node 6.
  • the second communication device constructs a first multicast distribution tree MDT according to the first message.
  • step S3 after receiving the first message, the second communication device constructs a multicast distribution tree related to the first multicast group according to the first multicast information carried in the first message.
  • the multicast distribution tree related to the first multicast group is referred to as a first multicast distribution tree (first MDT).
  • FIG. 8 is a schematic diagram of another embodiment of the multicast communication method in the embodiment of the present application.
  • a multicast communication method proposed in the embodiment of the present application also includes:
  • the second communication device determines a multicast forwarding path indicated by a first multicast distribution tree MDT according to a first message from the first communication device.
  • step D1 after receiving the first message from the first communication device, the second communication device determines the multicast forwarding path indicated by the first MDT according to the first multicast information carried in the first message. path.
  • FIG. 9 is a schematic diagram of another embodiment of the multicast communication method in the embodiment of the present application.
  • the multicast communication method in the embodiment of the present application further includes:
  • the second communication device determines the first multicast forwarding table according to the first multicast information.
  • the multicast forwarding table related to the first multicast group is referred to as the first multicast forwarding table.
  • the first message needs to be forwarded according to the multicast forwarding path indicated by the first MDT so that each node in the network builds the first MDT.
  • it is necessary to determine the forwarding path of the first message according to the first multicast forwarding table.
  • the second communication device may also include other multicast forwarding tables, each of which corresponds to the multicast forwarding path of a multicast group.
  • FIG 10 is a schematic diagram of the multicast forwarding table involved in the embodiment of the present application.
  • the multicast forwarding table includes: a key and a value, and the key and value form a key-value pair.
  • the key value has a unique corresponding relationship with the multicast group.
  • the corresponding key-value pair is determined by the key value, and then the outgoing interface of the multicast message at this node (for example, the second communication device) is determined according to the value included in the key-value pair.
  • the outgoing interface can also be the address of the next hop node.
  • the multicast message is forwarded to the node corresponding to the outgoing interface (for example, the third communication device).
  • the key includes: the address information of the multicast source node (referred to as the multicast source address), and the multicast source address is represented by "S”; the address information of the multicast group (referred to as the multicast group address), and the multicast group address is represented by "G”.
  • the key ⁇ S1, G1> corresponds to the multicast group "G1”
  • the multicast source address of the multicast group "G1” is "S1”
  • the outbound interfaces of the multicast group "G1" at this node (or called this hop) include: outbound interface 1, outbound interface 4, and outbound interface 6.
  • the key ⁇ S2, G2> corresponds to the multicast group "G2”
  • the multicast source address of the multicast group "G2” is "S2”
  • the outbound interfaces of the multicast group "G2" at this node include: outbound interface 2 and outbound interface 5.
  • FIG. 11 is a schematic diagram of another embodiment of the multicast communication method in the embodiment of the present application.
  • the multicast communication method in the embodiment of the present application also includes:
  • G1 Determine a first key value from the first multicast information, where the first key value includes part of the first multicast information.
  • the second communication device determines a first key value from the first multicast information, and the first key value includes part of the first multicast information.
  • the first key value includes address information of the multicast source node and address information of the multicast group; in another example, the first key value includes address information of the multicast group. This embodiment of the application is not limited to this.
  • the second communication device locally stores one or more multicast forwarding tables, each of which indicates an outbound interface of a multicast group on the second communication device. Since the multicast forwarding table is composed of key-value pairs, it is possible to find out whether the second communication device has a first multicast forwarding table associated with the first key value according to the first key value, and the first multicast forwarding table includes the first key value.
  • the second communication device may query whether there is a first multicast forwarding table associated with the first key value locally.
  • the second communication device sends a query request to a third-party device, and the query request carries a first key value.
  • the third-party device queries whether there is a first multicast forwarding table related to the second communication device and associated with the first key value according to the query request.
  • the third-party device includes but is not limited to: a network manager that manages the second communication device, or a cloud server that manages the second communication device.
  • the multicast forwarding table involved in the embodiment of the present application may also have other implementation methods, and the embodiment of the present application does not limit this.
  • it is an index and data corresponding to the index, wherein the index is composed of data associated with the multicast group, and the data corresponding to the index includes the outbound interface of the multicast group in this jump.
  • step G3 If the second communication device has a first multicast forwarding table associated with the first key value, the process proceeds to step G3; if the second communication device does not have a first multicast forwarding table associated with the first key value, the process proceeds to step G4.
  • G3. Determine the first multicast forwarding table.
  • step G3 when it is determined that the second communication device has a multicast forwarding table associated with the first key value, the multicast forwarding table is used as the first multicast forwarding table.
  • step G4 when it is determined that the second communication device does not have a multicast forwarding table associated with the first key value, the second communication device (or a third-party device) creates a first multicast forwarding table, the outbound interface included in the first multicast forwarding table is empty, and the key of the first multicast forwarding table is the first key value.
  • F2 Determine a target outbound interface in a routing table of the second communication device according to the first multicast information.
  • step F2 the first multicast forwarding table has been determined through the aforementioned step F1 (including steps G1 to G4), and the outbound interface included in the first multicast forwarding table needs to be updated. Specifically, in step F2, according to the first multicast information, the target outbound interface corresponding to the first multicast information is determined in the routing table of the second communication device.
  • FIG. 12 is a schematic diagram of another embodiment of the multicast communication method in the embodiment of the present application.
  • the multicast communication method in the embodiment of the present application also includes:
  • H1 Determine a first outbound interface set from a routing table of the second communication device according to the first multicast information, where the outbound interfaces included in the first outbound interface set can reach the multicast destination node.
  • step H1 the second communication device performs a table lookup in a routing table of the second communication device according to the address information of the multicast destination node included in the first multicast information, and determines an outbound interface of the outbound interface of the second communication device that can reach the multicast destination node (the multicast destination node is indicated by the first multicast information).
  • the outbound interface of the outbound interface of the second communication device that can reach the multicast destination node is referred to as a first outbound interface set, and the first outbound interface set includes one or more outbound interfaces.
  • the scenario shown in FIG14 is taken as an example:
  • the first multicast group includes: multicast source node 0, multicast destination node 3, multicast destination node 6, multicast destination node 7, multicast destination node 9, and multicast destination node A.
  • the next hop nodes that can reach multicast destination node 3, multicast destination node 6, multicast destination node 7, multicast destination node 9, and multicast destination node A include forwarding node 2 and forwarding node 3, so the outbound interface in forwarding node 6 pointing to forwarding node 2 and the outbound interface in forwarding node 6 pointing to forwarding node 3 are taken as the first outbound interface set.
  • step H2 the second communication device uses one or more outbound interfaces included in the first multicast forwarding table as the second outbound interface set. Then, the second communication device detects whether there is an intersection between the first outbound interface set and the second outbound interface set determined in step H1, and the intersection is called the third outbound interface set. If there is, proceed to step H3; if not, proceed to step H4.
  • step H3 if there is a third outbound interface set, the target outbound interface is determined from the third outbound interface set.
  • the specific method is as follows:
  • the second communication device can reach multiple multicast destination nodes included in the first multicast group through multiple forwarding nodes, and there are multiple forwarding paths for the second communication device to reach the multiple multicast destination nodes included in the first multicast group.
  • the second communication device selects a path with the smallest path cost based on the multiple outbound interface information, and then uses the outbound interface information corresponding to the path with the smallest path cost as the target outbound interface.
  • a forwarding path can be randomly selected from the multiple equal-cost paths as the target path, and the output interface corresponding to the target path on the second communication device is used as the target output interface.
  • a path can be selected from the multiple equal-cost paths as the target path according to a preset rule, and the target output interface can be determined.
  • the preset rule includes, but is not limited to: determining the forwarding path corresponding to the target output interface according to a modulo 2 operation.
  • FIG. 15 is a schematic diagram of another communication scenario involved in an embodiment of the present application.
  • the second communication device as forwarding node 2 as an example, there are two equivalent paths for forwarding node 2 to reach the multicast destination node of the first multicast group (including multicast destination node 6, multicast destination node 7, multicast destination node 9 and multicast destination node A): forwarding node 2-forwarding node 0, and forwarding node 2-forwarding node 1.
  • These two equivalent paths correspond to two outgoing interfaces in forwarding node 2 respectively.
  • the forwarding path corresponding to the target outgoing interface is selected as: forwarding node 2-forwarding node 1.
  • the outgoing interface in forwarding node 2 that reaches forwarding node 1 is determined as the target outgoing interface.
  • step H4 if the third outbound interface set does not exist, the target outbound interface is determined from the first outbound interface set.
  • the specific method of determining the target outbound interface is similar to the method of determining the target outbound interface in step H3, and will not be described in detail here.
  • the updated first multicast forwarding table includes the target outbound interface.
  • step F3 after the target outgoing interface is determined through the above steps H1 to H4, the first multicast forwarding table is updated according to the target outgoing interface.
  • the updated first multicast forwarding table includes the target outgoing interface.
  • the second communication device sends the first message to the third communication device according to the multicast forwarding path corresponding to the first MDT, and the third communication device The node is set as the next hop node of the second communication device in the multicast forwarding path indicated by the first MDT.
  • step D2 after the second communication device determines the multicast forwarding path corresponding to the first MDT through the above method, it sends the first message to the next hop node of the second communication device in the multicast forwarding path indicated by the first MDT.
  • the next hop node of the second communication device in the multicast forwarding path indicated by the first MDT is referred to as a third communication device, and the third communication device can be a forwarding node in the network, or a multicast sink node.
  • Figure 13 is a schematic diagram of another embodiment of the multicast communication method in the embodiment of the present application.
  • the multicast communication method in the embodiment of the present application also includes:
  • K1 Classify multiple multicast destination nodes included in the first multicast group according to the target outbound interface corresponding to the multicast destination node to obtain a first classification result, where the first classification result indicates one or more types of multicast destination nodes, and the same group of multicast destination nodes corresponds to the same target outbound interface in the second communication device.
  • the plurality of multicast destination nodes included in the first multicast group may be classified according to the target outbound interface corresponding to the multicast destination node to obtain a first classification result.
  • the first classification result indicates one or more types of multicast destination nodes, and the same group of multicast destination nodes corresponds to the same target outbound interface in the second communication device.
  • FIG. 15 is as follows: when the second communication device is forwarding node 2, the multicast sink node 3 belongs to group #1, and the target outbound interface corresponding to the group #1 points to forwarding node 7; the groupcast sink node 6, the groupcast sink node 7, the groupcast sink node 9 and the groupcast sink node A belong to group #2, and the target outbound interface corresponding to the group #2 points to forwarding node 1.
  • the groupcast sink node 6 and the groupcast sink node 7 belong to group #1, and the target outbound interface corresponding to the group #1 points to forwarding node 9;
  • the groupcast sink node #9 belongs to group #2, and the target outbound interface corresponding to the group #2 points to forwarding node A;
  • the groupcast sink node #A belongs to group #3, and the target outbound interface corresponding to the group #3 points to forwarding node B.
  • the updated first message carries second multicast information
  • the second multicast information includes address information of the same group of multicast destination nodes indicated by the first classification result.
  • step K2 after the second communication device determines the first classification result, it copies the first message on the target outbound interface corresponding to the same group, and then updates the copied first message. Specifically, the address information of the multicast host node carried by the first message is updated, and the multicast information carried by the updated first message is called the second multicast information.
  • the address information of the multicast host node included in the second multicast information is only the address information of the multicast host node corresponding to the group. So that the updated first message is forwarded to the multicast host node of the group along the multicast forwarding path indicated by the first MDT.
  • the second multicast information also includes: the address information of the multicast source node and the address information of the first multicast group.
  • the second multicast information carried by the first message (updated first message) sent to packet #1 includes the address information of multicast host node 3;
  • the second multicast information carried by the first message sent to packet #2 (the outgoing interface points to forwarding node 1) includes the address information of multicast host node 6, the address information of multicast host node 7, the address information of multicast host node 9 and the address information of multicast host node A, and so on.
  • step K3 according to the second multicast information carried by the updated first message, the next hop node indicated by the second multicast information is determined, that is, the third communication device is determined. Then, the updated first message is forwarded to the third communication device. All forwarding nodes on the forwarding path indicated by the first MDT receive the first message, and a first multicast forwarding table is constructed according to the first message. Through the above method, the construction of the first MDT is completed. On the first MDT, from the first message sent by the multicast source node 0 to the first message sent by each forwarding node, the information of the above multiple first messages is shown in Table 1.
  • FIG. 16 is a schematic diagram of another communication scenario involved in the embodiment of the present application. Taking the first multicast group shown in Fig. 15 as an example, after the first MDT is constructed, the forwarding path indicated by the first MDT is shown in Fig. 16 .
  • the embodiment of the present application proposes a multicast communication method, in which a first communication device constructs and forwards a first message, so that a second communication device belonging to the first multicast distribution tree MDT constructs a first MDT. Since the first message carries the first multicast information, the first multicast information indicates the communication devices included in the first multicast group. Therefore, the first message can be forwarded along the multicast forwarding path indicated by the first MDT, so that all communication devices on the multicast forwarding path can construct the first MDT according to the first message. After receiving the first message from the first communication device, the second communication device determines the multicast forwarding path indicated by the first multicast distribution tree MDT according to the first message.
  • the second communication device forwards the first message to the next hop node (third communication device) according to the multicast forwarding path indicated by the first MDT, and the first message instructs the third communication device to construct the first MDT.
  • the second communication device constructs the first MDT by processing and forwarding the first message, thereby obtaining the multicast forwarding path indicated by the first MDT.
  • the first multicast information carried by the first message may also change accordingly. Specifically, when a new multicast destination node is added to the first multicast group, the multicast source node adds the address information of the new multicast destination node in the first multicast information; when a multicast destination node is reduced in the first multicast group, the multicast source node deletes the address information of the reduced multicast destination node in the first multicast information.
  • Figure 17 is a schematic diagram of another communication scenario involved in an embodiment of the present application.
  • the multicast source node 0 senses that the multicast destination node 5 has joined the first multicast group through a routing protocol or other means.
  • the multicast source node 0 triggers a refresh of the first MDT.
  • the specific method is as follows: the multicast source node 0 constructs a first message, and the first multicast information included in the first message carries the address information of the multicast destination node 5.
  • the multicast source node 0 sends the first message to the next hop node (forwarding node 6), and the specific processing flow is consistent with the aforementioned embodiment and is not repeated here.
  • the first message is forwarded along the forwarding path indicated by the refreshed first MDT, so that each node on the refreshed first MDT constructs the refreshed first MDT.
  • the refreshed first MDT is shown in Figure 18, which is a schematic diagram of another communication scenario involved in an embodiment of the present application.
  • Figure 19 is a schematic diagram of another communication scenario involved in the embodiment of the present application.
  • the multicast source node 0 perceives that the multicast destination node 3 exits the first multicast group through a routing protocol or other means.
  • the multicast source node 0 triggers a refresh of the first MDT.
  • the specific method is as follows: the multicast source node 0 constructs a first message, and the address information of the multicast destination node 3 is deleted from the first multicast information included in the first message.
  • the multicast source node 0 sends the first message to the next hop node (forwarding node 6), and the specific processing flow is consistent with the aforementioned embodiment and is not repeated here.
  • the first message is forwarded along the forwarding path indicated by the refreshed first MDT, so that each node on the refreshed first MDT constructs the refreshed first MDT.
  • the refreshed first MDT is shown in Figure 20, which is a schematic diagram of another communication scenario involved in the embodiment of the present application.
  • the MDT when the multicast destination node in the multicast group changes, the MDT can be efficiently constructed. Compared with the current method for constructing the MDT, the performance requirements for the communication device can be effectively reduced, the occupancy rate of the network bandwidth resources can be reduced, and the communication efficiency can be improved.
  • the following describes a communication device according to an embodiment of the present application.
  • the communication device described below has any function of the first communication device or the second communication device in the above method embodiment.
  • FIG21 is a schematic diagram of the structure of a communication device 2100 provided in an embodiment of the present application.
  • the communication device 2100 includes: a transceiver module 2102 and a processing module 2101 .
  • the communication device 2100 can correspond to the first communication device or the second communication device in the above-mentioned method embodiment.
  • the various units in the communication device 2100 and the above-mentioned other operations and/or functions are respectively for implementing the various steps and methods implemented by the first communication device or the second communication device in the method embodiment.
  • the specific details can be found in the above-mentioned method embodiment. For the sake of brevity, they will not be repeated here.
  • the communication device 2100 is used as a first communication device, and the communication device 2100 includes:
  • the processing module 2101 is configured to construct a first message, where the first message carries first multicast information, where the first multicast information indicates a communication device included in a first multicast group, and the first communication device is a multicast source node in the first multicast group;
  • the transceiver module 2102 is configured to send the first message to the second communication device, wherein the first message instructs the second communication device to build a first multicast distribution tree MDT, and multicast data in the first multicast group is forwarded along the multicast forwarding path indicated by the first multicast distribution tree MDT.
  • the first multicast information includes: address information of the multicast source node, address information of the first multicast group, and address information of the multicast destination node in the first multicast group.
  • the address information of the multicast source node is the Internet Protocol IP address of the multicast source node
  • the address information of the first multicast group is a Class D multicast IP address
  • the address information of the multicast destination node is the IP address of the multicast destination node.
  • the first message carries a first identifier, and the first identifier indicates that the first message is used to construct the first MDT.
  • the first identifier is a User Datagram Protocol UDP destination port number.
  • the transceiver module 2102 is further configured to obtain a node information set, wherein the node information set includes node information of a plurality of nodes, wherein the plurality of nodes belong to the first multicast group, and the address information of the multicast sink node belongs to the node information set;
  • the processing module 2101 is further configured to construct the first message according to the node information set.
  • the processing module 2101 is further configured to obtain the node information set after creating the communication domain corresponding to the first multicast group;
  • the processing module 2101 is further configured to obtain a configuration file of node information in the first multicast group, where the configuration file of node information in the first multicast group includes the node information set.
  • the processing module 2101 is further configured to determine, according to the first multicast information, the address information of the second communication device from the routing table of the first communication device, and use the address information of the second communication device as the destination address of the first message.
  • the processing module 2101 is further configured to determine the address information of the second communication device from the routing table of the first communication device according to the address information of the multicast destination node.
  • the transceiver module 2102 is further configured to obtain address information of the first multicast group after creating the communication domain corresponding to the first multicast group;
  • the processing module 2101 is further configured to determine the address information of the first multicast group according to a configuration file of the node information in the first multicast group.
  • the processing module 2101 is further configured to determine that the multicast destination node included in the first multicast group changes
  • the processing module 2101 is further configured to modify the first message in response to a change in a multicast destination node included in the first multicast group, wherein the first multicast information carried by the modified first message corresponds to the changed first multicast group.
  • the processing module 2101 is further configured to modify the first message in response to the first node going offline, wherein the first multicast information carried by the modified first message does not include the address information of the first node, wherein the first node belongs to the first multicast group;
  • the processing module 2101 is further used to modify the first message in response to the second node coming online, and the first multicast information carried by the modified first message includes the address information of the second node, wherein before the second node comes online, the second node does not belong to the first multicast group.
  • the communication device 2100 is used as a second communication device, and the communication device 2100 includes:
  • the transceiver module 2102 is configured to receive a first message from a previous hop node, where the first message carries first multicast information, where the first multicast information indicates a communication device included in a first multicast group, where multicast data in the first multicast group is forwarded along a multicast forwarding path indicated by a first multicast distribution tree MDT, and where the first communication device is a multicast source node in the first multicast group;
  • the processing module 2101 is configured to determine a multicast forwarding path indicated by the first MDT according to the first multicast information
  • the transceiver module 2102 is further used to send the first message to a third communication device according to the multicast forwarding path corresponding to the first MDT, wherein the third communication device is the next hop node of the second communication device in the multicast forwarding path indicated by the first MDT, and the first message instructs the third communication device to construct the first MDT.
  • the first multicast information includes: address information of the multicast source node, address information of the first multicast group, and address information of the multicast destination node in the first multicast group.
  • the processing module 2101 is further configured to determine a first multicast forwarding table according to the first multicast information, wherein the first multicast forwarding table includes a target outbound interface, the target outbound interface can reach the multicast destination node included in the first multicast group, and the first multicast forwarding table indicates a multicast forwarding path corresponding to the first MDT.
  • the processing module 2101 is further configured to determine the first multicast forwarding table according to the first multicast information
  • the processing module 2101 is further configured to determine the target outgoing interface in the routing table of the second communication device according to the first multicast information
  • the processing module 2101 is further configured to update the first multicast forwarding table according to the target outbound interface, wherein the updated first multicast forwarding table includes the target outbound interface.
  • the processing module 2101 is further configured to determine a first key value from the first multicast information, where the first key value includes part of the first multicast information;
  • the processing module 2101 is further configured to search, according to the first key value, whether the second communication device has the first multicast forwarding table associated with the first key value;
  • the processing module 2101 is further configured to create the first multicast forwarding table if it does not exist;
  • the processing module 2101 is further configured to determine the first multicast forwarding table if it exists.
  • the processing module 2101 is further configured to determine a first outbound interface set from a routing table of the second communication device according to the first multicast information, wherein the outbound interfaces included in the first outbound interface set can reach the multicast destination node, and the first outbound interface set includes at least one outbound interface;
  • the processing module 2101 is further used to detect whether there is a third outbound interface set, where the third outbound interface set is the intersection of the first outbound interface set and the second outbound interface set, the third outbound interface set includes at least one outbound interface, and the second outbound interface set is the outbound interface included in the first multicast forwarding table;
  • the processing module 2101 is further configured to determine the target outbound interface from the third outbound interface set if the third outbound interface set exists;
  • the processing module 2101 is further configured to determine the target outbound interface from the first outbound interface set if the third outbound interface set does not exist.
  • the processing module 2101 is further configured to classify the plurality of multicast sink nodes included in the first multicast group according to the multicast forwarding path corresponding to the first MDT, to obtain a first classification result, wherein the first classification result indicates one or more groups of the multicast sink nodes, wherein the same group of the multicast sink nodes corresponds to the same target outbound interface in the second communication device;
  • the processing module 2101 is further configured to update the first message according to the first classification result, where the updated first message carries second multicast information, where the second multicast information includes address information of the same group of multicast sink nodes indicated by the first classification result;
  • the transceiver module 2102 is further configured to forward the updated first message to the third communication device, wherein the third communication device is the next hop node indicated by the second multicast information.
  • the processing module 2101 is further configured to determine, according to the multicast forwarding path corresponding to the first MDT, information of multiple outbound interfaces corresponding to the multicast sink node in the second communication device;
  • the processing module 2101 is also used to determine the target outbound interface corresponding to the multicast destination node based on the multiple outbound interface information corresponding to the multicast destination node, wherein, when the forwarding path for the second communication device to reach the multicast destination node includes multiple equal-cost paths, the forwarding path corresponding to the target outbound interface is determined from the multiple equal-cost paths according to a preset rule.
  • the communication device 2100 executes the above method embodiment, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the communication device 2100 is divided into different functional modules to complete all or part of the functions described above.
  • the communication device 2100 provided in the above embodiment and the embodiment method corresponding to Figures 6 to 20 above belong to the same concept, and the specific implementation process is detailed in the above method embodiment, which will not be repeated here.
  • the present application further provides a communication device.
  • Figure 22 is a schematic diagram of the structure of a communication device 2200 provided in an embodiment of the present application.
  • the communication device 2200 shown in Figure 22 shows certain specific features, those skilled in the art will realize from the embodiments of the present application that, for the sake of brevity, various other features are not shown in Figure 22 to avoid confusing more relevant aspects of the embodiments disclosed in the embodiments of the present application.
  • the communication device 2200 includes one or more processing units (such as CPU) 2201, a network interface 2202, a programming interface 2203, a memory 2204 and one or more communication buses 2205 for interconnecting various components.
  • the communication device 2200 can also omit or increase some functional components or units based on the above examples.
  • the network interface 2202 is used to connect to one or more other communication devices/servers in the network system.
  • the communication bus 2205 includes circuits for interconnecting and controlling communication between system components.
  • the memory 2204 may include non-volatile memory, such as read-only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), or flash memory.
  • the memory 2204 may also include volatile memory, which may be random access memory (RAM), which is used as an external cache.
  • memory 2204 or a non-temporary computer-readable storage medium of memory 2204 stores the following programs, modules, and data structures, or a subset thereof, including, for example, a transceiver unit (not shown), an acquisition unit 22041 , and a processing unit 22042 .
  • the communication device 2200 may have any functions of the first communication device or the second communication device in the method embodiments corresponding to FIG. 6 to FIG. 20 above.
  • the communication device 2200 corresponds to the first communication device or the second communication device in the above-mentioned method embodiment, and the various modules in the communication device 2200 and the above-mentioned other operations and/or functions are respectively for realizing the various steps and methods implemented by the first communication device or the second communication device in the above-mentioned method embodiment.
  • the various modules in the communication device 2200 and the above-mentioned other operations and/or functions are respectively for realizing the various steps and methods implemented by the first communication device or the second communication device in the above-mentioned method embodiment.
  • the data sending and receiving operations can be completed by the network interface 2202 on the communication device 2200, or the processor can call the program code in the memory and cooperate with the network interface 2202 to implement the functions of the transceiver unit when necessary.
  • the communication device 2200 is used to execute the multicast communication method provided in the embodiments of the present application, for example, to execute the multicast communication method corresponding to the embodiments shown in Figures 6 to 20 above.
  • FIG. 23 is a schematic diagram of the structure of a communication device 2300 provided in an embodiment of the present application.
  • the communication device 2300 includes: a main control board 2310 and an interface board 2330 .
  • the main control board 2310 is also called a main processing unit (MPU) or a route processor.
  • the main control board 2310 is used to control and manage various components in the communication device 2300, including routing calculation, device management, device maintenance, and protocol processing functions.
  • the main control board 2310 includes: a central processing unit 2311 and a memory 2312.
  • the interface board 2330 is also called a line processing unit (LPU), a line card or a service board.
  • the interface board 2330 is used to provide various service interfaces and realize the forwarding of data packets.
  • the service interfaces include but are not limited to Ethernet interfaces, POS (Packet over SONET/SDH) interfaces, etc.
  • the interface board 2330 includes: a central processing unit 2331, a network processor 2332, a forwarding table entry memory 2334 and a physical interface card (PIC) 2333.
  • PIC physical interface card
  • the central processor 2331 on the interface board 2330 is used to control and manage the interface board 2330 and communicate with the central processor 2311 on the main control board 2310 .
  • the physical interface card 2333 is used to implement the docking function of the physical layer, and the original traffic enters the interface board 2330 from it, and the processed message is sent from the physical interface card 2333.
  • the physical interface card 2333 includes at least one physical interface, which is also called a physical port.
  • the physical interface can be a Flexible Ethernet (FlexE) physical interface.
  • the physical interface card 2333 is also called a daughter card, which can be installed on the interface board 2330 and is responsible for converting the optical signal into a message and forwarding the message to the network processor 2332 for processing after checking the legitimacy of the message.
  • the central processor 2331 of the interface board 2330 can also perform the functions of the network processor 2332, such as implementing software forwarding based on a general-purpose CPU, so that the network processor 2332 is not required in the interface board 2330.
  • the communication device 2300 includes multiple interface boards.
  • the communication device 2300 also includes an interface board 2340 .
  • the interface board 2340 includes: a central processor 2341 , a network processor 2342 , a forwarding table entry memory 2344 , and a physical interface card 2343 .
  • the communication device 2300 further includes a switching fabric board 2320.
  • the switching fabric board 2320 may also be referred to as a switch fabric unit (SFU).
  • SFU switch fabric unit
  • the switching fabric board 2320 is used to complete data exchange between the interface boards.
  • the interface board 2330 and the interface board 2340 may communicate via the switching fabric board 2320.
  • the main control board 2310 is coupled to the interface board.
  • the main control board 2310, the interface board 2330, the interface board 2340, and the switching network board 2320 are interconnected through a system bus and/or a system backplane.
  • an inter-process communication (IPC) channel is established between the main control board 2310 and the interface board 2330, and the main control board 2310 and the interface board 2330 communicate through the IPC channel.
  • IPC inter-process communication
  • the communication device 2300 includes a control plane and a forwarding plane.
  • the control plane includes a main control board 2310 and a central processing unit 2331.
  • the forwarding plane includes various components for performing forwarding, such as a forwarding table entry memory 2334, a physical interface card 2333, and a network processor 2332.
  • the control plane performs functions such as publishing routes, generating forwarding tables, processing signaling and protocol messages, and configuring and maintaining the status of the device.
  • the control plane sends the generated forwarding table to the forwarding plane.
  • the network processor 2332 forwards the message received by the physical interface card 2333 based on the forwarding table sent by the control plane.
  • the forwarding table sent by the control plane can be stored in the forwarding table entry memory 2334. In some embodiments, the control plane and the forwarding plane can be completely separated and not on the same device.
  • the transceiver module in the communication device 2100 can be equivalent to the physical interface card 2333 or the physical interface card 2343 in the communication device 2300; the acquisition unit 22041 and the processing unit 22042 in the communication device 2200 can be equivalent to the central processor 2311 or the central processor 2331 in the communication device 2300, and can also be equivalent to the program code or instructions stored in the memory 2312.
  • the operation on the interface board 2340 in the embodiment of the present application is consistent with the operation of the interface board 2330, and for the sake of brevity, it will not be repeated.
  • the communication device 2300 of this embodiment can correspond to the first communication device or the second communication device in the above-mentioned various method embodiments, and the main control board 2310, the interface board 2330 and/or the interface board 2340 in the communication device 2300 can implement the functions and/or various steps of the first communication device or the second communication device in the above-mentioned various method embodiments, and for the sake of brevity, it will not be repeated here.
  • the communication device may have at least one switching network board, and the data exchange between multiple interface boards is realized through the switching network board, providing large-capacity data exchange and processing capabilities.
  • the form of the communication device may also be only one board, that is, there is no switching network board, and the functions of the interface board and the main control board are integrated on the board.
  • the central processor on the interface board and the central processor on the main control board can be merged into one central processor on the board to perform the functions of the two superimposed. Which architecture is adopted depends on the specific networking deployment scenario, and it is not limited here.
  • the first communication device or the second communication device may be implemented as a virtualized device.
  • the virtualized device may be a virtual machine (VM), a virtual router or a virtual switch running a program for sending a message.
  • the virtualized device is deployed on a hardware device (e.g., a physical server).
  • a hardware device e.g., a physical server.
  • the first communication device or the second communication device may be implemented based on a general physical server in combination with network functions virtualization (NFV) technology.
  • NFV network functions virtualization
  • the embodiment of the present application also provides a computer-readable storage medium, including instructions, which, when executed on a computer, enables the computer to control a terminal device to execute any one of the implementation methods shown in the aforementioned method embodiments.
  • the embodiments of the present application also provide a computer program product, which includes a computer program code.
  • the computer program code runs on a computer, the computer executes any one of the implementation methods shown in the aforementioned method embodiments.
  • the embodiment of the present application further provides a chip system, including a processor and an interface circuit, wherein the interface circuit is used to receive instructions and transmit them to the processor.
  • the processor is used to implement the method in any of the above method embodiments.
  • the chip system further includes a memory
  • the processor in the chip system may be one or more.
  • the processor may be implemented by hardware or software.
  • the processor may be a logic circuit, an integrated circuit, etc.
  • the processor may be a general-purpose processor that implements the method in any of the above method embodiments by reading the software code stored in the memory.
  • the memory in the chip system may be one or more.
  • the memory may be integrated with the processor or may be separately provided with the processor, which is not limited in the present application.
  • the memory may be a non-transient processor, such as a read-only memory ROM, which may be integrated with the processor on the same chip or may be provided on different chips.
  • the present application does not specifically limit the type of memory and the arrangement of the memory and the processor.
  • B corresponding to A means that B is associated with A, and B can be determined according to A.
  • determining B according to A does not mean determining B only according to A, and B can also be determined according to A and/or other information.
  • the disclosed systems, devices and methods can be implemented in other ways.
  • the device embodiments described above are only schematic.
  • the division of units is only a logical function division. There may be other division methods in actual implementation.
  • multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

Disclosed in the embodiments of the present application are a multicast communication method and a related apparatus. A first communication apparatus constructs and forwards a first message, such that a second communication apparatus also belonging to a first multicast distribution tree (MDT) constructs the first MDT. The first message carries first multicast information, and the first multicast information indicates a communication apparatus comprised in a first multicast group. Therefore, the first message can be forwarded along a multicast forwarding path indicated by the first MDT, such that all the communication apparatuses on the multicast forwarding path can construct the first MDT according to the first message. The efficient construction of an MDT is realized by means of the first message carrying the first multicast information. Compared with the current MDT construction method, performance requirements with regard to communication apparatuses can be effectively reduced. The occupancy rate of network bandwidth resources is reduced, and the communication efficiency is improved. Therefore, the construction convergence rate of the MDT is improved, and rapid construction of the MDT is realized.

Description

一种组播通信方法以及相关装置A multicast communication method and related device

本申请要求于2023年06月13日提交国家知识产权局、申请号为CN202310699905.1、发明名称为“一种组播通信方法以及相关装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed with the State Intellectual Property Office on June 13, 2023, with application number CN202310699905.1 and invention name “A multicast communication method and related devices”, all contents of which are incorporated by reference in this application.

技术领域Technical Field

本申请涉及通信技术领域,尤其涉及一种组播通信方法以及相关装置。The present application relates to the field of communication technology, and in particular to a multicast communication method and related devices.

背景技术Background Art

组播技术提供了点到多点(Point to Multiple Point,P2MP)的数据通信方式,实现了网络中一个源端(或称为源节点)发送,多个宿端(或称为宿节点)接收的高效数据传输方式。通过组播技术能够大量节省大量的网络带宽、降低网络的负载。组播技术包括两个关键技术:一、组播成员管理协议技术;二、组播路由协议技术。组播成员管理协议是作用于组播主机与接入该组播主机的通信装置之间的协议,用于构建组播组中的成员信息,以及组播组中成员的网络信息。组播路由协议是作用于组播组中通信装置之间的协议,用于根据组播组中成员的关系信息构造组播分发树(Multicast Distribution Tree,MDT)。通过组播路由协议在通信装置中建立组播路由状态,通信装置根据该组播路由状态进行组播数据包的转发。Multicast technology provides a point-to-multiple point (P2MP) data communication method, which realizes an efficient data transmission method in which one source end (or source node) sends and multiple destination ends (or destination nodes) receive in the network. Multicast technology can save a lot of network bandwidth and reduce network load. Multicast technology includes two key technologies: first, multicast member management protocol technology; second, multicast routing protocol technology. The multicast member management protocol is a protocol that acts between the multicast host and the communication device connected to the multicast host, and is used to construct member information in the multicast group and network information of the members in the multicast group. The multicast routing protocol is a protocol that acts between the communication devices in the multicast group, and is used to construct a multicast distribution tree (MDT) based on the relationship information of the members in the multicast group. The multicast routing protocol establishes a multicast routing state in the communication device, and the communication device forwards multicast data packets according to the multicast routing state.

典型的组播路由协议包括:协议无关组播密集模式(Protocol Independent Multicast Dense Mode,PIM-DM)和协议无关组播稀疏模式(Protocol Independent Multicast Sparse Mode,PIM-SM),分别应用于组播成员分布密集或者组播成员分布稀疏的场景。无论PIM-DM模式还是PIM-SIM模式构建的组播分发树MDT,位于MDT中的通信装置会构建组播组转发表项,因此,通信装置基于该组播组转发表项对接收到组播数据报文进行转发。而无论是PIM-DM模式还是PIM-SIM模式,组播分发树MDT的构建过程通常采用如下方式:组播宿节点向通信装置(该通信装置视为该组播宿节点的指定路由器(Designated Router,DR)设备)发送互联网组播管协议(Internet Group Management Protocol,IGMP)加入(join)消息,通过该IGMP join消息告知该通信装置该组播宿节点希望加入某个组播组。该通信装置会向其上游的其他通信装置发送协议无关组播(Protocol Independent Multicast,PIM)协议join消息,通过该PIN join消息告知上游的通信装置该组播宿节点希望加入某个组播组。依次类推,逐跳通信装置进行相似的处理流程,完成组播MDT的构建。Typical multicast routing protocols include: Protocol Independent Multicast Dense Mode (PIM-DM) and Protocol Independent Multicast Sparse Mode (PIM-SM), which are respectively applied to scenarios where multicast members are densely distributed or sparsely distributed. Regardless of whether the multicast distribution tree MDT is constructed in PIM-DM mode or PIM-SIM mode, the communication device located in the MDT will construct a multicast group forwarding table entry. Therefore, the communication device forwards the received multicast data message based on the multicast group forwarding table entry. Regardless of the PIM-DM mode or the PIM-SIM mode, the construction process of the multicast distribution tree MDT is usually as follows: the multicast destination node sends an Internet Group Management Protocol (IGMP) join message to the communication device (the communication device is regarded as the designated router (DR) device of the multicast destination node), and informs the communication device through the IGMP join message that the multicast destination node wants to join a multicast group. The communication device will send a Protocol Independent Multicast (PIM) protocol join message to other upstream communication devices, and inform the upstream communication device through the PIN join message that the multicast destination node wants to join a multicast group. By analogy, the hop-by-hop communication device performs a similar processing flow to complete the construction of the multicast MDT.

申请人研究发现,当前的组播路由协议在构建MDT的过程中,需要大量的消息交互。在构建MDT的过程,大量的需要交互的消息,对通信装置的性能提出较高要求。此外,还造成网络带宽资源的占用率较高的问题,影响通信效率。而大量的需要交互的消息,往往会导致MDT的构建收敛慢,无法快速构建MDT。The applicant has found that the current multicast routing protocol requires a large number of message interactions in the process of building MDT. In the process of building MDT, a large number of messages that need to be interacted with place high demands on the performance of the communication device. In addition, it also causes a high occupancy rate of network bandwidth resources, affecting communication efficiency. A large number of messages that need to be interacted with often leads to slow convergence of MDT construction and inability to quickly build MDT.

发明内容Summary of the invention

本申请实施例提出一种组播通信方法,通过携带第一组播信息的第一报文,实现高效的构建组播分发树MDT。相较于当前构建MDT方法,可有效减少对通信装置的性能要求。降低网络带宽资源的占用率,提升通信效率。进而提升MDT的构建收敛速率,实现快速构建MDT。The embodiment of the present application proposes a multicast communication method, which realizes efficient construction of a multicast distribution tree MDT by carrying a first message of first multicast information. Compared with the current method of constructing MDT, the performance requirements for communication devices can be effectively reduced. The occupancy rate of network bandwidth resources is reduced, and communication efficiency is improved. In addition, the construction convergence rate of MDT is improved, and MDT can be quickly constructed.

第一方面,本申请实施例提出一种组播通信方法,包括:首先,第一通信装置构建第一报文,所述第一报文携带第一组播信息,所述第一组播信息指示第一组播组包括的通信装置,所述第一通信装置为所述第一组播组中的组播源节点;然后,所述第一通信装置向第二通信装置发送所述第一报文,所述第一报文指示所述第二通信装置构建第一组播分发树MDT,所述第一组播组中组播数据沿所述第一组播分发树MDT指示的组播转发路径转发。第二通信装置属于第一MDT指示的组播转发路径中的转发节点或者第一组播组包括的组播宿节点。In a first aspect, an embodiment of the present application proposes a multicast communication method, comprising: first, a first communication device constructs a first message, the first message carries first multicast information, the first multicast information indicates the communication devices included in the first multicast group, and the first communication device is a multicast source node in the first multicast group; then, the first communication device sends the first message to a second communication device, the first message indicates that the second communication device constructs a first multicast distribution tree MDT, and the multicast data in the first multicast group is forwarded along the multicast forwarding path indicated by the first multicast distribution tree MDT. The second communication device belongs to a forwarding node in the multicast forwarding path indicated by the first MDT or a multicast destination node included in the first multicast group.

本申请实施例中,第一通信装置通过构建并转发第一报文,使得同属于第一组播分发树MDT的第二通信装置构建第一MDT。由于第一报文携带第一组播信息,第一组播信息指示第一组播组包括的通信装置。因此,第一报文可沿着第一MDT指示的组播转发路径转发,使得该组播转发路径上的通信装置都可 根据第一报文构建第一MDT。通过携带第一组播信息的第一报文,实现高效的构建MDT。相较于当前构建MDT方法,可有效减少对通信装置的性能要求。降低网络带宽资源的占用率,提升通信效率。进而提升MDT的构建收敛速率,实现快速构建MDT。In the embodiment of the present application, the first communication device constructs and forwards the first message, so that the second communication device belonging to the first multicast distribution tree MDT constructs the first MDT. Since the first message carries the first multicast information, the first multicast information indicates the communication devices included in the first multicast group. Therefore, the first message can be forwarded along the multicast forwarding path indicated by the first MDT, so that all communication devices on the multicast forwarding path can be forwarded. The first MDT is constructed according to the first message. The first message carrying the first multicast information realizes efficient construction of the MDT. Compared with the current method for constructing the MDT, the performance requirements for the communication device can be effectively reduced. The occupancy rate of network bandwidth resources is reduced, and the communication efficiency is improved. In addition, the construction convergence rate of the MDT is improved, and the MDT is quickly constructed.

结合第一方面,在第一方面的一种可能的实现方式中,所述第一组播信息包括:所述组播源节点的地址信息、所述第一组播组的地址信息,和,所述第一组播组中组播宿节点的地址信息。需要说明的是,组播源节点指的是第一组播组中的组播源节点。组播源节点的地址信息也可以是组播源节点的标识信息。第一组播组的地址信息也可以是第一组播组的标识信息。组播宿节点的地址信息也可以是组播宿节点的标识信息。In combination with the first aspect, in a possible implementation of the first aspect, the first multicast information includes: address information of the multicast source node, address information of the first multicast group, and address information of the multicast destination node in the first multicast group. It should be noted that the multicast source node refers to the multicast source node in the first multicast group. The address information of the multicast source node may also be identification information of the multicast source node. The address information of the first multicast group may also be identification information of the first multicast group. The address information of the multicast destination node may also be identification information of the multicast destination node.

结合第一方面,在第一方面的一种可能的实现方式中,所述组播源节点的地址信息为所述组播源节点的互联网协议IP地址,所述第一组播组的地址信息为D类组播IP地址,所述组播宿节点的地址信息为所述组播宿节点的IP地址。例如,组播源节点的地址信息为“192.168.100.1”、第一组播组的地址信息为“224.12.1.1”,组播宿节点的地址信息包括“192.168.3.1”、“192.168.6.1”、“192.168.7.1”、“192.168.9.1”和“192.168.10.1”。可选的,第一组播信息还可以包括其他信息,例如:第一组播组中组播宿节点的数量,本申请实施例对此不作限制。In combination with the first aspect, in a possible implementation of the first aspect, the address information of the multicast source node is the Internet Protocol IP address of the multicast source node, the address information of the first multicast group is a Class D multicast IP address, and the address information of the multicast destination node is the IP address of the multicast destination node. For example, the address information of the multicast source node is "192.168.100.1", the address information of the first multicast group is "224.12.1.1", and the address information of the multicast destination node includes "192.168.3.1", "192.168.6.1", "192.168.7.1", "192.168.9.1" and "192.168.10.1". Optionally, the first multicast information may also include other information, such as: the number of multicast destination nodes in the first multicast group, which is not limited in the embodiments of the present application.

一种可能的实现方式中,第一组播信息承载于第一报文的有效载荷(payload)部分。可以理解的是,第一组播信息还可以承载于第一报文的其他部分,本申请实施例对此不作限制。In a possible implementation, the first multicast information is carried in the payload portion of the first message. It is understandable that the first multicast information may also be carried in other portions of the first message, which is not limited in the embodiment of the present application.

结合第一方面,在第一方面的一种可能的实现方式中,所述第一报文携带第一标识,所述第一标识指示所述第一报文用于构建所述第一MDT。下一跳节点根据第一标识确定需要根据该第一报文构建MDT。通过第一标识,提升第二通信装置识别处理第一报文的效率。In combination with the first aspect, in a possible implementation of the first aspect, the first message carries a first identifier, and the first identifier indicates that the first message is used to construct the first MDT. The next hop node determines that the MDT needs to be constructed according to the first message according to the first identifier. The efficiency of the second communication device in identifying and processing the first message is improved through the first identifier.

结合第一方面,在第一方面的一种可能的实现方式中,所述第一标识为用户数据报协议(User Datagram Protocol,UDP)目的端口号。通过特殊的UDP目的端口号,指示第一报文用于构建第一MDT。示例性的,该UDP目的端口号为4799。又一种可能的实现方式中,第一标识还可以承载于IP头中。In combination with the first aspect, in a possible implementation of the first aspect, the first identifier is a User Datagram Protocol (UDP) destination port number. The special UDP destination port number indicates that the first message is used to construct the first MDT. Exemplarily, the UDP destination port number is 4799. In another possible implementation, the first identifier may also be carried in an IP header.

结合第一方面,在第一方面的一种可能的实现方式中,第一通信装置获取节点信息集合,所述节点信息集合包括多个节点的节点信息,其中,所述多个节点属于所述第一组播组,所述组播宿节点的地址信息属于所述节点信息集合;然后,所述第一通信装置根据所述节点信息集合,构建所述第一报文。通过获取节点信息集合,进而获取第一组播信息,提升了方案的实现灵活性。In combination with the first aspect, in a possible implementation of the first aspect, a first communication device obtains a node information set, the node information set including node information of multiple nodes, wherein the multiple nodes belong to the first multicast group, and the address information of the multicast destination node belongs to the node information set; then, the first communication device constructs the first message according to the node information set. By obtaining the node information set and then obtaining the first multicast information, the implementation flexibility of the solution is improved.

结合第一方面,在第一方面的一种可能的实现方式中,所述第一通信装置获取所述节点信息集合,包括:所述第一通信装置创建所述第一组播组对应的通信域之后,获取所述节点信息集合;或者,所述第一通信装置获取所述第一组播组中节点信息的配置文件,所述第一组播组中节点信息的配置文件包括所述节点信息集合。第一通信装置可以在创建第一组播组对应的通信域后,获取节点信息集合;也可以获取第一组播组中节点的配置信息,进而获取配置文件包括的节点信息集合,提升了方案的实现灵活性。In combination with the first aspect, in a possible implementation of the first aspect, the first communication device obtains the node information set, including: after the first communication device creates the communication domain corresponding to the first multicast group, the node information set is obtained; or, the first communication device obtains a configuration file of the node information in the first multicast group, and the configuration file of the node information in the first multicast group includes the node information set. The first communication device can obtain the node information set after creating the communication domain corresponding to the first multicast group; it can also obtain the configuration information of the nodes in the first multicast group, and then obtain the node information set included in the configuration file, which improves the implementation flexibility of the solution.

结合第一方面,在第一方面的一种可能的实现方式中,所述第一通信装置根据所述第一组播信息,从所述第一通信装置的路由表中确定所述第二通信装置的地址信息,所述第二通信装置的地址信息作为所述第一报文的目的地址。此外,第一通信装置也可以将第一通信装置的网关地址作为第一报文的目的地址,由第一通信装置连接的网关将该第一报文转发至第二通信装置。通过上述方法,第一通信装置可确定第一报文的目的地址,提升方案的实现灵活性。In combination with the first aspect, in a possible implementation of the first aspect, the first communication device determines the address information of the second communication device from the routing table of the first communication device according to the first multicast information, and the address information of the second communication device is used as the destination address of the first message. In addition, the first communication device may also use the gateway address of the first communication device as the destination address of the first message, and the gateway connected to the first communication device forwards the first message to the second communication device. Through the above method, the first communication device can determine the destination address of the first message, thereby improving the implementation flexibility of the solution.

结合第一方面,在第一方面的一种可能的实现方式中,所述第一通信装置根据所述组播宿节点的地址信息,从所述第一通信装置的路由表中确定所述第二通信装置的地址信息。In combination with the first aspect, in a possible implementation manner of the first aspect, the first communication device determines the address information of the second communication device from a routing table of the first communication device according to the address information of the multicast destination node.

结合第一方面,在第一方面的一种可能的实现方式中,所述第一通信装置创建所述第一组播组对应的通信域之后,获取所述第一组播组的地址信息;或者,所述第一通信装置根据所述第一组播组中节点信息的配置文件,确定所述第一组播组的地址信息。具体的,第一通信装置还可以通过多种方式获取第一组播组的地址信息,提升方案的实现灵活性。In combination with the first aspect, in a possible implementation of the first aspect, after the first communication device creates the communication domain corresponding to the first multicast group, it obtains the address information of the first multicast group; or, the first communication device determines the address information of the first multicast group according to a configuration file of the node information in the first multicast group. Specifically, the first communication device can also obtain the address information of the first multicast group in multiple ways to improve the implementation flexibility of the solution.

结合第一方面,在第一方面的一种可能的实现方式中,所述方法还包括:所述第一通信装置确定所述第一组播组包括的所述组播宿节点发生变化;响应于所述第一组播组包括的组播宿节点发生变化,所述第一通信装置修改所述第一报文,修改后的所述第一报文携带的所述第一组播信息对应于变化后的所述第一组播组。通过上述方法,可支持第一组播组的动态变化,并保证在第一组播组发生变化后,可构 建对应的第一MDT。In combination with the first aspect, in a possible implementation of the first aspect, the method further includes: the first communication device determines that the multicast destination node included in the first multicast group changes; in response to the change in the multicast destination node included in the first multicast group, the first communication device modifies the first message, and the first multicast information carried by the modified first message corresponds to the changed first multicast group. Through the above method, dynamic changes of the first multicast group can be supported, and after the first multicast group changes, a new multicast information can be constructed. A corresponding first MDT is established.

结合第一方面,在第一方面的一种可能的实现方式中,响应于所述第一组播组包括的组播宿节点发生变化,所述第一通信装置修改所述第一报文,修改后的所述第一报文携带的所述第一组播信息对应于变化后的所述第一组播组,包括:响应于第一节点下线,所述第一通信装置修改所述第一报文,修改后的所述第一报文携带的所述第一组播信息不包括所述第一节点的地址信息,其中,所述第一节点属于所述第一组播组;或者,响应于第二节点上线,所述第一通信装置修改所述第一报文,修改后的所述第一报文携带的所述第一组播信息包括所述第二节点的地址信息,其中,在所述第二节点上线前,所述第二节点不属于所述第一组播组。In combination with the first aspect, in a possible implementation manner of the first aspect, in response to a change in a multicast host node included in the first multicast group, the first communication device modifies the first message, and the first multicast information carried by the modified first message corresponds to the changed first multicast group, including: in response to a first node going offline, the first communication device modifies the first message, and the first multicast information carried by the modified first message does not include address information of the first node, wherein the first node belongs to the first multicast group; or, in response to a second node going online, the first communication device modifies the first message, and the first multicast information carried by the modified first message includes address information of the second node, wherein before the second node goes online, the second node does not belong to the first multicast group.

第二方面,本申请实施例提出一种组播通信方法,包括:首先,第二通信装置接收来自上一跳节点的第一报文,所述第一报文携带第一组播信息,所述第一组播信息指示第一组播组包括的通信装置,所述第一组播组中组播数据沿第一组播分发树MDT指示的组播转发路径转发,所述第一通信装置为所述第一组播组中的组播源节点;然后,所述第二通信装置根据所述第一组播信息,确定所述第一MDT指示的组播转发路径;最后,所述第二通信装置根据所述第一MDT对应的组播转发路径,向第三通信装置发送所述第一报文,其中,所述第三通信装置为所述第一MDT指示的组播转发路径中所述第二通信装置的下一跳节点,所述第一报文指示所述第三通信装置构建所述第一MDT。In a second aspect, an embodiment of the present application proposes a multicast communication method, comprising: first, a second communication device receives a first message from a previous hop node, the first message carries first multicast information, the first multicast information indicates the communication devices included in the first multicast group, the multicast data in the first multicast group is forwarded along a multicast forwarding path indicated by a first multicast distribution tree MDT, and the first communication device is a multicast source node in the first multicast group; then, the second communication device determines the multicast forwarding path indicated by the first MDT according to the first multicast information; finally, the second communication device sends the first message to a third communication device according to the multicast forwarding path corresponding to the first MDT, wherein the third communication device is the next hop node of the second communication device in the multicast forwarding path indicated by the first MDT, and the first message instructs the third communication device to construct the first MDT.

本申请实施例中,第二通信装置收到来自上一跳节点的第一报文后,根据第一报文确定第一组播分发树MDT指示的组播转发路径。然后,第二通信装置根据第一MDT指示的组播转发路径向下一跳节点(第三通信装置)转发第一报文,该第一报文指示第三通信装置构建第一MDT。第二通信装置通过处理和转发第一报文,实现构建第一MDT,从而获得第一MDT指示的组播转发路径。通过携带第一组播信息的第一报文,实现高效的构建MDT。相较于当前构建MDT方法,可有效减少对通信装置的性能要求。降低网络带宽资源的占用率,提升通信效率。进而提升MDT的构建收敛速率,实现快速构建MDT。若第二通信装置为第n个第二通信装置,则该上一跳节点可以是第n-1个第二通信装置,n为正整数。或者,该上一跳节点为第一通信装置。In an embodiment of the present application, after receiving the first message from the previous hop node, the second communication device determines the multicast forwarding path indicated by the first multicast distribution tree MDT according to the first message. Then, the second communication device forwards the first message to the next hop node (third communication device) according to the multicast forwarding path indicated by the first MDT, and the first message instructs the third communication device to build the first MDT. The second communication device constructs the first MDT by processing and forwarding the first message, thereby obtaining the multicast forwarding path indicated by the first MDT. By carrying the first message of the first multicast information, efficient construction of MDT is achieved. Compared with the current method for constructing MDT, the performance requirements for the communication device can be effectively reduced. The occupancy rate of network bandwidth resources is reduced, and the communication efficiency is improved. Then the construction convergence rate of MDT is improved, and the rapid construction of MDT is achieved. If the second communication device is the nth second communication device, the previous hop node can be the n-1th second communication device, where n is a positive integer. Alternatively, the previous hop node is the first communication device.

关于第三通信装置,第三通信装置可以是转发节点,该第三通信装置也可以是组播宿节点。例如,该第三通信装置可以是第n+1个第二通信装置,也就是第n个第二通信装置将第一报文转发至第n+1个第二通信装置(第三通信装置)。当第三通信装置收到该第一报文后,执行第二方面的相关方法。又例如,该第三通信装置为组播宿节点,则该第三通信装置收到第一报文后,终结该第一报文。Regarding the third communication device, the third communication device may be a forwarding node, and the third communication device may also be a multicast destination node. For example, the third communication device may be the n+1th second communication device, that is, the nth second communication device forwards the first message to the n+1th second communication device (the third communication device). When the third communication device receives the first message, the related method of the second aspect is executed. For another example, if the third communication device is a multicast destination node, then after the third communication device receives the first message, it terminates the first message.

结合第二方面,在第二方面的一种可能的实现方式中,所述第一组播信息包括:所述组播源节点的地址信息、所述第一组播组的地址信息,和,所述第一组播组中组播宿节点的地址信息。需要说明的是,组播源节点指的是第一组播组中的组播源节点。组播源节点的地址信息也可以是组播源节点的标识信息。第一组播组的地址信息也可以是第一组播组的标识信息。组播宿节点的地址信息也可以是组播宿节点的标识信息。In combination with the second aspect, in a possible implementation of the second aspect, the first multicast information includes: the address information of the multicast source node, the address information of the first multicast group, and the address information of the multicast destination node in the first multicast group. It should be noted that the multicast source node refers to the multicast source node in the first multicast group. The address information of the multicast source node may also be the identification information of the multicast source node. The address information of the first multicast group may also be the identification information of the first multicast group. The address information of the multicast destination node may also be the identification information of the multicast destination node.

例如,组播源节点的地址信息为“192.168.100.1”、第一组播组的地址信息为“224.12.1.1”,组播宿节点的地址信息包括“192.168.3.1”、“192.168.6.1”、“192.168.7.1”、“192.168.9.1”和“192.168.10.1”。可选的,第一组播信息还可以包括其他信息,例如:第一组播组中组播宿节点的数量,本申请实施例对此不作限制。For example, the address information of the multicast source node is "192.168.100.1", the address information of the first multicast group is "224.12.1.1", and the address information of the multicast destination node includes "192.168.3.1", "192.168.6.1", "192.168.7.1", "192.168.9.1" and "192.168.10.1". Optionally, the first multicast information may further include other information, such as: the number of multicast destination nodes in the first multicast group, which is not limited in the embodiment of the present application.

结合第二方面,在第二方面的一种可能的实现方式中,所述第二通信装置根据所述第一组播信息,确定所述第一MDT指示的组播转发路径,具体包括:所述第二通信装置根据所述第一组播信息,确定第一组播转发表,所述第一组播转发表包括目标出接口,所述目标出接口可到达所述第一组播组包括的组播宿节点,所述第一组播转发表指示所述第一MDT对应的组播转发路径。In combination with the second aspect, in a possible implementation of the second aspect, the second communication device determines the multicast forwarding path indicated by the first MDT based on the first multicast information, specifically including: the second communication device determines a first multicast forwarding table based on the first multicast information, the first multicast forwarding table includes a target outbound interface, the target outbound interface can reach the multicast host node included in the first multicast group, and the first multicast forwarding table indicates the multicast forwarding path corresponding to the first MDT.

组播分发树体现到每一台组播路由器上其实就是组播转发表(也称为组播路由表)中的相关表项。每一台组播路由器都维护着组播转发表,该组播转发表用于指导组播流量转发。在组播网络中,组播转发表可能包含多个表项,每个表项都存在四个关键信息:组播源地址、组播组地址、上游接口(或者称为入接口)、下游接口(或者称为出接口)、定时器和标志等。本申请实施例中,将与第一组播组相关的组播转发表称为第一组播转发表。第一报文需要根据第一MDT指示的组播转发路径进行转发,以便网络 中各个节点构建第一MDT。在第二通信装置中,需要根据第一组播转发表确定第一报文的转发路径。需要说明的是,第二通信装置中还可以包括其他的组播转发表,每个组播转发表对应于一个组播组的组播转发路径。组播转发表包括:键(key)和值(value),上述key和value组成键值对。键值与组播组具有唯一的对应关系,通过键值确定对应的键值对,然后根据该键值对包括的值确定组播报文在本节点(例如第二通信装置)的出接口,该出接口也可以是下一跳节点的地址。最后,根据该出接口,将组播报文转发至该出接口对应的节点(例如第三通信装置)。The multicast distribution tree reflected on each multicast router is actually the relevant table entries in the multicast forwarding table (also called multicast routing table). Each multicast router maintains a multicast forwarding table, which is used to guide the forwarding of multicast traffic. In a multicast network, the multicast forwarding table may contain multiple entries, each of which has four key information: multicast source address, multicast group address, upstream interface (or inbound interface), downstream interface (or outbound interface), timer and flag, etc. In the embodiment of the present application, the multicast forwarding table related to the first multicast group is referred to as the first multicast forwarding table. The first message needs to be forwarded according to the multicast forwarding path indicated by the first MDT so that the network The first MDT is constructed for each node in the communication device. In the second communication device, it is necessary to determine the forwarding path of the first message according to the first multicast forwarding table. It should be noted that the second communication device may also include other multicast forwarding tables, each of which corresponds to the multicast forwarding path of a multicast group. The multicast forwarding table includes: a key and a value, and the key and value constitute a key-value pair. The key value has a unique corresponding relationship with the multicast group. The corresponding key-value pair is determined by the key value, and then the outgoing interface of the multicast message in this node (for example, the second communication device) is determined according to the value included in the key-value pair. The outgoing interface may also be the address of the next hop node. Finally, according to the outgoing interface, the multicast message is forwarded to the node corresponding to the outgoing interface (for example, the third communication device).

结合第二方面,在第二方面的一种可能的实现方式中,第二通信装置根据第一组播信息确定第一组播转发表后,根据第一组播信息在第二通信装置的路由表中确定目标出接口。最后,第二通信装置根据确定的目标出接口,更新第一组播转发表,更新后的第一组播转发表包括该目标出接口。通过上述方法,确保第一组播转发表中的出接口可到达第一组播组包括的组播宿节点。In combination with the second aspect, in a possible implementation of the second aspect, after the second communication device determines the first multicast forwarding table according to the first multicast information, the target outgoing interface is determined in the routing table of the second communication device according to the first multicast information. Finally, the second communication device updates the first multicast forwarding table according to the determined target outgoing interface, and the updated first multicast forwarding table includes the target outgoing interface. Through the above method, it is ensured that the outgoing interface in the first multicast forwarding table can reach the multicast destination node included in the first multicast group.

结合第二方面,在第二方面的一种可能的实现方式中,所述第二通信装置根据所述第一组播信息,确定所述第一组播转发表,包括:所述第二通信装置从所述第一组播信息中确定第一键值,所述第一键值包括部分所述第一组播信息;所述第二通信装置根据所述第一键值,查找所述第二通信装置是否存在与所述第一键值关联的所述第一组播转发表;若不存在,则创建所述第一组播转发表;若存在,则确定所述第一组播转发表。第一键值存在多种可能的实现方式,示例性的,第一键值包括组播源节点的地址信息和组播组的地址信息;又一种示例中,第一键值包括组播组的地址信息。本申请实施例对此不作限制。In combination with the second aspect, in a possible implementation of the second aspect, the second communication device determines the first multicast forwarding table based on the first multicast information, including: the second communication device determines a first key value from the first multicast information, and the first key value includes part of the first multicast information; the second communication device searches the second communication device for the first key value based on the first key value to determine whether the first multicast forwarding table associated with the first key value exists; if not, the first multicast forwarding table is created; if so, the first multicast forwarding table is determined. There are multiple possible implementations of the first key value. Exemplarily, the first key value includes the address information of the multicast source node and the address information of the multicast group; in another example, the first key value includes the address information of the multicast group. This embodiment of the application is not limited to this.

第二通信装置本地保存有一个或多个组播转发表,每个组播转发表指示某个组播组在第二通信装置的出接口。由于组播转发表由键值对组成,因此根据第一键值可以查找第二通信装置是否存在与第一键值关联的第一组播转发表,该第一组播转发表中包括第一键值。The second communication device locally stores one or more multicast forwarding tables, each of which indicates a multicast group at an outbound interface of the second communication device. Since the multicast forwarding table is composed of key-value pairs, it is possible to find out whether the second communication device has a first multicast forwarding table associated with the first key value according to the first key value, and the first multicast forwarding table includes the first key value.

一种可能的实现方式中,第二通信装置可以查询本地是否存在第一键值关联的第一组播转发表。In a possible implementation manner, the second communication device may query whether there is a first multicast forwarding table associated with the first key value locally.

另一种可能的实现方式中,第二通信装置向第三方设备发送查询请求,该查询请求中携带第一键值。由第三方设备根据查询请求查询是否存在与第二通信装置相关的且与第一键值关联的第一组播转发表。该第三方设备包括但不限于:管理该第二通信装置的网络管理器,或者,管理该第二通信装置的云端服务器。In another possible implementation, the second communication device sends a query request to a third-party device, and the query request carries a first key value. The third-party device queries whether there is a first multicast forwarding table related to the second communication device and associated with the first key value according to the query request. The third-party device includes but is not limited to: a network manager that manages the second communication device, or a cloud server that manages the second communication device.

可以理解的是,本申请实施例中涉及的组播转发表还可以存在其他的实现方式,本申请实施例对此不作限制。例如是索引以及该索引对应的数据,其中,索引由组播组关联的数据组成,该索引对应的数据包括该组播组在本跳的出接口。It is understandable that the multicast forwarding table involved in the embodiment of the present application may also have other implementation methods, and the embodiment of the present application does not limit this. For example, it is an index and data corresponding to the index, wherein the index is composed of data associated with the multicast group, and the data corresponding to the index includes the outbound interface of the multicast group in this jump.

结合第二方面,在第二方面的一种可能的实现方式中,所述第二通信装置根据所述第一组播信息,在所述第二通信装置的路由表中确定所述目标出接口,包括:所述第二通信装置根据所述第一组播信息从所述第二通信装置的路由表中确定第一出接口集合,所述第一出接口集合包括的出接口可到达所述组播宿节点,所述第一出接口集合包括至少一个出接口;所述第二通信装置检测是否存在第三出接口集合,所述第三出接口集合为所述第一出接口集合与第二出接口集合的交集,所述第三出接口集合包括至少一个出接口,所述第二出接口集合为所述第一组播转发表包括的出接口;若存在所述第三出接口集合,则从所述第三出接口集合中确定所述目标出接口;若不存在所述第三出接口集合,则从所述第一出接口集合中确定所述目标出接口。In combination with the second aspect, in a possible implementation of the second aspect, the second communication device determines the target outbound interface in the routing table of the second communication device according to the first multicast information, including: the second communication device determines a first outbound interface set from the routing table of the second communication device according to the first multicast information, the outbound interfaces included in the first outbound interface set can reach the multicast host node, and the first outbound interface set includes at least one outbound interface; the second communication device detects whether there is a third outbound interface set, the third outbound interface set is the intersection of the first outbound interface set and the second outbound interface set, the third outbound interface set includes at least one outbound interface, and the second outbound interface set is the outbound interface included in the first multicast forwarding table; if the third outbound interface set exists, the target outbound interface is determined from the third outbound interface set; if the third outbound interface set does not exist, the target outbound interface is determined from the first outbound interface set.

具体的,第二通信装置根据第一组播信息包括的组播宿节点的地址信息,在第二通信装置的路由表中进行查表,确定第二通信装置的出接口中可到达该组播宿节点(该组播宿节点由第一组播信息指示)的出接口。为了便于描述,将第二通信装置的出接口中可到达组播宿节点的出接口称为第一出接口集合,第一出接口集合包括一个或多个出接口。第二通信装置将第一组播转发表包括的一个或多个出接口作为第二出接口集合。然后,第二通信装置确定第一出接口集合与第二出接口集合是否存在交集,该交集称为第三出接口集合。若存在,则从第三出接口集合中确定目标出接口;若不存在,则从第一出接口集合中确定目标出接口。通过上述方法,确定目标出接口为可到达组播宿节点的出接口,以保证第一报文可按照第一MDT指示的组播转发路径进行转发,保证第一MDT可成功构建。Specifically, the second communication device performs a table lookup in the routing table of the second communication device according to the address information of the multicast destination node included in the first multicast information, and determines the outbound interface of the second communication device that can reach the multicast destination node (the multicast destination node is indicated by the first multicast information). For the convenience of description, the outbound interface of the second communication device that can reach the multicast destination node is called the first outbound interface set, and the first outbound interface set includes one or more outbound interfaces. The second communication device uses the one or more outbound interfaces included in the first multicast forwarding table as the second outbound interface set. Then, the second communication device determines whether there is an intersection between the first outbound interface set and the second outbound interface set, and the intersection is called the third outbound interface set. If there is, the target outbound interface is determined from the third outbound interface set; if not, the target outbound interface is determined from the first outbound interface set. Through the above method, the target outbound interface is determined to be the outbound interface that can reach the multicast destination node, so as to ensure that the first message can be forwarded according to the multicast forwarding path indicated by the first MDT, and ensure that the first MDT can be successfully constructed.

结合第二方面,在第二方面的一种可能的实现方式中,所述第二通信装置根据所述第一MDT对应的组播转发路径,向所述第三通信装置发送所述第一报文,包括:所述第二通信装置根据所述第一MDT对 应的组播转发路径,对所述第一组播组包括的多个所述组播宿节点进行分类,得到第一分类结果,所述第一分类结果指示一组或多组所述组播宿节点,其中,同一组所述组播宿节点在所述第二通信装置中对应于同一个所述目标出接口;所述第二通信装置根据所述第一分类结果更新所述第一报文,更新后的所述第一报文携带第二组播信息,所述第二组播信息包括所述第一分类结果指示的同一组所述组播宿节点的地址信息;所述第二通信装置向所述第三通信装置转发所述更新后的所述第一报文,其中,所述第三通信装置为所述第二组播信息指示的下一跳节点。In combination with the second aspect, in a possible implementation manner of the second aspect, the second communication device sending the first message to the third communication device according to the multicast forwarding path corresponding to the first MDT includes: the second communication device sending the first message to the third communication device according to the multicast forwarding path corresponding to the first MDT The method comprises the steps of: classifying the plurality of multicast destination nodes included in the first multicast group according to the multicast forwarding path corresponding to the first multicast group to obtain a first classification result, wherein the first classification result indicates one or more groups of the multicast destination nodes, wherein the same group of the multicast destination nodes corresponds to the same target outbound interface in the second communication device; the second communication device updates the first message according to the first classification result, wherein the updated first message carries second multicast information, and the second multicast information includes address information of the same group of the multicast destination nodes indicated by the first classification result; and the second communication device forwards the updated first message to the third communication device, wherein the third communication device is the next hop node indicated by the second multicast information.

为了进一步提升通信效率,还可以根据组播宿节点对应的目标出接口对第一组播组包括的多个组播宿节点进行分类,得到第一分类结果。第一分类结果指示一组或多种组播宿节点,同一组组播宿节点在第二通信装置中对应于同一个目标出接口。第二通信装置确定第一分类结果后,在同一分组对应的目标出接口上复制该第一报文,然后将复制后的第一报文进行更新处理。具体指的是,将第一报文所携带的组播宿节点的地址信息进行更新处理,更新后的第一报文所携带的组播信息称为第二组播信息。第二组播信息包括的组播宿节点的地址信息,仅为该分组所对应的组播宿节点的地址信息。以便更新后的第一报文沿着第一MDT指示的组播转发路径转发至该分组的组播宿节点。根据更新后的第一报文所携带的第二组播信息,确定第二组播信息所指示的下一跳节点,即确定第三通信装置。然后,向第三通信装置转发该更新后的第一报文。使得第一MDT指示的转发路径上所有的转发节点都收到该第一报文,并根据第一报文构建第一组播转发表。通过上述方法,完成构建第一MDT。需要说明的是,第二组播信息还包括:所述组播源节点的地址信息和所述第一组播组的地址信息。In order to further improve the communication efficiency, the multiple multicast destination nodes included in the first multicast group can also be classified according to the target outbound interface corresponding to the multicast destination node to obtain a first classification result. The first classification result indicates one or more types of multicast destination nodes, and the same group of multicast destination nodes corresponds to the same target outbound interface in the second communication device. After the second communication device determines the first classification result, it copies the first message on the target outbound interface corresponding to the same group, and then updates the copied first message. Specifically, the address information of the multicast destination node carried by the first message is updated, and the multicast information carried by the updated first message is called the second multicast information. The address information of the multicast destination node included in the second multicast information is only the address information of the multicast destination node corresponding to the group. So that the updated first message is forwarded to the multicast destination node of the group along the multicast forwarding path indicated by the first MDT. According to the second multicast information carried by the updated first message, the next hop node indicated by the second multicast information is determined, that is, the third communication device is determined. Then, the updated first message is forwarded to the third communication device. All forwarding nodes on the forwarding path indicated by the first MDT receive the first message and construct a first multicast forwarding table according to the first message. The first MDT is constructed by the above method. It should be noted that the second multicast information also includes: the address information of the multicast source node and the address information of the first multicast group.

结合第二方面,在第二方面的一种可能的实现方式中,所述第二通信装置根据所述第一MDT对应的组播转发路径,对所述第一组播组包括的多个所述组播宿节点进行分类,得到所述第一分类结果,包括:所述第二通信装置根据所述第一MDT对应的组播转发路径,确定所述第二通信装置中所述组播宿节点对应的多个出接口信息;所述第二通信装置根据所述组播宿节点对应的多个出接口信息,确定所述组播宿节点对应的所述目标出接口,其中,当所述第二通信装置到达所述组播宿节点的转发路径包括多条等价路径时,从所述多条等价路径中按照预设规则确定所述目标出接口对应的转发路径。In combination with the second aspect, in a possible implementation of the second aspect, the second communication device classifies the multiple multicast destination nodes included in the first multicast group according to the multicast forwarding path corresponding to the first MDT, and obtains the first classification result, including: the second communication device determines the multiple outbound interface information corresponding to the multicast destination node in the second communication device according to the multicast forwarding path corresponding to the first MDT; the second communication device determines the target outbound interface corresponding to the multicast destination node according to the multiple outbound interface information corresponding to the multicast destination node, wherein, when the forwarding path of the second communication device to reach the multicast destination node includes multiple equal-cost paths, the forwarding path corresponding to the target outbound interface is determined from the multiple equal-cost paths according to a preset rule.

具体的,第三出接口集合包括多个出接口时,也就是说第二通信装置可以通过多个转发节点到达第一组播组包括的多个组播宿节点,第二通信装置到达第一组播组包括的多个组播宿节点存在多条转发路径。第二通信装置根据多个出接口信息,选择路径开销最小的路径,然后将该路径开销最小的路径所对应的出接口信息作为目标出接口。Specifically, when the third outbound interface set includes multiple outbound interfaces, that is, the second communication device can reach multiple multicast destination nodes included in the first multicast group through multiple forwarding nodes, and there are multiple forwarding paths for the second communication device to reach the multiple multicast destination nodes included in the first multicast group. The second communication device selects a path with the smallest path cost based on the multiple outbound interface information, and then uses the outbound interface information corresponding to the path with the smallest path cost as the target outbound interface.

进一步的,若第二通信装置到达第一组播组的组播宿节点存在多条等价路径(即多条转发路径的路径开销相同),则可以随机从多条等价路径中选择一条转发路径作为目标路径,该目标路径在第二通信装置上对应的出接口作为目标出接口。也可以按照预设规则,从多条等价路径中选择一条路径作为目标路径,并确定目标出接口。该预设规则包括但不限于:按照对2取模操作确定目标出接口对应的转发路径、按照哈希(hash)处理确定目标出接口对应的转发路径,或者从多条等价路径中随机选择一条路径作为目标路径等。Furthermore, if there are multiple equivalent paths for the second communication device to reach the multicast destination node of the first multicast group (i.e., the path overheads of the multiple forwarding paths are the same), a forwarding path can be randomly selected from the multiple equivalent paths as the target path, and the output interface corresponding to the target path on the second communication device is used as the target output interface. It is also possible to select a path from the multiple equivalent paths as the target path according to a preset rule, and determine the target output interface. The preset rule includes but is not limited to: determining the forwarding path corresponding to the target output interface according to a modulo 2 operation, determining the forwarding path corresponding to the target output interface according to a hash process, or randomly selecting a path from multiple equivalent paths as the target path, etc.

第三方面,本申请实施例提出一种通信装置,该通信装置用作第一通信装置,该通信装置包括:In a third aspect, an embodiment of the present application provides a communication device, which is used as a first communication device, and includes:

处理模块,用于构建第一报文,所述第一报文携带第一组播信息,所述第一组播信息指示第一组播组包括的通信装置,所述第一通信装置为所述第一组播组中的组播源节点;a processing module, configured to construct a first message, wherein the first message carries first multicast information, the first multicast information indicates a communication device included in a first multicast group, and the first communication device is a multicast source node in the first multicast group;

收发模块,用于向第二通信装置发送所述第一报文,所述第一报文指示所述第二通信装置构建第一组播分发树MDT,所述第一组播组中组播数据沿所述第一组播分发树MDT指示的组播转发路径转发。The transceiver module is used to send the first message to the second communication device, wherein the first message instructs the second communication device to build a first multicast distribution tree MDT, and the multicast data in the first multicast group is forwarded along the multicast forwarding path indicated by the first multicast distribution tree MDT.

在一种可能的实现方式中,所述第一组播信息包括:所述组播源节点的地址信息、所述第一组播组的地址信息,和,所述第一组播组中组播宿节点的地址信息。In a possible implementation manner, the first multicast information includes: address information of the multicast source node, address information of the first multicast group, and address information of the multicast destination node in the first multicast group.

在一种可能的实现方式中,所述组播源节点的地址信息为所述组播源节点的互联网协议IP地址,所述第一组播组的地址信息为D类组播IP地址,所述组播宿节点的地址信息为所述组播宿节点的IP地址。In a possible implementation, the address information of the multicast source node is the Internet Protocol IP address of the multicast source node, the address information of the first multicast group is a Class D multicast IP address, and the address information of the multicast destination node is the IP address of the multicast destination node.

在一种可能的实现方式中,所述第一报文携带第一标识,所述第一标识指示所述第一报文用于构建所述第一MDT。 In a possible implementation manner, the first message carries a first identifier, and the first identifier indicates that the first message is used to construct the first MDT.

在一种可能的实现方式中,所述第一标识为用户数据报协议UDP目的端口号。In a possible implementation manner, the first identifier is a User Datagram Protocol UDP destination port number.

在一种可能的实现方式中,In one possible implementation,

收发模块,还用于获取节点信息集合,所述节点信息集合包括多个节点的节点信息,其中,所述多个节点属于所述第一组播组,所述组播宿节点的地址信息属于所述节点信息集合;The transceiver module is further used to obtain a node information set, wherein the node information set includes node information of multiple nodes, wherein the multiple nodes belong to the first multicast group, and the address information of the multicast sink node belongs to the node information set;

处理模块,还用于根据所述节点信息集合,构建所述第一报文。The processing module is further used to construct the first message according to the node information set.

在一种可能的实现方式中,In one possible implementation,

处理模块,还用于创建所述第一组播组对应的通信域之后,获取所述节点信息集合;The processing module is further configured to obtain the node information set after creating the communication domain corresponding to the first multicast group;

或者,or,

处理模块,还用于获取所述第一组播组中节点信息的配置文件,所述第一组播组中节点信息的配置文件包括所述节点信息集合。The processing module is further configured to obtain a configuration file of node information in the first multicast group, wherein the configuration file of node information in the first multicast group includes the node information set.

在一种可能的实现方式中,In one possible implementation,

处理模块,还用于根据所述第一组播信息,从所述第一通信装置的路由表中确定所述第二通信装置的地址信息,所述第二通信装置的地址信息作为所述第一报文的目的地址。The processing module is further used to determine the address information of the second communication device from the routing table of the first communication device according to the first multicast information, and the address information of the second communication device is used as the destination address of the first message.

在一种可能的实现方式中,In one possible implementation,

处理模块,还用于根据所述组播宿节点的地址信息,从所述第一通信装置的路由表中确定所述第二通信装置的地址信息。The processing module is further used to determine the address information of the second communication device from the routing table of the first communication device according to the address information of the multicast destination node.

在一种可能的实现方式中,In one possible implementation,

收发模块,还用于创建所述第一组播组对应的通信域之后,获取所述第一组播组的地址信息;The transceiver module is further configured to obtain the address information of the first multicast group after creating the communication domain corresponding to the first multicast group;

或者,or,

处理模块,还用于根据所述第一组播组中节点信息的配置文件,确定所述第一组播组的地址信息。The processing module is further configured to determine the address information of the first multicast group according to a configuration file of the node information in the first multicast group.

在一种可能的实现方式中,In one possible implementation,

处理模块,还用于确定所述第一组播组包括的所述组播宿节点发生变化;The processing module is further configured to determine that the multicast destination node included in the first multicast group changes;

处理模块,还用于响应于所述第一组播组包括的组播宿节点发生变化,修改所述第一报文,修改后的所述第一报文携带的所述第一组播信息对应于变化后的所述第一组播组。The processing module is further configured to modify the first message in response to a change in a multicast destination node included in the first multicast group, wherein the first multicast information carried by the modified first message corresponds to the changed first multicast group.

在一种可能的实现方式中,In one possible implementation,

处理模块,还用于响应于第一节点下线,修改所述第一报文,修改后的所述第一报文携带的所述第一组播信息不包括所述第一节点的地址信息,其中,所述第一节点属于所述第一组播组;The processing module is further configured to modify the first message in response to the first node going offline, wherein the first multicast information carried by the modified first message does not include the address information of the first node, wherein the first node belongs to the first multicast group;

或者,处理模块,还用于响应于第二节点上线,修改所述第一报文,修改后的所述第一报文携带的所述第一组播信息包括所述第二节点的地址信息,其中,在所述第二节点上线前,所述第二节点不属于所述第一组播组。Alternatively, the processing module is further used to modify the first message in response to the second node coming online, and the first multicast information carried by the modified first message includes the address information of the second node, wherein before the second node comes online, the second node does not belong to the first multicast group.

第四方面,本申请实施例提出一种通信装置,该通信装置用作第二通信装置,该通信装置包括:In a fourth aspect, an embodiment of the present application provides a communication device, which is used as a second communication device, and includes:

收发模块,用于接收来自上一跳节点的第一报文,所述第一报文携带第一组播信息,所述第一组播信息指示第一组播组包括的通信装置,所述第一组播组中组播数据沿第一组播分发树MDT指示的组播转发路径转发,所述第一通信装置为所述第一组播组中的组播源节点;a transceiver module, configured to receive a first message from a previous hop node, wherein the first message carries first multicast information, the first multicast information indicates a communication device included in a first multicast group, multicast data in the first multicast group is forwarded along a multicast forwarding path indicated by a first multicast distribution tree MDT, and the first communication device is a multicast source node in the first multicast group;

处理模块,用于根据所述第一组播信息,确定所述第一MDT指示的组播转发路径;a processing module, configured to determine a multicast forwarding path indicated by the first MDT according to the first multicast information;

收发模块,还用于根据所述第一MDT对应的组播转发路径,向第三通信装置发送所述第一报文,其中,所述第三通信装置为所述第一MDT指示的组播转发路径中所述第二通信装置的下一跳节点,所述第一报文指示所述第三通信装置构建所述第一MDT。The transceiver module is also used to send the first message to a third communication device according to the multicast forwarding path corresponding to the first MDT, wherein the third communication device is the next hop node of the second communication device in the multicast forwarding path indicated by the first MDT, and the first message instructs the third communication device to construct the first MDT.

在一种可能的实现方式中,所述第一组播信息包括:所述组播源节点的地址信息、所述第一组播组的地址信息,和,所述第一组播组中组播宿节点的地址信息。In a possible implementation manner, the first multicast information includes: address information of the multicast source node, address information of the first multicast group, and address information of the multicast destination node in the first multicast group.

在一种可能的实现方式中,In one possible implementation,

处理模块,还用于根据所述第一组播信息,确定第一组播转发表,所述第一组播转发表包括目标出接口,所述目标出接口可到达所述第一组播组包括的组播宿节点,所述第一组播转发表指示所述第一MDT对应的组播转发路径。The processing module is further used to determine a first multicast forwarding table according to the first multicast information, wherein the first multicast forwarding table includes a target outbound interface, the target outbound interface can reach the multicast destination node included in the first multicast group, and the first multicast forwarding table indicates a multicast forwarding path corresponding to the first MDT.

在一种可能的实现方式中,In one possible implementation,

处理模块,还用于根据所述第一组播信息,确定所述第一组播转发表; The processing module is further used to determine the first multicast forwarding table according to the first multicast information;

处理模块,还用于根据所述第一组播信息,在所述第二通信装置的路由表中确定所述目标出接口;The processing module is further used to determine the target outbound interface in the routing table of the second communication device according to the first multicast information;

处理模块,还用于根据所述目标出接口,更新所述第一组播转发表,更新后的所述第一组播转发表包括所述目标出接口。The processing module is further configured to update the first multicast forwarding table according to the target outbound interface, wherein the updated first multicast forwarding table includes the target outbound interface.

在一种可能的实现方式中,In one possible implementation,

处理模块,还用于从所述第一组播信息中确定第一键值,所述第一键值包括部分所述第一组播信息;The processing module is further configured to determine a first key value from the first multicast information, where the first key value includes a portion of the first multicast information;

处理模块,还用于根据所述第一键值,查找所述第二通信装置是否存在与所述第一键值关联的所述第一组播转发表;The processing module is further used to search, according to the first key value, whether the second communication device has the first multicast forwarding table associated with the first key value;

处理模块,还用于若不存在,则创建所述第一组播转发表;The processing module is further configured to create the first multicast forwarding table if it does not exist;

处理模块,还用于若存在,则确定所述第一组播转发表。The processing module is further configured to determine the first multicast forwarding table if it exists.

在一种可能的实现方式中,In one possible implementation,

处理模块,还用于根据所述第一组播信息从所述第二通信装置的路由表中确定第一出接口集合,所述第一出接口集合包括的出接口可到达所述组播宿节点,所述第一出接口集合包括至少一个出接口;The processing module is further configured to determine a first outbound interface set from a routing table of the second communication device according to the first multicast information, wherein the outbound interfaces included in the first outbound interface set can reach the multicast destination node, and the first outbound interface set includes at least one outbound interface;

处理模块,还用于检测是否存在第三出接口集合,所述第三出接口集合为所述第一出接口集合与第二出接口集合的交集,所述第三出接口集合包括至少一个出接口,所述第二出接口集合为所述第一组播转发表包括的出接口;The processing module is further used to detect whether there is a third outbound interface set, the third outbound interface set is the intersection of the first outbound interface set and the second outbound interface set, the third outbound interface set includes at least one outbound interface, and the second outbound interface set is the outbound interface included in the first multicast forwarding table;

处理模块,还用于若存在所述第三出接口集合,则从所述第三出接口集合中确定所述目标出接口;The processing module is further configured to determine the target outbound interface from the third outbound interface set if the third outbound interface set exists;

处理模块,还用于若不存在所述第三出接口集合,则从所述第一出接口集合中确定所述目标出接口。The processing module is further configured to determine the target outbound interface from the first outbound interface set if the third outbound interface set does not exist.

在一种可能的实现方式中,In one possible implementation,

处理模块,还用于根据所述第一MDT对应的组播转发路径,对所述第一组播组包括的多个所述组播宿节点进行分类,得到第一分类结果,所述第一分类结果指示一组或多组所述组播宿节点,其中,同一组所述组播宿节点在所述第二通信装置中对应于同一个所述目标出接口;The processing module is further configured to classify the plurality of multicast sink nodes included in the first multicast group according to the multicast forwarding path corresponding to the first MDT, to obtain a first classification result, wherein the first classification result indicates one or more groups of the multicast sink nodes, wherein the same group of the multicast sink nodes corresponds to the same target outbound interface in the second communication device;

处理模块,还用于根据所述第一分类结果更新所述第一报文,更新后的所述第一报文携带第二组播信息,所述第二组播信息包括所述第一分类结果指示的同一组所述组播宿节点的地址信息;The processing module is further configured to update the first message according to the first classification result, wherein the updated first message carries second multicast information, and the second multicast information includes address information of the same group of multicast sink nodes indicated by the first classification result;

收发模块,还用于向所述第三通信装置转发所述更新后的所述第一报文,其中,所述第三通信装置为所述第二组播信息指示的下一跳节点。The transceiver module is further used to forward the updated first message to the third communication device, wherein the third communication device is the next hop node indicated by the second multicast information.

在一种可能的实现方式中,In one possible implementation,

处理模块,还用于根据所述第一MDT对应的组播转发路径,确定所述第二通信装置中所述组播宿节点对应的多个出接口信息;The processing module is further configured to determine, according to the multicast forwarding path corresponding to the first MDT, information of multiple outbound interfaces corresponding to the multicast sink node in the second communication device;

处理模块,还用于根据所述组播宿节点对应的多个出接口信息,确定所述组播宿节点对应的所述目标出接口,其中,当所述第二通信装置到达所述组播宿节点的转发路径包括多条等价路径时,从所述多条等价路径中按照预设规则确定所述目标出接口对应的转发路径。The processing module is further used to determine the target outbound interface corresponding to the multicast destination node according to the multiple outbound interface information corresponding to the multicast destination node, wherein, when the forwarding path for the second communication device to reach the multicast destination node includes multiple equal-cost paths, the forwarding path corresponding to the target outbound interface is determined from the multiple equal-cost paths according to a preset rule.

第五方面,本申请实施例提出一种通信装置,该通信装置用作第一通信装置,该通信装置包括:In a fifth aspect, an embodiment of the present application provides a communication device, which is used as a first communication device, and includes:

处理器,用于构建第一报文,所述第一报文携带第一组播信息,所述第一组播信息指示第一组播组包括的通信装置,所述第一通信装置为所述第一组播组中的组播源节点;a processor, configured to construct a first message, wherein the first message carries first multicast information, the first multicast information indicates a communication device included in a first multicast group, and the first communication device is a multicast source node in the first multicast group;

通信接口,用于向第二通信装置发送所述第一报文,所述第一报文指示所述第二通信装置构建第一组播分发树MDT,所述第一组播组中组播数据沿所述第一组播分发树MDT指示的组播转发路径转发。The communication interface is used to send the first message to the second communication device, wherein the first message instructs the second communication device to build a first multicast distribution tree MDT, and the multicast data in the first multicast group is forwarded along the multicast forwarding path indicated by the first multicast distribution tree MDT.

在一种可能的实现方式中,所述第一组播信息包括:所述组播源节点的地址信息、所述第一组播组的地址信息,和,所述第一组播组中组播宿节点的地址信息。In a possible implementation manner, the first multicast information includes: address information of the multicast source node, address information of the first multicast group, and address information of the multicast destination node in the first multicast group.

在一种可能的实现方式中,所述组播源节点的地址信息为所述组播源节点的互联网协议IP地址,所述第一组播组的地址信息为D类组播IP地址,所述组播宿节点的地址信息为所述组播宿节点的IP地址。In a possible implementation, the address information of the multicast source node is the Internet Protocol IP address of the multicast source node, the address information of the first multicast group is a Class D multicast IP address, and the address information of the multicast destination node is the IP address of the multicast destination node.

在一种可能的实现方式中,所述第一报文携带第一标识,所述第一标识指示所述第一报文用于构建所述第一MDT。In a possible implementation manner, the first message carries a first identifier, and the first identifier indicates that the first message is used to construct the first MDT.

在一种可能的实现方式中,所述第一标识为用户数据报协议UDP目的端口号。In a possible implementation manner, the first identifier is a User Datagram Protocol UDP destination port number.

在一种可能的实现方式中, In one possible implementation,

通信接口,还用于获取节点信息集合,所述节点信息集合包括多个节点的节点信息,其中,所述多个节点属于所述第一组播组,所述组播宿节点的地址信息属于所述节点信息集合;The communication interface is further used to obtain a node information set, wherein the node information set includes node information of multiple nodes, wherein the multiple nodes belong to the first multicast group, and the address information of the multicast sink node belongs to the node information set;

处理器,还用于根据所述节点信息集合,构建所述第一报文。The processor is further configured to construct the first message according to the node information set.

在一种可能的实现方式中,In one possible implementation,

处理器,还用于创建所述第一组播组对应的通信域之后,获取所述节点信息集合;The processor is further configured to obtain the node information set after creating the communication domain corresponding to the first multicast group;

或者,or,

处理器,还用于获取所述第一组播组中节点信息的配置文件,所述第一组播组中节点信息的配置文件包括所述节点信息集合。The processor is further configured to obtain a configuration file of node information in the first multicast group, where the configuration file of node information in the first multicast group includes the node information set.

在一种可能的实现方式中,In one possible implementation,

处理器,还用于根据所述第一组播信息,从所述第一通信装置的路由表中确定所述第二通信装置的地址信息,所述第二通信装置的地址信息作为所述第一报文的目的地址。The processor is further configured to determine, according to the first multicast information, address information of the second communication device from a routing table of the first communication device, and use the address information of the second communication device as a destination address of the first message.

在一种可能的实现方式中,In one possible implementation,

处理器,还用于根据所述组播宿节点的地址信息,从所述第一通信装置的路由表中确定所述第二通信装置的地址信息。The processor is further configured to determine the address information of the second communication device from a routing table of the first communication device according to the address information of the multicast destination node.

在一种可能的实现方式中,In one possible implementation,

通信接口,还用于创建所述第一组播组对应的通信域之后,获取所述第一组播组的地址信息;The communication interface is further used to obtain the address information of the first multicast group after creating the communication domain corresponding to the first multicast group;

或者,or,

处理器,还用于根据所述第一组播组中节点信息的配置文件,确定所述第一组播组的地址信息。The processor is further configured to determine the address information of the first multicast group according to a configuration file of the node information in the first multicast group.

在一种可能的实现方式中,In one possible implementation,

处理器,还用于确定所述第一组播组包括的所述组播宿节点发生变化;The processor is further configured to determine that the multicast destination node included in the first multicast group changes;

处理器,还用于响应于所述第一组播组包括的组播宿节点发生变化,修改所述第一报文,修改后的所述第一报文携带的所述第一组播信息对应于变化后的所述第一组播组。The processor is further configured to modify the first message in response to a change in a multicast destination node included in the first multicast group, wherein the first multicast information carried by the modified first message corresponds to the changed first multicast group.

在一种可能的实现方式中,In one possible implementation,

处理器,还用于响应于第一节点下线,修改所述第一报文,修改后的所述第一报文携带的所述第一组播信息不包括所述第一节点的地址信息,其中,所述第一节点属于所述第一组播组;The processor is further configured to modify the first message in response to the first node going offline, wherein the first multicast information carried by the modified first message does not include the address information of the first node, wherein the first node belongs to the first multicast group;

或者,处理器,还用于响应于第二节点上线,修改所述第一报文,修改后的所述第一报文携带的所述第一组播信息包括所述第二节点的地址信息,其中,在所述第二节点上线前,所述第二节点不属于所述第一组播组。Alternatively, the processor is further used to modify the first message in response to the second node coming online, wherein the first multicast information carried by the modified first message includes the address information of the second node, wherein before the second node comes online, the second node does not belong to the first multicast group.

第六方面,本申请实施例提出一种通信装置,该通信装置用作第二通信装置,该通信装置包括:In a sixth aspect, an embodiment of the present application provides a communication device, which is used as a second communication device, and includes:

通信接口,用于接收来自上一跳节点的第一报文,所述第一报文携带第一组播信息,所述第一组播信息指示第一组播组包括的通信装置,所述第一组播组中组播数据沿第一组播分发树MDT指示的组播转发路径转发,所述第一通信装置为所述第一组播组中的组播源节点;a communication interface, configured to receive a first message from a previous hop node, wherein the first message carries first multicast information, the first multicast information indicates a communication device included in a first multicast group, multicast data in the first multicast group is forwarded along a multicast forwarding path indicated by a first multicast distribution tree MDT, and the first communication device is a multicast source node in the first multicast group;

处理器,用于根据所述第一组播信息,确定所述第一MDT指示的组播转发路径;a processor, configured to determine, according to the first multicast information, a multicast forwarding path indicated by the first MDT;

通信接口,还用于根据所述第一MDT对应的组播转发路径,向第三通信装置发送所述第一报文,其中,所述第三通信装置为所述第一MDT指示的组播转发路径中所述第二通信装置的下一跳节点,所述第一报文指示所述第三通信装置构建所述第一MDT。The communication interface is also used to send the first message to a third communication device according to the multicast forwarding path corresponding to the first MDT, wherein the third communication device is the next hop node of the second communication device in the multicast forwarding path indicated by the first MDT, and the first message instructs the third communication device to construct the first MDT.

在一种可能的实现方式中,所述第一组播信息包括:所述组播源节点的地址信息、所述第一组播组的地址信息,和,所述第一组播组中组播宿节点的地址信息。In a possible implementation manner, the first multicast information includes: address information of the multicast source node, address information of the first multicast group, and address information of the multicast destination node in the first multicast group.

在一种可能的实现方式中,In one possible implementation,

处理器,还用于根据所述第一组播信息,确定第一组播转发表,所述第一组播转发表包括目标出接口,所述目标出接口可到达所述第一组播组包括的组播宿节点,所述第一组播转发表指示所述第一MDT对应的组播转发路径。The processor is further configured to determine a first multicast forwarding table according to the first multicast information, wherein the first multicast forwarding table includes a target outbound interface, the target outbound interface can reach a multicast destination node included in the first multicast group, and the first multicast forwarding table indicates a multicast forwarding path corresponding to the first MDT.

在一种可能的实现方式中,In one possible implementation,

处理器,还用于根据所述第一组播信息,确定所述第一组播转发表;The processor is further configured to determine the first multicast forwarding table according to the first multicast information;

处理器,还用于根据所述第一组播信息,在所述第二通信装置的路由表中确定所述目标出接口;The processor is further configured to determine the target outbound interface in a routing table of the second communication device according to the first multicast information;

处理器,还用于根据所述目标出接口,更新所述第一组播转发表,更新后的所述第一组播转发表包 括所述目标出接口。The processor is further configured to update the first multicast forwarding table according to the target outbound interface, wherein the updated first multicast forwarding table contains The target output interface is included.

在一种可能的实现方式中,In one possible implementation,

处理器,还用于从所述第一组播信息中确定第一键值,所述第一键值包括部分所述第一组播信息;The processor is further configured to determine a first key value from the first multicast information, where the first key value includes a portion of the first multicast information;

处理器,还用于根据所述第一键值,查找所述第二通信装置是否存在与所述第一键值关联的所述第一组播转发表;The processor is further configured to search, according to the first key value, whether the second communication device has the first multicast forwarding table associated with the first key value;

处理器,还用于若不存在,则创建所述第一组播转发表;The processor is further configured to create the first multicast forwarding table if it does not exist;

处理器,还用于若存在,则确定所述第一组播转发表。The processor is further configured to determine the first multicast forwarding table if it exists.

在一种可能的实现方式中,In one possible implementation,

处理器,还用于根据所述第一组播信息从所述第二通信装置的路由表中确定第一出接口集合,所述第一出接口集合包括的出接口可到达所述组播宿节点,所述第一出接口集合包括至少一个出接口;The processor is further configured to determine a first outbound interface set from a routing table of the second communication device according to the first multicast information, wherein the outbound interfaces included in the first outbound interface set can reach the multicast destination node, and the first outbound interface set includes at least one outbound interface;

处理器,还用于检测是否存在第三出接口集合,所述第三出接口集合为所述第一出接口集合与第二出接口集合的交集,所述第三出接口集合包括至少一个出接口,所述第二出接口集合为所述第一组播转发表包括的出接口;The processor is further used to detect whether there is a third outbound interface set, where the third outbound interface set is the intersection of the first outbound interface set and the second outbound interface set, the third outbound interface set includes at least one outbound interface, and the second outbound interface set is the outbound interface included in the first multicast forwarding table;

处理器,还用于若存在所述第三出接口集合,则从所述第三出接口集合中确定所述目标出接口;The processor is further configured to determine the target outbound interface from the third outbound interface set if the third outbound interface set exists;

处理器,还用于若不存在所述第三出接口集合,则从所述第一出接口集合中确定所述目标出接口。The processor is further configured to determine the target outbound interface from the first outbound interface set if the third outbound interface set does not exist.

在一种可能的实现方式中,In one possible implementation,

处理器,还用于根据所述第一MDT对应的组播转发路径,对所述第一组播组包括的多个所述组播宿节点进行分类,得到第一分类结果,所述第一分类结果指示一组或多组所述组播宿节点,其中,同一组所述组播宿节点在所述第二通信装置中对应于同一个所述目标出接口;The processor is further configured to classify the plurality of multicast sink nodes included in the first multicast group according to the multicast forwarding path corresponding to the first MDT, to obtain a first classification result, wherein the first classification result indicates one or more groups of the multicast sink nodes, wherein the same group of the multicast sink nodes corresponds to the same target outbound interface in the second communication device;

处理器,还用于根据所述第一分类结果更新所述第一报文,更新后的所述第一报文携带第二组播信息,所述第二组播信息包括所述第一分类结果指示的同一组所述组播宿节点的地址信息;The processor is further configured to update the first message according to the first classification result, where the updated first message carries second multicast information, where the second multicast information includes address information of the same group of multicast sink nodes indicated by the first classification result;

通信接口,还用于向所述第三通信装置转发所述更新后的所述第一报文,其中,所述第三通信装置为所述第二组播信息指示的下一跳节点。The communication interface is further used to forward the updated first message to the third communication device, wherein the third communication device is the next hop node indicated by the second multicast information.

在一种可能的实现方式中,In one possible implementation,

处理器,还用于根据所述第一MDT对应的组播转发路径,确定所述第二通信装置中所述组播宿节点对应的多个出接口信息;The processor is further configured to determine, according to the multicast forwarding path corresponding to the first MDT, information of multiple outbound interfaces corresponding to the multicast sink node in the second communication device;

处理器,还用于根据所述组播宿节点对应的多个出接口信息,确定所述组播宿节点对应的所述目标出接口,其中,当所述第二通信装置到达所述组播宿节点的转发路径包括多条等价路径时,从所述多条等价路径中按照预设规则确定所述目标出接口对应的转发路径。The processor is further used to determine the target outbound interface corresponding to the multicast destination node based on multiple outbound interface information corresponding to the multicast destination node, wherein when the forwarding path for the second communication device to reach the multicast destination node includes multiple equal-cost paths, the forwarding path corresponding to the target outbound interface is determined from the multiple equal-cost paths according to a preset rule.

第七方面,本申请实施例提供了一种存储一个或多个计算机执行指令的计算机可读存储介质,当该计算机执行指令被处理器执行时,该处理器执行如前述第一方面中任意一种可能的实现方式。In the seventh aspect, an embodiment of the present application provides a computer-readable storage medium storing one or more computer-executable instructions. When the computer-executable instructions are executed by a processor, the processor executes any possible implementation method as described in the first aspect above.

第八方面,本申请实施例提供一种存储一个或多个计算机执行指令的计算机程序产品(或称计算机程序),当该计算机执行指令被该处理器执行时,该处理器执行前述第一方面中任意一种可能的实现方式。In an eighth aspect, an embodiment of the present application provides a computer program product (or computer program) storing one or more computer execution instructions. When the computer execution instructions are executed by the processor, the processor executes any possible implementation method of the aforementioned first aspect.

第九方面,本申请提供了一种芯片系统,该芯片系统包括处理器,用于支持计算机设备实现上述方面中所涉及的功能。在一种可能的设计中,该芯片系统还包括存储器,该存储器,用于保存计算机设备必要的程序指令和数据。该芯片系统,可以由芯片构成,也可以包括芯片和其他分立器件。In a ninth aspect, the present application provides a chip system, which includes a processor for supporting a computer device to implement the functions involved in the above aspects. In a possible design, the chip system also includes a memory, which is used to store program instructions and data necessary for the computer device. The chip system can be composed of a chip, or it can include a chip and other discrete devices.

第十方面,本申请实施例提供了一种芯片系统,该芯片系统包括至少一个处理器和通信接口,通信接口和至少一个处理器通过线路互联,至少一个处理器用于运行计算机程序或指令,以进行第一方面的方法。In the tenth aspect, an embodiment of the present application provides a chip system, which includes at least one processor and a communication interface, the communication interface and at least one processor are interconnected through lines, and the at least one processor is used to run computer programs or instructions to perform the method of the first aspect.

其中,芯片系统中的通信接口可以为输入/输出接口、管脚或电路等。Among them, the communication interface in the chip system can be an input/output interface, a pin or a circuit, etc.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1为一种组播通信场景示意图;FIG1 is a schematic diagram of a multicast communication scenario;

图2为一种组播通信场景示意图;FIG2 is a schematic diagram of a multicast communication scenario;

图3为一种通信域场景示意图; FIG3 is a schematic diagram of a communication domain scenario;

图4为一种组播通信场景示意图;FIG4 is a schematic diagram of a multicast communication scenario;

图5为本申请实施例涉及的一种通信场景示意图;FIG5 is a schematic diagram of a communication scenario involved in an embodiment of the present application;

图6为本申请实施例中组播通信方法的一种实施例示意图;FIG6 is a schematic diagram of an embodiment of a multicast communication method in an embodiment of the present application;

图7为本申请实施例中一种第一报文的结构示意图;FIG7 is a schematic diagram of the structure of a first message in an embodiment of the present application;

图8为本申请实施例中组播通信方法的又一种实施例示意图;FIG8 is a schematic diagram of another embodiment of the multicast communication method in the embodiment of the present application;

图9为本申请实施例中组播通信方法的又一种实施例示意图;FIG9 is a schematic diagram of another embodiment of the multicast communication method in the embodiment of the present application;

图10为本申请实施例中涉及的组播转发表的一种示意图;FIG10 is a schematic diagram of a multicast forwarding table involved in an embodiment of the present application;

图11为本申请实施例中组播通信方法的又一种实施例示意图;FIG11 is a schematic diagram of another embodiment of the multicast communication method in the embodiment of the present application;

图12为本申请实施例中组播通信方法的又一种实施例示意图;FIG12 is a schematic diagram of another embodiment of the multicast communication method in the embodiment of the present application;

图13为本申请实施例中组播通信方法的又一种实施例示意图;FIG13 is a schematic diagram of another embodiment of the multicast communication method in the embodiment of the present application;

图14为本申请实施例中涉及的一种通信场景示意图;FIG14 is a schematic diagram of a communication scenario involved in an embodiment of the present application;

图15为本申请实施例中涉及的又一种通信场景示意图;FIG15 is a schematic diagram of another communication scenario involved in an embodiment of the present application;

图16为本申请实施例中涉及的又一种通信场景示意图;FIG16 is a schematic diagram of another communication scenario involved in an embodiment of the present application;

图17为本申请实施例中涉及的又一种通信场景示意图;FIG17 is a schematic diagram of another communication scenario involved in an embodiment of the present application;

图18为本申请实施例中涉及的又一种通信场景示意图;FIG18 is a schematic diagram of another communication scenario involved in an embodiment of the present application;

图19为本申请实施例中涉及的又一种通信场景示意图;FIG19 is a schematic diagram of another communication scenario involved in an embodiment of the present application;

图20为本申请实施例中涉及的又一种通信场景示意图;FIG20 is a schematic diagram of another communication scenario involved in an embodiment of the present application;

图21为本申请实施例提供的一种通信装置2100的结构示意图;FIG21 is a schematic diagram of the structure of a communication device 2100 provided in an embodiment of the present application;

图22为本申请实施例提供的一种通信装置2200的结构示意图;FIG22 is a schematic diagram of the structure of a communication device 2200 provided in an embodiment of the present application;

图23为本申请实施例提供的一种通信装置2300的结构示意图。FIG. 23 is a schematic diagram of the structure of a communication device 2300 provided in an embodiment of the present application.

具体实施方式DETAILED DESCRIPTION

下面,对本申请实施例进行描述。显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。本领域普通技术人员可知,随着新应用场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。Below, the embodiments of the present application are described. Obviously, the described embodiments are only embodiments of a part of the present application, rather than all embodiments. It is known to those skilled in the art that with the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的描述在适当情况下可以互换,以便使实施例能够以除了在本申请图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或模块的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或模块,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或模块。在本申请中出现的对步骤进行的命名或者编号,并不意味着必须按照命名或者编号所指示的时间/逻辑先后顺序执行方法流程中的步骤,已经命名或者编号的流程步骤可以根据要实现的技术目的变更执行顺序,只要能达到相同或者相类似的技术效果即可。本申请中所出现的单元的划分,是一种逻辑上的划分,实际应用中实现时可以有另外的划分方式,例如多个单元可以结合成或集成在另一个系统中,或一些特征可以忽略,或不执行,另外,所显示的或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,单元之间的间接耦合或通信连接可以是电性或其他类似的形式,本申请中均不作限定。并且,作为分离部件说明的单元或子单元可以是也可以不是物理上的分离,可以是也可以不是物理单元,或者可以分布到多个电路单元中,可以根据实际的需要选择其中的部分或全部单元来实现本申请方案的目的。The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the descriptions used in this way can be interchanged where appropriate, so that the embodiments can be implemented in a sequence other than that illustrated or described in the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or modules is not necessarily limited to those steps or modules that are clearly listed, but may include other steps or modules that are not clearly listed or inherent to these processes, methods, products or devices. The naming or numbering of the steps that appear in the present application does not mean that the steps in the method flow must be executed in the time/logical sequence indicated by the naming or numbering. The process steps that have been named or numbered can change the execution order according to the technical purpose to be achieved, as long as the same or similar technical effects can be achieved. The division of units in this application is a logical division. There may be other division methods when it is implemented in actual applications. For example, multiple units can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection between units can be electrical or other similar forms, which are not limited in this application. In addition, the units or sub-units described as separate components may or may not be physically separated, may or may not be physical units, or may be distributed in multiple circuit units, and some or all of the units may be selected according to actual needs to achieve the purpose of the present application.

首先,介绍本申请实施例涉及的一些技术概念。First, some technical concepts involved in the embodiments of the present application are introduced.

1、组播。1. Multicast.

组播是主机间一对多的通讯模式,组播是一种允许一个或多个组播源(或者称为组播源节点,或者源节点)发送同一报文到多个组播宿(或者称为组播宿节点,或者宿节点)的技术。组播指的是报文从一个组播发出,被转发到一组特定的接收者,相同的报文在每条链路上最多有一份。组播源将一份报文发送到特定的组播地址,组播地址不同于单播地址,它并不属于特定某个主机,而是属于一组主机。一个组播组地址表示一个群组,需要接收组播报文的接收者都加入这个群组。 Multicast is a one-to-many communication mode between hosts. Multicast is a technology that allows one or more multicast sources (or multicast source nodes, or source nodes) to send the same message to multiple multicast destinations (or multicast destination nodes, or destination nodes). Multicast means that a message is sent from a multicast and forwarded to a specific group of receivers. The same message can only be sent to one copy on each link. The multicast source sends a message to a specific multicast address. The multicast address is different from the unicast address. It does not belong to a specific host, but to a group of hosts. A multicast group address represents a group. All receivers who need to receive multicast messages join this group.

为了便于理解,如图1~图2所示,图1为一种组播通信场景示意图,图2为一种组播通信场景示意图。For ease of understanding, as shown in FIGS. 1 and 2 , FIG. 1 is a schematic diagram of a multicast communication scenario, and FIG. 2 is a schematic diagram of a multicast communication scenario.

相较于传统的单播和广播,组播可以有效地节约网络带宽、降低网络负载,所以被广泛应用于交互式网络电视(Internet Protocol TV or Interactive Personal TV,IPTV)、实时数据传送和多媒体会议等网络业务中。示例性的,组播的一种典型应用为高性能计算(High Performance Computing,HPC)或人工智能(Artificial Intelligence,AI)业务场景,HPC/AI应用基于业务处理需求,通过调用消息传递接口(Message Passing Interface,MPI)“MPI_Comm_create()”,创建通信域,指定通信域内的通信成员信息。通信域内的任何一个通信成员/节点/实例通过调用MPI_Bcast()接口,都可以作为数据源端,向通信与内其他的节点发送组播数据。例如图3所示,图3为一种通信域场景示意图。图3中,节点1、节点2、节点5和节点6属于通信域1;节点A、节点B、节点7和节点8属于通信域2。Compared with traditional unicast and broadcast, multicast can effectively save network bandwidth and reduce network load, so it is widely used in network services such as interactive Internet Protocol TV or Interactive Personal TV (IPTV), real-time data transmission and multimedia conferencing. For example, a typical application of multicast is high performance computing (HPC) or artificial intelligence (AI) business scenarios. HPC/AI applications create communication domains and specify communication member information within the communication domain by calling the message passing interface (MPI) "MPI_Comm_create()" based on business processing requirements. Any communication member/node/instance within the communication domain can be used as a data source to send multicast data to other nodes within the communication domain by calling the MPI_Bcast() interface. For example, as shown in Figure 3, Figure 3 is a schematic diagram of a communication domain scenario. In Figure 3, nodes 1, 2, 5 and 6 belong to communication domain 1; nodes A, B, 7 and 8 belong to communication domain 2.

在IP组播传输模型中,发送者不关心接收者所处的位置,只要将数据发送到约定的目的地址,剩下的工作就交给网络去完成。网络中的组播设备必须收集接收者的信息,并按照正确的路径实现组播报文的转发和复制。在组播的发展过程中,形成了一套完整的协议来完成此任务。In the IP multicast transmission model, the sender does not care about the location of the receiver. As long as the data is sent to the agreed destination address, the rest of the work is left to the network. The multicast devices in the network must collect the receiver's information and forward and replicate the multicast message along the correct path. In the development of multicast, a complete set of protocols has been formed to complete this task.

常见的组播协议包括:组播组管理协议(Internet Group Management Protocol,IGMP)以及协议无关组播(Protocol Independent Multicast,PIM)。Common multicast protocols include Internet Group Management Protocol (IGMP) and Protocol Independent Multicast (PIM).

IGMP是负责IPv4组播成员管理的协议,运行在组播网络中的最后一段,即三层网络设备与用户主机相连的网段内。IGMP协议在主机端实现组播组成员加入与离开,在上游的三层设备中实现组成员关系的维护与管理,同时支持与上层组播路由协议的信息交互。IGMP is a protocol responsible for IPv4 multicast member management. It runs in the last segment of the multicast network, that is, the segment where the Layer 3 network device connects to the user host. The IGMP protocol implements the joining and leaving of multicast group members on the host side, and implements the maintenance and management of group membership in the upstream Layer 3 device. It also supports information exchange with the upper-layer multicast routing protocol.

PIM作为一种IPv4网络中的组播路由协议,主要用于将网络中的组播数据流发送到有组播数据请求的组成员所连接的组播设备上,从而实现组播数据的路由查找与转发。PIM is a multicast routing protocol in IPv4 networks. It is mainly used to send multicast data streams in the network to multicast devices connected to group members with multicast data requests, thereby realizing routing search and forwarding of multicast data.

PIM协议包括协议无关组播-稀疏模式(Protocol Independent Multicast Sparse Mode,PIM-SM)和协议无关组播-密集模式(Protocol Independent Multicast Dense Mode,PIM-DM)。PIM-SM适合规模较大、组成员相对比较分散的网络;PIM-DM适合规模较小、组播组成员相对比较集中的网络。The PIM protocol includes Protocol Independent Multicast Sparse Mode (PIM-SM) and Protocol Independent Multicast Dense Mode (PIM-DM). PIM-SM is suitable for large-scale networks with relatively dispersed group members; PIM-DM is suitable for small-scale networks with relatively concentrated multicast group members.

PIM-DM协议使用下面的假设:当组播源开始发送组播数据时,域内所有的节点都需要接收数据,因此采用“扩散/剪枝”的方式进行组播数据包的转发。组播源开始发送数据时,沿途节点向除组播源对应的逆向路径转发(Reverse Path Forwarding,RPF)接口之外的所有接口转发组播数据包。这样,PIM-DM域中所有节点都会收到这些组播数据包。The PIM-DM protocol uses the following assumption: When a multicast source starts to send multicast data, all nodes in the domain need to receive the data, so the "diffusion/pruning" method is used to forward multicast data packets. When the multicast source starts to send data, the nodes along the way forward the multicast data packets to all interfaces except the Reverse Path Forwarding (RPF) interface corresponding to the multicast source. In this way, all nodes in the PIM-DM domain will receive these multicast data packets.

如果网络中某区域没有组播组成员,该区域内的节点会发送剪枝消息,将通往该区域的转发接口剪枝,并且建立剪枝状态。剪枝状态对应着超时定时器。当定时器超时后,剪枝状态又重新变为转发状态,组播数据得以再次沿着这些分支流下。另外,剪枝状态包含组播源和组播组的信息。当剪枝区域内出现了组播组成员时,为了减少反应时间,协议不必等待上游剪枝状态超时,而是主动向上游发送嫁接报文,以使剪枝状态变为转发状态。If there are no multicast group members in a certain area of the network, the nodes in the area will send a prune message to prune the forwarding interface leading to the area and establish a pruning state. The pruning state corresponds to the timeout timer. When the timer times out, the pruning state changes back to the forwarding state, and multicast data can flow down along these branches again. In addition, the pruning state contains information about the multicast source and multicast group. When a multicast group member appears in the pruning area, in order to reduce the reaction time, the protocol does not have to wait for the upstream pruning state to time out, but actively sends a graft message to the upstream to change the pruning state to the forwarding state.

2、组播分发树(Multicast Distribution Tree,MDT)。2. Multicast Distribution Tree (MDT).

在一个组播网络中,组播路由协议最重要的工作之一就是为组播网络生成一棵无环的树,这棵树也是组播流量在网络中的传输路径(或者称为组播数据在网络中的转发路径),这棵树称之为组播分发树(Multicast Distribution Tree,MDT),简称为组播树。常用的组播分发树有以下两种:最短路径树(Shortest-Path Tree,SPT)和共享树(Rendezvous Point Tree,RPT)。In a multicast network, one of the most important tasks of the multicast routing protocol is to generate a loop-free tree for the multicast network. This tree is also the transmission path of multicast traffic in the network (or the forwarding path of multicast data in the network). This tree is called the multicast distribution tree (MDT), or multicast tree for short. There are two commonly used multicast distribution trees: the shortest-path tree (SPT) and the shared tree (RPT).

SPT也被称为源树,因为是以组播源为树根的组播分发树,而组播组的接收者则可以看作是这棵树的树叶。组播流量从树根(组播源)出发,沿着枝干传播,最终到达树叶,也即接收者所在的终端网络。组播分发树体现到每一台组播路由器上其实就是组播转发表(也称为组播路由表)中的相关表项。每一台组播路由器都维护着组播转发表,该组播转发表用于指导组播流量转发。SPT is also called source tree because it is a multicast distribution tree with the multicast source as the root, and the receivers of the multicast group can be regarded as the leaves of the tree. Multicast traffic starts from the root (multicast source), propagates along the branches, and finally reaches the leaves, which are the terminal networks where the receivers are located. The multicast distribution tree is reflected on each multicast router as the relevant table entries in the multicast forwarding table (also called the multicast routing table). Each multicast router maintains a multicast forwarding table, which is used to guide the forwarding of multicast traffic.

在组播网络中,组播转发表可能包含多个表项,每个表项都存在四个关键信息:组播源地址、组播组地址、上游接口(或者称为入接口)、下游接口(或者称为出接口)、定时器和标志等。In a multicast network, a multicast forwarding table may contain multiple entries, each of which contains four key information: multicast source address, multicast group address, upstream interface (or inbound interface), downstream interface (or outbound interface), timer, and flag.

对于SPT而言,使用的是(S,G)组播转发表项,其中,“S”为组播源节点(简称为组播源)的地址信息,“G”为组播组地址信息。每一个(S,G)表项在网络中都对应了一棵独立的SPT。示例性的,S为组播源的IP地址(10.1.1.1),假设该组播源向组播组239.1.1.13发送组播流量,那么网络中组播路 由器所维护的(S,G)表项就是(10.1.1.1,239.1.1.13)。每台路由器的(10.1.1.1,239.1.1.13)表项都包含上游及下游接口信息,在SPT中,上游接口是设备朝向组播源的接口,For SPT, the (S, G) multicast forwarding table entry is used, where "S" is the address information of the multicast source node (referred to as the multicast source) and "G" is the multicast group address information. Each (S, G) table entry corresponds to an independent SPT in the network. For example, S is the IP address of the multicast source (10.1.1.1). Assuming that the multicast source sends multicast traffic to the multicast group 239.1.1.13, the multicast routing in the network The (S, G) entry maintained by the router is (10.1.1.1, 239.1.1.13). Each router's (10.1.1.1, 239.1.1.13) entry contains upstream and downstream interface information. In SPT, the upstream interface is the interface of the device facing the multicast source.

对于SPT而言,组播流量从源到接收者的过程走的是最短路径,这也是该组播分发树被称为最短路径树的原因。For SPT, multicast traffic takes the shortest path from the source to the receiver, which is why the multicast distribution tree is called the shortest path tree.

共享树(Rendezvous Point Tree,RPT)。RPT与SPT不同,它不以组播源为树根,而是以RP(Rendezvous Point)为根。RP可理解为一个汇聚点的概念,在一个典型的组播网络中,通常是一台性能较好的网络设备。多个组播组可以共用一个RP,期望接收组播流量的路由器(下接组播接收终端)通过组播路由协议在自己与RP之间建立一段RPT的分支。组播流量首先需要从源发送到RP,然后再由RP将组播流量分发下来,组播流量顺着RPT最终到达各个接收者所在的终端网络。Shared tree (Rendezvous Point Tree, RPT). RPT is different from SPT. It does not take the multicast source as the root, but the RP (Rendezvous Point) as the root. RP can be understood as the concept of a convergence point. In a typical multicast network, it is usually a network device with good performance. Multiple multicast groups can share one RP. The router that expects to receive multicast traffic (connected to the multicast receiving terminal) establishes a branch of RPT between itself and RP through the multicast routing protocol. Multicast traffic first needs to be sent from the source to RP, and then RP distributes the multicast traffic. The multicast traffic follows the RPT and finally reaches the terminal network where each receiver is located.

3、互联网组播管协议(Internet Group Management Protocol,IGMP)。3. Internet Group Management Protocol (IGMP).

组播源节点通过发送加入组播组或者离开组播组等IGMP消息,构建组播组的成员。以IGMPv2为例介绍IGMP的处理流程:3.1、查询器的选举:当同一个网段内有多个组播路由器(或者组播节点)时,IGMPv2通过查询器选举机制从中选举出唯一的查询器。3.2、组播组成员查询:查询器周期性地发送通用组查询消息进行成员关系查询;组播节点发送报告消息来响应查询。3.3、成员查询消息抑制:组播节点发送报告消息的时间有随机性,当检测到同一网段内有其它成员发送同样的消息时,则抑制自己的响应报文。3.4、成员加入:新的组播节点要加入组播组,不必等待查询器的查询消息,而是主动发送报告消息。3.5、成员离开:组播组成员(组播节点)离开组播组时,该组播节点发送离开组消息;收到离开组消息后,查询器发送特定组查询消息来确定是否所有组成员都已离开。The multicast source node builds the members of the multicast group by sending IGMP messages such as joining the multicast group or leaving the multicast group. Taking IGMPv2 as an example, the IGMP processing flow is introduced: 3.1. Querier election: When there are multiple multicast routers (or multicast nodes) in the same network segment, IGMPv2 elects a unique querier from them through the querier election mechanism. 3.2. Multicast group member query: The querier periodically sends a general group query message to query the membership relationship; the multicast node sends a report message to respond to the query. 3.3. Member query message suppression: The time when the multicast node sends a report message is random. When it detects that other members in the same network segment have sent the same message, it suppresses its own response message. 3.4. Member joining: If a new multicast node wants to join the multicast group, it does not have to wait for the query message from the querier, but actively sends a report message. 3.5. Member leaving: When a multicast group member (multicast node) leaves the multicast group, the multicast node sends a leave group message; after receiving the leave group message, the querier sends a specific group query message to determine whether all group members have left.

具体的,采用IGMP协议的构建MDT流程如下:组播宿节点向通信装置(该通信装置视为该组播宿节点的指定路由器(Designated Router,DR)设备)发送互联网组播管协议(Internet Group Management Protocol,IGMP)加入(join)消息,通过该IGMP join消息告知该通信装置该组播宿节点希望加入某个组播组。该通信装置会向其上游的其他通信装置发送协议无关组播(Protocol Independent Multicast,PIM)协议join消息,通过该PIN join消息告知上游的通信装置该组播宿节点希望加入某个组播组。依次类推,逐跳通信装置进行相似的处理流程,完成组播MDT的构建。Specifically, the process of constructing MDT using the IGMP protocol is as follows: the multicast destination node sends an Internet Group Management Protocol (IGMP) join message to the communication device (the communication device is regarded as the designated router (DR) device of the multicast destination node), and informs the communication device through the IGMP join message that the multicast destination node wishes to join a certain multicast group. The communication device will send a Protocol Independent Multicast (PIM) protocol join message to other upstream communication devices, and inform the upstream communication device through the PIN join message that the multicast destination node wishes to join a certain multicast group. By analogy, the hop-by-hop communication device performs a similar processing flow to complete the construction of the multicast MDT.

接下来,介绍当前的组播通信场景。一种可能的场景如图4所示,图4为一种组播通信场景示意图。该通信场景包括:组播源节点(简称为源节点)0、组播宿节点(简称为宿节点)1、组播宿节点2、组播宿节点3、组播宿节点4、组播宿节点5、组播宿节点6、组播宿节点7、组播宿节点8、组播宿节点9、组播宿节点A和组播宿节点B,转发节点0、转发节点1、转发节点2、转发节点3、转发节点4、转发节点5、转发节点6、转发节点7、转发节点8、转发节点9、转发节点A和转发节点B。其中,组播源节点0、组播宿节点3、组播宿节点6、组播宿节点7、组播宿节点9和组播宿节点A加入一个组播组。如图4所示的组播通信场景中,无论是采用PIM-DM或者PIM-SM构建该组播组对应的组播分发树MDT,各类节点之间需要交互大量的协议消息。例如,图4中,宿节点3、宿节点6、宿节点7、宿节点9和宿节点A加入源节点0的一个组播组。上述宿节点3、6、7、9和A发送IGMP join消息加入该组播组。转发节点(例如转发节点3、转发节点9、转发节点A和转发节点B)逐跳向上一跳转发节点发送PIM join消息构建MDT。以转发节点9为例,转发节点9向上一跳节点发送PIM join消息,可以选择给转发节点4发送,也可以选择给转发节点5发送。以此类推,每个节点随机选择一个等价路径发送IGMP join/PIM join消息。Next, the current multicast communication scenario is introduced. A possible scenario is shown in FIG4, which is a schematic diagram of a multicast communication scenario. The communication scenario includes: multicast source node (referred to as source node) 0, multicast sink node (referred to as sink node) 1, multicast sink node 2, multicast sink node 3, multicast sink node 4, multicast sink node 5, multicast sink node 6, multicast sink node 7, multicast sink node 8, multicast sink node 9, multicast sink node A and multicast sink node B, forwarding node 0, forwarding node 1, forwarding node 2, forwarding node 3, forwarding node 4, forwarding node 5, forwarding node 6, forwarding node 7, forwarding node 8, forwarding node 9, forwarding node A and forwarding node B. Among them, multicast source node 0, multicast sink node 3, multicast sink node 6, multicast sink node 7, multicast sink node 9 and multicast sink node A join a multicast group. In the multicast communication scenario shown in FIG4, whether PIM-DM or PIM-SM is used to construct the multicast distribution tree MDT corresponding to the multicast group, a large number of protocol messages need to be exchanged between various nodes. For example, in FIG4, the sink node 3, the sink node 6, the sink node 7, the sink node 9 and the sink node A join a multicast group of the source node 0. The above sink nodes 3, 6, 7, 9 and A send IGMP join messages to join the multicast group. The forwarding nodes (such as forwarding nodes 3, forwarding nodes 9, forwarding nodes A and forwarding nodes B) send PIM join messages to the upper hop forwarding nodes hop by hop to construct the MDT. Taking forwarding node 9 as an example, forwarding node 9 sends a PIM join message to the upper hop node, and can choose to send it to forwarding node 4 or forwarding node 5. By analogy, each node randomly selects an equal-cost path to send an IGMP join/PIM join message.

通过上述方式,最终构建的MDT转发路径,如图4所示。为了降低网络带宽的使用率,组播分发树中需要尽可能的在距离组播源节点远的位置,进行组播数据的复制处理,实现组播数据的“分叉”转发。显然,图4示意的MDT转发路径并不是一个最优的MDT。从源节点0到宿节点A的组播流量,通过转发路径:转发节点6-转发节点2-转发节点1-转发节点4-转发节点B为最优路径。而采用当前的MDT构建方法,可能会构建一条非最优的MDT,例如:转发节点6-转发节点2-转发节点1-转发节点5-转发节点B,造成网络带宽的浪费。综上,申请人发现当前在构建MDT的过程,大量的需要交互的消息,对通信装置的性能提出较高要求。此外,还造成网络带宽资源的占用率较高的问题,影响通信效率。而大量的需要交互的消息,往往会导致MDT的构建收敛慢,无法快速构建MDT。Through the above method, the MDT forwarding path finally constructed is shown in Figure 4. In order to reduce the utilization rate of network bandwidth, the multicast distribution tree needs to copy the multicast data as far away from the multicast source node as possible to realize the "forked" forwarding of multicast data. Obviously, the MDT forwarding path shown in Figure 4 is not an optimal MDT. The multicast traffic from source node 0 to destination node A passes through the forwarding path: forwarding node 6-forwarding node 2-forwarding node 1-forwarding node 4-forwarding node B is the optimal path. However, using the current MDT construction method, a non-optimal MDT may be constructed, for example: forwarding node 6-forwarding node 2-forwarding node 1-forwarding node 5-forwarding node B, resulting in a waste of network bandwidth. In summary, the applicant found that in the current process of constructing MDT, a large number of messages that need to be interacted with put forward high requirements on the performance of the communication device. In addition, it also causes the problem of high occupancy rate of network bandwidth resources, affecting communication efficiency. A large number of messages that need to be interacted with often lead to slow convergence of MDT construction and inability to quickly construct MDT.

基于此,本申请实施例提出一种组播通信方法,第一通信装置通过构建并转发第一报文,使得同属 于第一组播分发树MDT的第二通信装置构建第一MDT。由于第一报文携带第一组播信息,第一组播信息指示第一组播组包括的通信装置。因此,第一报文可沿着第一MDT指示的组播转发路径转发,使得该组播转发路径上的通信装置都可根据第一报文构建第一MDT。通过携带第一组播信息的第一报文,实现高效的构建MDT。相较于当前构建MDT方法,可有效减少对通信装置的性能要求。降低网络带宽资源的占用率,提升通信效率。进而提升MDT的构建收敛速率,实现快速构建MDT。Based on this, the embodiment of the present application proposes a multicast communication method, in which the first communication device constructs and forwards the first message so that The first MDT is constructed on the second communication device of the first multicast distribution tree MDT. Since the first message carries the first multicast information, the first multicast information indicates the communication devices included in the first multicast group. Therefore, the first message can be forwarded along the multicast forwarding path indicated by the first MDT, so that all the communication devices on the multicast forwarding path can construct the first MDT according to the first message. By using the first message carrying the first multicast information, efficient construction of MDT is achieved. Compared with the current method for constructing MDT, the performance requirements for communication devices can be effectively reduced. The occupancy rate of network bandwidth resources is reduced, and communication efficiency is improved. In addition, the construction convergence rate of MDT is improved, and rapid construction of MDT is achieved.

下面结合附图详细介绍本申请实施例。首先,介绍本申请实施例涉及的一种通信场景。请参阅图5,图5为本申请实施例涉及的一种通信场景示意图。本申请实施例提出的一种通信场景包括:第一通信装置、第二通信装置以及第三通信装置。其中,第一通信装置为组播组中的组播源节点、第二通信装置为组播组中的转发节点(或者称为中间节点),第三通信装置为组播组中的转发节点(或者称为中间节点),第一通信装置的下一跳节点为第二通信装置,第二通信装置的下一跳为第三通信装置。The embodiments of the present application are described in detail below in conjunction with the accompanying drawings. First, a communication scenario involved in the embodiments of the present application is introduced. Please refer to Figure 5, which is a schematic diagram of a communication scenario involved in the embodiments of the present application. A communication scenario proposed in the embodiments of the present application includes: a first communication device, a second communication device, and a third communication device. Among them, the first communication device is a multicast source node in a multicast group, the second communication device is a forwarding node (or intermediate node) in the multicast group, the third communication device is a forwarding node (or intermediate node) in the multicast group, the next hop node of the first communication device is the second communication device, and the next hop of the second communication device is the third communication device.

关于图5,进一步可选地,该通信场景包括多个第二通信装置。以该通信场景包括N个第二通信装置为例,N为大于1的正整数。对于第n个第二通信装置,存在上一跳节点,该上一跳节点为第n-1个第二通信装置,n为小于或等于N的正整数。With respect to FIG5, further optionally, the communication scenario includes multiple second communication devices. Taking the communication scenario including N second communication devices as an example, N is a positive integer greater than 1. For the nth second communication device, there is a previous hop node, the previous hop node is the n-1th second communication device, and n is a positive integer less than or equal to N.

需要说明的是,本申请实施例中的通信装置包括但不限于:平板电脑(pad)或折叠屏手机、非折叠屏手机、智能手表、智能耳机、智能音响、智能家电终端、智能汽车、智能路灯、智能眼镜、智能手环、便携式游戏机、掌上电脑(personal digital assistant,PDA)、笔记本电脑、超级移动个人计算机(ultra mobile personal computer,UMPC)、手持计算机、上网本、车载媒体播放设备、可穿戴电子设备(例如:手表、手环、眼镜)、虚拟现实(virtual reality,VR)终端设备,或者,增强现实(augmented reality,AR)终端设备。本申请实施例中的通信装置还可以是:交换机、路由器、服务器,或其他支持转发报文或数据的设备或网元。在一种可能的实现方式中,该通信装置可以是网络中的物理实体或物理实体中的装置(例如芯片或功能模块)。或者,在一种可能的实现方式中,通信装置可以是运行在物理实体中的虚拟设备(例如虚拟机或容器),示例性的,该虚拟设备可以是虚拟路由器或虚拟交换机等。It should be noted that the communication device in the embodiment of the present application includes but is not limited to: a tablet computer (pad) or a folding screen mobile phone, a non-folding screen mobile phone, a smart watch, a smart headset, a smart speaker, a smart home appliance terminal, a smart car, a smart street lamp, a smart glasses, a smart bracelet, a portable game console, a personal digital assistant (PDA), a laptop computer, an ultra mobile personal computer (UMPC), a handheld computer, a netbook, a car media player, a wearable electronic device (for example: a watch, a bracelet, glasses), a virtual reality (VR) terminal device, or an augmented reality (AR) terminal device. The communication device in the embodiment of the present application may also be: a switch, a router, a server, or other equipment or network element that supports forwarding messages or data. In a possible implementation, the communication device may be a physical entity in a network or a device in a physical entity (for example, a chip or a functional module). Alternatively, in a possible implementation, the communication device may be a virtual device (such as a virtual machine or a container) running in a physical entity. Exemplarily, the virtual device may be a virtual router or a virtual switch, etc.

其次,介绍本申请实施例提出的组播通信方法。请参阅图6,图6为本申请实施例中组播通信方法的一种实施例示意图。本申请实施例提出的一种组播通信方法,包括:Next, the multicast communication method proposed in the embodiment of the present application is introduced. Please refer to FIG. 6, which is a schematic diagram of an embodiment of the multicast communication method in the embodiment of the present application. A multicast communication method proposed in the embodiment of the present application includes:

S1、第一通信装置构建第一报文,第一报文携带第一组播信息,第一组播信息指示第一组播组包括的通信装置。S1. A first communication device constructs a first message, where the first message carries first multicast information, and the first multicast information indicates communication devices included in a first multicast group.

步骤S1中,第一通信装置获取第一组播组相关的信息,然后,根据第一组播组相关的信息构建第一报文。第一组播组相关的信息包括第一组播组中多个节点的节点信息,为了便于描述,将第一组播组中多个节点的节点信息称为节点信息集合。In step S1, the first communication device obtains information related to the first multicast group, and then constructs a first message according to the information related to the first multicast group. The information related to the first multicast group includes node information of multiple nodes in the first multicast group. For ease of description, the node information of multiple nodes in the first multicast group is referred to as a node information set.

一种可能的实现方式中,第一通信装置创建第一组播组对应的通信域后,获取第一组播组的地址信息。示例性的,第一通信装置通过调用消息传递接口(Message Passing Interface,MPI)“MPI_Comm_create()”,创建通信域并指定通信域内的通信成员信息,该通信域对应的组播称为第一组播组。该通信域中包括组播源节点(该组播源节点包括第一通信装置)以及组播宿节点(该组播宿节点包括第二通信装置)。当第一通信装置通过接口“MPI_Comm_create()”创建通信域后,第一通信装置获取通信域中所有节点的节点信息。该通信域包括的所有节点视为第一组播组包括的所有节点,将通信域中所有节点的节点信息称为节点信息集合。该节点信息集合包括第一组播组中组播宿节点的节点信息。第一通信装置创建通信域后,第一通信装置还可获取第一组播组的地址信息。In a possible implementation, after the first communication device creates a communication domain corresponding to the first multicast group, it obtains the address information of the first multicast group. Exemplarily, the first communication device creates a communication domain and specifies the communication member information in the communication domain by calling the message passing interface (MPI) "MPI_Comm_create()", and the multicast corresponding to the communication domain is called the first multicast group. The communication domain includes a multicast source node (the multicast source node includes the first communication device) and a multicast destination node (the multicast destination node includes the second communication device). After the first communication device creates a communication domain through the interface "MPI_Comm_create()", the first communication device obtains the node information of all nodes in the communication domain. All nodes included in the communication domain are regarded as all nodes included in the first multicast group, and the node information of all nodes in the communication domain is called a node information set. The node information set includes the node information of the multicast destination node in the first multicast group. After the first communication device creates the communication domain, the first communication device can also obtain the address information of the first multicast group.

另一种可能的实现方式中,第一通信装置获取第一组播组中节点信息的配置文件,然后根据第一组播组中节点信息的配置文件确定第一组播组包括的各个节点的节点信息。将第一组播组包括的多个节点的节点信息称为节点信息集合。该节点信息集合包括第一组播组中组播宿节点的节点信息。需要说明的是,节点信息的配置文件可以由管理第一组播组的网络管理器基于业务需求信息构建,也可以由管理第一组播组的业务平台基于业务需求构建,本申请实施例对此不作限制。第一通信装置获取第一组播组中节点信息的配置文件后,还可以从配置文件中获取第一组播组的地址信息。In another possible implementation, the first communication device obtains a configuration file of node information in the first multicast group, and then determines the node information of each node included in the first multicast group based on the configuration file of node information in the first multicast group. The node information of multiple nodes included in the first multicast group is called a node information set. The node information set includes the node information of the multicast host node in the first multicast group. It should be noted that the configuration file of the node information can be constructed by a network manager that manages the first multicast group based on business demand information, and can also be constructed by a business platform that manages the first multicast group based on business demand, and the embodiments of the present application do not limit this. After the first communication device obtains the configuration file of the node information in the first multicast group, it can also obtain the address information of the first multicast group from the configuration file.

第一通信装置根据第一组播组相关的信息,构建第一报文,该第一报文携带第一组播信息,该第一组播信息指示第一组播组包括的通信装置(即第一组播组包括的节点)。具体的,第一组播信息包括:组播源节点的地址信息、第一组播组的地址信息,和,第一组播组中组播宿节点的地址信息。需要说明 的是,组播源节点指的是第一组播组中的组播源节点。组播源节点的地址信息也可以是组播源节点的标识信息。第一组播组的地址信息也可以是第一组播组的标识信息。组播宿节点的地址信息也可以是组播宿节点的标识信息。The first communication device constructs a first message according to information related to the first multicast group. The first message carries first multicast information. The first multicast information indicates the communication devices included in the first multicast group (i.e., the nodes included in the first multicast group). Specifically, the first multicast information includes: address information of the multicast source node, address information of the first multicast group, and address information of the multicast destination node in the first multicast group. The multicast source node refers to the multicast source node in the first multicast group. The address information of the multicast source node may also be the identification information of the multicast source node. The address information of the first multicast group may also be the identification information of the first multicast group. The address information of the multicast sink node may also be the identification information of the multicast sink node.

示例性的,所述组播源节点的地址信息为所述组播源节点的互联网协议(Internet Protocol,IP)地址,所述第一组播组的地址信息为D类组播IP地址,所述组播宿节点的地址信息为所述组播宿节点的IP地址。例如,组播源节点的地址信息为“192.168.100.1”、第一组播组的地址信息为“224.12.1.1”,组播宿节点的地址信息包括“192.168.3.1”、“192.168.6.1”、“192.168.7.1”、“192.168.9.1”和“192.168.10.1”。可选的,第一组播信息还可以包括其他信息,例如:第一组播组中组播宿节点的数量,本申请实施例对此不作限制。Exemplarily, the address information of the multicast source node is the Internet Protocol (IP) address of the multicast source node, the address information of the first multicast group is a Class D multicast IP address, and the address information of the multicast destination node is the IP address of the multicast destination node. For example, the address information of the multicast source node is "192.168.100.1", the address information of the first multicast group is "224.12.1.1", and the address information of the multicast destination node includes "192.168.3.1", "192.168.6.1", "192.168.7.1", "192.168.9.1" and "192.168.10.1". Optionally, the first multicast information may also include other information, such as: the number of multicast destination nodes in the first multicast group, which is not limited in the embodiments of the present application.

一种可能的实现方式中,第一组播信息承载于第一报文的有效载荷(payload)部分。可以理解的是,第一组播信息还可以承载于第一报文的其他部分,本申请实施例对此不作限制。In a possible implementation, the first multicast information is carried in the payload portion of the first message. It is understandable that the first multicast information may also be carried in other portions of the first message, which is not limited in the embodiment of the present application.

可选的,第一报文还携带第一标识,该第一标识指示第一报文用于构建第一MDT。一种可能的实现方式中,第一标识可以是第一报文中的目的端口号,例如是用户数据报协议(User Datagram Protocol,UDP)的目的端口号。通过特殊的UDP目的端口号,指示第一报文用于构建第一MDT。示例性的,该UDP目的端口号为4799。又一种可能的实现方式中,第一标识还可以承载于IP头中。通过第一标识,提升第二通信装置识别处理第一报文的效率。Optionally, the first message also carries a first identifier, which indicates that the first message is used to construct a first MDT. In one possible implementation, the first identifier may be a destination port number in the first message, such as a destination port number of a user datagram protocol (UDP). Through a special UDP destination port number, it is indicated that the first message is used to construct a first MDT. Exemplarily, the UDP destination port number is 4799. In another possible implementation, the first identifier may also be carried in an IP header. Through the first identifier, the efficiency of the second communication device in identifying and processing the first message is improved.

关于第一报文的目的地址和第一报文的源地址:一种可能的实现方式中,第一报文的目的地址为网关(gateway)地址,该网关协助第一报文进行转发。又一种可能的实现方式中,第一报文的目的地址为下一跳通信装置的地址(例如第二通信装置的地址)。该下一跳通信装置也可以称为中间节点、中转节点、接入网络设备或者网络设备。关于第一报文的源地址,一种可能的实现方式中,第一报文的源地址为第一通信装置的地址。Regarding the destination address of the first message and the source address of the first message: In one possible implementation, the destination address of the first message is a gateway address, and the gateway assists in forwarding the first message. In another possible implementation, the destination address of the first message is the address of the next-hop communication device (for example, the address of the second communication device). The next-hop communication device may also be referred to as an intermediate node, a transit node, an access network device, or a network device. Regarding the source address of the first message, in one possible implementation, the source address of the first message is the address of the first communication device.

示例性的,请参阅图7,图7为本申请实施例中一种第一报文的结构示意图。第一报文包括:目的地址:下一跳节点的地址信息;源地址:当前节点的地址信息;第一组播信息:组播源节点的地址信息、组播组的地址信息和组播宿节点的地址信息。For example, please refer to Figure 7, which is a schematic diagram of the structure of a first message in an embodiment of the present application. The first message includes: destination address: address information of the next hop node; source address: address information of the current node; first multicast information: address information of the multicast source node, address information of the multicast group, and address information of the multicast destination node.

S2、第一通信装置向第二通信装置发送第一报文。S2. The first communication device sends a first message to the second communication device.

步骤S2中,当第一通信装置构建完毕第一报文后,第一通信装置向第二通信装置发送第一报文。为了便于理解,请参阅图14,图14为本申请实施例中涉及的一种通信场景示意图。该通信场景包括:组播源节点(简称为源节点)0、组播宿节点(简称为宿节点)1、组播宿节点2、组播宿节点3、组播宿节点4、组播宿节点5、组播宿节点6、组播宿节点7、组播宿节点8、组播宿节点9、组播宿节点A和组播宿节点B,转发节点0、转发节点1、转发节点2、转发节点3、转发节点4、转发节点5、转发节点6、转发节点7、转发节点8、转发节点9、转发节点A和转发节点B。其中,组播源节点0、组播宿节点3、组播宿节点6、组播宿节点7、组播宿节点9和组播宿节点A加入一个组播组。当组播源节点0(第一通信装置)生成第一报文后,由于该第一报文携带的第一组播信息包括:组播源节点0的地址信息、第一组播组的地址信息、组播宿节点3的地址信息、组播宿节点6的地址信息、组播宿节点7的地址信息、组播宿节点9的地址信息和组播宿节点A的地址信息。由于组播源节点的接入网络设备为转发节点6(转发节点6视为第二通信装置),因此,确定第一报文的目的地址为转发节点6的地址。然后,第一通信装置将第一报文发送至转发节点6。In step S2, after the first communication device completes constructing the first message, the first communication device sends the first message to the second communication device. For ease of understanding, please refer to Figure 14, which is a schematic diagram of a communication scenario involved in an embodiment of the present application. The communication scenario includes: multicast source node (referred to as source node) 0, multicast destination node (referred to as destination node) 1, multicast destination node 2, multicast destination node 3, multicast destination node 4, multicast destination node 5, multicast destination node 6, multicast destination node 7, multicast destination node 8, multicast destination node 9, multicast destination node A and multicast destination node B, forwarding node 0, forwarding node 1, forwarding node 2, forwarding node 3, forwarding node 4, forwarding node 5, forwarding node 6, forwarding node 7, forwarding node 8, forwarding node 9, forwarding node A and forwarding node B. Among them, multicast source node 0, multicast destination node 3, multicast destination node 6, multicast destination node 7, multicast destination node 9 and multicast destination node A join a multicast group. When the multicast source node 0 (first communication device) generates the first message, the first multicast information carried by the first message includes: the address information of the multicast source node 0, the address information of the first multicast group, the address information of the multicast sink node 3, the address information of the multicast sink node 6, the address information of the multicast sink node 7, the address information of the multicast sink node 9 and the address information of the multicast sink node A. Since the access network device of the multicast source node is the forwarding node 6 (the forwarding node 6 is regarded as the second communication device), the destination address of the first message is determined to be the address of the forwarding node 6. Then, the first communication device sends the first message to the forwarding node 6.

S3、第二通信装置根据第一报文构建第一组播分发树MDT。S3. The second communication device constructs a first multicast distribution tree MDT according to the first message.

步骤S3中,第二通信装置接收到第一报文后,根据第一报文携带的第一组播信息构建第一组播组相关的组播分发树,为了便于描述,将第一组播组相关的组播分发树称为第一组播分发树(第一MDT)。In step S3, after receiving the first message, the second communication device constructs a multicast distribution tree related to the first multicast group according to the first multicast information carried in the first message. For ease of description, the multicast distribution tree related to the first multicast group is referred to as a first multicast distribution tree (first MDT).

结合前述实施例,下面介绍第二通信装置是如何构建第一MDT。请参阅图8,图8为本申请实施例中组播通信方法的又一种实施例示意图。本申请实施例提出的一种组播通信方法,还包括:In combination with the above-mentioned embodiment, the following describes how the second communication device constructs the first MDT. Please refer to Figure 8, which is a schematic diagram of another embodiment of the multicast communication method in the embodiment of the present application. A multicast communication method proposed in the embodiment of the present application also includes:

D1、第二通信装置根据来自第一通信装置的第一报文,确定第一组播分发树MDT指示的组播转发路径。D1. The second communication device determines a multicast forwarding path indicated by a first multicast distribution tree MDT according to a first message from the first communication device.

步骤D1中,第二通信装置接收到第一通信装置的第一报文后,根据第一报文携带的第一组播信息,确定第一MDT指示的组播转发路径。下面结合附图介绍第二通信装置如何确定第一MDT指示的组播转发 路径。In step D1, after receiving the first message from the first communication device, the second communication device determines the multicast forwarding path indicated by the first MDT according to the first multicast information carried in the first message. path.

一种可能的实现方式中,关于第二通信装置如何确定第一MDT指示的组播转发路径,请查阅图9,图9为本申请实施例中组播通信方法的又一种实施例示意图。本申请实施例中组播通信方法,还包括:In a possible implementation, regarding how the second communication device determines the multicast forwarding path indicated by the first MDT, please refer to FIG. 9 , which is a schematic diagram of another embodiment of the multicast communication method in the embodiment of the present application. The multicast communication method in the embodiment of the present application further includes:

F1、根据第一组播信息,确定第一组播转发表。F1. Determine a first multicast forwarding table according to the first multicast information.

步骤F1中,第二通信装置根据第一组播信息,确定第一组播转发表。本申请实施例中,将与第一组播组相关的组播转发表称为第一组播转发表。第一报文需要根据第一MDT指示的组播转发路径进行转发,以便网络中各个节点构建第一MDT。在第二通信装置中,需要根据第一组播转发表确定第一报文的转发路径。需要说明的是,第二通信装置中还可以包括其他的组播转发表,每个组播转发表对应于一个组播组的组播转发路径。In step F1, the second communication device determines the first multicast forwarding table according to the first multicast information. In the embodiment of the present application, the multicast forwarding table related to the first multicast group is referred to as the first multicast forwarding table. The first message needs to be forwarded according to the multicast forwarding path indicated by the first MDT so that each node in the network builds the first MDT. In the second communication device, it is necessary to determine the forwarding path of the first message according to the first multicast forwarding table. It should be noted that the second communication device may also include other multicast forwarding tables, each of which corresponds to the multicast forwarding path of a multicast group.

示例性的,关于组播转发表,如图10所示,图10为本申请实施例中涉及的组播转发表的一种示意图。组播转发表包括:键(key)和值(value),上述key和value组成键值对。键值与组播组具有唯一的对应关系,通过键值确定对应的键值对,然后根据该键值对包括的值确定组播报文在本节点(例如第二通信装置)的出接口,该出接口也可以是下一跳节点的地址。最后,根据该出接口,将组播报文转发至该出接口对应的节点(例如第三通信装置)。一种可能的实现方式中,键包括:组播源节点的地址信息(简称为组播源地址),该组播源地址使用“S”表示;组播组的地址信息(简称为组播组地址),该组播组地址使用“G”表示。以图10为例,键<S1,G1>对应于组播组“G1”,该组播组“G1”的组播源地址为“S1”,该组播组“G1”在本节点(或者称为本跳)的出接口包括:出接口1、出接口4和出接口6。以此类推:键<S2,G2>对应于组播组“G2”,该组播组“G2”的组播源地址为“S2”,该组播组“G2”在本节点(或者称为本跳)的出接口包括:出接口2和出接口5。Exemplarily, regarding the multicast forwarding table, as shown in Figure 10, Figure 10 is a schematic diagram of the multicast forwarding table involved in the embodiment of the present application. The multicast forwarding table includes: a key and a value, and the key and value form a key-value pair. The key value has a unique corresponding relationship with the multicast group. The corresponding key-value pair is determined by the key value, and then the outgoing interface of the multicast message at this node (for example, the second communication device) is determined according to the value included in the key-value pair. The outgoing interface can also be the address of the next hop node. Finally, according to the outgoing interface, the multicast message is forwarded to the node corresponding to the outgoing interface (for example, the third communication device). In a possible implementation method, the key includes: the address information of the multicast source node (referred to as the multicast source address), and the multicast source address is represented by "S"; the address information of the multicast group (referred to as the multicast group address), and the multicast group address is represented by "G". Taking Figure 10 as an example, the key <S1, G1> corresponds to the multicast group "G1", the multicast source address of the multicast group "G1" is "S1", and the outbound interfaces of the multicast group "G1" at this node (or called this hop) include: outbound interface 1, outbound interface 4, and outbound interface 6. Similarly: the key <S2, G2> corresponds to the multicast group "G2", the multicast source address of the multicast group "G2" is "S2", and the outbound interfaces of the multicast group "G2" at this node (or called this hop) include: outbound interface 2 and outbound interface 5.

下面介绍第二通信装置如何确定第一组播转发表,在一种可能的实现方式中,请参阅图11,图11为本申请实施例中组播通信方法的又一种实施例示意图。本申请实施例中组播通信方法,还包括:The following describes how the second communication device determines the first multicast forwarding table. In a possible implementation, please refer to FIG. 11, which is a schematic diagram of another embodiment of the multicast communication method in the embodiment of the present application. The multicast communication method in the embodiment of the present application also includes:

G1、从第一组播信息中确定第一键值,第一键值包括部分第一组播信息。G1. Determine a first key value from the first multicast information, where the first key value includes part of the first multicast information.

步骤G1中,第二通信装置从第一组播信息中确定第一键值,第一键值包括部分第一组播信息。第一键值存在多种可能的实现方式,示例性的,第一键值包括组播源节点的地址信息和组播组的地址信息;又一种示例中,第一键值包括组播组的地址信息。本申请实施例对此不作限制。In step G1, the second communication device determines a first key value from the first multicast information, and the first key value includes part of the first multicast information. There are multiple possible implementations of the first key value. For example, the first key value includes address information of the multicast source node and address information of the multicast group; in another example, the first key value includes address information of the multicast group. This embodiment of the application is not limited to this.

G2、根据第一键值,查找第二通信装置是否存在第一键值关联的第一组播转发表。G2. According to the first key value, search whether the second communication device has a first multicast forwarding table associated with the first key value.

步骤G2中,第二通信装置本地保存有一个或多个组播转发表,每个组播转发表指示某个组播组在第二通信装置的出接口。由于组播转发表由键值对组成,因此根据第一键值可以查找第二通信装置是否存在与第一键值关联的第一组播转发表,该第一组播转发表中包括第一键值。In step G2, the second communication device locally stores one or more multicast forwarding tables, each of which indicates an outbound interface of a multicast group on the second communication device. Since the multicast forwarding table is composed of key-value pairs, it is possible to find out whether the second communication device has a first multicast forwarding table associated with the first key value according to the first key value, and the first multicast forwarding table includes the first key value.

一种可能的实现方式中,第二通信装置可以查询本地是否存在第一键值关联的第一组播转发表。In a possible implementation manner, the second communication device may query whether there is a first multicast forwarding table associated with the first key value locally.

另一种可能的实现方式中,第二通信装置向第三方设备发送查询请求,该查询请求中携带第一键值。由第三方设备根据查询请求查询是否存在与第二通信装置相关的且与第一键值关联的第一组播转发表。该第三方设备包括但不限于:管理该第二通信装置的网络管理器,或者,管理该第二通信装置的云端服务器。In another possible implementation, the second communication device sends a query request to a third-party device, and the query request carries a first key value. The third-party device queries whether there is a first multicast forwarding table related to the second communication device and associated with the first key value according to the query request. The third-party device includes but is not limited to: a network manager that manages the second communication device, or a cloud server that manages the second communication device.

可以理解的是,本申请实施例中涉及的组播转发表还可以存在其他的实现方式,本申请实施例对此不作限制。例如是索引以及该索引对应的数据,其中,索引由组播组关联的数据组成,该索引对应的数据包括该组播组在本跳的出接口。It is understandable that the multicast forwarding table involved in the embodiment of the present application may also have other implementation methods, and the embodiment of the present application does not limit this. For example, it is an index and data corresponding to the index, wherein the index is composed of data associated with the multicast group, and the data corresponding to the index includes the outbound interface of the multicast group in this jump.

若第二通信装置存在第一键值关联的第一组播转发表,则进入步骤G3;若第二通信装置不存在与第一键值关联的第一组播转发表,则进入步骤G4。If the second communication device has a first multicast forwarding table associated with the first key value, the process proceeds to step G3; if the second communication device does not have a first multicast forwarding table associated with the first key value, the process proceeds to step G4.

G3、确定第一组播转发表。G3. Determine the first multicast forwarding table.

步骤G3中,当确定第二通信装置存在第一键值关联的组播转发表后,将该组播转发表作为第一组播转发表。In step G3, when it is determined that the second communication device has a multicast forwarding table associated with the first key value, the multicast forwarding table is used as the first multicast forwarding table.

G4、创建第一组播转发表。G4. Create the first multicast forwarding table.

步骤G4中,当确定第二通信装置不存在第一键值关联的组播转发表后,第二通信装置(或者第三方设备)创建第一组播转发表,该第一组播转发表包括的出接口为空,该第一组播转发表的键为第一键值。 In step G4, when it is determined that the second communication device does not have a multicast forwarding table associated with the first key value, the second communication device (or a third-party device) creates a first multicast forwarding table, the outbound interface included in the first multicast forwarding table is empty, and the key of the first multicast forwarding table is the first key value.

F2、根据第一组播信息,在第二通信装置的路由表中确定目标出接口。F2. Determine a target outbound interface in a routing table of the second communication device according to the first multicast information.

步骤F2中,通过前述步骤F1(包括步骤G1~步骤G4)已确定第一组播转发表,需要更新该第一组播转发表包括的出接口。具体的,在步骤F2中根据第一组播信息,在第二通信装置的路由表中确定与第一组播信息对应的目标出接口。In step F2, the first multicast forwarding table has been determined through the aforementioned step F1 (including steps G1 to G4), and the outbound interface included in the first multicast forwarding table needs to be updated. Specifically, in step F2, according to the first multicast information, the target outbound interface corresponding to the first multicast information is determined in the routing table of the second communication device.

关于第二通信装置如何确定目标出接口,在一种可能的实现方式中,请参阅图12,图12为本申请实施例中组播通信方法的又一种实施例示意图。本申请实施例中组播通信方法,还包括:Regarding how the second communication device determines the target outgoing interface, in a possible implementation, please refer to FIG. 12 , which is a schematic diagram of another embodiment of the multicast communication method in the embodiment of the present application. The multicast communication method in the embodiment of the present application also includes:

H1、根据第一组播信息从第二通信装置的路由表中确定第一出接口集合,第一出接口集合包括的出接口可到达组播宿节点。H1. Determine a first outbound interface set from a routing table of the second communication device according to the first multicast information, where the outbound interfaces included in the first outbound interface set can reach the multicast destination node.

步骤H1中,第二通信装置根据第一组播信息包括的组播宿节点的地址信息,在第二通信装置的路由表中进行查表,确定第二通信装置的出接口中可到达该组播宿节点(该组播宿节点由第一组播信息指示)的出接口。为了便于描述,将第二通信装置的出接口中可到达组播宿节点的出接口称为第一出接口集合,第一出接口集合包括一个或多个出接口。In step H1, the second communication device performs a table lookup in a routing table of the second communication device according to the address information of the multicast destination node included in the first multicast information, and determines an outbound interface of the outbound interface of the second communication device that can reach the multicast destination node (the multicast destination node is indicated by the first multicast information). For ease of description, the outbound interface of the outbound interface of the second communication device that can reach the multicast destination node is referred to as a first outbound interface set, and the first outbound interface set includes one or more outbound interfaces.

为了便于理解,以图14示意的场景为例:图14示意场景中,第一组播组包括:组播源节点0、组播宿节点3、组播宿节点6、组播宿节点7、组播宿节点9和组播宿节点A。以第二通信装置为转发节点6为例,可到达组播宿节点3、组播宿节点6、组播宿节点7、组播宿节点9和组播宿节点A的下一跳节点包括转发节点2和转发节点3,因此将转发节点6中指向转发节点2的出接口和转发节点6中指向转发节点3的出接口作为第一出接口集合。For ease of understanding, the scenario shown in FIG14 is taken as an example: In the scenario shown in FIG14, the first multicast group includes: multicast source node 0, multicast destination node 3, multicast destination node 6, multicast destination node 7, multicast destination node 9, and multicast destination node A. Taking the second communication device as forwarding node 6 as an example, the next hop nodes that can reach multicast destination node 3, multicast destination node 6, multicast destination node 7, multicast destination node 9, and multicast destination node A include forwarding node 2 and forwarding node 3, so the outbound interface in forwarding node 6 pointing to forwarding node 2 and the outbound interface in forwarding node 6 pointing to forwarding node 3 are taken as the first outbound interface set.

H2、检测是否存在第三出接口集合,第三出接口集合为第一出接口集合与第二出接口集合的交集,第二出接口集合为第一组播转发表包括的出接口。H2. Detect whether there is a third outbound interface set, where the third outbound interface set is the intersection of the first outbound interface set and the second outbound interface set, and the second outbound interface set is the outbound interfaces included in the first multicast forwarding table.

步骤H2中,第二通信装置将第一组播转发表包括的一个或多个出接口作为第二出接口集合。然后,第二通信装置检测步骤H1中确定的第一出接口集合和第二出接口集合是否存在交集,该交集称为第三出接口集合。若存在,则进入步骤H3;若不存在,则进入步骤H4。In step H2, the second communication device uses one or more outbound interfaces included in the first multicast forwarding table as the second outbound interface set. Then, the second communication device detects whether there is an intersection between the first outbound interface set and the second outbound interface set determined in step H1, and the intersection is called the third outbound interface set. If there is, proceed to step H3; if not, proceed to step H4.

H3、则从第三出接口集合中确定目标出接口。H3. Determine the target outbound interface from the third outbound interface set.

步骤H3中,若存在第三出接口集合,则从第三出接口集合中确定目标出接口。具体的方式如下:In step H3, if there is a third outbound interface set, the target outbound interface is determined from the third outbound interface set. The specific method is as follows:

第三出接口集合包括多个出接口时,也就是说第二通信装置可以通过多个转发节点到达第一组播组包括的多个组播宿节点,第二通信装置到达第一组播组包括的多个组播宿节点存在多条转发路径。第二通信装置根据多个出接口信息,选择路径开销最小的路径,然后将该路径开销最小的路径所对应的出接口信息作为目标出接口。When the third outbound interface set includes multiple outbound interfaces, that is, the second communication device can reach multiple multicast destination nodes included in the first multicast group through multiple forwarding nodes, and there are multiple forwarding paths for the second communication device to reach the multiple multicast destination nodes included in the first multicast group. The second communication device selects a path with the smallest path cost based on the multiple outbound interface information, and then uses the outbound interface information corresponding to the path with the smallest path cost as the target outbound interface.

进一步的,若第二通信装置到达第一组播组的组播宿节点存在多条等价路径(即多条转发路径的路径开销相同),则可以随机从多条等价路径中选择一条转发路径作为目标路径,该目标路径在第二通信装置上对应的出接口作为目标出接口。也可以按照预设规则,从多条等价路径中选择一条路径作为目标路径,并确定目标出接口。该预设规则包括但不限于:按照对2取模操作确定目标出接口对应的转发路径。Furthermore, if there are multiple equal-cost paths for the second communication device to reach the multicast destination node of the first multicast group (i.e., the path costs of the multiple forwarding paths are the same), a forwarding path can be randomly selected from the multiple equal-cost paths as the target path, and the output interface corresponding to the target path on the second communication device is used as the target output interface. Alternatively, a path can be selected from the multiple equal-cost paths as the target path according to a preset rule, and the target output interface can be determined. The preset rule includes, but is not limited to: determining the forwarding path corresponding to the target output interface according to a modulo 2 operation.

示例性的,请参阅图15,图15为本申请实施例中涉及的又一种通信场景示意图。以第二通信装置为转发节点2为例,转发节点2到达第一组播组的组播宿节点(包括组播宿节点6、组播宿节点7、组播宿节点9和组播宿节点A)存在两条等价路径:转发节点2-转发节点0,和转发节点2-转发节点1,这两条等价路径在转发节点2中分别对应两个出接口。按照对2取模操作选择目标出接口对应的转发路径为:转发节点2-转发节点1。然后,确定转发节点2中到达转发节点1的出接口作为目标出接口。For example, please refer to Figure 15, which is a schematic diagram of another communication scenario involved in an embodiment of the present application. Taking the second communication device as forwarding node 2 as an example, there are two equivalent paths for forwarding node 2 to reach the multicast destination node of the first multicast group (including multicast destination node 6, multicast destination node 7, multicast destination node 9 and multicast destination node A): forwarding node 2-forwarding node 0, and forwarding node 2-forwarding node 1. These two equivalent paths correspond to two outgoing interfaces in forwarding node 2 respectively. According to the modulo operation of 2, the forwarding path corresponding to the target outgoing interface is selected as: forwarding node 2-forwarding node 1. Then, the outgoing interface in forwarding node 2 that reaches forwarding node 1 is determined as the target outgoing interface.

H4、从第一出接口集合中确定目标出接口。H4. Determine a target outbound interface from the first outbound interface set.

步骤H4中,若不存在第三出接口集合,则从第一出接口集合中确定目标出接口。具体确定目标出接口的方式,与步骤H3中确定目标出接口的方式类似,此处不作赘述。In step H4, if the third outbound interface set does not exist, the target outbound interface is determined from the first outbound interface set. The specific method of determining the target outbound interface is similar to the method of determining the target outbound interface in step H3, and will not be described in detail here.

F3、根据目标出接口,更新第一组播转发表,更新后的第一组播转发表包括目标出接口。F3. Update the first multicast forwarding table according to the target outbound interface. The updated first multicast forwarding table includes the target outbound interface.

步骤F3中,通过上述步骤H1~步骤H4,确定目标出接口后,根据该目标出接口更新第一组播转发表。更新后的第一组播转发表包括目标出接口。In step F3, after the target outgoing interface is determined through the above steps H1 to H4, the first multicast forwarding table is updated according to the target outgoing interface. The updated first multicast forwarding table includes the target outgoing interface.

D2、第二通信装置根据第一MDT对应的组播转发路径,向第三通信装置发送第一报文,第三通信装 置为第一MDT指示的组播转发路径中第二通信装置的下一跳节点。D2. The second communication device sends the first message to the third communication device according to the multicast forwarding path corresponding to the first MDT, and the third communication device The node is set as the next hop node of the second communication device in the multicast forwarding path indicated by the first MDT.

步骤D2中,第二通信装置通过上述方法确定第一MDT对应的组播转发路径后,向第一MDT指示的组播转发路径中第二通信装置的下一跳节点发送该第一报文。为了便于描述,将该第一MDT指示的组播转发路径中第二通信装置的下一跳节点称为第三通信装置,第三通信装置可以是网络中的转发节点,第三通信装置也可以是组播宿节点。In step D2, after the second communication device determines the multicast forwarding path corresponding to the first MDT through the above method, it sends the first message to the next hop node of the second communication device in the multicast forwarding path indicated by the first MDT. For ease of description, the next hop node of the second communication device in the multicast forwarding path indicated by the first MDT is referred to as a third communication device, and the third communication device can be a forwarding node in the network, or a multicast sink node.

具体的,关于第二通信装置根据第一MDT对应的组播转发路径,向第三通信装置发送第一报文,在一种可能的实现方式中,请参阅图13。图13为本申请实施例中组播通信方法的又一种实施例示意图。本申请实施例中组播通信方法,还包括:Specifically, regarding the second communication device sending the first message to the third communication device according to the multicast forwarding path corresponding to the first MDT, in a possible implementation, please refer to Figure 13. Figure 13 is a schematic diagram of another embodiment of the multicast communication method in the embodiment of the present application. The multicast communication method in the embodiment of the present application also includes:

K1、根据组播宿节点对应的目标出接口,对第一组播组包括的多个组播宿节点进行分类,得到第一分类结果,第一分类结果指示一组或多种组播宿节点,同一组组播宿节点在第二通信装置中对应于同一个目标出接口。K1. Classify multiple multicast destination nodes included in the first multicast group according to the target outbound interface corresponding to the multicast destination node to obtain a first classification result, where the first classification result indicates one or more types of multicast destination nodes, and the same group of multicast destination nodes corresponds to the same target outbound interface in the second communication device.

步骤K1中,为了进一步提升通信效率,还可以根据组播宿节点对应的目标出接口对第一组播组包括的多个组播宿节点进行分类,得到第一分类结果。第一分类结果指示一组或多种组播宿节点,同一组组播宿节点在第二通信装置中对应于同一个目标出接口。In step K1, in order to further improve communication efficiency, the plurality of multicast destination nodes included in the first multicast group may be classified according to the target outbound interface corresponding to the multicast destination node to obtain a first classification result. The first classification result indicates one or more types of multicast destination nodes, and the same group of multicast destination nodes corresponds to the same target outbound interface in the second communication device.

为了便于理解,请参阅图15,具体如下:当第二通信装置为转发节点2,则组播宿节点3属于分组#1,该分组#1对应的目标出接口指向转发节点7;组播宿节点6、组播宿节点7、组播宿节点9和组播宿节点A属于分组#2,该分组#2对应的目标出接口指向转发节点1。当第二通信装置为转发节点4,则组播宿节点6和组播宿节点7属于分组#1,该分组#1对应的目标出接口指向转发节点9;组播宿节点#9属于分组#2,该分组#2对应的目标出接口指向转发节点A;组播宿节点#A属于分组#3,该分组#3对应的目标出接口指向转发节点B。For ease of understanding, please refer to FIG. 15, which is as follows: when the second communication device is forwarding node 2, the multicast sink node 3 belongs to group #1, and the target outbound interface corresponding to the group #1 points to forwarding node 7; the groupcast sink node 6, the groupcast sink node 7, the groupcast sink node 9 and the groupcast sink node A belong to group #2, and the target outbound interface corresponding to the group #2 points to forwarding node 1. When the second communication device is forwarding node 4, the groupcast sink node 6 and the groupcast sink node 7 belong to group #1, and the target outbound interface corresponding to the group #1 points to forwarding node 9; the groupcast sink node #9 belongs to group #2, and the target outbound interface corresponding to the group #2 points to forwarding node A; the groupcast sink node #A belongs to group #3, and the target outbound interface corresponding to the group #3 points to forwarding node B.

K2、根据第一分类结果更新第一报文,更新后的第一报文携带第二组播信息,第二组播信息包括第一分类结果指示的同一组组播宿节点的地址信息。K2. Update the first message according to the first classification result, the updated first message carries second multicast information, and the second multicast information includes address information of the same group of multicast destination nodes indicated by the first classification result.

步骤K2中,第二通信装置确定第一分类结果后,在同一分组对应的目标出接口上复制该第一报文,然后将复制后的第一报文进行更新处理。具体指的是,将第一报文所携带的组播宿节点的地址信息进行更新处理,更新后的第一报文所携带的组播信息称为第二组播信息。第二组播信息包括的组播宿节点的地址信息,仅为该分组所对应的组播宿节点的地址信息。以便更新后的第一报文沿着第一MDT指示的组播转发路径转发至该分组的组播宿节点。需要说明的是,第二组播信息还包括:所述组播源节点的地址信息和所述第一组播组的地址信息。In step K2, after the second communication device determines the first classification result, it copies the first message on the target outbound interface corresponding to the same group, and then updates the copied first message. Specifically, the address information of the multicast host node carried by the first message is updated, and the multicast information carried by the updated first message is called the second multicast information. The address information of the multicast host node included in the second multicast information is only the address information of the multicast host node corresponding to the group. So that the updated first message is forwarded to the multicast host node of the group along the multicast forwarding path indicated by the first MDT. It should be noted that the second multicast information also includes: the address information of the multicast source node and the address information of the first multicast group.

示例性的,以图15为例,当第二通信装置为转发节点2,则发往分组#1(出接口指向转发节点7)的第一报文(更新后的第一报文)所携带的第二组播信息包括组播宿节点3的地址信息;发往分组#2(出接口指向转发节点1)的第一报文所携带的第二组播信息包括组播宿节点6的地址信息、组播宿节点7的地址信息、组播宿节点9的地址信息和组播宿节点A的地址信息,以此类推。Exemplarily, taking Figure 15 as an example, when the second communication device is forwarding node 2, the second multicast information carried by the first message (updated first message) sent to packet #1 (the outgoing interface points to forwarding node 7) includes the address information of multicast host node 3; the second multicast information carried by the first message sent to packet #2 (the outgoing interface points to forwarding node 1) includes the address information of multicast host node 6, the address information of multicast host node 7, the address information of multicast host node 9 and the address information of multicast host node A, and so on.

K3、向第三通信装置转发更新后的第一报文,第三通信装置为第二组播信息指示的下一跳节点。K3. Forward the updated first message to a third communication device, where the third communication device is the next hop node indicated by the second multicast information.

步骤K3中,根据更新后的第一报文所携带的第二组播信息,确定第二组播信息所指示的下一跳节点,即确定第三通信装置。然后,向第三通信装置转发该更新后的第一报文。使得第一MDT指示的转发路径上所有的转发节点都收到该第一报文,并根据第一报文构建第一组播转发表。通过上述方法,完成构建第一MDT。在第一MDT上,从组播源节点0发送的第一报文到各个转发节点发送的第一报文,上述多个第一报文的信息如表1所示。In step K3, according to the second multicast information carried by the updated first message, the next hop node indicated by the second multicast information is determined, that is, the third communication device is determined. Then, the updated first message is forwarded to the third communication device. All forwarding nodes on the forwarding path indicated by the first MDT receive the first message, and a first multicast forwarding table is constructed according to the first message. Through the above method, the construction of the first MDT is completed. On the first MDT, from the first message sent by the multicast source node 0 to the first message sent by each forwarding node, the information of the above multiple first messages is shown in Table 1.

表1

Table 1

示例性的,图16为本申请实施例中涉及的又一种通信场景示意图。以图15为例的第一组播组,当完成构建第一MDT后,第一MDT指示的转发路径如图16所示。For example, Fig. 16 is a schematic diagram of another communication scenario involved in the embodiment of the present application. Taking the first multicast group shown in Fig. 15 as an example, after the first MDT is constructed, the forwarding path indicated by the first MDT is shown in Fig. 16 .

本申请实施例提出一种组播通信方法,第一通信装置通过构建并转发第一报文,使得同属于第一组播分发树MDT的第二通信装置构建第一MDT。由于第一报文携带第一组播信息,第一组播信息指示第一组播组包括的通信装置。因此,第一报文可沿着第一MDT指示的组播转发路径转发,使得该组播转发路径上的通信装置都可根据第一报文构建第一MDT。第二通信装置收到来自第一通信装置的第一报文后,根据第一报文确定第一组播分发树MDT指示的组播转发路径。然后,第二通信装置根据第一MDT指示的组播转发路径向下一跳节点(第三通信装置)转发第一报文,该第一报文指示第三通信装置构建第一MDT。第二通信装置通过处理和转发第一报文,实现构建第一MDT,从而获得第一MDT指示的组播转发路径。通过携带第一组播信息的第一报文,实现高效的构建MDT。相较于当前构建MDT方法,可有效减少对通信装置的性能要求。降低网络带宽资源的占用率,提升通信效率。进而提升MDT的构建收敛速率,实现快速构建MDT。The embodiment of the present application proposes a multicast communication method, in which a first communication device constructs and forwards a first message, so that a second communication device belonging to the first multicast distribution tree MDT constructs a first MDT. Since the first message carries the first multicast information, the first multicast information indicates the communication devices included in the first multicast group. Therefore, the first message can be forwarded along the multicast forwarding path indicated by the first MDT, so that all communication devices on the multicast forwarding path can construct the first MDT according to the first message. After receiving the first message from the first communication device, the second communication device determines the multicast forwarding path indicated by the first multicast distribution tree MDT according to the first message. Then, the second communication device forwards the first message to the next hop node (third communication device) according to the multicast forwarding path indicated by the first MDT, and the first message instructs the third communication device to construct the first MDT. The second communication device constructs the first MDT by processing and forwarding the first message, thereby obtaining the multicast forwarding path indicated by the first MDT. By carrying the first message of the first multicast information, efficient construction of the MDT is achieved. Compared with the current method for constructing the MDT, the performance requirements for the communication device can be effectively reduced. Reduce the occupancy rate of network bandwidth resources and improve communication efficiency. This will increase the MDT construction and convergence rate and enable rapid MDT construction.

结合前述实施例,当第一组播组的组播宿节点发生变化,响应于该变化,第一报文所携带的第一组播信息也可以相应变化。具体的,当第一组播组新增组播宿节点时,组播源节点在第一组播信息中增加该新增的组播宿节点的地址信息;当第一组播组减少组播宿节点时,组播源节点在第一组播信息中删减该减少的组播宿节点的地址信息。In combination with the foregoing embodiment, when the multicast destination node of the first multicast group changes, in response to the change, the first multicast information carried by the first message may also change accordingly. Specifically, when a new multicast destination node is added to the first multicast group, the multicast source node adds the address information of the new multicast destination node in the first multicast information; when a multicast destination node is reduced in the first multicast group, the multicast source node deletes the address information of the reduced multicast destination node in the first multicast information.

一种示例中,请参阅图17,图17为本申请实施例中涉及的又一种通信场景示意图。当第一组播组中新增组播宿节点5(或者组播宿节点5上线)时,组播源节点0通过路由协议或者其他方式感知到组播宿节点5加入第一组播组。组播源节点0触发刷新第一MDT。具体方式如下:组播源节点0构建第一报文,该第一报文包括的第一组播信息中携带有组播宿节点5的地址信息。然后,组播源节点0向下一跳节点(转发节点6)发送该第一报文,具体的处理流程与前述实施例一致,此处不作赘述。第一报文沿着刷新后的第一MDT指示的转发路径转发,使得刷新后的第一MDT上的各个节点构建该刷新后的第一MDT。该刷新后的第一MDT,如图18所示,图18为本申请实施例中涉及的又一种通信场景示意图。In one example, please refer to Figure 17, which is a schematic diagram of another communication scenario involved in an embodiment of the present application. When a new multicast destination node 5 is added to the first multicast group (or the multicast destination node 5 comes online), the multicast source node 0 senses that the multicast destination node 5 has joined the first multicast group through a routing protocol or other means. The multicast source node 0 triggers a refresh of the first MDT. The specific method is as follows: the multicast source node 0 constructs a first message, and the first multicast information included in the first message carries the address information of the multicast destination node 5. Then, the multicast source node 0 sends the first message to the next hop node (forwarding node 6), and the specific processing flow is consistent with the aforementioned embodiment and is not repeated here. The first message is forwarded along the forwarding path indicated by the refreshed first MDT, so that each node on the refreshed first MDT constructs the refreshed first MDT. The refreshed first MDT is shown in Figure 18, which is a schematic diagram of another communication scenario involved in an embodiment of the present application.

另一种示例中,请参阅图19,图19为本申请实施例中涉及的又一种通信场景示意图。当第一组播组中减少组播宿节点3(或者第一组播组的组播宿节点3下线)时,组播源节点0通过路由协议或者其他方式感知到组播宿节点3退出第一组播组。组播源节点0触发刷新第一MDT。具体方式如下:组播源节点0构建第一报文,该第一报文包括的第一组播信息中删除组播宿节点3的地址信息。然后,组播源节点0向下一跳节点(转发节点6)发送该第一报文,具体的处理流程与前述实施例一致,此处不作赘述。第一报文沿着刷新后的第一MDT指示的转发路径转发,使得刷新后的第一MDT上的各个节点构建该刷新后的第一MDT。该刷新后的第一MDT,如图20所示,图20为本申请实施例中涉及的又一种通信场景示意图。In another example, please refer to Figure 19, which is a schematic diagram of another communication scenario involved in the embodiment of the present application. When the multicast destination node 3 is reduced in the first multicast group (or the multicast destination node 3 of the first multicast group is offline), the multicast source node 0 perceives that the multicast destination node 3 exits the first multicast group through a routing protocol or other means. The multicast source node 0 triggers a refresh of the first MDT. The specific method is as follows: the multicast source node 0 constructs a first message, and the address information of the multicast destination node 3 is deleted from the first multicast information included in the first message. Then, the multicast source node 0 sends the first message to the next hop node (forwarding node 6), and the specific processing flow is consistent with the aforementioned embodiment and is not repeated here. The first message is forwarded along the forwarding path indicated by the refreshed first MDT, so that each node on the refreshed first MDT constructs the refreshed first MDT. The refreshed first MDT is shown in Figure 20, which is a schematic diagram of another communication scenario involved in the embodiment of the present application.

通过上述方法,组播组中组播宿节点发生变化时,可实现高效的构建MDT。相较于当前构建MDT方法,可有效减少对通信装置的性能要求。降低网络带宽资源的占用率,提升通信效率。By using the above method, when the multicast destination node in the multicast group changes, the MDT can be efficiently constructed. Compared with the current method for constructing the MDT, the performance requirements for the communication device can be effectively reduced, the occupancy rate of the network bandwidth resources can be reduced, and the communication efficiency can be improved.

以下介绍本申请实施例的通信装置,以下介绍的通信装置具有上述方法实施例中的第一通信装置或第二通信装置的任意功能。The following describes a communication device according to an embodiment of the present application. The communication device described below has any function of the first communication device or the second communication device in the above method embodiment.

图21为本申请实施例提供的一种通信装置2100的结构示意图,如图21所示,通信装置2100包括:收发模块2102,和处理模块2101。 FIG21 is a schematic diagram of the structure of a communication device 2100 provided in an embodiment of the present application. As shown in FIG21 , the communication device 2100 includes: a transceiver module 2102 and a processing module 2101 .

通信装置2100可以对应于上述方法实施例中的第一通信装置或第二通信装置,通信装置2100中的各单元和上述其他操作和/或功能分别为了实现方法实施例中的第一通信装置或第二通信装置所实施的各种步骤和方法,具体细节可参见上述方法实施例,为了简洁,在此不再赘述。The communication device 2100 can correspond to the first communication device or the second communication device in the above-mentioned method embodiment. The various units in the communication device 2100 and the above-mentioned other operations and/or functions are respectively for implementing the various steps and methods implemented by the first communication device or the second communication device in the method embodiment. The specific details can be found in the above-mentioned method embodiment. For the sake of brevity, they will not be repeated here.

一种示例中,该通信装置2100用作第一通信装置,该通信装置2100包括:In one example, the communication device 2100 is used as a first communication device, and the communication device 2100 includes:

处理模块2101,用于构建第一报文,所述第一报文携带第一组播信息,所述第一组播信息指示第一组播组包括的通信装置,所述第一通信装置为所述第一组播组中的组播源节点;The processing module 2101 is configured to construct a first message, where the first message carries first multicast information, where the first multicast information indicates a communication device included in a first multicast group, and the first communication device is a multicast source node in the first multicast group;

收发模块2102,用于向第二通信装置发送所述第一报文,所述第一报文指示所述第二通信装置构建第一组播分发树MDT,所述第一组播组中组播数据沿所述第一组播分发树MDT指示的组播转发路径转发。The transceiver module 2102 is configured to send the first message to the second communication device, wherein the first message instructs the second communication device to build a first multicast distribution tree MDT, and multicast data in the first multicast group is forwarded along the multicast forwarding path indicated by the first multicast distribution tree MDT.

在一种可能的实现方式中,所述第一组播信息包括:所述组播源节点的地址信息、所述第一组播组的地址信息,和,所述第一组播组中组播宿节点的地址信息。In a possible implementation manner, the first multicast information includes: address information of the multicast source node, address information of the first multicast group, and address information of the multicast destination node in the first multicast group.

在一种可能的实现方式中,所述组播源节点的地址信息为所述组播源节点的互联网协议IP地址,所述第一组播组的地址信息为D类组播IP地址,所述组播宿节点的地址信息为所述组播宿节点的IP地址。In a possible implementation, the address information of the multicast source node is the Internet Protocol IP address of the multicast source node, the address information of the first multicast group is a Class D multicast IP address, and the address information of the multicast destination node is the IP address of the multicast destination node.

在一种可能的实现方式中,所述第一报文携带第一标识,所述第一标识指示所述第一报文用于构建所述第一MDT。In a possible implementation manner, the first message carries a first identifier, and the first identifier indicates that the first message is used to construct the first MDT.

在一种可能的实现方式中,所述第一标识为用户数据报协议UDP目的端口号。In a possible implementation manner, the first identifier is a User Datagram Protocol UDP destination port number.

在一种可能的实现方式中,In one possible implementation,

收发模块2102,还用于获取节点信息集合,所述节点信息集合包括多个节点的节点信息,其中,所述多个节点属于所述第一组播组,所述组播宿节点的地址信息属于所述节点信息集合;The transceiver module 2102 is further configured to obtain a node information set, wherein the node information set includes node information of a plurality of nodes, wherein the plurality of nodes belong to the first multicast group, and the address information of the multicast sink node belongs to the node information set;

处理模块2101,还用于根据所述节点信息集合,构建所述第一报文。The processing module 2101 is further configured to construct the first message according to the node information set.

在一种可能的实现方式中,In one possible implementation,

处理模块2101,还用于创建所述第一组播组对应的通信域之后,获取所述节点信息集合;The processing module 2101 is further configured to obtain the node information set after creating the communication domain corresponding to the first multicast group;

或者,or,

处理模块2101,还用于获取所述第一组播组中节点信息的配置文件,所述第一组播组中节点信息的配置文件包括所述节点信息集合。The processing module 2101 is further configured to obtain a configuration file of node information in the first multicast group, where the configuration file of node information in the first multicast group includes the node information set.

在一种可能的实现方式中,In one possible implementation,

处理模块2101,还用于根据所述第一组播信息,从所述第一通信装置的路由表中确定所述第二通信装置的地址信息,所述第二通信装置的地址信息作为所述第一报文的目的地址。The processing module 2101 is further configured to determine, according to the first multicast information, the address information of the second communication device from the routing table of the first communication device, and use the address information of the second communication device as the destination address of the first message.

在一种可能的实现方式中,In one possible implementation,

处理模块2101,还用于根据所述组播宿节点的地址信息,从所述第一通信装置的路由表中确定所述第二通信装置的地址信息。The processing module 2101 is further configured to determine the address information of the second communication device from the routing table of the first communication device according to the address information of the multicast destination node.

在一种可能的实现方式中,In one possible implementation,

收发模块2102,还用于创建所述第一组播组对应的通信域之后,获取所述第一组播组的地址信息;The transceiver module 2102 is further configured to obtain address information of the first multicast group after creating the communication domain corresponding to the first multicast group;

或者,or,

处理模块2101,还用于根据所述第一组播组中节点信息的配置文件,确定所述第一组播组的地址信息。The processing module 2101 is further configured to determine the address information of the first multicast group according to a configuration file of the node information in the first multicast group.

在一种可能的实现方式中,In one possible implementation,

处理模块2101,还用于确定所述第一组播组包括的所述组播宿节点发生变化;The processing module 2101 is further configured to determine that the multicast destination node included in the first multicast group changes;

处理模块2101,还用于响应于所述第一组播组包括的组播宿节点发生变化,修改所述第一报文,修改后的所述第一报文携带的所述第一组播信息对应于变化后的所述第一组播组。The processing module 2101 is further configured to modify the first message in response to a change in a multicast destination node included in the first multicast group, wherein the first multicast information carried by the modified first message corresponds to the changed first multicast group.

在一种可能的实现方式中,In one possible implementation,

处理模块2101,还用于响应于第一节点下线,修改所述第一报文,修改后的所述第一报文携带的所述第一组播信息不包括所述第一节点的地址信息,其中,所述第一节点属于所述第一组播组;The processing module 2101 is further configured to modify the first message in response to the first node going offline, wherein the first multicast information carried by the modified first message does not include the address information of the first node, wherein the first node belongs to the first multicast group;

或者,处理模块2101,还用于响应于第二节点上线,修改所述第一报文,修改后的所述第一报文携带的所述第一组播信息包括所述第二节点的地址信息,其中,在所述第二节点上线前,所述第二节点不属于所述第一组播组。 Alternatively, the processing module 2101 is further used to modify the first message in response to the second node coming online, and the first multicast information carried by the modified first message includes the address information of the second node, wherein before the second node comes online, the second node does not belong to the first multicast group.

又一种示例中,该通信装置2100用作第二通信装置,该通信装置2100包括:In another example, the communication device 2100 is used as a second communication device, and the communication device 2100 includes:

收发模块2102,用于接收来自上一跳节点的第一报文,所述第一报文携带第一组播信息,所述第一组播信息指示第一组播组包括的通信装置,所述第一组播组中组播数据沿第一组播分发树MDT指示的组播转发路径转发,所述第一通信装置为所述第一组播组中的组播源节点;The transceiver module 2102 is configured to receive a first message from a previous hop node, where the first message carries first multicast information, where the first multicast information indicates a communication device included in a first multicast group, where multicast data in the first multicast group is forwarded along a multicast forwarding path indicated by a first multicast distribution tree MDT, and where the first communication device is a multicast source node in the first multicast group;

处理模块2101,用于根据所述第一组播信息,确定所述第一MDT指示的组播转发路径;The processing module 2101 is configured to determine a multicast forwarding path indicated by the first MDT according to the first multicast information;

收发模块2102,还用于根据所述第一MDT对应的组播转发路径,向第三通信装置发送所述第一报文,其中,所述第三通信装置为所述第一MDT指示的组播转发路径中所述第二通信装置的下一跳节点,所述第一报文指示所述第三通信装置构建所述第一MDT。The transceiver module 2102 is further used to send the first message to a third communication device according to the multicast forwarding path corresponding to the first MDT, wherein the third communication device is the next hop node of the second communication device in the multicast forwarding path indicated by the first MDT, and the first message instructs the third communication device to construct the first MDT.

在一种可能的实现方式中,所述第一组播信息包括:所述组播源节点的地址信息、所述第一组播组的地址信息,和,所述第一组播组中组播宿节点的地址信息。In a possible implementation manner, the first multicast information includes: address information of the multicast source node, address information of the first multicast group, and address information of the multicast destination node in the first multicast group.

在一种可能的实现方式中,In one possible implementation,

处理模块2101,还用于根据所述第一组播信息,确定第一组播转发表,所述第一组播转发表包括目标出接口,所述目标出接口可到达所述第一组播组包括的组播宿节点,所述第一组播转发表指示所述第一MDT对应的组播转发路径。The processing module 2101 is further configured to determine a first multicast forwarding table according to the first multicast information, wherein the first multicast forwarding table includes a target outbound interface, the target outbound interface can reach the multicast destination node included in the first multicast group, and the first multicast forwarding table indicates a multicast forwarding path corresponding to the first MDT.

在一种可能的实现方式中,In one possible implementation,

处理模块2101,还用于根据所述第一组播信息,确定所述第一组播转发表;The processing module 2101 is further configured to determine the first multicast forwarding table according to the first multicast information;

处理模块2101,还用于根据所述第一组播信息,在所述第二通信装置的路由表中确定所述目标出接口;The processing module 2101 is further configured to determine the target outgoing interface in the routing table of the second communication device according to the first multicast information;

处理模块2101,还用于根据所述目标出接口,更新所述第一组播转发表,更新后的所述第一组播转发表包括所述目标出接口。The processing module 2101 is further configured to update the first multicast forwarding table according to the target outbound interface, wherein the updated first multicast forwarding table includes the target outbound interface.

在一种可能的实现方式中,In one possible implementation,

处理模块2101,还用于从所述第一组播信息中确定第一键值,所述第一键值包括部分所述第一组播信息;The processing module 2101 is further configured to determine a first key value from the first multicast information, where the first key value includes part of the first multicast information;

处理模块2101,还用于根据所述第一键值,查找所述第二通信装置是否存在与所述第一键值关联的所述第一组播转发表;The processing module 2101 is further configured to search, according to the first key value, whether the second communication device has the first multicast forwarding table associated with the first key value;

处理模块2101,还用于若不存在,则创建所述第一组播转发表;The processing module 2101 is further configured to create the first multicast forwarding table if it does not exist;

处理模块2101,还用于若存在,则确定所述第一组播转发表。The processing module 2101 is further configured to determine the first multicast forwarding table if it exists.

在一种可能的实现方式中,In one possible implementation,

处理模块2101,还用于根据所述第一组播信息从所述第二通信装置的路由表中确定第一出接口集合,所述第一出接口集合包括的出接口可到达所述组播宿节点,所述第一出接口集合包括至少一个出接口;The processing module 2101 is further configured to determine a first outbound interface set from a routing table of the second communication device according to the first multicast information, wherein the outbound interfaces included in the first outbound interface set can reach the multicast destination node, and the first outbound interface set includes at least one outbound interface;

处理模块2101,还用于检测是否存在第三出接口集合,所述第三出接口集合为所述第一出接口集合与第二出接口集合的交集,所述第三出接口集合包括至少一个出接口,所述第二出接口集合为所述第一组播转发表包括的出接口;The processing module 2101 is further used to detect whether there is a third outbound interface set, where the third outbound interface set is the intersection of the first outbound interface set and the second outbound interface set, the third outbound interface set includes at least one outbound interface, and the second outbound interface set is the outbound interface included in the first multicast forwarding table;

处理模块2101,还用于若存在所述第三出接口集合,则从所述第三出接口集合中确定所述目标出接口;The processing module 2101 is further configured to determine the target outbound interface from the third outbound interface set if the third outbound interface set exists;

处理模块2101,还用于若不存在所述第三出接口集合,则从所述第一出接口集合中确定所述目标出接口。The processing module 2101 is further configured to determine the target outbound interface from the first outbound interface set if the third outbound interface set does not exist.

在一种可能的实现方式中,In one possible implementation,

处理模块2101,还用于根据所述第一MDT对应的组播转发路径,对所述第一组播组包括的多个所述组播宿节点进行分类,得到第一分类结果,所述第一分类结果指示一组或多组所述组播宿节点,其中,同一组所述组播宿节点在所述第二通信装置中对应于同一个所述目标出接口;The processing module 2101 is further configured to classify the plurality of multicast sink nodes included in the first multicast group according to the multicast forwarding path corresponding to the first MDT, to obtain a first classification result, wherein the first classification result indicates one or more groups of the multicast sink nodes, wherein the same group of the multicast sink nodes corresponds to the same target outbound interface in the second communication device;

处理模块2101,还用于根据所述第一分类结果更新所述第一报文,更新后的所述第一报文携带第二组播信息,所述第二组播信息包括所述第一分类结果指示的同一组所述组播宿节点的地址信息;The processing module 2101 is further configured to update the first message according to the first classification result, where the updated first message carries second multicast information, where the second multicast information includes address information of the same group of multicast sink nodes indicated by the first classification result;

收发模块2102,还用于向所述第三通信装置转发所述更新后的所述第一报文,其中,所述第三通信装置为所述第二组播信息指示的下一跳节点。The transceiver module 2102 is further configured to forward the updated first message to the third communication device, wherein the third communication device is the next hop node indicated by the second multicast information.

在一种可能的实现方式中, In one possible implementation,

处理模块2101,还用于根据所述第一MDT对应的组播转发路径,确定所述第二通信装置中所述组播宿节点对应的多个出接口信息;The processing module 2101 is further configured to determine, according to the multicast forwarding path corresponding to the first MDT, information of multiple outbound interfaces corresponding to the multicast sink node in the second communication device;

处理模块2101,还用于根据所述组播宿节点对应的多个出接口信息,确定所述组播宿节点对应的所述目标出接口,其中,当所述第二通信装置到达所述组播宿节点的转发路径包括多条等价路径时,从所述多条等价路径中按照预设规则确定所述目标出接口对应的转发路径。The processing module 2101 is also used to determine the target outbound interface corresponding to the multicast destination node based on the multiple outbound interface information corresponding to the multicast destination node, wherein, when the forwarding path for the second communication device to reach the multicast destination node includes multiple equal-cost paths, the forwarding path corresponding to the target outbound interface is determined from the multiple equal-cost paths according to a preset rule.

通信装置2100执行上述方法实施例时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将通信装置2100的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的通信装置2100与上述图6-图20对应的实施例方法属于同一构思,其具体实现过程详见上述方法实施例,这里不再赘述。When the communication device 2100 executes the above method embodiment, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the communication device 2100 is divided into different functional modules to complete all or part of the functions described above. In addition, the communication device 2100 provided in the above embodiment and the embodiment method corresponding to Figures 6 to 20 above belong to the same concept, and the specific implementation process is detailed in the above method embodiment, which will not be repeated here.

为了实现上述实施例,本申请还提供了一种通信装置。可以参阅图22,图22为本申请实施例提供的一种通信装置2200的结构示意图。In order to implement the above embodiment, the present application further provides a communication device. Please refer to Figure 22, which is a schematic diagram of the structure of a communication device 2200 provided in an embodiment of the present application.

图22所示的通信装置2200尽管示出了某些特定特征,但是本领域的技术人员将从本申请实施例中意识到,为了简洁起见,图22未示出各种其他特征,以免混淆本申请实施例所公开的实施方式的更多相关方面。为此,作为示例,在一些实现方式中,通信装置2200包括一个或多个处理单元(如,CPU)2201、网络接口2202、编程接口2203、存储器2204和一个或多个通信总线2205,用于将各种组件互连。在另一些实现方式中,通信装置2200也可以在上述示例基础上省略或增加部分功能部件或单元。Although the communication device 2200 shown in Figure 22 shows certain specific features, those skilled in the art will realize from the embodiments of the present application that, for the sake of brevity, various other features are not shown in Figure 22 to avoid confusing more relevant aspects of the embodiments disclosed in the embodiments of the present application. To this end, as an example, in some implementations, the communication device 2200 includes one or more processing units (such as CPU) 2201, a network interface 2202, a programming interface 2203, a memory 2204 and one or more communication buses 2205 for interconnecting various components. In other implementations, the communication device 2200 can also omit or increase some functional components or units based on the above examples.

在一些实现方式中,网络接口2202用于在网络系统中和一个或多个其他的通信装置/服务器连接。在一些实现方式中,通信总线2205包括互连和控制系统组件之间的通信的电路。存储器2204可以包括非易失性存储器,例如,只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。存储器2204也可以包括易失性存储器,易失性存储器可以是随机存取存储器(random access memory,RAM),其用作外部高速缓存。In some implementations, the network interface 2202 is used to connect to one or more other communication devices/servers in the network system. In some implementations, the communication bus 2205 includes circuits for interconnecting and controlling communication between system components. The memory 2204 may include non-volatile memory, such as read-only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), or flash memory. The memory 2204 may also include volatile memory, which may be random access memory (RAM), which is used as an external cache.

在一些实现中,存储器2204或存储器2204的非暂时性计算机可读存储介质存储以下程序、模块和数据结构,或其子集,例如包括收发单元(图中未示出)、获取单元22041和处理单元22042。In some implementations, memory 2204 or a non-temporary computer-readable storage medium of memory 2204 stores the following programs, modules, and data structures, or a subset thereof, including, for example, a transceiver unit (not shown), an acquisition unit 22041 , and a processing unit 22042 .

在一个可能的实施例中,该通信装置2200可以具有上述图6-图20对应的方法实施例中的第一通信装置或第二通信装置中的任意功能。In a possible embodiment, the communication device 2200 may have any functions of the first communication device or the second communication device in the method embodiments corresponding to FIG. 6 to FIG. 20 above.

应理解,通信装置2200对应于上述方法实施例中的第一通信装置或第二通信装置,通信装置2200中的各模块和上述其他操作和/或功能分别为了实现上述方法实施例中的第一通信装置或第二通信装置所实施的各种步骤和方法,具体细节可参见上述图6-图20对应的方法实施例,为了简洁,在此不再赘述。It should be understood that the communication device 2200 corresponds to the first communication device or the second communication device in the above-mentioned method embodiment, and the various modules in the communication device 2200 and the above-mentioned other operations and/or functions are respectively for realizing the various steps and methods implemented by the first communication device or the second communication device in the above-mentioned method embodiment. For specific details, please refer to the method embodiments corresponding to the above-mentioned Figures 6-20. For the sake of brevity, they will not be repeated here.

应理解,本申请可以是由通信装置2200上的网络接口2202来完成数据的收发操作,也可以是由处理器调用存储器中的程序代码,并在需要时配合网络接口2202来实现收发单元的功能。It should be understood that in the present application, the data sending and receiving operations can be completed by the network interface 2202 on the communication device 2200, or the processor can call the program code in the memory and cooperate with the network interface 2202 to implement the functions of the transceiver unit when necessary.

在各种实现中,通信装置2200用于执行本申请实施例提供的组播通信方法,例如是执行上述图6-图20所示的实施例所对应的组播通信方法。In various implementations, the communication device 2200 is used to execute the multicast communication method provided in the embodiments of the present application, for example, to execute the multicast communication method corresponding to the embodiments shown in Figures 6 to 20 above.

本申请图22所述的通信装置具体结构可以为图23所示。The specific structure of the communication device described in Figure 22 of the present application can be shown in Figure 23.

图23为本申请实施例提供的一种通信装置2300的结构示意图,通信装置2300包括:主控板2310和接口板2330。FIG. 23 is a schematic diagram of the structure of a communication device 2300 provided in an embodiment of the present application. The communication device 2300 includes: a main control board 2310 and an interface board 2330 .

主控板2310也称为主处理单元(main processing unit,MPU)或路由处理器(route processor),主控板2310用于对通信装置2300中各个组件的控制和管理,包括路由计算、设备管理、设备维护、协议处理功能。主控板2310包括:中央处理器2311和存储器2312。The main control board 2310 is also called a main processing unit (MPU) or a route processor. The main control board 2310 is used to control and manage various components in the communication device 2300, including routing calculation, device management, device maintenance, and protocol processing functions. The main control board 2310 includes: a central processing unit 2311 and a memory 2312.

接口板2330也称为线路处理单元(line processing unit,LPU)、线卡(line card)或业务板。接口板2330用于提供各种业务接口并实现数据包的转发。业务接口包括但不限于以太网接口、POS(Packet over SONET/SDH)接口等。接口板2330包括:中央处理器2331、网络处理器2332、转发表项存储器2334和物理接口卡(physical interface card,PIC)2333。 The interface board 2330 is also called a line processing unit (LPU), a line card or a service board. The interface board 2330 is used to provide various service interfaces and realize the forwarding of data packets. The service interfaces include but are not limited to Ethernet interfaces, POS (Packet over SONET/SDH) interfaces, etc. The interface board 2330 includes: a central processing unit 2331, a network processor 2332, a forwarding table entry memory 2334 and a physical interface card (PIC) 2333.

接口板2330上的中央处理器2331用于对接口板2330进行控制管理并与主控板2310上的中央处理器2311通信。The central processor 2331 on the interface board 2330 is used to control and manage the interface board 2330 and communicate with the central processor 2311 on the main control board 2310 .

网络处理器2332用于实现报文的转发处理。网络处理器2332的形态可以是转发芯片。The network processor 2332 is used to implement message forwarding processing. The network processor 2332 may be in the form of a forwarding chip.

物理接口卡2333用于实现物理层的对接功能,原始的流量由此进入接口板2330,以及处理后的报文从该物理接口卡2333发出。物理接口卡2333包括至少一个物理接口,物理接口也称物理口,物理接口可以为灵活以太(Flexible Ethernet,FlexE)物理接口。物理接口卡2333也称为子卡,可安装在接口板2330上,负责将光电信号转换为报文并对报文进行合法性检查后转发给网络处理器2332处理。在一些实施例中,接口板2330的中央处理器2331也可执行网络处理器2332的功能,比如基于通用CPU实现软件转发,从而接口板2330中不需要网络处理器2332。The physical interface card 2333 is used to implement the docking function of the physical layer, and the original traffic enters the interface board 2330 from it, and the processed message is sent from the physical interface card 2333. The physical interface card 2333 includes at least one physical interface, which is also called a physical port. The physical interface can be a Flexible Ethernet (FlexE) physical interface. The physical interface card 2333 is also called a daughter card, which can be installed on the interface board 2330 and is responsible for converting the optical signal into a message and forwarding the message to the network processor 2332 for processing after checking the legitimacy of the message. In some embodiments, the central processor 2331 of the interface board 2330 can also perform the functions of the network processor 2332, such as implementing software forwarding based on a general-purpose CPU, so that the network processor 2332 is not required in the interface board 2330.

可选的,通信装置2300包括多个接口板,例如通信装置2300还包括接口板2340,接口板2340包括:中央处理器2341、网络处理器2342、转发表项存储器2344和物理接口卡2343。Optionally, the communication device 2300 includes multiple interface boards. For example, the communication device 2300 also includes an interface board 2340 . The interface board 2340 includes: a central processor 2341 , a network processor 2342 , a forwarding table entry memory 2344 , and a physical interface card 2343 .

可选的,通信装置2300还包括交换网板2320。交换网板2320也可以称为交换网板单元(switch fabric unit,SFU)。在通信装置有多个接口板2330的情况下,交换网板2320用于完成各接口板之间的数据交换。例如,接口板2330和接口板2340之间可以通过交换网板2320通信。Optionally, the communication device 2300 further includes a switching fabric board 2320. The switching fabric board 2320 may also be referred to as a switch fabric unit (SFU). When the communication device has multiple interface boards 2330, the switching fabric board 2320 is used to complete data exchange between the interface boards. For example, the interface board 2330 and the interface board 2340 may communicate via the switching fabric board 2320.

主控板2310和接口板耦合。例如,主控板2310、接口板2330和接口板2340,以及交换网板2320之间通过系统总线和/或系统背板相连实现互通。在一种可能的实现方式中,主控板2310和接口板2330之间建立进程间通信协议(inter-process communication,IPC)通道,主控板2310和接口板2330之间通过IPC通道进行通信。The main control board 2310 is coupled to the interface board. For example, the main control board 2310, the interface board 2330, the interface board 2340, and the switching network board 2320 are interconnected through a system bus and/or a system backplane. In a possible implementation, an inter-process communication (IPC) channel is established between the main control board 2310 and the interface board 2330, and the main control board 2310 and the interface board 2330 communicate through the IPC channel.

在逻辑上,通信装置2300包括控制面和转发面,控制面包括主控板2310和中央处理器2331,转发面包括执行转发的各个组件,比如转发表项存储器2334、物理接口卡2333和网络处理器2332。控制面执行发布路由、生成转发表、处理信令和协议报文、配置与维护设备的状态等功能,控制面将生成的转发表下发给转发面,在转发面,网络处理器2332基于控制面下发的转发表对物理接口卡2333收到的报文查表转发。控制面下发的转发表可以保存在转发表项存储器2334中。在有些实施例中,控制面和转发面可以完全分离,不在同一设备上。Logically, the communication device 2300 includes a control plane and a forwarding plane. The control plane includes a main control board 2310 and a central processing unit 2331. The forwarding plane includes various components for performing forwarding, such as a forwarding table entry memory 2334, a physical interface card 2333, and a network processor 2332. The control plane performs functions such as publishing routes, generating forwarding tables, processing signaling and protocol messages, and configuring and maintaining the status of the device. The control plane sends the generated forwarding table to the forwarding plane. On the forwarding plane, the network processor 2332 forwards the message received by the physical interface card 2333 based on the forwarding table sent by the control plane. The forwarding table sent by the control plane can be stored in the forwarding table entry memory 2334. In some embodiments, the control plane and the forwarding plane can be completely separated and not on the same device.

应理解,通信装置2100中的收发模块可以相当于通信装置2300中的物理接口卡2333或物理接口卡2343;通信装置2200中的获取单元22041和处理单元22042可以相当于通信装置2300中的中央处理器2311或中央处理器2331,也可以相当于存储器2312中存储的程序代码或指令。It should be understood that the transceiver module in the communication device 2100 can be equivalent to the physical interface card 2333 or the physical interface card 2343 in the communication device 2300; the acquisition unit 22041 and the processing unit 22042 in the communication device 2200 can be equivalent to the central processor 2311 or the central processor 2331 in the communication device 2300, and can also be equivalent to the program code or instructions stored in the memory 2312.

应理解,本申请实施例中接口板2340上的操作与接口板2330的操作一致,为了简洁,不再赘述。应理解,本实施例的通信装置2300可对应于上述各个方法实施例中的第一通信装置或第二通信装置,该通信装置2300中的主控板2310、接口板2330和/或接口板2340可以实现上述各个方法实施例中的第一通信装置或第二通信装置所具有的功能和/或所实施的各种步骤,为了简洁,在此不再赘述。It should be understood that the operation on the interface board 2340 in the embodiment of the present application is consistent with the operation of the interface board 2330, and for the sake of brevity, it will not be repeated. It should be understood that the communication device 2300 of this embodiment can correspond to the first communication device or the second communication device in the above-mentioned various method embodiments, and the main control board 2310, the interface board 2330 and/or the interface board 2340 in the communication device 2300 can implement the functions and/or various steps of the first communication device or the second communication device in the above-mentioned various method embodiments, and for the sake of brevity, it will not be repeated here.

值得说明的是,主控板可能有一块或多块,有多块的时候可以包括主用主控板和备用主控板。接口板可能有一块或多块,通信装置的数据处理能力越强,提供的接口板越多。接口板上的物理接口卡也可以有一块或多块。交换网板可能没有,也可能有一块或多块,有多块的时候可以共同实现负荷分担冗余备份。在集中式转发架构下,通信装置可以不需要交换网板,接口板承担整个系统的业务数据的处理功能。在分布式转发架构下,通信装置可以有至少一块交换网板,通过交换网板实现多块接口板之间的数据交换,提供大容量的数据交换和处理能力。可选的,通信装置的形态也可以是只有一块板卡,即没有交换网板,接口板和主控板的功能集成在该一块板卡上,此时接口板上的中央处理器和主控板上的中央处理器在该一块板卡上可以合并为一个中央处理器,执行两者叠加后的功能。具体采用哪种架构,取决于具体的组网部署场景,此处不做唯一限定。It is worth noting that there may be one or more main control boards, and when there are multiple boards, they may include a main main control board and a standby main control board. There may be one or more interface boards. The stronger the data processing capability of the communication device, the more interface boards are provided. There may also be one or more physical interface cards on the interface board. There may be no switching network board, or there may be one or more switching network boards. When there are multiple switching network boards, load sharing and redundant backup can be achieved together. Under the centralized forwarding architecture, the communication device may not need a switching network board, and the interface board bears the processing function of the service data of the entire system. Under the distributed forwarding architecture, the communication device may have at least one switching network board, and the data exchange between multiple interface boards is realized through the switching network board, providing large-capacity data exchange and processing capabilities. Optionally, the form of the communication device may also be only one board, that is, there is no switching network board, and the functions of the interface board and the main control board are integrated on the board. At this time, the central processor on the interface board and the central processor on the main control board can be merged into one central processor on the board to perform the functions of the two superimposed. Which architecture is adopted depends on the specific networking deployment scenario, and it is not limited here.

在一些可能的实施例中,上述第一通信装置或第二通信装置和/可以实现为虚拟化设备。虚拟化设备可以是运行有用于发送报文功能的程序的虚拟机(virtual machine,VM),虚拟路由器或虚拟交换机。虚拟化设备部署在硬件设备上(例如,物理服务器)。例如,可以基于通用的物理服务器结合网络功能虚拟化(network functions virtualization,NFV)技术来实现第一通信装置或第二通信装置。In some possible embodiments, the first communication device or the second communication device and/or may be implemented as a virtualized device. The virtualized device may be a virtual machine (VM), a virtual router or a virtual switch running a program for sending a message. The virtualized device is deployed on a hardware device (e.g., a physical server). For example, the first communication device or the second communication device may be implemented based on a general physical server in combination with network functions virtualization (NFV) technology.

本申请实施例还提供的一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得计算机控制终端装置执行如前述方法实施例所示任一项实现方式。 The embodiment of the present application also provides a computer-readable storage medium, including instructions, which, when executed on a computer, enables the computer to control a terminal device to execute any one of the implementation methods shown in the aforementioned method embodiments.

本申请实施例还提供的一种计算机程序产品,计算机程序产品包括计算机程序代码,当计算机程序代码在计算机上运行时,使得计算机执行如前述方法实施例所示任一项实现方式。The embodiments of the present application also provide a computer program product, which includes a computer program code. When the computer program code runs on a computer, the computer executes any one of the implementation methods shown in the aforementioned method embodiments.

进一步地,本申请实施例还提供了一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述图6-图20对应的方法实施例执行的方法。Furthermore, an embodiment of the present application also provides a computer program product, which, when executed on a computer, enables the computer to execute the method executed by the method embodiments corresponding to the above-mentioned Figures 6 to 20.

本申请实施例还提供了一种芯片系统,包括处理器和接口电路,接口电路,用于接收指令并传输至处理器。其中,所述处理器用于实现上述任一方法实施例中的方法。The embodiment of the present application further provides a chip system, including a processor and an interface circuit, wherein the interface circuit is used to receive instructions and transmit them to the processor. The processor is used to implement the method in any of the above method embodiments.

可选的,该芯片系统还包括存储器,该芯片系统中的处理器可以为一个或多个。该处理器可以通过硬件实现也可以通过软件实现。当通过硬件实现时,该处理器可以是逻辑电路、集成电路等。当通过软件实现时,该处理器可以是一个通用处理器,通过读取存储器中存储的软件代码来实现上述任一方法实施例中的方法。Optionally, the chip system further includes a memory, and the processor in the chip system may be one or more. The processor may be implemented by hardware or software. When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented by software, the processor may be a general-purpose processor that implements the method in any of the above method embodiments by reading the software code stored in the memory.

可选的,该芯片系统中的存储器也可以为一个或多个。该存储器可以与处理器集成在一起,也可以和处理器分离设置,本申请并不限定。示例性的,存储器可以是非瞬时性处理器,例如只读存储器ROM,其可以与处理器集成在同一块芯片上,也可以分别设置在不同的芯片上,本申请对存储器的类型,以及存储器与处理器的设置方式不作具体限定。Optionally, the memory in the chip system may be one or more. The memory may be integrated with the processor or may be separately provided with the processor, which is not limited in the present application. Exemplarily, the memory may be a non-transient processor, such as a read-only memory ROM, which may be integrated with the processor on the same chip or may be provided on different chips. The present application does not specifically limit the type of memory and the arrangement of the memory and the processor.

以上对本申请实施例进行了详细介绍,本申请实施例方法中的步骤可以根据实际需要进行顺序调度、合并或删减;本申请实施例装置中的模块可以根据实际需要进行划分、合并或删减。The above describes the embodiments of the present application in detail. The steps in the method of the embodiments of the present application can be scheduled in sequence, merged or deleted according to actual needs; the modules in the device of the embodiments of the present application can be divided, merged or deleted according to actual needs.

应理解,说明书通篇中提到的“一个实施例”或“一实施例”意味着与实施例有关的特定特征、结构或特性包括在本申请的至少一个实施例中。因此,在整个说明书各处出现的“在一个实施例中”或“在一实施例中”未必一定指相同的实施例。此外,这些特定的特征、结构或特性可以任意适合的方式结合在一个或多个实施例中。应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.

本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。The term "and/or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and/or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character "/" in this article generally indicates that the associated objects before and after are in an "or" relationship.

应理解,在本申请实施例中,“与A相应的B”表示B与A相关联,根据A可以确定B。但还应理解,根据A确定B并不意味着仅仅根据A确定B,还可以根据A和/或其它信息确定B。It should be understood that in the embodiment of the present application, "B corresponding to A" means that B is associated with A, and B can be determined according to A. However, it should also be understood that determining B according to A does not mean determining B only according to A, and B can also be determined according to A and/or other information.

所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。 In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

Claims (24)

一种组播通信方法,其特征在于,包括:A multicast communication method, characterized by comprising: 第一通信装置构建第一报文,所述第一报文携带第一组播信息,所述第一组播信息指示第一组播组包括的通信装置,所述第一通信装置为所述第一组播组中的组播源节点;The first communication device constructs a first message, the first message carries first multicast information, the first multicast information indicates the communication devices included in the first multicast group, and the first communication device is a multicast source node in the first multicast group; 所述第一通信装置向第二通信装置发送所述第一报文,所述第一报文指示所述第二通信装置构建第一组播分发树MDT,所述第一组播组中组播数据沿所述第一组播分发树MDT指示的组播转发路径转发。The first communication device sends the first message to the second communication device, the first message instructing the second communication device to build a first multicast distribution tree MDT, and multicast data in the first multicast group is forwarded along the multicast forwarding path indicated by the first multicast distribution tree MDT. 根据权利要求1所述的方法,其特征在于,所述第一组播信息包括:所述组播源节点的地址信息、所述第一组播组的地址信息,和,所述第一组播组中组播宿节点的地址信息。The method according to claim 1 is characterized in that the first multicast information includes: address information of the multicast source node, address information of the first multicast group, and address information of the multicast destination node in the first multicast group. 根据权利要求2所述的方法,其特征在于,所述组播源节点的地址信息为所述组播源节点的互联网协议IP地址,所述第一组播组的地址信息为D类组播IP地址,所述组播宿节点的地址信息为所述组播宿节点的互联网协议IP地址。The method according to claim 2 is characterized in that the address information of the multicast source node is the Internet Protocol IP address of the multicast source node, the address information of the first multicast group is a Class D multicast IP address, and the address information of the multicast destination node is the Internet Protocol IP address of the multicast destination node. 根据权利要求1-3中任一项所述的方法,其特征在于,所述第一报文携带第一标识,所述第一标识指示所述第一报文用于构建所述第一MDT。The method according to any one of claims 1 to 3, characterized in that the first message carries a first identifier, and the first identifier indicates that the first message is used to construct the first MDT. 根据权利要求4所述的方法,其特征在于,所述第一标识为用户数据报协议UDP目的端口号。The method according to claim 4 is characterized in that the first identifier is a User Datagram Protocol UDP destination port number. 根据权利要求1-5中任一项所述的方法,其特征在于,所述第一通信装置构建所述第一报文,包括:The method according to any one of claims 1 to 5, characterized in that the first communication device constructs the first message, comprising: 所述第一通信装置获取节点信息集合,所述节点信息集合包括多个节点的节点信息,其中,所述多个节点属于所述第一组播组,所述组播宿节点的地址信息属于所述节点信息集合;The first communication device acquires a node information set, the node information set including node information of a plurality of nodes, wherein the plurality of nodes belong to the first multicast group, and the address information of the multicast sink node belongs to the node information set; 所述第一通信装置根据所述节点信息集合,构建所述第一报文。The first communication device constructs the first message according to the node information set. 根据权利要求6所述的方法,其特征在于,所述第一通信装置获取所述节点信息集合,包括:The method according to claim 6, characterized in that the first communication device obtains the node information set, comprising: 所述第一通信装置创建所述第一组播组对应的通信域之后,获取所述节点信息集合;After the first communication device creates the communication domain corresponding to the first multicast group, acquiring the node information set; 或者,or, 所述第一通信装置获取所述第一组播组中节点信息的配置文件,所述第一组播组中节点信息的配置文件包括所述节点信息集合。The first communication device obtains a configuration file of node information in the first multicast group, where the configuration file of node information in the first multicast group includes the node information set. 根据权利要求1-7中任一项所述的方法,其特征在于,所述第一通信装置构建所述第一报文,包括:The method according to any one of claims 1 to 7, wherein the first communication device constructs the first message, comprising: 所述第一通信装置根据所述第一组播信息,从所述第一通信装置的路由表中确定所述第二通信装置的地址信息,所述第二通信装置的地址信息作为所述第一报文的目的地址。The first communication device determines the address information of the second communication device from the routing table of the first communication device according to the first multicast information, and uses the address information of the second communication device as the destination address of the first message. 根据权利要求8所述的方法,其特征在于,所述第一通信装置根据所述第一组播信息,从所述第一通信装置的路由表中确定所述第二通信装置的地址信息,包括:The method according to claim 8, wherein the first communication device determines the address information of the second communication device from a routing table of the first communication device according to the first multicast information, comprising: 所述第一通信装置根据所述组播宿节点的地址信息,从所述第一通信装置的路由表中确定所述第二通信装置的地址信息。The first communication device determines the address information of the second communication device from a routing table of the first communication device according to the address information of the multicast destination node. 根据权利要求2-9中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 2 to 9, characterized in that the method further comprises: 所述第一通信装置创建所述第一组播组对应的通信域之后,获取所述第一组播组的地址信息;After the first communication device creates the communication domain corresponding to the first multicast group, acquiring the address information of the first multicast group; 或者,or, 所述第一通信装置根据所述第一组播组中节点信息的配置文件,确定所述第一组播组的地址信息。The first communication device determines the address information of the first multicast group according to a configuration file of the node information in the first multicast group. 根据权利要求1-10中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 10, characterized in that the method further comprises: 所述第一信装置确定所述第一组播组包括的所述组播宿节点发生变化;The first communication device determines that the multicast destination node included in the first multicast group changes; 响应于所述第一组播组包括的组播宿节点发生变化,所述第一通信装置修改所述第一报文,修改后的所述第一报文携带的所述第一组播信息对应于变化后的所述第一组播组。In response to a change in a multicast destination node included in the first multicast group, the first communication device modifies the first message, and the first multicast information carried by the modified first message corresponds to the changed first multicast group. 根据权利要求11所述的方法,其特征在于,响应于所述第一组播组包括的组播宿节点发生变化,所述第一通信装置修改所述第一报文,修改后的所述第一报文携带的所述第一组播信息对应于变化后的所述第一组播组,包括:The method according to claim 11, characterized in that in response to a change in a multicast destination node included in the first multicast group, the first communication device modifies the first message, and the first multicast information carried by the modified first message corresponds to the changed first multicast group, comprising: 响应于第一节点下线,所述第一通信装置修改所述第一报文,修改后的所述第一报文携带的所述第一组播信息不包括所述第一节点的地址信息,其中,所述第一节点属于所述第一组播组; In response to the first node going offline, the first communication device modifies the first message, wherein the first multicast information carried by the modified first message does not include the address information of the first node, wherein the first node belongs to the first multicast group; 或者,响应于第二节点上线,所述第一通信装置修改所述第一报文,修改后的所述第一报文携带的所述第一组播信息包括所述第二节点的地址信息,其中,在所述第二节点上线前,所述第二节点不属于所述第一组播组。Alternatively, in response to the second node coming online, the first communication device modifies the first message, and the first multicast information carried by the modified first message includes the address information of the second node, wherein before the second node comes online, the second node does not belong to the first multicast group. 一种组播通信方法,其特征在于,包括:A multicast communication method, characterized by comprising: 第二通信装置接收来自上一跳节点的第一报文,所述第一报文携带第一组播信息,所述第一组播信息指示第一组播组包括的通信装置,所述第一组播组中组播数据沿第一组播分发树MDT指示的组播转发路径转发;The second communication device receives a first message from a previous hop node, where the first message carries first multicast information, where the first multicast information indicates the communication devices included in the first multicast group, and where the multicast data in the first multicast group is forwarded along a multicast forwarding path indicated by a first multicast distribution tree MDT; 所述第二通信装置根据所述第一组播信息,确定所述第一MDT指示的组播转发路径;The second communication device determines, according to the first multicast information, a multicast forwarding path indicated by the first MDT; 所述第二通信装置根据所述第一MDT对应的组播转发路径,向第三通信装置发送所述第一报文,其中,所述第三通信装置为所述第一MDT指示的组播转发路径中所述第二通信装置的下一跳节点,所述第一报文指示所述第三通信装置构建所述第一MDT。The second communication device sends the first message to a third communication device according to the multicast forwarding path corresponding to the first MDT, wherein the third communication device is the next hop node of the second communication device in the multicast forwarding path indicated by the first MDT, and the first message instructs the third communication device to construct the first MDT. 根据权利要求13所述的方法,其特征在于,所述第一组播信息包括:所述组播源节点的地址信息、所述第一组播组的地址信息,和,所述第一组播组中组播宿节点的地址信息。The method according to claim 13 is characterized in that the first multicast information includes: address information of the multicast source node, address information of the first multicast group, and address information of the multicast destination node in the first multicast group. 根据权利要求13或14所述的方法,其特征在于,所述第二通信装置根据所述第一组播信息,确定所述第一MDT指示的组播转发路径,包括:The method according to claim 13 or 14, characterized in that the second communication device determines the multicast forwarding path indicated by the first MDT according to the first multicast information, comprising: 所述第二通信装置根据所述第一组播信息,确定第一组播转发表,所述第一组播转发表包括目标出接口,所述目标出接口可到达所述第一组播组包括的组播宿节点,所述第一组播转发表指示所述第一MDT对应的组播转发路径。The second communication device determines a first multicast forwarding table according to the first multicast information, the first multicast forwarding table including a target outbound interface, the target outbound interface can reach the multicast destination node included in the first multicast group, and the first multicast forwarding table indicates a multicast forwarding path corresponding to the first MDT. 根据权利要求15所述的方法,其特征在于,所述第二通信装置根据所述第一组播信息,确定所述第一组播转发表,包括:The method according to claim 15, wherein the second communication device determines the first multicast forwarding table according to the first multicast information, comprising: 所述第二通信装置根据所述第一组播信息,确定所述第一组播转发表;The second communication device determines the first multicast forwarding table according to the first multicast information; 所述第二通信装置根据所述第一组播信息,在所述第二通信装置的路由表中确定所述目标出接口;The second communication device determines the target outgoing interface in a routing table of the second communication device according to the first multicast information; 所述第二通信装置根据所述目标出接口,更新所述第一组播转发表,更新后的所述第一组播转发表包括所述目标出接口。The second communication device updates the first multicast forwarding table according to the target outbound interface, and the updated first multicast forwarding table includes the target outbound interface. 根据权利要求16所述的方法,其特征在于,所述第二通信装置根据所述第一组播信息,确定所述第一组播转发表,包括:The method according to claim 16, wherein the second communication device determines the first multicast forwarding table according to the first multicast information, comprising: 所述第二通信装置从所述第一组播信息中确定第一键值,所述第一键值包括部分所述第一组播信息;The second communication device determines a first key value from the first multicast information, the first key value including a portion of the first multicast information; 所述第二通信装置根据所述第一键值,查找所述第二通信装置是否存在与所述第一键值关联的所述第一组播转发表;The second communication device searches, according to the first key value, whether the second communication device has the first multicast forwarding table associated with the first key value; 若不存在,则创建所述第一组播转发表;If it does not exist, create the first multicast forwarding table; 若存在,则确定所述第一组播转发表。If so, the first multicast forwarding table is determined. 根据权利要求16所述的方法,其特征在于,所述第二通信装置根据所述第一组播信息,在所述第二通信装置的路由表中确定所述目标出接口,包括:The method according to claim 16, wherein the second communication device determines the target outbound interface in a routing table of the second communication device according to the first multicast information, comprising: 所述第二通信装置根据所述第一组播信息从所述第二通信装置的路由表中确定第一出接口集合,所述第一出接口集合包括的出接口可到达所述组播宿节点,所述第一出接口集合包括至少一个出接口;The second communication device determines, from a routing table of the second communication device according to the first multicast information, a first outbound interface set, wherein the outbound interfaces included in the first outbound interface set can reach the multicast destination node, and the first outbound interface set includes at least one outbound interface; 所述第二通信装置检测是否存在第三出接口集合,所述第三出接口集合为所述第一出接口集合与第二出接口集合的交集,所述第三出接口集合包括至少一个出接口,所述第二出接口集合为所述第一组播转发表包括的出接口;The second communication device detects whether there is a third outbound interface set, where the third outbound interface set is the intersection of the first outbound interface set and the second outbound interface set, the third outbound interface set includes at least one outbound interface, and the second outbound interface set is the outbound interface included in the first multicast forwarding table; 若存在所述第三出接口集合,则从所述第三出接口集合中确定所述目标出接口;If the third outbound interface set exists, determining the target outbound interface from the third outbound interface set; 若不存在所述第三出接口集合,则从所述第一出接口集合中确定所述目标出接口。If the third outbound interface set does not exist, the target outbound interface is determined from the first outbound interface set. 根据权利要求13-18中任一项所述的方法,其特征在于,所述第二通信装置根据所述第一MDT对应的组播转发路径,向所述第三通信装置发送所述第一报文,包括:The method according to any one of claims 13 to 18, wherein the second communication device sends the first message to the third communication device according to the multicast forwarding path corresponding to the first MDT, comprising: 所述第二通信装置根据所述第一MDT对应的组播转发路径,对所述第一组播组包括的多个所述组播宿节点进行分类,得到第一分类结果,所述第一分类结果指示一组或多组所述组播宿节点,其中,同一组所述组播宿节点在所述第二通信装置中对应于同一个所述目标出接口;The second communication device classifies the plurality of multicast sink nodes included in the first multicast group according to the multicast forwarding path corresponding to the first MDT to obtain a first classification result, wherein the first classification result indicates one or more groups of the multicast sink nodes, wherein the same group of the multicast sink nodes corresponds to the same target outbound interface in the second communication device; 所述第二通信装置根据所述第一分类结果更新所述第一报文,更新后的所述第一报文携带第二组播 信息,所述第二组播信息包括所述第一分类结果指示的同一组所述组播宿节点的地址信息;The second communication device updates the first message according to the first classification result, and the updated first message carries a second multicast information, wherein the second multicast information includes address information of the same group of multicast destination nodes indicated by the first classification result; 所述第二通信装置向所述第三通信装置转发所述更新后的所述第一报文,其中,所述第三通信装置为所述第二组播信息指示的下一跳节点。The second communication device forwards the updated first message to the third communication device, wherein the third communication device is the next hop node indicated by the second multicast information. 根据权利要求19所述的方法,其特征在于,所述方法还包括:The method according to claim 19, characterized in that the method further comprises: 所述第二通信装置根据所述第一MDT对应的组播转发路径,确定所述第二通信装置中所述组播宿节点对应的多个出接口信息;The second communication device determines, according to the multicast forwarding path corresponding to the first MDT, information of multiple outbound interfaces corresponding to the multicast sink node in the second communication device; 所述第二通信装置根据所述组播宿节点对应的多个出接口信息,确定所述组播宿节点对应的所述目标出接口,其中,当所述第二通信装置到达所述组播宿节点的转发路径包括多条等价路径时,从所述多条等价路径中按照预设规则确定所述目标出接口对应的转发路径。The second communication device determines the target outbound interface corresponding to the multicast destination node based on the multiple outbound interface information corresponding to the multicast destination node, wherein when the forwarding path of the second communication device to reach the multicast destination node includes multiple equal-cost paths, the forwarding path corresponding to the target outbound interface is determined from the multiple equal-cost paths according to a preset rule. 一种通信装置,其特征在于,包括处理器和存储器,A communication device, comprising a processor and a memory, 所述存储器,用于存储计算机程序或指令;The memory is used to store computer programs or instructions; 所述处理器,用于执行存储器中的计算机程序或指令,使得权利要求1-12任一项所述的方法被执行,或使得权利要求13-20任一项所述的方法被执行。The processor is used to execute the computer program or instructions in the memory, so that the method described in any one of claims 1 to 12 is executed, or the method described in any one of claims 13 to 20 is executed. 一种计算机可读存储介质,包括指令,其特征在于,当所述指令被处理器执行时,实现权利要求1-12,或者,权利要求13-20任一项所述的方法。A computer-readable storage medium, comprising instructions, characterized in that when the instructions are executed by a processor, the method described in any one of claims 1 to 12 or claims 13 to 20 is implemented. 一种计算机程序产品,包括程序,其特征在于,当所述程序被处理器执行时,实现权权利要求1-12,或者,权利要求13-20任一项所述的方法。A computer program product, comprising a program, characterized in that when the program is executed by a processor, the method described in any one of claims 1 to 12 or claims 13 to 20 is implemented. 一种芯片系统,其特征在于,所述芯片系统包括至少一个处理器,当程序指令在所述至少一个处理器中执行时,使得如权利要求1-12,或者,权利要求13-20中任一所述的方法被实现。 A chip system, characterized in that the chip system includes at least one processor, and when program instructions are executed in the at least one processor, the method described in any one of claims 1-12 or claims 13-20 is implemented.
PCT/CN2024/096987 2023-06-13 2024-06-03 Multicast communication method and related apparatus Ceased WO2024255629A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202310699905.1A CN119135597A (en) 2023-06-13 2023-06-13 A multicast communication method and related device
CN202310699905.1 2023-06-13

Publications (1)

Publication Number Publication Date
WO2024255629A1 true WO2024255629A1 (en) 2024-12-19

Family

ID=93747019

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2024/096987 Ceased WO2024255629A1 (en) 2023-06-13 2024-06-03 Multicast communication method and related apparatus

Country Status (2)

Country Link
CN (1) CN119135597A (en)
WO (1) WO2024255629A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8908686B1 (en) * 2010-12-08 2014-12-09 Juniper Networks, Inc. Distributed generation of hierarchical multicast forwarding structures
CN115134289A (en) * 2021-03-22 2022-09-30 华为技术有限公司 Multicast message sending method and device
CN115801663A (en) * 2022-11-28 2023-03-14 中国联合网络通信集团有限公司 Route generation method, device and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8908686B1 (en) * 2010-12-08 2014-12-09 Juniper Networks, Inc. Distributed generation of hierarchical multicast forwarding structures
CN115134289A (en) * 2021-03-22 2022-09-30 华为技术有限公司 Multicast message sending method and device
CN115801663A (en) * 2022-11-28 2023-03-14 中国联合网络通信集团有限公司 Route generation method, device and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
NOKIA, NOKIA SHANGHAI BELL: "KI #1, new Solution Integrated Multicast and Unicast Transport with multicast distribution tree established by RAN nodes", 3GPP DRAFT; S2-2004279, 3RD GENERATION PARTNERSHIP PROJECT (3GPP), MOBILE COMPETENCE CENTRE ; 650, ROUTE DES LUCIOLES ; F-06921 SOPHIA-ANTIPOLIS CEDEX ; FRANCE, vol. SA WG2, no. Electronic meeting; 20200601 - 20200612, 22 May 2020 (2020-05-22), Mobile Competence Centre ; 650, route des Lucioles ; F-06921 Sophia-Antipolis Cedex ; France , XP051890280 *

Also Published As

Publication number Publication date
CN119135597A (en) 2024-12-13

Similar Documents

Publication Publication Date Title
US8009671B2 (en) Multicast method and multicast routing method
US7839850B2 (en) Forming equal cost multipath multicast distribution structures
US8429296B2 (en) Method and apparatus for distributing routing instructions over multiple interfaces of a data router
Li et al. ESM: Efficient and scalable data center multicast routing
CN101035057B (en) Method for establishing the multicast share tree and data transfer method and communication network
US11190367B2 (en) Multicast forwarding method and multicast router
Jia A scalable multicast source routing architecture for data center networks
EP3965368B1 (en) Replication mode selection for multicast in evpn
CN109981308B (en) Message transmission method and device
US8270395B2 (en) Forming multicast distribution structures using exchanged multicast optimization data
US10389618B2 (en) Distributing network path information in a network environment
CN119172187B (en) Multicast tree-based garment design message receiving and transmitting method and system
US11018886B1 (en) Methods and apparatus for selectively filtering an IP multicast data stream for selected group members of a multicast group
CN102077508A (en) Multicast communication method and device for receiving and forwarding data through network between multiple nodes
CN100417141C (en) A method for realizing multicast service
EP2892196A1 (en) Method, network node and system for implementing point-to-miltipoint multicast
US20160043878A1 (en) Multicast communications method and aggregation switch
CN100477635C (en) Inter-domain multicast transmission method and edge device
US11329907B2 (en) Establishing a multicast flow path through a network using multicast resources currently associated with a different multicast flow path
CN110324247B (en) Multicast forwarding method, device and storage medium in three-layer multicast network
WO2024255629A1 (en) Multicast communication method and related apparatus
CN101013948A (en) Forming equal cost multipath multicast distribution structures
CN115102806B (en) Multicast data transmission method, device, system and storage medium
WO2012103748A1 (en) Multicast control method, routing device and multicast system
Liao et al. Prototype for customized multicast services in software defined networks

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE