Multicast communication method and related apparatus

By forwarding messages carrying multicast information in multicast communication along the multicast forwarding path, the problem of many messages interactions and low efficiency in the construction of MDT in the prior art is solved, and the multicast distribution tree is realized Rapid construction and communication efficiency improvement.

WO2024255629A1PCT designated stage expired Publication Date: 2024-12-19HUAWEI TECH CO LTD

Patent Information

Application Number
PCT/CN2024/096987
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-06-13
Filing Date
2024-06-03
Publication Date
2024-12-19

AI Technical Summary

Technical Problem

The existing multicast routing protocol requires a large number of message interactions in the process of building the multicast distribution tree MDT, resulting in high performance requirements of communication devices and high network bandwidth occupancy, which affects communication efficiency. The MDT construction convergence is slow and cannot be quickly built.

Method used

By forwarding messages carrying multicast information along the multicast forwarding path, the communication device on the multicast forwarding path builds MDT, reducing performance requirements, reducing network bandwidth occupancy, and improving the convergence rate of MDT construction.

Benefits of technology

The rapid construction of multicast distribution tree MDT is realized, communication efficiency is improved, and the requirements for communication device performance and network bandwidth occupancy are reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024096987_19122024_PF_FP_ABST
    Figure CN2024096987_19122024_PF_FP_ABST
Patent Text Reader

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.
Need to check novelty before this filing date? Find Prior Art

Description

A multicast communication method and related device

[0001] This application claims priority to 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”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of communication technology, and in particular to a multicast communication method and related devices. Background Art

[0003] Multicast technology provides a point-to-multipoint (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 the network load. Multicast technology includes two key technologies: one is the multicast member management protocol technology; the other is the 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 the member information in the multicast group and the 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 the 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.

[0004] 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. Whether constructing a multicast distribution tree (MDT) using the PIM-DM or PIM-SIM modes, the communication devices within the MDT construct multicast group forwarding entries. Therefore, the communication devices forward received multicast data packets based on these multicast group forwarding entries. Whether using the PIM-DM or PIM-SIM modes, the MDT construction process typically employs the following method: a multicast destination node sends an Internet Group Management Protocol (IGMP) join message to a communication device (which is considered the designated router (DR) device of the multicast destination node). This IGMP join message informs the communication device that the multicast destination node wishes to join a multicast group. The communication device sends a Protocol Independent Multicast (PIM) join message to its upstream communication device, notifying it that the multicast sink node wishes to join a specific multicast group. Hop-by-hop communication devices then perform similar processing to complete the establishment of the multicast MDT.

[0005] The applicant's research has found that current multicast routing protocols require a large number of message exchanges during the MDT construction process. This large number of messages placed high demands on the performance of communication devices. Furthermore, it leads to high network bandwidth utilization, impacting communication efficiency. This large number of messages often results in slow MDT convergence, preventing rapid MDT construction.

[0006] Summary of the Invention

[0007] This embodiment of the present application proposes a multicast communication method that efficiently establishes a multicast distribution tree (MDT) using a first message carrying first multicast information. Compared to current MDT establishment methods, this method can effectively reduce the performance requirements of communication devices, lower network bandwidth utilization, and improve communication efficiency. This in turn increases the MDT establishment and convergence rate, enabling rapid MDT establishment.

[0008] In a first aspect, an embodiment of the present application provides a multicast communication method, comprising: first, a first communication device constructs a first message, the first message carrying first multicast information, the first multicast information indicating the communication devices included in a first multicast group, the first communication device being 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 instructing the second communication device to construct a first multicast distribution tree (MDT), wherein 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 is a forwarding node in the multicast forwarding path indicated by the first MDT or a multicast sink node included in the first multicast group.

[0009] In this embodiment of the present application, a first communication device constructs and forwards a first message, enabling a second communication device belonging to the same multicast distribution tree (MDT) to establish a first MDT. Because the first message carries 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, allowing all communication devices along the multicast forwarding path to establish the first MDT based on the first message. The first message carrying the first multicast information enables efficient MDT establishment. Compared to current MDT establishment methods, this effectively reduces the performance requirements placed on communication devices, reduces network bandwidth utilization, and improves communication efficiency. This in turn increases the MDT establishment and convergence rate, enabling rapid MDT establishment.

[0010] In conjunction 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.

[0011] In conjunction 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 this embodiment of the present application.

[0012] In one 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 this embodiment of the present application.

[0013] In conjunction with the first aspect, in one 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 establish the first MDT. The next hop node determines, based on the first identifier, that an MDT needs to be established based on the first message. The first identifier improves the efficiency of the second communication device in identifying and processing the first message.

[0014] In conjunction with the first aspect, in one 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 establish 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.

[0015] In conjunction with the first aspect, in a possible implementation of the first aspect, a first communication device obtains a node information set, where the node information set includes node information of multiple nodes, where the multiple nodes belong to the first multicast group, and the address information of the multicast destination node belongs to the node information set; and then, the first communication device constructs the first message based on 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.

[0016] In conjunction with the first aspect, in a possible implementation of the first aspect, the first communication device obtains the node information set, including: obtaining the node information set after the first communication device creates a communication domain corresponding to the first multicast group; or obtaining a configuration file for node information in the first multicast group, where the configuration file for 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; or it can obtain configuration information of nodes in the first multicast group, and then obtain the node information set included in the configuration file, thereby improving the implementation flexibility of the solution.

[0017] In conjunction with the first aspect, in one 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 based on the first multicast information, and uses the address information of the second communication device as the destination address of the first message. Furthermore, 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 to which the first communication device is connected 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.

[0018] 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.

[0019] In conjunction with the first aspect, in one possible implementation of the first aspect, 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; alternatively, the first communication device determines the address information of the first multicast group based on a configuration file containing node information in the first multicast group. Specifically, the first communication device may also obtain the address information of the first multicast group through multiple methods to increase the implementation flexibility of the solution.

[0020] In conjunction with the first aspect, in a possible implementation of the first aspect, the method further includes: the first communication device determining that the multicast destination node included in the first multicast group has changed; in response to the change in the multicast destination node included in the first multicast group, the first communication device modifying the first message, whereby the first multicast information carried in the modified first message corresponds to the changed first multicast group. This method supports dynamic changes in the first multicast group and ensures that a corresponding first MDT can be established after the first multicast group changes.

[0021] In combination with the first aspect, in a possible implementation of the first aspect, in response to a change in the 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 the 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 the address information of the first node, wherein the first node belongs to the first multicast group; or, in response to the second node going 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 goes online, the second node does not belong to the first multicast group.

[0022] In a second aspect, an embodiment of the present application proposes a multicast communication method, including: 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 the multicast forwarding path indicated by the first multicast distribution tree MDT, and the first communication device is the multicast source node in the first multicast group; then, the second communication device determines the multicast forwarding path indicated by the first MDT based on the first multicast information; finally, the second communication device sends the first message to a third communication device based on 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.

[0023] In an embodiment of the present application, after receiving a first message from a previous-hop node, a second communication device determines the multicast forwarding path indicated by the first multicast distribution tree (MDT) based on the first message. The second communication device then forwards the first message to a next-hop node (a third communication device) based on the multicast forwarding path indicated by the first MDT. The first message instructs the third communication device to establish a first MDT. The second communication device processes and forwards the first message to establish the first MDT, thereby obtaining the multicast forwarding path indicated by the first MDT. The first message carrying the first multicast information enables efficient MDT establishment. Compared to current MDT establishment methods, this effectively reduces performance requirements for communication devices, reduces network bandwidth resource utilization, and improves communication efficiency. This in turn improves the MDT establishment convergence rate, enabling rapid MDT establishment. If the second communication device is the nth second communication device, the previous-hop node may be the n-1th second communication device, where n is a positive integer. Alternatively, the previous-hop node may be the first communication device.

[0024] Regarding the third communication device, the third communication device can be a forwarding node, or the third communication device can be a multicast destination node. For example, the third communication device can 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, it executes the relevant method of the second aspect. For another example, if the third communication device is a multicast destination node, then after receiving the first message, the third communication device terminates the first message.

[0025] In conjunction with the second aspect, in a possible implementation of the second 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.

[0026] 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 sink nodes 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 sink nodes in the first multicast group, which is not limited in this embodiment of the present application.

[0027] 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 the 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.

[0028] The multicast distribution tree, as reflected on each multicast router, is actually the relevant entries in the multicast forwarding table (also known as 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, the multicast forwarding table may contain multiple entries, each of which contains four key pieces of information: the multicast source address, the multicast group address, the upstream interface (or inbound interface), the downstream interface (or outbound interface), a timer, and a flag. In the embodiments of the present application, the multicast forwarding table associated with 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 multicast forwarding table (MDT), so that each node in the network can establish the first MDT. In the second communication device, the forwarding path for the first message needs to be determined based on the first multicast forwarding table. It should be noted that the second communication device may also include other multicast forwarding tables, each corresponding to the multicast forwarding path of a multicast group. The multicast forwarding table includes a key and a value, which form a key-value pair. The key value and the multicast group have a unique correspondence. The key value is used to determine the corresponding key-value pair. Then, based on the value included in the key-value pair, the outbound interface of the multicast message on the local node (for example, the second communication device) is determined. This outbound interface can also be the address of the next-hop node. Finally, based on the outbound interface, the multicast message is forwarded to the node corresponding to the outbound interface (for example, the third communication device).

[0029] In conjunction with the second aspect, in one possible implementation of the second aspect, after the second communication device determines the first multicast forwarding table based on the first multicast information, it determines a target outbound interface in the routing table of the second communication device based on the first multicast information. Finally, the second communication device updates the first multicast forwarding table based on the determined target outbound interface, and the updated first multicast forwarding table includes the target outbound interface. Through the above method, it is ensured that the outbound interface in the first multicast forwarding table can reach the multicast destination node included in the first multicast group.

[0030] 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 based on the first key value to see 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. For example, 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 present application does not limit this.

[0031] The second communication device locally stores one or more multicast forwarding tables, each of which indicates an outbound interface of the second communication device for a particular multicast group. Because the multicast forwarding table is composed of key-value pairs, a search can be performed based on a first key value to determine whether the second communication device has a first multicast forwarding table associated with the first key value, where the first multicast forwarding table includes the first key value.

[0032] In a possible implementation, the second communication device may query whether a first multicast forwarding table associated with the first key value exists locally.

[0033] In another possible implementation, the second communication device sends a query request to a third-party device, the query request carrying a first key value. The third-party device queries, based on the query request, whether a first multicast forwarding table related to the second communication device and associated with the first key value exists. 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.

[0034] It is understood that the multicast forwarding table involved in the embodiments of the present application may also have other implementations, which are not limited by the embodiments of the present application. For example, it may be 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 on the current hop.

[0035] 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 based on the first multicast information, including: the second communication device determines a first outbound interface set from the routing table of the second communication device based on 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.

[0036] Specifically, the second communication device performs a table lookup in its routing table based on the address information of the multicast destination node included in the first multicast information, and determines an outbound interface among the outbound interfaces of the second communication device that can reach the multicast destination node (the multicast destination node indicated by the first multicast information). For ease of description, the outbound interfaces of the second communication device that can reach the multicast destination node are referred to as a 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 a second outbound interface set. The second communication device then determines whether there is an intersection between the first outbound interface set and the second outbound interface set. This intersection is referred to as a third outbound interface set. If so, a target outbound interface is determined from the third outbound interface set; if not, a target outbound interface is determined from the first outbound interface set. Through the above method, the target outbound interface is determined to be an outbound interface that can reach the multicast destination node, thereby ensuring that the first message can be forwarded according to the multicast forwarding path indicated by the first multicast forwarding table, thereby ensuring that the first multicast forwarding table can be successfully established.

[0037] In combination with the second aspect, in a possible implementation of the second aspect, the second communication device sends the first message to the third communication device according to the multicast forwarding path corresponding to the first MDT, including: 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 a first classification result, the first classification result indicates one or more groups of multicast destination nodes, wherein the same group of 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, and the updated first message carries second multicast information, and the second multicast information includes the 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.

[0038] To further improve communication efficiency, the multiple multicast sink nodes included in the first multicast group can be classified based on the target outbound interfaces corresponding to the multicast sink nodes to obtain a first classification result. The first classification result indicates one or more types of multicast sink nodes, with the same group of multicast sink nodes corresponding to the same target outbound interface in the second communication device. After determining the first classification result, the second communication device copies the first message to the target outbound interface corresponding to the same group and then updates the copied first message. Specifically, the address information of the multicast sink node carried in the first message is updated. The updated multicast information carried in the first message is referred to as the second multicast information. The address information of the multicast sink node included in the second multicast information is only the address information of the multicast sink node corresponding to the group. This allows the updated first message to be forwarded to the multicast sink node of the group along the multicast forwarding path indicated by the first MDT. Based on the second multicast information carried in the updated first message, the next hop node indicated by the second multicast information is determined, i.e., a third communication device is determined. The updated first message is then 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 based on the first message. The first MDT is constructed using 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.

[0039] 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.

[0040] Specifically, when the third outbound interface set includes multiple outbound interfaces, that is, the second communication device can reach the multiple multicast destination nodes included in the first multicast group via multiple forwarding nodes, and multiple forwarding paths exist for the second communication device to reach the multiple multicast destination nodes included in the first multicast group. The second communication device selects the path with the lowest path cost based on the multiple outbound interface information, and then uses the outbound interface information corresponding to the path with the lowest path cost as the target outbound interface.

[0041] Furthermore, if there are multiple equivalent paths (i.e., the path costs of the multiple forwarding paths are the same) from the second communication device to the multicast destination node of the first multicast group, 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. Alternatively, a path can be selected from the multiple equivalent paths as the target path and the target output interface can be determined according to a preset rule. 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 the multiple equivalent paths as the target path, etc.

[0042] In a third aspect, an embodiment of the present application provides a communication device, which is used as a first communication device and includes:

[0043] 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;

[0044] The transceiver module is configured to send the first message to the second communication device, wherein the first message instructs the second communication device to construct 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.

[0045] In a possible implementation, 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 sink node in the first multicast group.

[0046] 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 sink node is the IP address of the multicast sink node.

[0047] In a possible implementation, the first message carries a first identifier, where the first identifier indicates that the first message is used to construct the first MDT.

[0048] In a possible implementation, the first identifier is a User Datagram Protocol UDP destination port number.

[0049] In one possible implementation,

[0050] The transceiver module 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;

[0051] The processing module is further used to construct the first message according to the node information set.

[0052] In one possible implementation,

[0053] The processing module is further configured to obtain the node information set after creating the communication domain corresponding to the first multicast group;

[0054] or,

[0055] The processing module 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.

[0056] In one possible implementation,

[0057] The processing module is further configured to determine, based on 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.

[0058] In one possible implementation,

[0059] The processing module 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.

[0060] In one possible implementation,

[0061] The transceiver module is further configured to obtain address information of the first multicast group after creating a communication domain corresponding to the first multicast group;

[0062] or,

[0063] 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.

[0064] In one possible implementation,

[0065] The processing module is further configured to determine that the multicast sink node included in the first multicast group changes;

[0066] 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 in the modified first message corresponds to the changed first multicast group.

[0067] In one possible implementation,

[0068] The processing module is further configured to modify the first message in response to the first node going offline, where the first multicast information carried in the modified first message does not include the address information of the first node, wherein the first node belongs to the first multicast group;

[0069] 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.

[0070] In a fourth aspect, an embodiment of the present application provides a communication device, which is used as a second communication device, and includes:

[0071] a transceiver module, configured to receive a first message from a previous hop node, the first message carrying first multicast information, the first multicast information indicating communication devices included in a first multicast group, multicast data in the first multicast group being forwarded along a multicast forwarding path indicated by a first multicast distribution tree (MDT), and the first communication device being a multicast source node in the first multicast group;

[0072] a processing module, configured to determine a multicast forwarding path indicated by the first MDT according to the first multicast information;

[0073] The transceiver module is further configured 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 a 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 establish the first MDT.

[0074] In a possible implementation, 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 sink node in the first multicast group.

[0075] In one possible implementation,

[0076] The processing module is further configured to determine a first multicast forwarding table based on the first multicast information, wherein the first multicast forwarding table includes a target outbound interface that can reach the multicast sink node included in the first multicast group, and the first multicast forwarding table indicates a multicast forwarding path corresponding to the first MDT.

[0077] In one possible implementation,

[0078] The processing module is further configured to determine the first multicast forwarding table according to the first multicast information;

[0079] The processing module is further configured to determine the target outbound interface in a routing table of the second communication device according to the first multicast information;

[0080] 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.

[0081] In one possible implementation,

[0082] 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;

[0083] The processing module is further configured to search, based on the first key value, whether the second communication device has the first multicast forwarding table associated with the first key value;

[0084] The processing module is further configured to create the first multicast forwarding table if it does not exist;

[0085] The processing module is further configured to determine the first multicast forwarding table if it exists.

[0086] In one possible implementation,

[0087] 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 sink node, and the first outbound interface set includes at least one outbound interface;

[0088] The processing module is further configured to detect whether a third outbound interface set exists, 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;

[0089] 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;

[0090] 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.

[0091] In one possible implementation,

[0092] 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, where 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;

[0093] The processing module 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;

[0094] The transceiver module 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.

[0095] In one possible implementation,

[0096] 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;

[0097] The processing module is further 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.

[0098] In a fifth aspect, an embodiment of the present application provides a communication device, which is used as a first communication device and includes:

[0099] a processor, configured to construct a first message, wherein the first message carries first multicast information, the first multicast information indicates communication devices included in a first multicast group, and the first communication devices are multicast source nodes in the first multicast group;

[0100] The communication interface is configured to send the first message to a second communication device, wherein the first message instructs the second communication device to construct 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.

[0101] In a possible implementation, 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 sink node in the first multicast group.

[0102] 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 sink node is the IP address of the multicast sink node.

[0103] In a possible implementation, the first message carries a first identifier, where the first identifier indicates that the first message is used to construct the first MDT.

[0104] In a possible implementation, the first identifier is a User Datagram Protocol UDP destination port number.

[0105] In one possible implementation,

[0106] The communication interface is further configured to obtain 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;

[0107] The processor is further configured to construct the first message according to the node information set.

[0108] In one possible implementation,

[0109] The processor is further configured to obtain the node information set after creating the communication domain corresponding to the first multicast group;

[0110] or,

[0111] 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.

[0112] In one possible implementation,

[0113] The processor is further configured to determine, based on the first multicast information, the 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 the destination address of the first message.

[0114] In one possible implementation,

[0115] 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.

[0116] In one possible implementation,

[0117] The communication interface is further configured to obtain the address information of the first multicast group after creating the communication domain corresponding to the first multicast group;

[0118] or,

[0119] 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.

[0120] In one possible implementation,

[0121] The processor is further configured to determine that the multicast destination node included in the first multicast group changes;

[0122] 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, where the first multicast information carried by the modified first message corresponds to the changed first multicast group.

[0123] In one possible implementation,

[0124] The processor is further configured to modify the first message in response to the first node going offline, where the first multicast information carried in the modified first message does not include the address information of the first node, wherein the first node belongs to the first multicast group;

[0125] Alternatively, the processor 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.

[0126] In a sixth aspect, an embodiment of the present application provides a communication device, which is used as a second communication device, and includes:

[0127] a communication interface, configured to receive a first message from a previous hop node, the first message carrying first multicast information, the first multicast information indicating communication devices included in a first multicast group, multicast data in the first multicast group being forwarded along a multicast forwarding path indicated by a first multicast distribution tree (MDT), and the first communication device being a multicast source node in the first multicast group;

[0128] a processor, configured to determine, based on the first multicast information, a multicast forwarding path indicated by the first MDT;

[0129] The communication interface is further configured 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 a 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.

[0130] In a possible implementation, 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 sink node in the first multicast group.

[0131] In one possible implementation,

[0132] The processor is further configured to determine a first multicast forwarding table based on the first multicast information, where the first multicast forwarding table includes a target outbound interface that can reach a multicast sink node included in the first multicast group, and the first multicast forwarding table indicates a multicast forwarding path corresponding to the first MDT.

[0133] In one possible implementation,

[0134] The processor is further configured to determine the first multicast forwarding table according to the first multicast information;

[0135] 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;

[0136] The processor is further configured to update the first multicast forwarding table according to the target outbound interface, where the updated first multicast forwarding table includes the target outbound interface.

[0137] In one possible implementation,

[0138] 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;

[0139] The processor is further configured to search, based on the first key value, whether the second communication device has the first multicast forwarding table associated with the first key value;

[0140] The processor is further configured to create the first multicast forwarding table if the first multicast forwarding table does not exist;

[0141] The processor is further configured to determine the first multicast forwarding table if it exists.

[0142] In one possible implementation,

[0143] The processor is further configured to determine, 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 sink node, and the first outbound interface set includes at least one outbound interface;

[0144] The processor is further configured to detect whether a third outbound interface set exists, 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;

[0145] The processor is further configured to determine the target outbound interface from the third outbound interface set if the third outbound interface set exists;

[0146] 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.

[0147] In one possible implementation,

[0148] 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, where 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;

[0149] 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;

[0150] 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.

[0151] In one possible implementation,

[0152] The processor is further configured to determine, based on 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;

[0153] The processor is further configured to determine the target outbound interface corresponding to the multicast destination node based on information of multiple outbound interfaces 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.

[0154] In the seventh aspect, an embodiment of the present application provides a computer-readable storage medium that stores 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.

[0155] In an eighth aspect, an embodiment of the present application provides a computer program product (or computer program) that stores one or more computer-executable instructions. When the computer-executable instructions are executed by the processor, the processor executes any possible implementation method of the aforementioned first aspect.

[0156] In a ninth aspect, the present application provides a chip system comprising a processor for supporting a computer device in implementing the functions described in the above aspects. In one possible design, the chip system further comprises a memory for storing program instructions and data necessary for the computer device. The chip system may be composed solely of a chip or may include a chip and other discrete components.

[0157] 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 the 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.

[0158] The communication interface in the chip system may be an input / output interface, a pin or a circuit, etc. BRIEF DESCRIPTION OF THE DRAWINGS

[0159] FIG1 is a schematic diagram of a multicast communication scenario;

[0160] FIG2 is a schematic diagram of a multicast communication scenario;

[0161] FIG3 is a schematic diagram of a communication domain scenario;

[0162] FIG4 is a schematic diagram of a multicast communication scenario;

[0163] FIG5 is a schematic diagram of a communication scenario involved in an embodiment of the present application;

[0164] FIG6 is a schematic diagram of an embodiment of a multicast communication method according to an embodiment of the present application;

[0165] FIG7 is a schematic diagram of the structure of a first message in an embodiment of the present application;

[0166] FIG8 is a schematic diagram of another embodiment of the multicast communication method in the embodiment of the present application;

[0167] FIG9 is a schematic diagram of another embodiment of the multicast communication method in the embodiment of the present application;

[0168] FIG10 is a schematic diagram of a multicast forwarding table involved in an embodiment of the present application;

[0169] FIG11 is a schematic diagram of another embodiment of the multicast communication method in the embodiment of the present application;

[0170] FIG12 is a schematic diagram of another embodiment of the multicast communication method in the embodiment of the present application;

[0171] FIG13 is a schematic diagram of another embodiment of the multicast communication method in the embodiment of the present application;

[0172] FIG14 is a schematic diagram of a communication scenario involved in an embodiment of the present application;

[0173] FIG15 is a schematic diagram of another communication scenario involved in an embodiment of the present application;

[0174] FIG16 is a schematic diagram of another communication scenario involved in an embodiment of the present application;

[0175] FIG17 is a schematic diagram of another communication scenario involved in an embodiment of the present application;

[0176] FIG18 is a schematic diagram of another communication scenario involved in an embodiment of the present application;

[0177] FIG19 is a schematic diagram of another communication scenario involved in an embodiment of the present application;

[0178] FIG20 is a schematic diagram of another communication scenario involved in an embodiment of the present application;

[0179] FIG21 is a schematic structural diagram of a communication device 2100 provided in an embodiment of the present application;

[0180] FIG22 is a schematic structural diagram of a communication device 2200 provided in an embodiment of the present application;

[0181] FIG23 is a schematic structural diagram of a communication device 2300 provided in an embodiment of the present application. DETAILED DESCRIPTION

[0182] The following describes the embodiments of the present application. Obviously, the embodiments described are only part of the embodiments of the present application, not all of the embodiments. Those skilled in the art will appreciate that as new application scenarios emerge, the technical solutions provided by the embodiments of the present application are equally applicable to similar technical problems.

[0183] The terms "first", "second", etc. in the specification and claims of this 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 interchangeable where appropriate so that the embodiments can be implemented in a sequence other than that illustrated or described in this application. In addition, the terms "including" and "having" and any variations thereof 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 clearly listed, but may include other steps or modules that are not clearly listed or that are inherent to these processes, methods, products or devices. The naming or numbering of steps in this 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 named or numbered process steps 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. In actual application, there may be other division methods. For example, multiple units can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each other 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. Moreover, 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 into multiple circuit units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this application.

[0184] First, some technical concepts involved in the embodiments of this application are introduced.

[0185] 1. Multicast

[0186] Multicast is a one-to-many communication mode between hosts. It is a technology that allows one or more multicast sources (also called multicast source nodes or source nodes) to send the same message to multiple multicast destinations (also called multicast destination nodes or destination nodes). Multicast refers to a message sent from a multicast and forwarded to a specific group of receivers. There is at most one copy of the same message on each link. The multicast source sends a message to a specific multicast address. Unlike unicast addresses, a multicast address does not belong to a specific host, but to a group of hosts. A multicast group address represents a group, and all receivers that need to receive multicast messages join this group.

[0187] For ease of understanding, as shown in Figures 1 and 2, Figure 1 is a schematic diagram of a multicast communication scenario, and Figure 2 is a schematic diagram of a multicast communication scenario.

[0188] Compared to 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. Based on business processing requirements, HPC / AI applications create a communication domain by calling the Message Passing Interface (MPI) "MPI_Comm_create()" and specify the communication member information within the communication domain. Any communication member / node / instance within the communication domain can act as a data source by calling the MPI_Bcast() interface to send multicast data to other nodes in the communication domain. 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.

[0189] In the IP multicast transmission model, the sender doesn't care about the receiver's location; it simply sends the data to the agreed-upon destination, and the network handles the rest. Multicast devices on the network must collect receiver information and forward and replicate multicast messages along the correct path. The development of multicast has resulted in a comprehensive set of protocols to accomplish this task.

[0190] Common multicast protocols include Internet Group Management Protocol (IGMP) and Protocol Independent Multicast (PIM).

[0191] IGMP is a protocol responsible for IPv4 multicast membership management. It runs on the last segment of a multicast network, the network segment connecting Layer 3 network devices and user hosts. IGMP enables hosts to join and leave multicast groups, maintains and manages group memberships on upstream Layer 3 devices, and supports information exchange with upper-layer multicast routing protocols.

[0192] PIM, a multicast routing protocol in IPv4 networks, is primarily used to send multicast data streams to multicast devices connected to group members that have requested multicast data, thereby implementing routing lookup and forwarding for multicast data.

[0193] PIM includes Protocol Independent Multicast Sparse Mode (PIM-SM) and Protocol Independent Multicast Dense Mode (PIM-DM). PIM-SM is suitable for large networks with relatively dispersed group members, while PIM-DM is suitable for smaller networks with relatively concentrated multicast group members.

[0194] The PIM-DM protocol uses the following assumption: When a multicast source begins sending multicast data, all nodes in the domain need to receive it. Therefore, it uses a flood / prune method to forward multicast packets. When the multicast source begins sending data, nodes along the route forward the multicast packets out all interfaces except the Reverse Path Forwarding (RPF) interface corresponding to the multicast source. This ensures that all nodes in the PIM-DM domain receive these multicast packets.

[0195] If a certain area of ​​the network lacks multicast group members, nodes in that area send a prune message, pruning the forwarding interfaces leading to that area and establishing a prune state. The prune state is associated with a timeout timer. When the timer expires, the prune state returns to the forwarding state, allowing multicast data to flow along these branches again. The prune state also contains information about the multicast source and multicast group. When a multicast group member appears in the prune area, to reduce response time, the protocol proactively sends a graft message upstream, rather than waiting for the upstream prune state to time out, to transition the prune state back to the forwarding state.

[0196] 2. Multicast Distribution Tree (MDT)

[0197] In a multicast network, one of the most important tasks of a multicast routing protocol is to generate a loop-free tree for the multicast network. This tree is also the transmission path (or forwarding path) for multicast traffic within the network. This tree is called the Multicast Distribution Tree (MDT), or simply the multicast tree. There are two common types of multicast distribution trees: the Shortest-Path Tree (SPT) and the Rendezvous Point Tree (RPT).

[0198] An SPT is also called a source tree because it represents a multicast distribution tree with a multicast source as its root, while the multicast group receivers are considered the leaves of the tree. Multicast traffic originates from the root (the multicast source), propagates along the branches, and ultimately reaches the leaves, which are the end networks where the receivers reside. The multicast distribution tree is represented on each multicast router as entries in the multicast forwarding table (also known as the multicast routing table). Each multicast router maintains a multicast forwarding table, which guides the forwarding of multicast traffic.

[0199] In a multicast network, the multicast forwarding table may contain multiple entries, each of which contains four key pieces of information: multicast source address, multicast group address, upstream interface (or inbound interface), downstream interface (or outbound interface), timer, and flag.

[0200] 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 (S, G) table entry maintained by the multicast router in the network is (10.1.1.1, 239.1.1.13). The (10.1.1.1, 239.1.1.13) table entry of each router contains upstream and downstream interface information. In SPT, the upstream interface is the interface of the device facing the multicast source.

[0201] 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.

[0202] Shared tree (Rendezvous Point Tree, RPT). Unlike the SPT, the RPT does not have the multicast source as its root, but rather the RP (Rendezvous Point). The RP can be understood as a convergence point. In a typical multicast network, it is usually a high-performance network device. Multiple multicast groups can share one RP. Routers that wish to receive multicast traffic (connected to multicast receiving terminals) use a multicast routing protocol to establish an RPT branch between themselves and the RP. Multicast traffic must first be sent from the source to the RP, which then distributes the multicast traffic. The multicast traffic follows the RPT and ultimately reaches the terminal network where each receiver is located.

[0203] 3. Internet Group Management Protocol (IGMP).

[0204] The multicast source node establishes the membership of the multicast group by sending IGMP messages such as joining 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 general group query messages to query membership; the multicast node sends a report message in response to the query. 3.3. Member query message suppression: The time when the multicast node sends the 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: When a new multicast node wants to join the multicast group, it does not need to wait for the query message from the querier, but actively sends a report message. 3.5. Member departure: 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.

[0205] Specifically, the process for establishing an MDT using the IGMP protocol is as follows: a multicast sink node sends an Internet Group Management Protocol (IGMP) join message to a communication device (which acts as the designated router (DR) of the multicast sink node). This IGMP join message informs the communication device that the multicast sink node wishes to join a specific multicast group. This communication device then sends a Protocol Independent Multicast (PIM) join message to other upstream communication devices, notifying them of the multicast sink node's desire to join a specific multicast group. Hop-by-hop communication devices then perform similar processes to complete the establishment of the multicast MDT.

[0206] Next, we will introduce the current multicast communication scenario. A possible scenario is shown in Figure 4, which is a schematic diagram of a multicast communication scenario. This 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; and forwarding nodes 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. In the multicast communication scenario shown in Figure 4, whether PIM-DM or PIM-SM is used to build 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 Figure 4, sink nodes 3, 6, 7, 9, and A join a multicast group of source node 0. These sink nodes 3, 6, 7, 9, and A send IGMP join messages to join the multicast group. Forwarding nodes (e.g., forwarding nodes 3, 9, A, and B) send PIM join messages to the previous-hop forwarding node hop by hop to build the MDT. Forwarding node 9, for example, sends a PIM join message to the previous-hop node. Forwarding node 9 can choose to send the PIM join message to either forwarding node 4 or forwarding node 5. Similarly, each node randomly selects an equal-cost path to send an IGMP join / PIM join message.

[0207] The MDT forwarding path ultimately constructed using the above approach is shown in Figure 4. To reduce network bandwidth utilization, the multicast distribution tree needs to replicate multicast data as far away from the multicast source node as possible, achieving "forked" forwarding of multicast data. Clearly, the MDT forwarding path illustrated in Figure 4 is not an optimal MDT. The optimal path for multicast traffic from source node 0 to destination node A is forwarding node 6 - forwarding node 2 - forwarding node 1 - forwarding node 4 - forwarding node B. However, using current MDT construction methods may result in a non-optimal MDT, for example: forwarding node 6 - forwarding node 2 - forwarding node 1 - forwarding node 5 - forwarding node B, resulting in wasted network bandwidth. In summary, the applicant has discovered that the large number of messages required to interact during the current MDT construction process places high demands on the performance of the communication device. Furthermore, this leads to high network bandwidth utilization, impacting communication efficiency. The large number of messages required to interact often results in slow MDT convergence, preventing rapid MDT construction.

[0208] Based on this, an embodiment of the present application proposes a multicast communication method in which a first communication device constructs and forwards a first message, enabling a second communication device belonging to a first multicast distribution tree (MDT) to establish a first MDT. Because the first message carries 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, allowing all communication devices along the multicast forwarding path to establish the first MDT based on the first message. The first message carrying the first multicast information enables efficient MDT establishment. Compared to current MDT establishment methods, this method can effectively reduce the performance requirements placed on communication devices, reduce network bandwidth utilization, and improve communication efficiency. This in turn improves the MDT establishment and convergence rate, enabling rapid MDT establishment.

[0209] The embodiments of the present application are described in detail below with reference to 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 the 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.

[0210] With respect to Figure 5 , further optionally, the communication scenario includes multiple second communication devices. For example, the communication scenario includes N second communication devices, where N is a positive integer greater than 1. For the nth second communication device, there is a previous hop node, which is the n-1th second communication device, where n is a positive integer less than or equal to N.

[0211] 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 playback device, 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 one possible implementation, the communication device may be a physical entity in the network or a device in a physical entity (for example, a chip or a functional module). Alternatively, in one possible implementation, the communication device may be a virtual device (for example, a virtual machine or a container) running in a physical entity. For example, the virtual device may be a virtual router or a virtual switch.

[0212] Next, the multicast communication method proposed in the embodiment of the present application is introduced. Please refer to Figure 6, which is a schematic diagram of an embodiment of the multicast communication method in the embodiment of the present application. The multicast communication method proposed in the embodiment of the present application includes:

[0213] 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.

[0214] In step S1, a first communication device obtains information related to a first multicast group and then constructs a first message based on 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.

[0215] In one 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 within the communication domain by calling the Message Passing Interface (MPI) "MPI_Comm_create()". 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 the 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 considered to be 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 nodes 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.

[0216] In another possible implementation, the first communication device obtains a configuration file of the 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 the node information in the first multicast group. The node information of the 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 the network manager that manages the first multicast group based on business demand information, or it can be constructed by the business platform that manages the first multicast group based on business demand, and the embodiment of the present application does 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.

[0217] The first communication device constructs a first message based on 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. 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.

[0218] 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 this embodiment of the present application.

[0219] In one 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 this embodiment of the present application.

[0220] Optionally, the first message also carries a first identifier, which indicates that the first message is used to establish the first MDT. In one possible implementation, the first identifier may be a destination port number in the first message, such as a User Datagram Protocol (UDP) destination port number. A special UDP destination port number is used to indicate that the first message is used to establish 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. The first identifier improves the efficiency of the second communication device in identifying and processing the first message.

[0221] 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.

[0222] 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: the address information of the next hop node; source address: the address information of the current node; first multicast information: the address information of the multicast source node, the address information of the multicast group, and the address information of the multicast destination node.

[0223] S2. The first communication device sends a first message to the second communication device.

[0224] 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 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. When multicast source node 0 (the first communication device) generates a first message, the first multicast information carried in the first message includes the address information of multicast source node 0, the address information of the first multicast group, the address information of multicast sink node 3, the address information of multicast sink node 6, the address information of multicast sink node 7, the address information of multicast sink node 9, and the address information of multicast sink node A. Since the access network device of the multicast source node is forwarding node 6 (forwarding node 6 is considered the second communication device), the destination address of the first message is determined to be the address of forwarding node 6. The first communication device then sends the first message to forwarding node 6.

[0225] S3. The second communication device constructs a first multicast distribution tree MDT according to the first message.

[0226] 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).

[0227] In conjunction with the above embodiments, 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. The multicast communication method proposed in the embodiment of the present application also includes:

[0228] 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.

[0229] 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 based on the first multicast information carried in the first message.

[0230] In one possible implementation, regarding how the second communication device determines the multicast forwarding path indicated by the first MDT, please refer to FIG9 , 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:

[0231] F1. Determine a first multicast forwarding table according to the first multicast information.

[0232] In step F1, the second communication device determines a first multicast forwarding table based on the first multicast information. In this embodiment of the present application, the multicast forwarding table associated with 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 multicast forwarding table, so that each node in the network can establish the first multicast forwarding table. The second communication device needs to determine the forwarding path of the first message based on 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.

[0233] 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 above key and value constitute a key-value pair. The key value has a unique correspondence 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 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 one possible implementation method, the key includes: the address information of the multicast source node (referred to as the multicast source address for short), and the multicast source address is represented by "S"; the address information of the multicast group (referred to as the multicast group address for short), and the multicast group address is represented by "G". Taking Figure 10 as an example, the key<S1,G1> For 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 this hop) include: outbound interface 1, outbound interface 4, and outbound interface 6. And so on:<S2,G2> Corresponding 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 the local node (or called the local hop) include: outbound interface 2 and outbound interface 5.

[0234] The following describes how the second communication device determines the first multicast forwarding table. In one possible implementation, please refer to FIG11 , 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:

[0235] G1. Determine a first key value from the first multicast information, where the first key value includes part of the first multicast information.

[0236] In step G1, the second communication device determines a first key value from the first multicast information. The first key value includes a portion of the first multicast information. There are various possible implementations of the first key value. For example, 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 present application is not limited to this.

[0237] G2. Search, based on the first key value, whether the second communication device has a first multicast forwarding table associated with the first key value.

[0238] In step G2, the second communication device locally stores one or more multicast forwarding tables, each of which indicates the outbound interface of a multicast group on the second communication device. Because the multicast forwarding table is composed of key-value pairs, a search can be performed based on the first key value to determine whether the second communication device has a first multicast forwarding table associated with the first key value, where the first multicast forwarding table includes the first key value.

[0239] In a possible implementation, the second communication device may query whether a first multicast forwarding table associated with the first key value exists locally.

[0240] In another possible implementation, the second communication device sends a query request to a third-party device, the query request carrying a first key value. The third-party device queries, based on the query request, whether a first multicast forwarding table related to the second communication device and associated with the first key value exists. 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.

[0241] It is understood that the multicast forwarding table involved in the embodiments of the present application may also have other implementations, which are not limited by the embodiments of the present application. For example, it may be 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 on the current hop.

[0242] 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 .

[0243] G3. Determine the first multicast forwarding table.

[0244] 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.

[0245] G4. Create the first multicast forwarding table.

[0246] 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 outgoing interface included in the first multicast forwarding table is empty, and the key of the first multicast forwarding table is the first key value.

[0247] F2. Determine a target outbound interface in a routing table of the second communication device according to the first multicast information.

[0248] In step F2, the first multicast forwarding table has been determined by 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, based on 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.

[0249] Regarding how the second communication device determines the target outbound interface, in a possible implementation, please refer to FIG12 , 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:

[0250] H1. Determine a first outbound interface set from a 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 a multicast destination node.

[0251] In step H1, the second communication device performs a lookup in its routing table based on the address information of the multicast destination node included in the first multicast information, and determines an outbound interface of the second communication device that can reach the multicast destination node (the multicast destination node indicated by the first multicast information). For ease of description, the outbound interfaces of the second communication device that can reach the multicast destination node are referred to as a first outbound interface set. The first outbound interface set includes one or more outbound interfaces.

[0252] For ease of understanding, the scenario shown in FIG14 is used as an example. In the scenario shown in FIG14 , the first multicast group includes 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. Taking the second communication device as forwarding node 6 as an example, the next-hop nodes that can reach multicast sink node 3, multicast sink node 6, multicast sink node 7, multicast sink node 9, and multicast sink node A include forwarding node 2 and forwarding node 3. Therefore, the outbound interface of forwarding node 6 pointing to forwarding node 2 and the outbound interface of forwarding node 6 pointing to forwarding node 3 are used as the first outbound interface set.

[0253] H2. Detect whether a third outbound interface set exists. The third outbound interface set is the intersection of the first outbound interface set and the second outbound interface set. The second outbound interface set is the outbound interfaces included in the first multicast forwarding table.

[0254] 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. The second communication device then checks whether there is an intersection between the first outbound interface set and the second outbound interface set determined in step H1. This intersection is referred to as the third outbound interface set. If so, the process proceeds to step H3; if not, the process proceeds to step H4.

[0255] H3. Determine the target outbound interface from the third outbound interface set.

[0256] 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:

[0257] When the third outbound interface set includes multiple outbound interfaces, that is, the second communication device can reach the multiple multicast destination nodes included in the first multicast group through multiple forwarding nodes, and multiple forwarding paths exist for the second communication device to reach the multiple multicast destination nodes included in the first multicast group. The second communication device selects the path with the lowest path cost based on the multiple outbound interface information, and then uses the outbound interface information corresponding to the path with the lowest path cost as the target outbound interface.

[0258] Furthermore, if there are multiple equal-cost paths from the second communication device to the multicast destination node of the first multicast group (i.e., multiple forwarding paths with the same path cost), a forwarding path from the multiple equal-cost paths can be randomly selected as the target path, and the outbound interface corresponding to the target path on the second communication device can be used as the target outbound interface. Alternatively, a path from the multiple equal-cost paths can be selected as the target path and the target outbound interface can be determined according to a preset rule. The preset rule includes, but is not limited to, determining the forwarding path corresponding to the target outbound interface according to a modulo-2 operation.

[0259] 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 2 operation, 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.

[0260] H4. Determine a target outbound interface from the first outbound interface set.

[0261] In step H4, if the third outgoing interface set does not exist, the target outgoing interface is determined from the first outgoing interface set. The specific method of determining the target outgoing interface is similar to that of determining the target outgoing interface in step H3 and is not described here in detail.

[0262] F3. Update the first multicast forwarding table according to the target outbound interface. The updated first multicast forwarding table includes the target outbound interface.

[0263] In step F3, after the target outgoing interface is determined through 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.

[0264] D2. The second communication device sends a first message to a third communication device according to the multicast forwarding path corresponding to the first MDT. The third communication device is the next hop node of the second communication device in the multicast forwarding path indicated by the first MDT.

[0265] In step D2, after the second communication device determines the multicast forwarding path corresponding to the first MDT using 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. The third communication device can be a forwarding node in the network or a multicast sink node.

[0266] 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 one 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:

[0267] K1. Classify multiple multicast sink nodes included in the first multicast group according to target outbound interfaces corresponding to the multicast sink nodes to obtain a first classification result. The first classification result indicates one or more types of multicast sink nodes. The same group of multicast sink nodes corresponds to the same target outbound interface in the second communication device.

[0268] In step K1, to further improve communication efficiency, the multiple multicast sink nodes included in the first multicast group may be classified according to the target outbound interfaces corresponding to the multicast sink nodes to obtain a first classification result. The first classification result indicates one or more groups of multicast sink nodes, where the same group of multicast sink nodes corresponds to the same target outbound interface in the second communication device.

[0269] For easier understanding, please refer to Figure 15 , which is as follows: When the second communication device is forwarding node 2, multicast sink node 3 belongs to group #1, and the target outbound interface corresponding to group #1 points to forwarding node 7. Multicast sink nodes 6, multicast sink node 7, multicast sink node 9, and multicast sink node A belong to group #2, and the target outbound interface corresponding to group #2 points to forwarding node 1. When the second communication device is forwarding node 4, multicast sink node 6 and multicast sink node 7 belong to group #1, and the target outbound interface corresponding to group #1 points to forwarding node 9. Multicast sink node #9 belongs to group #2, and the target outbound interface corresponding to group #2 points to forwarding node A. Multicast sink node #A belongs to group #3, and the target outbound interface corresponding to group #3 points to forwarding node B.

[0270] K2. Update the first message according to the first classification result, where 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.

[0271] 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 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. 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.

[0272] For example, 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 destination 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 destination node 6, the address information of multicast destination node 7, the address information of multicast destination node 9 and the address information of multicast destination node A, and so on.

[0273] 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.

[0274] In step K3, based on the second multicast information carried in the updated first message, the next hop node indicated by the second multicast information is determined, namely, the third communication device. The updated first message is then forwarded to the third communication device. This ensures that all forwarding nodes along the forwarding path indicated by the first MDT receive the first message and construct a first multicast forwarding table based on the first message. This completes the construction of the first MDT. On the first MDT, information about the first message sent from multicast source node 0 to the first messages sent by each forwarding node is shown in Table 1.

[0275] Table 1

[0276] For example, Figure 16 is a schematic diagram of another communication scenario involved in the embodiments of the present application. Taking the first multicast group shown in Figure 15 as an example, after the first MDT is constructed, the forwarding path indicated by the first MDT is shown in Figure 16.

[0277] An embodiment of the present application provides a multicast communication method. A first communication device constructs and forwards a first message, enabling a second communication device belonging to a first multicast distribution tree (MDT) to establish a first MDT. Because the first message carries 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, allowing all communication devices along the multicast forwarding path to establish the first MDT based on 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) based on the first message. The second communication device then forwards the first message to a next-hop node (a third communication device) based on the multicast forwarding path indicated by the first MDT, instructing the third communication device to establish the first MDT. The second communication device establishes the first MDT by processing and forwarding the first message, thereby obtaining the multicast forwarding path indicated by the first MDT. Efficient MDT establishment is achieved through the first message carrying the first multicast information. Compared to current MDT establishment methods, this method can significantly reduce the performance requirements placed on communication devices. Reduce network bandwidth usage and improve communication efficiency, thereby increasing the MDT construction and convergence rate, and achieving rapid MDT construction.

[0278] In conjunction with the aforementioned embodiment, when the multicast destination node of the first multicast group changes, the first multicast information carried in the first message may also change accordingly in response to the change. 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 to the first multicast information; when a new multicast destination node is added to the first multicast group, the multicast source node deletes the address information of the new multicast destination node from the first multicast information.

[0279] 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 perceives 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). 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.

[0280] 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 goes offline), the multicast source node 0 perceives that the multicast destination node 3 has exited 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). 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.

[0281] The above method allows for efficient MDT construction when the multicast sink node in a multicast group changes. Compared to current MDT construction methods, it can effectively reduce the performance requirements for communication devices, lower network bandwidth utilization, and improve communication efficiency.

[0282] 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.

[0283] Figure 21 is a structural diagram of a communication device 2100 provided in an embodiment of the present application. As shown in Figure 21, the communication device 2100 includes: a transceiver module 2102 and a processing module 2101.

[0284] 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. For specific details, please refer to the above-mentioned method embodiment. For the sake of brevity, they will not be repeated here.

[0285] In one example, the communication device 2100 is used as a first communication device, and the communication device 2100 includes:

[0286] A processing module 2101 is configured to construct a first message, where the first message carries first multicast information, where the first multicast information indicates communication devices included in a first multicast group, where the first communication devices are multicast source nodes in the first multicast group.

[0287] The transceiver module 2102 is configured to send the first message to the second communication device, where 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.

[0288] In a possible implementation, 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 sink node in the first multicast group.

[0289] 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 sink node is the IP address of the multicast sink node.

[0290] In a possible implementation, the first message carries a first identifier, where the first identifier indicates that the first message is used to construct the first MDT.

[0291] In a possible implementation, the first identifier is a User Datagram Protocol (UDP) destination port number.

[0292] In one possible implementation,

[0293] The transceiver module 2102 is further configured to obtain a node information set, where 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;

[0294] The processing module 2101 is further configured to construct the first message according to the node information set.

[0295] In one possible implementation,

[0296] The processing module 2101 is further configured to obtain the node information set after creating the communication domain corresponding to the first multicast group;

[0297] or,

[0298] 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.

[0299] In one possible implementation,

[0300] The processing module 2101 is further configured to determine, based on 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.

[0301] In one possible implementation,

[0302] 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.

[0303] In one possible implementation,

[0304] The transceiver module 2102 is further configured to obtain the address information of the first multicast group after creating the communication domain corresponding to the first multicast group;

[0305] or,

[0306] 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.

[0307] In one possible implementation,

[0308] The processing module 2101 is further configured to determine that the multicast sink node included in the first multicast group changes;

[0309] The processing module 2101 is further configured to modify the first message in response to a change in the multicast destination node included in the first multicast group, wherein the first multicast information carried in the modified first message corresponds to the changed first multicast group.

[0310] In one possible implementation,

[0311] The processing module 2101 is further configured to modify the first message in response to the first node going offline, where the first multicast information carried in the modified first message does not include the address information of the first node, wherein the first node belongs to the first multicast group;

[0312] 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.

[0313] In another example, the communication device 2100 is used as a second communication device, and the communication device 2100 includes:

[0314] a transceiver module 2102 configured to receive a first message from a previous hop node, the first message carrying first multicast information, the first multicast information indicating communication devices included in a first multicast group, multicast data in the first multicast group being forwarded along a multicast forwarding path indicated by a first multicast distribution tree (MDT), and the first communication device being a multicast source node in the first multicast group;

[0315] The processing module 2101 is configured to determine a multicast forwarding path indicated by the first MDT according to the first multicast information;

[0316] The transceiver module 2102 is further configured 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 establish the first MDT.

[0317] In a possible implementation, 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 sink node in the first multicast group.

[0318] In one possible implementation,

[0319] The processing module 2101 is further configured to determine a first multicast forwarding table based on the first multicast information, where the first multicast forwarding table includes a target outbound interface that can reach the multicast sink node included in the first multicast group, and the first multicast forwarding table indicates a multicast forwarding path corresponding to the first MDT.

[0320] In one possible implementation,

[0321] The processing module 2101 is further configured to determine the first multicast forwarding table according to the first multicast information;

[0322] The processing module 2101 is further configured to determine the target outbound interface in the routing table of the second communication device according to the first multicast information;

[0323] The processing module 2101 is further configured to update the first multicast forwarding table according to the target outbound interface, where the updated first multicast forwarding table includes the target outbound interface.

[0324] In one possible implementation,

[0325] The processing module 2101 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;

[0326] The processing module 2101 is further configured to search, based on the first key value, whether the second communication device has the first multicast forwarding table associated with the first key value;

[0327] The processing module 2101 is further configured to create the first multicast forwarding table if the first multicast forwarding table does not exist;

[0328] The processing module 2101 is further configured to determine the first multicast forwarding table if it exists.

[0329] In one possible implementation,

[0330] 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, where the outbound interfaces included in the first outbound interface set can reach the multicast sink node, and the first outbound interface set includes at least one outbound interface;

[0331] The processing module 2101 is further configured to detect whether a third outbound interface set exists, 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;

[0332] 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;

[0333] 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.

[0334] In one possible implementation,

[0335] 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, where 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;

[0336] 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;

[0337] The transceiver module 2102 is further configured to forward the updated first message to the third communication device, where the third communication device is the next hop node indicated by the second multicast information.

[0338] In one possible implementation,

[0339] 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;

[0340] 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 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.

[0341] When the communication device 2100 executes the above-described method embodiment, the division of the above-described functional modules is used only as an example. In actual applications, the above-described functions can be assigned to different functional modules as needed, that is, the internal structure of the communication device 2100 can be 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-described embodiment and the embodiment method corresponding to Figures 6 to 20 above are based on the same concept. The specific implementation process is detailed in the above-described method embodiment and will not be repeated here.

[0342] 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.

[0343] 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, Figure 22 does not show various other features 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 CPUs) 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.

[0344] 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 communications between system components. The memory 2204 may include non-volatile memory, such as read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The memory 2204 may also include volatile memory, which may be random access memory (RAM) used as an external cache.

[0345] In some implementations, the memory 2204 or the non-transitory computer-readable storage medium of the 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 .

[0346] 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 .

[0347] 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.

[0348] It should be understood that in this 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 when necessary to implement the functions of the transceiver unit.

[0349] 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.

[0350] The specific structure of the communication device described in Figure 22 of this application can be shown in Figure 23.

[0351] FIG23 is a schematic structural diagram 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 .

[0352] Main control board 2310, also known as the main processing unit (MPU) or route processor, is responsible for controlling and managing various components in communication device 2300, including routing calculation, device management, device maintenance, and protocol processing. Main control board 2310 includes a central processing unit (CPU) 2311 and memory 2312.

[0353] Interface board 2330 is also known as a line processing unit (LPU), line card, or service board. It provides various service interfaces and implements data packet forwarding. Service interfaces include, but are not limited to, Ethernet interfaces and POS (Packet over SONET / SDH) interfaces. Interface board 2330 includes a central processing unit (CPU) 2331, a network processor (NPU) 2332, a forwarding table memory 2334, and a physical interface card (PIC) 2333.

[0354] The central processing unit 2331 on the interface board 2330 is used to control and manage the interface board 2330 and communicate with the central processing unit 2311 on the main control board 2310 .

[0355] The network processor 2332 is used to implement packet forwarding processing and can be in the form of a forwarding chip.

[0356] The physical interface card 2333 is used to implement the physical layer docking function. The original traffic enters the interface board 2330 from this physical interface card, 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, also known as a daughter card, can be installed on the interface board 2330. It is responsible for converting the optical and electrical signals into messages and performing a validity check on the messages before forwarding them to the network processor 2332 for processing. In some embodiments, the central processing unit 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.

[0357] Optionally, the communication device 2300 includes multiple interface boards. For example, the communication device 2300 further includes an interface board 2340 . The interface board 2340 includes: a central processing unit 2341 , a network processor 2342 , a forwarding table entry memory 2344 and a physical interface card 2343 .

[0358] 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). If the communication device includes multiple interface boards 2330, the switching fabric board 2320 is used to exchange data between the interface boards. For example, the interface board 2330 and the interface board 2340 can communicate via the switching fabric board 2320.

[0359] 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 via a system bus and / or a system backplane. In one possible implementation, an inter-process communication (IPC) channel is established between the main control board 2310 and the interface board 2330, and communication between the main control board 2310 and the interface board 2330 is performed via the IPC channel.

[0360] Logically, 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 that perform 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 device status. The control plane sends the generated forwarding table to the forwarding plane. On the forwarding plane, the network processor 2332 forwards messages 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 forwarding plane can be completely separate and not located on the same device.

[0361] 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 processing unit 2311 or the central processing unit 2331 in the communication device 2300, or can be equivalent to the program code or instructions stored in the memory 2312.

[0362] It should be understood that the operations on the interface board 2340 in the embodiment of the present application are consistent with the operations on the interface board 2330. For the sake of brevity, detailed description is omitted. It should be understood that the communication device 2300 of this embodiment may correspond to the first communication device or the second communication device in each of the above-mentioned method embodiments. The main control board 2310, interface board 2330, and / or interface board 2340 in the communication device 2300 may implement the functions and / or various steps of the first communication device or the second communication device in each of the above-mentioned method embodiments. For the sake of brevity, detailed description is omitted here.

[0363] It's worth noting that there may be one or more main control boards (SBCs), which may include a primary SBC and a backup SBC. There may be one or more interface boards. The higher the data processing capability of a communication device, the more interface boards are provided. An interface board may also have one or more physical interface cards. There may be no SBCs, or one or more. Multiple SBCs can be used to achieve load balancing and redundant backup. In a centralized forwarding architecture, a communication device may not require a SBC; the interface board handles service data processing for the entire system. In a distributed forwarding architecture, a communication device may have at least one SBC, which enables data exchange between multiple interface boards, providing high-capacity data exchange and processing capabilities. Alternatively, a communication device may have only one SBC, i.e., no SBC. The functions of the interface board and the SBC are integrated on this single SBC. In this case, the central processing unit (CPU) on the interface board and the CPU on the SBC can be combined into a single CPU on this single SBC, performing the combined functions of the two. The specific architecture to be adopted depends on the specific network deployment scenario and is not intended to be exclusive here.

[0364] In some possible embodiments, 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 messages. 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-purpose physical server in combination with network function virtualization (NFV) technology.

[0365] An embodiment of the present application also provides a computer-readable storage medium, comprising 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.

[0366] An embodiment of the present application also provides a computer program product, which includes computer program code. When the computer program code runs on a computer, it enables the computer to execute any one of the implementation methods shown in the aforementioned method embodiments.

[0367] 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 in the method embodiments corresponding to Figures 6 to 20 above.

[0368] The present application also provides a chip system including a processor and an interface circuit, wherein the interface circuit is configured to receive instructions and transmit them to the processor, wherein the processor is configured to implement any of the above method embodiments.

[0369] Optionally, the chip system further includes a memory, and the chip system may include one or more processors. The processor may be implemented in hardware or software. When implemented in hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented in software, the processor may be a general-purpose processor that implements any of the above method embodiments by reading software code stored in the memory.

[0370] Optionally, the memory in the chip system may be one or more memories. The memory may be integrated with the processor or may be provided separately from the processor, which is not limited in this application. For example, 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 provided on different chips. This application does not specifically limit the type of memory or the configuration of the memory and the processor.

[0371] 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 sequentially, 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.

[0372] It should be understood that “one embodiment” or “an embodiment” mentioned throughout the specification means that the 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 the various embodiments of the present application, the size of the sequence numbers of the above-mentioned processes does not mean the order of execution. 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 embodiments of the present application.

[0373] The term "and / or" in this document simply describes a relationship between related objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone. Additionally, the character " / " in this document generally indicates that the related objects are in an "or" relationship.

[0374] It should be understood that in the embodiments of the present application, "B corresponding to A" means that B is associated with A and B can be determined based on A. However, it should also be understood that determining B based on A does not mean determining B based solely on A, but B can also be determined based on A and / or other information.

[0375] Those skilled in the art will 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.

[0376] In the several embodiments provided in this 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 merely schematic. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods, such as 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 interface, device or unit, which can be electrical, mechanical or other forms.

[0377] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0378] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

Claims

1. A multicast communication method, It is characterized in that include: 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; 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.

2. The method according to claim 1, It 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.

3. The method according to claim 2, It 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 sink node is the Internet Protocol IP address of the multicast sink node.

4. The method according to any one of claims 1 to 3, It is 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.

5. The method according to claim 4, It is characterized in that The first identifier is a User Datagram Protocol UDP destination port number.

6. The method according to any one of claims 1 to 5, It is characterized in that The first communication device constructs the first message, including: 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.

7. The method according to claim 6, It is characterized in that The first communication device acquires the node information set, including: 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.

8. The method according to any one of claims 1 to 7, It is characterized in that The first communication device constructs the first message, including: 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.

9. The method according to claim 8, It is characterized in that The first communication device determines, according to the first multicast information, the address information of the second communication device from a routing table of the first communication device, including: 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.

10. The method according to any one of claims 2 to 9, It is 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.

11. The method according to any one of claims 1 to 10, It is 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.

12. The method according to claim 11, It is 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, where the first multicast information carried by the modified first message corresponds to the changed first multicast group, including: 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.

13. A multicast communication method, It is characterized in that include: 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; The second communication device determines, according to the first multicast information, a multicast forwarding path indicated by the first 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.

14. The method according to claim 13, It 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.

15. The method according to claim 13 or 14, It is characterized in that The second communication device determines, according to the first multicast information, a multicast forwarding path indicated by the first MDT, including: 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.

16. The method according to claim 15, It is characterized in that The second communication device determines the first multicast forwarding table according to the first multicast information, including: 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.

17. The method according to claim 16, It is characterized in that The second communication device determines the first multicast forwarding table according to the first multicast information, including: 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.

18. The method according to claim 16, It is characterized in that The second communication device determines the target outgoing interface in a routing table of the second communication device according to the first multicast information, including: 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.

19. The method according to any one of claims 13 to 18, It is characterized in that 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 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.

20. The method according to claim 19, It is characterized in that The method further comprises: 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.

21. A communication device, It is characterized in that including a processor and memory, The memory is used to store computer programs or instructions; 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.

22. A computer-readable storage medium comprising instructions, It is 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.

23. A computer program product comprising a program, It is 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.

24. A chip system, It is characterized in that The chip system includes at least one processor, and when the 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.

Citation Information

Patent Citations

  • Multicast message sending method and device

    CN115134289A

  • Route generation method and device and storage medium

    CN115801663A

  • Distributed generation of hierarchical multicast forwarding structures

    US8908686B1

Cited By

  • Multicast transmission method and device and electronic equipment

    CN120768848A