Multicast data forwarding method and switching device

By obtaining information on the bandwidth used on the links and selecting the minimum link to transmit multicast traffic, the problem of unbalanced load on equivalent links is solved, thereby improving the quality of multicast service.

CN121967306APending Publication Date: 2026-05-01HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2024-10-30
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

In existing multicast methods, load imbalance on equivalent links can cause traffic bursts on some links, affecting the quality of multicast services.

Method used

By obtaining the used bandwidth information of the links, the link with the least used bandwidth is selected to transmit multicast traffic, and the link load is dynamically adjusted to achieve load balancing.

Benefits of technology

This reduces the degradation of multicast service quality caused by sudden traffic spikes on some links, improves link load balancing, and enhances multicast service quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121967306A_ABST
    Figure CN121967306A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a multicast data forwarding method, which can select a link with least used bandwidth information for a multicast group, and the used bandwidth information of the link can be increased when multicast traffic is sent on the link, so that the load balance of an equivalent link is realized. The method comprises the following steps: after receiving a multicast joining message comprising a multicast group identifier, acquiring a minimum value from used bandwidth information of at least two links, then allocating a first link corresponding to the minimum value to a multicast group corresponding to the multicast group identifier, and transmitting first multicast data of the multicast group through the first link. The invention further provides an exchange device capable of realizing the method.
Need to check novelty before this filing date? Find Prior Art

Description

A method for forwarding multicast data and a switching device Technical Field

[0001] This application relates to the field of communications, and more particularly to a method for forwarding multicast data and a switching apparatus. Background Technology

[0002] Multicast refers to sending multicast data from a multicast source to a specific group of multicast receiving devices.

[0003] One current multicast method is roughly as follows: there are multiple equivalent links between the multicast source and the multicast receiving device. After the switching device receives the multicast join message, it selects the link with the fewest multicast groups for the multicast group corresponding to the multicast join message. Then the multicast source sends the multicast data of the multicast group through the link, so that the number of multicast groups on each link is the same or similar.

[0004] However, the bandwidth of different multicast groups varies greatly. When two links transmit the same amount of multicast data, their bandwidth may differ significantly, resulting in unbalanced link load. Summary of the Invention

[0005] This application provides a method for forwarding multicast data. This method selects the link with the least used bandwidth information for a multicast group. Sending multicast traffic on this link increases the used bandwidth information of that link, making the multicast traffic on equivalent links similar or equal, thereby achieving load balancing of equivalent links. This reduces the degradation of multicast service quality caused by traffic bursts on some links. This application also provides switching apparatus, switching equipment, computer-readable storage media, and computer program products capable of implementing the above method.

[0006] A first aspect provides a method for forwarding multicast data. This method is applied to a first switching device in a communication system, which further includes a second switching device connected to a multicast source. At least two equivalent links exist between the first and second switching devices. The method includes: receiving a multicast join message including a multicast group identifier from a multicast receiving device; obtaining a minimum bandwidth value from the used bandwidth information of the at least two links; allocating a first link corresponding to the minimum bandwidth value to the multicast group corresponding to the multicast group identifier; and transmitting the first multicast data of the multicast group through the first link. The used bandwidth information of the link is the sum of the traffic bandwidth information of all multicast groups in the link.

[0007] By implementing this method, the link with the least used bandwidth information can be selected for the multicast group. Sending multicast traffic on this link will increase the used bandwidth information of that link, making the multicast traffic on equivalent links similar or equal, thereby achieving load balancing of equivalent links and reducing the degradation of multicast service quality caused by traffic bursts on some links.

[0008] In conjunction with the first aspect, in the first possible implementation, the used bandwidth information is either the used bandwidth value or the link utilization rate. When the first link has the smallest used bandwidth value, the multicast traffic on the equivalent links can be made similar or equal. The link utilization rate is the ratio of used bandwidth to the total link bandwidth. When the target link has the smallest link utilization rate, the proportion of multicast traffic on the equivalent links can be made similar or equal.

[0009] In conjunction with the first aspect, in a second possible implementation, the multicast data forwarding method of this application further includes: when the first switching device stores historical traffic bandwidth information of the multicast group, updating the used bandwidth information of the first link to the sum of the minimum value and the historical traffic bandwidth information of the multicast group; when the first switching device does not store historical traffic bandwidth information of the multicast group, updating the used bandwidth information of the first link to the sum of the minimum value and the traffic bandwidth reference value. The traffic bandwidth reference value can be, but is not limited to, a bandwidth threshold. Accordingly, before obtaining the actual traffic bandwidth of the multicast group, the traffic bandwidth of the multicast group can be estimated, and the used bandwidth information of the link can be dynamically updated based on the estimated traffic bandwidth. Then, based on the updated link used bandwidth information, the least idle link is selected for subsequent multicast groups, ensuring load balancing of equivalent links. Optionally, the historical traffic bandwidth information stored by the first switching device is greater than the bandwidth threshold, i.e., the first switching device stores large traffic bandwidth information and does not store small traffic bandwidth information, thus saving storage resources occupied by traffic bandwidth information.

[0010] In a third possible implementation, combining the first aspect or the second possible implementation of the first aspect, the multicast data forwarding method further includes: acquiring the traffic bandwidth information of the first multicast data and the current used bandwidth information of the first link; when the first switching device stores historical traffic bandwidth information of the multicast group, determining the first difference as the difference between the current used bandwidth information of the first link and the historical traffic bandwidth information of the multicast group, and updating the used bandwidth information of the first link to the sum of the first difference and the traffic bandwidth information of the first multicast data; when the first switching device does not store historical traffic bandwidth information of the multicast group, determining the second difference as the difference between the current used bandwidth information of the first link and the traffic bandwidth reference value, and updating the used bandwidth information of the first link to the sum of the second difference and the traffic bandwidth information of the first multicast data. This allows updating the used bandwidth information of the link based on the actual traffic bandwidth of the multicast group, improving the accuracy of selecting the least busy link.

[0011] In conjunction with the third possible implementation of the first aspect, in the fourth possible implementation, when the ratio of the traffic bandwidth information of the first multicast data to the total bandwidth of the first link is greater than or equal to a preset ratio, and the traffic bandwidth information of the first multicast data is less than the difference between the used bandwidth information of the first link and the used bandwidth information of the second link, the link corresponding to the multicast group is switched from the first link to the second link. The second link is used to transmit the second multicast data of the multicast group. Here, the second link is the link with the minimum used bandwidth information at the current moment.

[0012] When the multicast group has a large bandwidth and the used bandwidth of the link where the multicast group is located differs significantly from the used bandwidth of the minimum link (i.e., the second link), the multicast data of the multicast group is switched to the minimum link for transmission. This makes the load of the second link and the first link closer, thereby achieving link load balancing.

[0013] In conjunction with the third possible implementation of the first aspect, in the fifth possible implementation, when the ratio of the traffic bandwidth information of the first multicast data to the total bandwidth of the first link is greater than or equal to a preset ratio, and the traffic bandwidth information of the first multicast data is less than the difference between the used bandwidth information of the first link and the used bandwidth information of the second link, the link is not switched. Multicast data with low traffic does not switch links, thus minimizing the impact on link load and reducing the number of link switches, thereby reducing the degradation of multicast service quality caused by link switching.

[0014] In a sixth possible implementation, combining the first aspect or other possible implementations, when the first switching device detects a failure in at least one of the at least two links, it sequentially selects multicast group identifiers from the multicast group identifiers corresponding to the failed link as multicast group identifiers to be processed. It then associates these multicast group identifiers with the normal links among the at least two links, receives third multicast data through the normal link associated with the multicast group identifier, and sends the third multicast data to the multicast receiving device. This allows multicast traffic to be sent through the normal links even when the failed link cannot send multicast traffic, thus improving the quality of multicast service.

[0015] In conjunction with the sixth possible implementation of the first aspect, another possible implementation involves associating the multicast group identifier to be processed with a normal link among at least two links, including steps A to C. Step A includes: determining the minimum used bandwidth information among the normal links of at least two links; step B includes: associating the multicast group identifier to be processed with the link having the minimum used bandwidth information among the normal links of at least two links; step C includes: updating the used bandwidth information of the link associated with the multicast group identifier to the sum of the traffic bandwidth information corresponding to the multicast group identifier to be processed and the minimum used bandwidth information among the normal links, and repeating steps A to C until the end. This allows for dynamic selection of the link with the minimum used bandwidth information, sequentially distributing the multicast group traffic to the link with the minimum used bandwidth information. When there are multiple normal links, load balancing can be achieved across multiple links.

[0016] In conjunction with the first aspect or the above possible implementations, in another possible implementation, the first multicast join message is an Internet Group Management Protocol (IGMP) join message or a Multicast Listener Discovery (MLD) join message, and the second multicast join message is a Protocol Independent Multicast (PIM) join message. This allows for the establishment of a multicast distribution tree based on the second multicast join message.

[0017] A second aspect provides a method for forwarding multicast data. This method is applied to a first switching device in a communication system, which further includes a second switching device connected to a multicast source. At least two equivalent links exist between the first and second switching devices. The method includes: receiving a first multicast join message including a multicast group identifier from a multicast receiving device; determining the link corresponding to the multicast group identifier as the first link (i.e., the link carrying the fewest multicast groups among at least two links); and then sending a second multicast join message to the multicast source through the first link; the multicast source then sends a first multicast join message based on the second multicast join message. Subsequently, the first multicast data is received through the first link, and then the used bandwidth information of at least two links is determined. If the used bandwidth information of the first link is not the minimum value among the used bandwidth information of at least two links, the link corresponding to the multicast group identifier is updated from the first link to the second link (i.e., the link with the minimum used bandwidth information among at least two links). Then, a third multicast join message is sent to the multicast source through the second link. After the multicast source sends the second multicast data according to the third multicast join message, the first switching device receives the second multicast data through the second link and sends the second multicast data to the multicast receiving device. The used bandwidth information of the link is the sum of the traffic bandwidth information of all multicast groups in the link.

[0018] Because the bandwidth of each multicast group varies, the link carrying the fewest multicast groups may not be the least idle link. Selecting a link based solely on the number of multicast groups can lead to severe link load imbalance. This approach selects the link with the lowest used bandwidth for each multicast group. Sending multicast traffic on this link increases its used bandwidth, making the multicast traffic on equivalent links similar or equal, thus achieving load balancing on equivalent links and reducing the degradation of multicast service quality caused by traffic bursts.

[0019] In conjunction with the second aspect, in the first possible implementation, the used bandwidth information is either the used bandwidth value or the link utilization rate. When the second link has the smallest used bandwidth value, this ensures that the multicast traffic on the equivalent links is similar or equal. The link utilization rate is the ratio of used bandwidth to the total link bandwidth. When the second link has the smallest link utilization rate, this ensures that the proportion of multicast traffic on the equivalent links is similar or equal.

[0020] In conjunction with the second aspect or the first possible implementation of the second aspect, in the second possible implementation, when at least one of the at least two links is detected to be faulty, multicast group identifiers are sequentially selected from the multicast group identifiers corresponding to the faulty link as multicast group identifiers to be processed. These multicast group identifiers are then associated with normal links among the at least two links. A fourth multicast join message is then sent through the normal link associated with the multicast group identifier to be processed. After the multicast source sends third multicast data based on the fourth multicast join message, the third multicast data is received through the normal link associated with the multicast group identifier and sent to the multicast receiving device. This allows multicast traffic to be sent through normal links even when the faulty link cannot send multicast traffic, thus improving the quality of multicast service.

[0021] In conjunction with the second possible implementation of the second aspect, the third possible implementation involves associating the multicast group identifier to be processed with a normal link among at least two links, including steps A to C. Step A includes determining the minimum used bandwidth information among the normal links of at least two links; step B includes associating the multicast group identifier to be processed with the link having the minimum used bandwidth information among the normal links of at least two links; and step C includes updating the used bandwidth information of the link associated with the multicast group identifier to the sum of the traffic bandwidth information corresponding to the multicast group identifier to be processed and the minimum used bandwidth information among the normal links. Steps A to C are repeated until the end. This allows for dynamic selection of the link with the minimum used bandwidth information, sequentially distributing the multicast group traffic to the link with the minimum used bandwidth information. When there are multiple normal links, load balancing can be achieved across multiple links.

[0022] In conjunction with the second aspect or other possible implementations, in another possible implementation, when the ratio of the bandwidth of the first multicast data to the bandwidth of the first link is greater than or equal to a preset ratio, the step of determining the used bandwidth information of at least two links is triggered; when the ratio of the bandwidth of the first multicast data to the bandwidth of the first link is less than the preset ratio, the step of determining the used bandwidth information of at least two links is not executed. For multicast data with high traffic, links are switched to achieve link load balancing. For multicast data with low traffic, links are not switched, which minimizes the impact on link load and reduces the number of link switches, thus reducing the degradation of multicast service quality caused by link switching.

[0023] In conjunction with the second aspect or other possible implementations, in another possible implementation, the first multicast join message is an IGMP join message or an MLD join message, while the second and third multicast join messages are both PIM join messages. This allows the multicast distribution tree to be established based on the second multicast join message and updated based on the third multicast join message.

[0024] A third aspect provides a method for forwarding multicast data. This method is applied to a first switching device in a communication system, which also includes a second switching device connected to a multicast source. At least two links exist between the first and second switching devices. The method includes: when a primary link and a backup link are configured for the multicast group, receiving first multicast data through the primary link and sending the first multicast data to a multicast receiving device; after detecting a failure in the primary link of the multicast group, sending a multicast join message to the multicast source through the backup link of the multicast group; after the multicast source sends second multicast data based on the multicast join message, receiving the second multicast data through the backup link and sending the second multicast data to the multicast receiving device. The primary link and the backup link are equivalent links. The first switching device is connected to the multicast receiving device.

[0025] By implementing this, after the main link of the multicast group fails (i.e., the default outgoing interface corresponding to the multicast group fails), the equivalent backup link can be used to continue receiving multicast data, thus reducing the occurrence of multicast data stream interruptions.

[0026] In conjunction with the third aspect, one possible implementation is that the multicast join message is a protocol-independent multicast (PIM) join message. This allows for the establishment of a multicast distribution tree based on the multicast join message.

[0027] In conjunction with the third aspect, in one possible implementation, before receiving the first multicast data via the main link, an Internet Group Management Protocol (IGMP) join message sent by the multicast receiving device is received. Then, a multicast join message is sent to the multicast source via the main link of the multicast group, causing the multicast source to send the first multicast data to the first switching device on the main link based on the multicast join message. Here, the multicast join message is a PIM join message, thus providing a method for establishing a multicast distribution tree and the main link of the multicast group.

[0028] In conjunction with the third aspect, in one possible implementation, before receiving the first multicast data via the main link, a multicast listener discovery (MLD) join message sent by the multicast receiving device is received. Then, a multicast join message is sent to the multicast source via the main link of the multicast group, causing the multicast source to send the first multicast data to the first switching device on the main link based on the multicast join message. Here, the multicast join message is a PIM join message, thus providing another method for establishing the multicast distribution tree and the main link of the multicast group.

[0029] A fourth aspect provides a switching device including a communication interface and a processing module. The communication interface is used to receive a multicast join message including a multicast group identifier from a multicast receiving device. The processing module is also used to obtain a minimum value from the used bandwidth information of at least two links, and allocate a first link corresponding to the minimum value to the multicast group corresponding to the multicast group identifier. The first link is used to transmit the first multicast data of the multicast group.

[0030] In conjunction with the fourth aspect, in the first possible implementation, the switching device further includes a storage module; when the storage module stores historical traffic bandwidth information of the multicast group, the processing module is further used to update the used bandwidth information of the first link to the sum of the minimum value and the historical traffic bandwidth information of the multicast group; when the storage module does not store historical traffic bandwidth information of the multicast group, the processing module is further used to update the used bandwidth information of the first link to the sum of the minimum value and the traffic bandwidth reference value.

[0031] In conjunction with the fourth aspect or the first possible implementation of the fourth aspect, in the second possible implementation, the processing module is further configured to obtain the traffic bandwidth information of the first multicast data and the current used bandwidth information of the first link; when the storage module stores the historical traffic bandwidth information of the multicast group, the processing module is further configured to determine the first difference as the difference between the current used bandwidth information of the first link and the historical traffic bandwidth information of the multicast group, and update the used bandwidth information of the first link to the sum of the first difference and the traffic bandwidth information of the first multicast data; when the storage module does not store the historical traffic bandwidth information of the multicast group, the processing module is further configured to determine the second difference as the difference between the current used bandwidth information of the first link and the traffic bandwidth reference value, and update the used bandwidth information of the first link to the sum of the second difference and the traffic bandwidth information of the first multicast data.

[0032] In conjunction with the second possible implementation of the fourth aspect, in the third possible implementation, when the ratio of the traffic bandwidth of the first multicast data to the total bandwidth of the first link is greater than or equal to a preset ratio and the traffic bandwidth information of the first multicast data is less than the difference between the used bandwidth information of the first link and the used bandwidth information of the second link, the processing module is further used to switch the link corresponding to the multicast group from the first link to the second link, and the second link is used to transmit the second multicast data of the multicast group.

[0033] For the explanation of terms, the steps for each module, and the beneficial effects in the fourth part, please refer to the corresponding description in the first part.

[0034] A fifth aspect provides a switching device, comprising a communication interface and a processing module. The communication interface is used to receive a first multicast join message from a multicast receiving device, the first multicast join message including a multicast group identifier. The processing module is used to determine that the link corresponding to the multicast group identifier is a first link, the first link being the link carrying the fewest multicast groups among at least two links. The communication interface is also used to send a second multicast join message to a multicast source through the first link; receive first multicast data through the first link; the processing module is also used to determine the used bandwidth information of at least two links; when the used bandwidth information of the first link is not the minimum value among the used bandwidth information of at least two links, update the link corresponding to the multicast group identifier from the first link to a second link, the second link being the link with the smallest used bandwidth information among at least two links; the communication interface is also used to send a third multicast join message to a multicast source through the second link; receive second multicast data through the second link; and send the second multicast data to the multicast receiving device.

[0035] In conjunction with the fifth aspect, in the first possible implementation, the used bandwidth information is the used bandwidth value or link utilization.

[0036] In conjunction with the fifth aspect or the first possible implementation of the fifth aspect, in the second possible implementation, the processing module is further configured to, when detecting a failure in at least one of the at least two links, sequentially select multicast group identifiers from the multicast group identifiers corresponding to the failed link as multicast group identifiers to be processed; associate the multicast group identifier to be processed with a normal link among the at least two links; the communication interface is further configured to send a fourth multicast join message to the multicast source through the normal link associated with the multicast group identifier to be processed; receive third multicast data through the normal link associated with the multicast group identifier; and send the third multicast data to the multicast receiving device.

[0037] In conjunction with the second possible implementation of the fifth aspect, in the third possible implementation, the processing module is specifically used to repeatedly execute steps A to C. Step A includes determining the minimum used bandwidth information among the normal links of at least two links; Step B includes associating the multicast group identifier to be processed with the links with the minimum used bandwidth information among the normal links of at least two links; Step C includes updating the used bandwidth information of the links associated with the multicast group identifier to be processed to the sum of the traffic bandwidth information corresponding to the multicast group identifier to be processed and the minimum used bandwidth information among the normal links, until the end.

[0038] In combination with the fifth aspect or the above possible implementations, in the fourth possible implementation, when the ratio of the bandwidth of the first multicast data to the bandwidth of the first link is greater than or equal to a preset ratio, the processing module is triggered to determine the bandwidth used of at least two links; when the ratio of the bandwidth of the first multicast data to the bandwidth of the first link is less than the preset ratio, the processing module is not triggered to determine the bandwidth used of at least two links.

[0039] For the explanation of terms, the steps for each module, and the beneficial effects in the fifth aspect, please refer to the corresponding description in the second aspect.

[0040] A sixth aspect provides a switching device, which includes a processing module and a communication interface. The processing module is used to configure an equivalent primary link and a backup link for a multicast group. The communication interface is used to receive first multicast data of the multicast group through the primary link; send the first multicast data to a multicast receiving device; after the processing module detects a failure of the primary link, send a multicast join message to the multicast source through the backup link; receive second multicast data of the multicast group through the backup link; and send the second multicast data to the multicast receiving device.

[0041] For the explanation of terms, the steps for each module, and the beneficial effects in the sixth aspect, please refer to the corresponding description in the third aspect.

[0042] A seventh aspect provides a switching device including a processor and a memory, the memory storing computer-readable instructions, the processor executing the computer-readable instructions to cause the switching device to perform a multicast data forwarding method as described in the foregoing aspects or any possible implementation thereof.

[0043] The eighth aspect provides a computer-readable storage medium including computer program instructions, which, when executed by a switching device, enable the switching device to implement the multicast data forwarding method of the above aspects or any possible implementation thereof.

[0044] A ninth aspect provides a computer program product comprising instructions which, when executed by a switching device, enable the switching device to implement the multicast data forwarding method of the foregoing aspect or any possible implementation thereof. Attached Figure Description

[0045] Figure 1 is a schematic diagram of a multicast system in an embodiment of this application;

[0046] Figure 2 is a signaling interaction diagram of a multicast data forwarding method in an embodiment of this application;

[0047] Figure 3 is another signaling interaction diagram of the multicast data forwarding method in the embodiments of this application;

[0048] Figure 4 is a schematic diagram of a multicast data forwarding method in an embodiment of this application;

[0049] Figure 5 is another signaling interaction diagram of the multicast data forwarding method in the embodiments of this application;

[0050] Figure 6 is a schematic diagram of a multicast data forwarding method in an embodiment of this application;

[0051] Figure 7 is another signaling interaction diagram of the multicast data forwarding method in the embodiments of this application;

[0052] Figure 8 is a structural diagram of a switching device in an embodiment of this application;

[0053] Figure 9 is a structural diagram of a switching device in an embodiment of this application. Detailed Implementation

[0054] The multicast data forwarding method in this application can be applied to scenarios such as IPTV, broadcasting networks, live video streaming, video conferencing, video-on-demand, audio conferencing, audio-on-demand, gaming, or information services. In these scenarios, the bandwidth differences between different video formats are significant, requiring load balancing. For example, standard definition (SD), high definition (HD), and ultra-high definition (UHD) video streams differ greatly, and the links transmitting these video streams may experience load imbalances. It should be understood that the video formats involved in this application are not limited to the examples above.

[0055] The communication system described in this application can also be referred to as a multicast system. In the above-described scenario, the multicast system includes a multicast source, a multicast receiving device, and a switching network between them. The switching network includes multiple switching devices. Switching devices can be, but are not limited to, gateways, routers, or switches. The multicast receiving device, also called a multicast receiver, can be a terminal device. A terminal device can also be called user equipment (UE), mobile station (MS), mobile terminal (MT), or a terminal, etc. It is a device that provides voice and / or data connectivity to a user, or a chip embedded within that device, such as a handheld device or vehicle-mounted device with wireless connectivity. For example, terminal devices can be mobile phones, desktop computers, tablets, laptops, handheld computers, mobile internet devices (mobile internet switching devices, MID), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in autonomous driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, and 5G-residential gateway devices (5G-RG) that support 5G access.

[0056] Referring to Figure 1, in one embodiment, the multicast system includes a multicast source 110, a switching network 120, multicast receiving devices 131, 132, and 133. The switching network 120 includes switching devices 120A to 120E. Switching device 120E is connected to multicast receiving devices 131, 132, and 133, respectively. It should be understood that the number of multicast receiving devices in the multicast system and the number of switching devices in the switching network are not limited to those shown in Figure 1 and can be configured according to actual conditions.

[0057] There are multiple links between switching device 120A and switching device 120E, for example, links between switching device 120A, switching device 120B and switching device 120E, links between switching device 120A, switching device 120C and switching device 120E, and links between switching device 120A, switching device 120D and switching device 120E.

[0058] Switching devices and multicast receivers can process user requests to join or leave multicast groups according to the IGMP or MLD protocols. IGMP is an IPv4-based protocol, while MLD is an IPv6 protocol.

[0059] The switching device runs the PIM protocol and establishes a multicast distribution tree hop-by-hop between the multicast source and the multicast receiver through PIM join messages. The multicast source sends multicast data to the multicast receiver through the multicast distribution tree.

[0060] PIM is a multicast routing protocol that does not require maintaining dedicated unicast routing information. It utilizes the routing information in the unicast routing table to perform reverse path forwarding (RPF) checks on multicast packets. If the check passes, a multicast routing table entry is created, thus forwarding the multicast packet. A PIM routing table entry refers to a multicast routing table entry established through the PIM protocol. There are two types of routing table entries in a PIM network: (S, G) routing table entries or (*, G) routing table entries. S represents the multicast source, G represents the multicast group, and * represents any. When a switching device receives a multicast packet, it uses the packet's source address to look up the route to the "packet source" in the unicast routing table. It checks whether the outgoing interface of the "packet source" routing table entry matches the incoming interface of the received multicast packet. If they match, the multicast packet is considered to have arrived from the correct interface, thus ensuring the correctness and uniqueness of the entire forwarding path. This process is called the RPF check.

[0061] In the PIM multicast domain, point-to-multipoint multicast forwarding paths are established from the multicast source to group members, with multicast groups as the unit. Because the multicast forwarding path presents a tree structure, it is also called a multicast distribution tree (MDT). In the multicast distribution tree, for each multicast group, there is only one copy of the same multicast data on each link. The multicast data being transmitted begins to be replicated and distributed at the switch furthest possible from the multicast source.

[0062] For example, multicast data including link forwarding (S,G1) of switching devices 120A, 120B, and 120E; multicast data including link forwarding (S,G2) of switching devices 120A, 120C, and 120E; and multicast data including link forwarding (S,G3) of switching devices 120A, 120D, and 120E. These links can be denoted as Switching Device 120A→Switching Device 120B→Switching Device 120E, Switching Device 120A→Switching Device 120C→Switching Device 120E, and Switching Device 120A→Switching Device 120D→Switching Device 120E. These three links can be considered as equivalent links.

[0063] In this application, an equivalent link refers to multiple links with equal costs. Cost-related parameters include, but are not limited to, link hop count, link transmission delay, or link bandwidth. In links between switching devices, multiple links can be considered equivalent when they include the same number of switching devices. Alternatively, multiple links can be considered equivalent when the difference in data transmission delay across multiple links is less than or equal to a delay threshold. Or, multiple links can be considered equivalent when their bandwidth is equal.

[0064] In existing multicast methods, the link with the fewest multicast groups is selected for the next multicast group, and multicast data is transmitted through that link. Since the bandwidth of each multicast group differs, the link carrying the fewest multicast groups may not be the least busy link. Selecting a link based on the number of multicast groups can lead to severe link load imbalance, and congested links are prone to packet loss, affecting the quality of multicast service. To address this, this application provides a multicast data forwarding method that selects the least busy link for the next multicast group based on the used bandwidth information of the link, resulting in a more balanced load across links and thus improving the quality of multicast service. The multicast data forwarding method of this application is described below with reference to the apparatus shown in Figure 1. Referring to Figure 2, in another embodiment, the multicast data forwarding method of this application includes the following steps:

[0065] S201, Switching device 120E receives a multicast join message including a multicast group identifier sent by multicast receiving device 131.

[0066] S202, Switching device 120E obtains the minimum value from the used bandwidth information of at least two links.

[0067] The used bandwidth information of a link is the sum of the traffic bandwidth information of all multicast groups in the link. The initial value of the used bandwidth information of a link can be, but is not limited to, 0. The used bandwidth information is either the used bandwidth value or the link utilization rate, which is the ratio of the used bandwidth of the link to the total bandwidth of the link.

[0068] S203, the switching device 120E allocates the first link corresponding to the minimum value for the multicast group corresponding to the multicast group identifier. The first link is used to transmit the first multicast data of the multicast group.

[0069] When the first link has the lowest used bandwidth, this ensures that the multicast traffic on the equivalent links is similar or equal. When the first link has the lowest link utilization, this ensures that the proportion of multicast traffic on the equivalent links is similar or equal.

[0070] S204. When the local storage contains historical traffic bandwidth information of the multicast group, update the used bandwidth information of the first link to the sum of the minimum value and the historical traffic bandwidth information of the multicast group.

[0071] The historical bandwidth information of a multicast group refers to the actual bandwidth information of that multicast group before the first multicast data was obtained, such as the bandwidth of the most recent multicast data and the percentage of bandwidth of the most recent multicast data. Optionally, for large-volume data (such as multicast data exceeding the bandwidth threshold), the bandwidth and multicast group identifier of the multicast group are stored locally. The storage duration can be set according to actual conditions, and this application does not impose a limit. For small-volume data (such as multicast data less than or equal to the bandwidth threshold), the bandwidth and multicast group identifier of the multicast group are not stored locally. This avoids storing the bandwidth information of small-volume data, saving local storage resources occupied by bandwidth information.

[0072] S205. When the local storage does not contain historical traffic bandwidth information for the multicast group, update the used bandwidth information of the first link to the sum of the minimum value and the traffic bandwidth reference value.

[0073] According to S204 and S205, the used bandwidth information of the link can be updated to facilitate subsequent multicast groups in selecting the least idle link. It should be noted that for multicast groups that do not store historical traffic bandwidth information or are sending a multicast join message for the first time, a traffic bandwidth reference value can be set for that multicast group. The traffic bandwidth reference value can be set according to actual conditions, such as the average historical traffic bandwidth information of all multicast groups in a preset time period, a bandwidth threshold, or 0; this application does not impose any limitations.

[0074] In this embodiment, the link with the least used bandwidth information can be selected for the multicast group. Sending multicast traffic on this link will increase the used bandwidth information of the link, making the multicast traffic on the equivalent links similar or equal, thereby achieving load balancing of the equivalent links and reducing the degradation of multicast service quality caused by traffic bursts on some links.

[0075] Because historical bandwidth information and reference bandwidth values ​​may differ from actual bandwidth, the link bandwidth usage information determined based on this information may contain errors. This application can update the link bandwidth usage information based on the actual bandwidth of the multicast group after receiving multicast data, thereby improving the accuracy of the link bandwidth usage information. This is described below:

[0076] In an optional embodiment, the multicast data forwarding method of this application further includes: obtaining traffic bandwidth information of the first multicast data and current used bandwidth information of the first link; when the switching device 120E stores historical traffic bandwidth information of the multicast group, determining the first difference as the difference between the current used bandwidth information of the first link and the historical traffic bandwidth information of the multicast group, and updating the used bandwidth information of the first link to the sum of the first difference and the traffic bandwidth information of the first multicast data; when the switching device 120E does not store historical traffic bandwidth information of the multicast group, determining the second difference as the difference between the current used bandwidth information of the first link and the traffic bandwidth reference value, and updating the used bandwidth information of the first link to the sum of the second difference and the traffic bandwidth information of the first multicast data.

[0077] In this embodiment, updating the used bandwidth information of the link based on the actual traffic bandwidth of the multicast group improves the accuracy of selecting the least busy link. When the switching device 120E stores historical traffic bandwidth information of the multicast group, it can first calculate the difference between the historical traffic bandwidth information of the multicast group and the traffic bandwidth information of the first multicast data, and then update the used bandwidth information of the first link to the current used bandwidth information of the first link minus the difference. When the switching device 120E does not store historical traffic bandwidth information of the multicast group, it can first calculate the difference between the historical traffic bandwidth information of the multicast group and the traffic bandwidth reference value, and then update the used bandwidth information of the first link to the current used bandwidth information of the first link minus the difference.

[0078] In conjunction with the preceding embodiment, in another optional embodiment, the multicast data forwarding method of this application further includes: when the ratio of the traffic bandwidth of the first multicast data to the total bandwidth of the first link is greater than or equal to a preset ratio and the traffic bandwidth information of the first multicast data is less than the difference between the used bandwidth information of the first link and the used bandwidth information of the second link, the link corresponding to the multicast group is switched from the first link to the second link, and the second multicast data of the multicast group is transmitted through the second link. When the ratio of the traffic bandwidth of the first multicast data to the total bandwidth of the first link is less than the preset ratio, or when the traffic bandwidth information of the first multicast data is greater than or equal to the difference between the used bandwidth information of the first link and the used bandwidth information of the second link, the link is not switched.

[0079] In this embodiment, the second link is the link with the minimum used bandwidth information among at least two links at the current time. When the traffic bandwidth of the multicast group is large and the used bandwidth of the link where the multicast group is located differs significantly from the used bandwidth of the minimum link (i.e., the second link), the multicast data of the multicast group is switched to the minimum link for transmission. This makes the load of the second link and the first link closer, thereby achieving link load balancing.

[0080] The multicast data forwarding method in this application will be described in detail below with reference to the multicast system shown in Figure 1. Referring to Figure 3, in another embodiment, the multicast data forwarding method in this application includes the following steps:

[0081] S301. When the switching device 120E does not receive multicast data from the target multicast group within a preset time period and the traffic bandwidth of the target multicast group is greater than or equal to the bandwidth threshold, the identifier of the target multicast group and the traffic bandwidth of the target multicast group are saved.

[0082] S302, Switching device 120E receives the first multicast join message from multicast receiving device 131.

[0083] S303 and switching device 120E allocate the first link for the multicast group corresponding to the first multicast join message.

[0084] The used bandwidth information for the first link is the minimum value among the used bandwidth information of at least two links. The used bandwidth information is either the used bandwidth value or the link utilization rate.

[0085] S304. When the multicast group corresponding to the first multicast join message is the target multicast group, the switching device 120E updates the used bandwidth information of the first link to the sum of the traffic bandwidth information of the target multicast group and the minimum value.

[0086] S305, Switch 120E sends a second multicast join message to Switch 120B.

[0087] S306, Switching device 120B sends a second multicast join message to switching device 120A.

[0088] S307, Switching device 120A sends a second multicast join message to multicast source 110.

[0089] The process of switching device 120E sending a second multicast join message to multicast source via the first link includes S305 to S307. The process of multicast source 110 establishing a multicast distribution tree based on the second multicast join message and sending first multicast data to switching device 120E via the first link of the multicast distribution tree includes S308 to S310.

[0090] S308, Multicast source 110 sends the first multicast data to switching device 120A.

[0091] S309, Switching device 120A sends the first multicast data to switching device 120B.

[0092] S310, Switching device 120B sends the first multicast data to switching device 120E.

[0093] S311, Switching device 120E sends the first multicast data to multicast receiving device 131.

[0094] S312, Switching device 120E updates the used bandwidth information of the first link based on the traffic bandwidth information of the first multicast data.

[0095] Specifically, the traffic bandwidth information of the first multicast data and the current used bandwidth information of the first link are obtained, the first difference is determined to be the difference between the current used bandwidth information of the first link and the traffic bandwidth of the target multicast group, and the used bandwidth information of the first link is updated to be the sum of the first difference and the traffic bandwidth information of the first multicast data.

[0096] This allows the used bandwidth information of the first link to be updated based on the actual bandwidth information of the multicast group, improving the accuracy of the used bandwidth information of the first link and thus improving the accuracy of link selection. Optionally, the bandwidth information of the multicast group is the bandwidth of the multicast data of that multicast group. Alternatively, the bandwidth information of the multicast group is the ratio of the bandwidth of the multicast data of that multicast group to the total bandwidth of the link.

[0097] S313. When the multicast group corresponding to the first multicast join message is not the target multicast group, update the used bandwidth information of the first link to the sum of the bandwidth threshold and minimum value of the target multicast group.

[0098] S314, Switch 120E sends a third multicast join message to Switch 120B.

[0099] S315, Switch 120B sends a third multicast join message to Switch 120A.

[0100] S316, Switching device 120A sends a third multicast join message to multicast source 110.

[0101] S317, Multicast source 110 sends second multicast data to switching device 120A.

[0102] S318, Switching device 120A sends second multicast data to switching device 120B.

[0103] S319, Switching device 120B sends second multicast data to switching device 120E.

[0104] S320, the switching device 120E sends the second multicast data to the multicast receiving device 131.

[0105] S321, Switching device 120E updates the used bandwidth information of the first link based on the traffic bandwidth information of the second multicast data.

[0106] Specifically, the switching device 120E does not store the historical traffic bandwidth information of the multicast group. It determines the second difference as the difference between the current used bandwidth information of the first link and the bandwidth threshold, and updates the used bandwidth information of the first link to the sum of the second difference and the traffic bandwidth information of the first multicast data.

[0107] It should be noted that S304 to S312 are processes for updating the used bandwidth information of the link based on high-volume bandwidth, while S313 to S321 are processes for updating the used bandwidth information of the link based on low-volume bandwidth. These two processes are independent, and only one is executed during actual operation. This allows the used bandwidth information of the first link to be updated according to the actual multicast traffic bandwidth information, improving the accuracy of the used bandwidth information of the link and thus improving the accuracy of link selection.

[0108] In this embodiment, for multicast data with high bandwidth, its bandwidth can be recorded. When retransmitting the multicast data, the used bandwidth information of the link is updated based on the recorded bandwidth. This allows subsequent multicast groups to select the least busy link based on the updated used bandwidth information, ensuring that the multicast traffic on equivalent links is similar or equal, thereby achieving load balancing. Compared to the method of selecting the least busy link after receiving multicast data, this reduces link switching.

[0109] Secondly, for low-volume multicast data, the used bandwidth information of the link is updated with the traffic bandwidth reference value. This also enables subsequent multicast groups to select the most idle link with a higher probability.

[0110] In an optional embodiment, the multicast data forwarding method of this application further includes: deleting the target multicast group's identifier and traffic bandwidth when the storage time reaches a preset duration. This saves storage resources. The preset duration can be, but is not limited to, 5 hours. It can be set according to actual conditions, and this application does not limit it.

[0111] The process of reselecting links for multiple multicast groups is described below with reference to Figure 4. In one embodiment, the bandwidth threshold is 20 Mbps. A multicast source sends multicast traffic to multicast receivers in four multicast groups, denoted as (S,G1), (S,G2), (S,G3), and (S,G4). The traffic and bandwidth of the four multicast groups are shown in Table 1.

[0112] Traffic bandwidth (S, G1) 5Mbps (S, G2) 10Mbps (S, G3) 100Mbps (S, G4) 100Mbps surface

[0113] Table 1

[0114] Save the bandwidth of (S,G3) and the bandwidth of (S,G4), but do not save the bandwidth of (S,G1) and the bandwidth of (S,G2).

[0115] Upon receiving the multicast join message corresponding to (S,G1) again, (S,G1) is assigned to the link with the minimum used bandwidth. Assuming this link is switch 120E→switch 120B→switch 120A, its used bandwidth is 0Mbps, and then the traffic on this link is modified to 20Mbps (i.e., the sum of the used bandwidth and the bandwidth threshold).

[0116] Upon receiving the multicast join message corresponding to (S,G2) again, (S,G2) is assigned to the link with the minimum used bandwidth. Assuming this link is switch 120E→switch 120D→switch 120A, its used bandwidth is 0Mbps, and then the traffic on this link is modified to 20Mbps (i.e., the sum of the used bandwidth and the bandwidth threshold).

[0117] Upon receiving the multicast join message corresponding to (S,G3) again, (S,G3) is assigned to the link with the minimum used bandwidth. Assuming this link is switch 120E→switch 120B→switch 120A, and its used bandwidth is 20Mbps, the traffic on this link is then modified to 120Mbps (i.e., the sum of the used bandwidth and the traffic bandwidth of (S,G3).

[0118] Upon receiving the multicast join message corresponding to (S,G4) again, (S,G4) is assigned to the link with the minimum used bandwidth. Assuming this link is switch 120E→switch 120D→switch 120A, and its used bandwidth is 20Mbps, the traffic on this link is then modified to 120Mbps (i.e., the sum of the used bandwidth and the traffic bandwidth of (S,G4).

[0119] At this point, the multicast group, traffic path, PIM join path, and multicast group traffic bandwidth are shown in Table 2:

[0120]

[0121] Table 2

[0122] After receiving multicast messages (S,G1), (S,G2), (S,G3), and (S,G4), the bandwidth in Table 2 is updated based on the actual traffic. The traffic bandwidth for (S,G1) and (S,G2) is taken as 10Mbps. The updated multicast group, traffic path, PIM join path, and multicast group traffic bandwidth are shown in Table 3.

[0123]

[0124] Table 3

[0125] It can be seen that selecting a path based on the estimated link bandwidth before sending multicast data can achieve load balancing and reduce link switching, thereby reducing failures caused by path switching, including but not limited to packet loss or out-of-order packets.

[0126] This application also provides a method for forwarding multicast data. First, an idle link is selected based on the number of multicast groups on the link. Then, the most idle link is selected for the next multicast group based on the used bandwidth information of the link, thus ensuring a more balanced load across links and improving the quality of multicast service. The method for forwarding multicast data in this application is described below with reference to the multicast system shown in Figure 1. Referring to Figure 5, in one embodiment, the method for forwarding multicast data in this application includes the following steps:

[0127] S501, Switching device 120E receives the first multicast join message from the multicast receiving device.

[0128] The first multicast join message includes the multicast group identifier.

[0129] S502, Switching device 120E determines that the link corresponding to the multicast group identifier is the first link.

[0130] The first link is the link that carries the fewest multicast groups among at least two links at the current moment. This allows for the dynamic selection of the link carrying the fewest multicast groups for each multicast group. Taking the first link as an example of switch 120E→switch 120B→switch 120A. The process of switch 120E sending the second multicast join message to multicast source 110 through the first link includes steps S503 to S505.

[0131] S503, Switch 120E sends a second multicast join message to Switch 120B.

[0132] S504, Switch 120B sends a second multicast join message to Switch 120A.

[0133] S505, Switching device 120A sends a second multicast join message to multicast source 110.

[0134] The process of multicast source 110 generating a multicast distribution tree based on the second multicast join message and then sending the first multicast data to switching device 120E according to the first link in the multicast distribution tree includes S506 to S508.

[0135] S506, Multicast source 110 sends the first multicast data to switching device 120A.

[0136] S507, Switching device 120A sends the first multicast data to switching device 120B.

[0137] S508, Switching device 120B sends the first multicast data to switching device 120E.

[0138] S509, the switching device 120B sends the first multicast data to the multicast receiving device 131.

[0139] S510 and Switch 120E determine the used bandwidth information for at least two links.

[0140] In the multicast system shown in Figure 1, at least two links include switching device 120E→switching device 120B→switching device 120A, switching device 120E→switching device 120C→switching device 120A, and switching device 120E→switching device 120D→switching device 120A. When the used bandwidth information of the first link is the minimum value among the used bandwidth information of the above links, the link does not need to be switched, that is, S511 to S518 are not executed.

[0141] S511. When the used bandwidth information of the first link is not the minimum value among the used bandwidth information of at least two links, the switching device 120E updates the link corresponding to the multicast group identifier from the first link to the second link. The second link is the link with the minimum used bandwidth information among at least two links. The used bandwidth information can be the used bandwidth value or the link utilization rate. The link utilization rate is equal to the ratio of the used bandwidth to the total link bandwidth. When the used bandwidth information is the used bandwidth value, the link with the minimum used bandwidth is selected as the second link. This allows the most idle link to be selected for each multicast group, thus achieving a more balanced link load.

[0142] When the used bandwidth information is the link utilization rate, the link with the lowest utilization rate is selected as the second link. In non-equivalent load sharing scenarios, since the total bandwidth of different links is different, the link with the lowest utilization rate can be considered the least active link. Assigning the link with the lowest utilization rate to the multicast group provides another method for selecting the least active link, which can achieve load balancing in non-equivalent load sharing scenarios.

[0143] The second link takes switching device 120E→switching device 120C→switching device 120A as an example. The process of switching device 120E sending a third multicast join message to the multicast source through the second link includes S512 to S514.

[0144] S512, Switch 120E sends a third multicast join message to Switch 120C.

[0145] S513, Switch 120C sends a third multicast join message to Switch 120A.

[0146] S514, Switching device 120A sends a third multicast join message to multicast source 110.

[0147] The process of multicast source 110 updating the multicast distribution tree according to the third multicast join message and sending the second multicast data to the switching device 120E through the second link in the multicast distribution tree includes S515 to S517.

[0148] S515, multicast source 110 sends second multicast data to switching device 120A.

[0149] S516, Switching device 120A sends second multicast data to switching device 120C.

[0150] S517, Switching device 120C sends second multicast data to switching device 120E.

[0151] S518, the switching device 120E sends the second multicast data to the multicast receiving device 131.

[0152] In this embodiment, the link with the least used bandwidth information can be selected for the multicast group. Sending multicast traffic on this link increases the used bandwidth information of that link, making the multicast traffic on equivalent links similar or equal, thereby achieving load balancing of equivalent links. Link load balancing can reduce the degradation of multicast service quality caused by traffic bursts.

[0153] In an optional embodiment, the multicast data forwarding method in this application further includes: when at least one of the at least two links is detected to be faulty, selecting multicast group identifiers sequentially from the multicast group identifiers corresponding to the faulty link as multicast group identifiers to be processed, associating the multicast group identifiers to be processed with the normal links among the at least two links, then sending a fourth multicast join message to the multicast source through the normal link associated with the multicast group identifier to be processed, and after the multicast source sends the third multicast data according to the fourth multicast join message, receiving the third multicast data through the normal link associated with the multicast group identifier, and sending the third multicast data to the multicast receiving device.

[0154] This embodiment can send multicast traffic through a normal link when a faulty link cannot send multicast traffic, thus improving the quality of multicast service.

[0155] Associating the multicast group identifier to be processed with a normal link among at least two links includes:

[0156] Step A: Determine the minimum used bandwidth information for at least two normal links;

[0157] Step B: Associate the multicast group identifier to be processed with the link that has the minimum used bandwidth information among at least two normal links;

[0158] Step C: Update the used bandwidth information corresponding to the multicast group identifier to be processed to the sum of the traffic bandwidth information corresponding to the multicast group identifier to be processed and the minimum used bandwidth information in the normal link. Repeat steps A to C until the end.

[0159] This embodiment can dynamically select the link with the minimum used bandwidth information and distribute the multicast group traffic to the link with the minimum used bandwidth information in sequence. When there are multiple normal links, load balancing can be achieved on multiple links.

[0160] In an optional embodiment, the multicast data forwarding method in this application further includes: when the ratio of the traffic bandwidth of the first multicast data to the bandwidth of the first link is greater than or equal to a preset ratio, steps S510 to S518 are executed; when the ratio of the traffic bandwidth of the first multicast data to the bandwidth of the first link is less than the preset ratio, steps S510 to S518 are not executed.

[0161] For example, if the bandwidth of the first link is 1000Mbps and the preset ratio is 10%, when the bandwidth of the first multicast data is 100Mbps, the ratio of the bandwidth of the first multicast data to the bandwidth of the first link is 10%, and steps S510 to S518 are executed. When the bandwidth of the first multicast data is 10Mbps, the ratio of the bandwidth of the first multicast data to the bandwidth of the first link is 1%, and steps S510 to S518 are not executed.

[0162] The preset ratio is used to determine whether the bandwidth of multicast data is large. Its value can be set according to the actual situation, and this application does not limit it.

[0163] In this embodiment, links are switched for multicast data with high traffic to achieve link load balancing. Links are not switched for multicast data with low traffic, which minimizes the impact on link load and reduces the number of link switches, thus reducing the degradation of multicast service quality caused by link switching.

[0164] The process of reselecting links for multiple multicast groups is described below with reference to Figure 4. In another embodiment, the multicast system includes a multicast source, a switching device, and a multicast receiving device. Each switching device is configured with an IGP, which can establish unicast routes to form equal-cost links. All direct links between devices are enabled with Protocol Independent Multicast-Sparse Mode (PIM-SM) capability.

[0165] A multicast source sends multicast traffic to multicast receivers in four multicast groups, denoted as (S,G1), (S,G2), (S,G3), and (S,G4). The traffic and bandwidth of the four multicast groups are shown in Table 4.

[0166] Traffic bandwidth (S, G1) 5Mbps (S, G2) 10Mbps (S, G3) 100Mbps (S, G4) 100Mbps surface

[0167] Table 4

[0168] There are two equivalent links between the switching device 120A and the multicast receiving device: switching device 120A→switching device 120B→switching device 120E and switching device 120A→switching device 120D→switching device 120E.

[0169] Specifically, multicast receivers 131 to 134 send IGMP join messages to switch 120E. Switch 120E generates PIM entries and sends PIM join messages to upstream devices based on the number of (S,G) pairs carried by the link. For example, it sends PIM join messages for (S,G1) and (S,G2) to switch 120B, and PIM join messages for (S,G3) and (S,G4) to switch 120D. After receiving the PIM join messages, switches 120B and 120D generate PIM entries and send PIM join messages to switch 120A according to the route from their respective switches to multicast source 110. After receiving PIM join messages from switching devices 120B and 120D, switching device 120A sends PIM join messages to multicast source 110 according to the route from the switching device to multicast source 110, thereby establishing a multicast distribution tree.

[0170] Table 5 shows the multicast group, traffic path, PIM join path, and multicast group traffic bandwidth:

[0171]

[0172] Table 5

[0173] Switch 120E calculates the bandwidth of all multicast groups. For example, the used bandwidth of switch 120A → switch 120B → switch 120E is 15Mbps, and the used bandwidth of switch 120A → switch 120D → switch 120E is 200Mbps. Based on the bandwidth of all multicast groups, a new PIM join path is selected for the multicast groups, and PIM join messages are sent to the upstream switches to update the multicast distribution tree. For example, the PIM join message for (S, G2) is sent to switch 120D, and the PIM join message for (S, G3) is sent to switch 120B. The adjusted multicast groups, traffic paths, PIM join paths, and bandwidths are shown in Table 6.

[0174]

[0175] Table 6

[0176] As shown in Table 6, the used bandwidth of switch 120A→120B→120E is 105Mbps, and the used bandwidth of switch 120A→120D→120E is 110Mbps, indicating that the bandwidth occupied by the two links is similar. Compared with the used bandwidth of 200Mbps for switch 120A→120D→120E, this approach can reduce traffic congestion in switch 120A→120D→120E, reduce packet loss, and improve multicast service quality.

[0177] When new multicast traffic is added, the multicast distribution tree is adjusted again. For example, if new multicast traffic (S, G5) is added, its bandwidth is 5Mbps. Since the bandwidth of the link used by switch 120A→switch 120B→switch 120E is less than the bandwidth of the link used by switch 120A→switch 120D→switch 120E, the multicast traffic (S, G5) is forwarded through switch 120A→switch 120B→switch 120E.

[0178] The multicast group, traffic path, PIM join path, and bandwidth after the addition of (S, G5) are shown in Table 7:

[0179]

[0180] Table 7

[0181] When a link failure occurs between switch 120A, switch 120B, and switch 120E, switch 120E detects the unicast route change and realizes that the multicast source can no longer be reached from switch 120B. Switch 120E then sends PIM join messages for (S,G1), (S,G3), and (S,G5) to switch 120D, establishing a new multicast distribution tree hop-by-hop. The multicast traffic for (S,G1), (S,G3), and (S,G5) is then transmitted along the path between switch 120A, switch 120D, and switch 120E. This allows multicast traffic to be transmitted through the normal link after a link failure, improving the robustness of multicast traffic transmission.

[0182] In existing multicast data forwarding methods, if the outgoing interface corresponding to (S,G2) in switch 120C fails, switch 120E cannot receive multicast data from switch 120C. This affects the quality of multicast service. This application can configure a primary link and a backup link. When the primary link fails, the backup link can be used to continue forwarding multicast data, thereby improving the quality of multicast service.

[0183] The multicast data forwarding method in this application is described below with reference to the multicast system shown in Figure 1. Referring to Figure 6, in one embodiment, the multicast data forwarding method in this application includes the following steps:

[0184] S601 and Switch 120E are configured with primary and backup links for multicast groups.

[0185] The primary and backup links are statically configured equal-cost links. Optionally, the equal-cost links include the same number of switching devices. For example, the primary link of (S,G1) includes switching devices 120A, 120B, and 120E, and the backup link of (S,G1) includes switching devices 120A, 120C, and 120E. The primary link of (S,G2) includes switching devices 120A, 120C, and 120E, and the backup link of (S,G1) includes switching devices 120A, 120D, and 120E. The primary link of (S,G3) includes switching devices 120A, 120D, and 120E, and the backup link of (S,G1) includes switching devices 120A, 120B, and 120E.

[0186] It should be noted that the primary link can include the current switching device and the next-hop switching device, but exclude other switching devices. For example, the primary link of (S,G1) includes switching devices 120A and 120B, the primary link of (S,G2) includes switching devices 120A and 120C, and the primary link of (S,G3) includes switching devices 120A and 120D. This is because the path from other switching devices to the multicast source is unique. Similarly, the backup link can also include the current switching device and the next-hop switching device, but exclude other switching devices. The backup link of (S,G1) includes switching devices 120A and 120C.

[0187] S602, Switching device 120E obtains the first multicast join message from multicast receiving device 131.

[0188] The first multicast join message can be an IGMP join message or an MLD join message. After the switching device 120E obtains the IGMP join message or the MLD join message, it generates a second multicast join message, which can be, but is not limited to, a PIM join message.

[0189] S603, Switch 120E sends a second multicast join message to Switch 120B.

[0190] S604, Switch 120B sends a second multicast join message to Switch 120A.

[0191] S605, Switching device 120A sends a second multicast join message to multicast source 110.

[0192] The process by which the switching device 120E sends a second multicast join message to the multicast source 110 via the main link includes steps S603 to S605. The second multicast join message can be, but is not limited to, a PIM join message, and the multicast source 110 generates a multicast distribution tree based on the second multicast join message.

[0193] S606, Multicast source 110 sends the first multicast data to switching device 120A.

[0194] S607, Switching device 120A sends the first multicast data to switching device 120B.

[0195] S608, Switching device 120B sends the first multicast data to switching device 120E.

[0196] The process by which the switching device 120E receives the first multicast data of the multicast group through the main link includes steps S606 to S608.

[0197] S609, the switching device 120E sends the first multicast data to the multicast receiving device 131.

[0198] In this embodiment, the multicast receiving device 131 corresponds to (S, G1), and the switching device 120E can send the first multicast data to the multicast receiving device 131 according to their correspondence.

[0199] When the main link fails, the S610 and the switching device 120E send a third multicast join message to the switching device 120C.

[0200] When the primary link fails, the switching devices in the switching network can re-establish the routing table according to the IGP. Switch E can detect that the re-established routing table does not include the aforementioned primary link (i.e., switch 120A → switch 120B → switch 120E), thus detecting a primary link failure. It then sends a third multicast join message to the multicast source via the backup link. The process of switch 120E sending the third multicast join message to the multicast source via the backup link includes steps S610 to S612.

[0201] S611, Switch 120C sends a third multicast join message to Switch 120A.

[0202] S612, Switching device 120A sends a third multicast join message to multicast source 110.

[0203] The third multicast join message can be, but is not limited to, the PIM join message. Multicast source 110 updates the multicast distribution tree based on the third multicast join message and then executes S613.

[0204] S613, Multicast source 110 sends second multicast data to switching device 120A.

[0205] S614, Switching device 120A sends second multicast data to switching device 120C.

[0206] S615, Switching device 120C sends second multicast data to switching device 120E.

[0207] The process by which the switching device 120E receives the second multicast data of the multicast group through the backup link includes steps S613 to S615. The second multicast data is sent by the multicast source according to the third multicast join message.

[0208] S616, Switching device 120E sends the second multicast data to multicast receiving device 131.

[0209] In this embodiment, after the main link of the multicast group fails (i.e., the default outgoing interface corresponding to the multicast group fails), the multicast data can continue to be received using an equivalent backup link, which can reduce the occurrence of multicast data stream interruptions.

[0210] For ease of understanding, the multicast traffic forwarding method in this application is described below. Referring to Figure 7, in one embodiment, each switching device is configured with an IGP, which can establish unicast routes to form equal-cost links. The direct links between each switching device are all enabled with protocol-independent multicast-sparse mode (PIM-SM) capability.

[0211] There are three equivalent links between the multicast source and the multicast receiver: Switch 120A → Switch 120B → Switch 120E, Switch 120A → Switch 120C → Switch 120E, and Switch 120A → Switch 120D → Switch 120E. The multicast source sends multicast traffic to the multicast receivers of the three multicast groups, denoted as (S,G1), (S,G2), and (S,G3), respectively. The traffic bandwidth of the three multicast groups is the same.

[0212] Switching unit 120E is statically configured with (S,G) primary and backup links for PIM addition. For example, the primary link for (S,G1) is switching unit 120E→switching unit 120B, and the backup link is switching unit 120E→switching unit 120C; the primary link for (S,G2) is switching unit 120E→switching unit 120C, and the backup link is switching unit 120E→switching unit 120D; the primary link for (S,G3) is switching unit 120E→switching unit 120D, and the backup link is switching unit 120E→switching unit 120B. Since there is only one link between switching unit 120B→switching unit 120A, switching unit 120C→switching unit 120A, and switching unit 120D→switching unit 120A, no further static link configuration is needed. Multicast traffic can automatically reach switching unit 120A along this link.

[0213] Specifically, the multicast receiver sends an IGMP join message to switch 120E. Switch 120E generates a PIM entry and sends a PIM join message according to the configured primary link. For example, it sends the PIM join message for (S,G1) to switch 120B, the PIM join message for (S,G2) to switch 120C, and the PIM join message for (S,G3) to switch 120D. After receiving the PIM join message, switches 120B, 120C, and 120D generate PIM entries and send the PIM join message to switch 120A according to the route from the switch to the multicast source.

[0214] After receiving PIM join messages from switches 120B, 120C, and 120D, switch 120A sends PIM join messages to the multicast source according to the route from the switch to the multicast source, thereby establishing a multicast distribution tree. Multicast traffic from the multicast source is then sent to the multicast receiving device along the multicast distribution tree.

[0215] The relationship between multicast groups, traffic paths, PIM join paths, and multicast receiving devices is shown in Table 8:

[0216]

[0217] Table 8

[0218] When a link failure occurs between switch 120A, switch 120B, and switch 120E, switch 120E detects the unicast route change and can no longer reach the multicast source from switch 120B. Switch 120E sends the PIM add message (S,G1) to switch 120C to establish a new multicast distribution tree hop by hop.

[0219] The relationships between multicast groups, traffic paths, PIM join paths, and multicast receivers in the new multicast distribution tree are shown in Table 9.

[0220]

[0221] Table 9

[0222] Then, the multicast traffic from (S,G1) is sent along the path from switch 120A to switch 120C to switch 120E, until it reaches the multicast receiver. This allows multicast traffic to be sent through the normal link after a primary link failure, improving the robustness of multicast data transmission.

[0223] This application also provides a switching device that can implement the multicast data forwarding method in the above embodiments. Referring to FIG8, in one embodiment, the switching device 800 of this application includes a processing module 801, a communication interface 802, and a storage module 803.

[0224] In one embodiment, the switching device 800 can implement the multicast data forwarding method shown in the embodiment of FIG2. Specifically, the communication interface 802 is used to receive a multicast join message including a multicast group identifier from the multicast receiving device, and the processing module 801 is further used to obtain the minimum value from the used bandwidth information of at least two links, and allocate the first link corresponding to the minimum value to the multicast group corresponding to the multicast group identifier. The first link is used to transmit the first multicast data of the multicast group.

[0225] In another embodiment, when the storage module 803 stores historical traffic bandwidth information of the multicast group, the processing module 801 is further configured to update the used bandwidth information of the first link to the sum of the minimum value and the historical traffic bandwidth information of the multicast group; when the storage module 803 does not store historical traffic bandwidth information of the multicast group, the processing module 802 is further configured to update the used bandwidth information of the first link to the sum of the minimum value and the traffic bandwidth reference value. Optionally, the historical traffic bandwidth information stored in the storage module 803 is greater than the bandwidth threshold.

[0226] In another embodiment, the processing module 801 is further configured to acquire the traffic bandwidth information of the first multicast data and the current used bandwidth information of the first link; when the storage module 803 stores the historical traffic bandwidth information of the multicast group, the processing module 801 is further configured to determine the first difference as the difference between the current used bandwidth information of the first link and the historical traffic bandwidth information of the multicast group, and update the used bandwidth information of the first link to the sum of the first difference and the traffic bandwidth information of the first multicast data; when the storage module 803 does not store the historical traffic bandwidth information of the multicast group, the processing module 801 is further configured to determine the second difference as the difference between the current used bandwidth information of the first link and the traffic bandwidth reference value, and update the used bandwidth information of the first link to the sum of the second difference and the traffic bandwidth information of the first multicast data.

[0227] In another embodiment, when the ratio of the traffic bandwidth of the first multicast data to the total bandwidth of the first link is greater than or equal to a preset ratio and the traffic bandwidth information of the first multicast data is less than the difference between the used bandwidth information of the first link and the used bandwidth information of the second link, the processing module 801 is further configured to switch the link corresponding to the multicast group from the first link to the second link. The second link is the link with the minimum used bandwidth information at the current time among at least two links, and the second link is used to transmit the second multicast data of the multicast group.

[0228] In another embodiment, the switching device 800 can implement the multicast data forwarding method shown in the embodiment of FIG5. Specifically, the communication interface 802 is used to receive a first multicast join message including a multicast group identifier from the multicast receiving device, and the processing module 801 is used to determine that the link corresponding to the multicast group identifier is the first link, which is the link carrying the fewest multicast groups among at least two links; the communication interface 802 is also used to send a second multicast join message to the multicast source through the first link; receive the first multicast data through the first link, and the processing module 801 is also used to determine the used bandwidth information of at least two links; when the used bandwidth information of the first link is not the minimum value among the used bandwidth information of at least two links, the processing module 801 is also used to update the link corresponding to the multicast group identifier from the first link to the second link, which is the link with the smallest used bandwidth information among at least two links; the communication interface 802 is also used to send a third multicast join message to the multicast source through the second link, receive the second multicast data through the second link, and send the second multicast data to the multicast receiving device.

[0229] In an optional embodiment, the processing module 801 is further configured to, when detecting that at least one of the at least two links is faulty, sequentially select multicast group identifiers from the multicast group identifiers corresponding to the faulty link as multicast group identifiers to be processed; associate the multicast group identifiers to be processed with the normal links among the at least two links; the communication interface 802 is further configured to send a fourth multicast join message through the normal link associated with the multicast group identifiers to be processed; receive third multicast data through the normal link associated with the multicast group identifiers; and send the third multicast data to the multicast receiving device.

[0230] In another optional embodiment, the processing module 801 is specifically used to perform the following steps: Step A includes determining the minimum used bandwidth information among the normal links of at least two links; Step B includes associating the multicast group identifier to be processed with the links that have the minimum used bandwidth information among the normal links of at least two links; Step C includes updating the used bandwidth information corresponding to the multicast group identifier to be processed to the sum of the traffic bandwidth information corresponding to the multicast group identifier to be processed and the minimum used bandwidth information among the normal links; Steps A to C are repeated until the end.

[0231] In another optional embodiment, when the ratio of the bandwidth of the first multicast data to the bandwidth of the first link is greater than or equal to a preset ratio, the processing module 801 is triggered to determine the bandwidth used information of at least two links; when the ratio of the bandwidth of the first multicast data to the bandwidth of the first link is less than the preset ratio, the processing module 801 is not triggered to determine the bandwidth used information of at least two links.

[0232] In another embodiment, the switching device 800 can implement the multicast data forwarding method shown in the embodiment of FIG6. Specifically, the processing module 801 is used to configure a primary link and a backup link for the multicast group, wherein the primary link and the backup link are equivalent links; the communication interface 802 is used to receive the first multicast data through the primary link of the multicast group and send the first multicast data to the multicast receiving device; after the processing module 801 detects a failure of the primary link, the communication interface 802 is also used to send a multicast join message to the multicast source through the backup link of the multicast group, receive the second multicast data through the backup link, and send the second multicast data to the multicast receiving device.

[0233] This application also provides a switching device, which may be, but is not limited to, a router or a switch. As shown in FIG9, in one embodiment, the switching device 900 includes: a bus 902, a processor 904, a memory 906, and a communication interface 908. The processor 904, the memory 906, and the communication interface 908 communicate with each other via the bus 902. It should be understood that this application does not limit the number of processors and memory in the switching device 900.

[0234] Bus 902 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, only one line is used in Figure 9, but this does not indicate that there is only one bus or one type of bus. Bus 904 can include pathways for transmitting information between various components of the switching device 900 (e.g., memory 906, processor 904, communication interface 908).

[0235] Processor 904 may include any one or more processors such as a central processing unit (CPU), graphics processing unit (GPU), microprocessor (MP), or digital signal processor (DSP). The processor includes multiple processing cores.

[0236] The memory 906 may include volatile memory, such as random access memory (RAM). The memory 906 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD). In some embodiments, the memory 906 stores executable program code, which the processor 904 executes to implement the functions of the aforementioned processing module 801, communication interface 802, and storage module 803, thereby implementing the multicast data forwarding method described above.

[0237] The communication interface 908 uses transceiver modules such as, but not limited to, network interface cards and transceivers to enable communication between the switching device 900 and other devices or communication networks.

[0238] This application also provides a computer program product containing instructions. The computer program product may be software or program products containing instructions, capable of running on a computing device or stored on any usable medium. When the computer program product runs on at least one computing device, it causes the at least one computing device to execute the multicast data forwarding method of this application.

[0239] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium capable of being stored by a computing device, or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to execute the multicast data forwarding method of this application.

[0240] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0241] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for forwarding multicast data, characterized in that, The method is applied to a first switching device in a communication system, the communication system further including a second switching device connected to a multicast source, the first switching device and the second switching device having at least two links and the at least two links being equivalent, the method comprising: receiving a multicast join message from a multicast receiving device, the multicast join message including a multicast group identifier; obtaining a minimum value from the used bandwidth information of the at least two links; allocating a first link corresponding to the minimum value to the multicast group corresponding to the multicast group identifier, the first link being used to transmit the first multicast data of the multicast group.

2. The method according to claim 1, characterized in that, The method further includes: when the first switching device stores the historical traffic bandwidth information of the multicast group, updating the used bandwidth information of the first link to the sum of the minimum value and the historical traffic bandwidth information of the multicast group; when the first switching device does not store the historical traffic bandwidth information of the multicast group, updating the used bandwidth information of the first link to the sum of the minimum value and the traffic bandwidth reference value.

3. The method according to claim 2, characterized in that, The historical traffic bandwidth information stored in the first switching device is greater than the bandwidth threshold.

4. The method according to any one of claims 2 to 3, characterized in that, The method further includes: acquiring the traffic bandwidth information of the first multicast data and the current used bandwidth information of the first link; when the first switching device stores the historical traffic bandwidth information of the multicast group, updating the used bandwidth information of the first link to the sum of the first difference and the traffic bandwidth information of the first multicast data, wherein the first difference is the difference between the current used bandwidth information of the first link and the historical traffic bandwidth information of the multicast group; when the first switching device does not store the historical traffic bandwidth information of the multicast group, updating the used bandwidth information of the first link to the sum of the second difference and the traffic bandwidth information of the first multicast data, wherein the second difference is the difference between the current used bandwidth information of the first link and the traffic bandwidth reference value.

5. The method according to claim 4, characterized in that, The method further includes: when the ratio of the traffic bandwidth of the first multicast data to the total bandwidth of the first link is greater than or equal to a preset ratio and the traffic bandwidth information of the first multicast data is less than the difference between the used bandwidth information of the first link and the used bandwidth information of the second link, the link corresponding to the multicast group is switched from the first link to the second link, the second link being the link with the minimum used bandwidth information among the at least two links at the current time, and the second link being used to transmit the second multicast data of the multicast group.

6. The method according to any one of claims 1 to 5, characterized in that, The used bandwidth information refers to the used bandwidth value or link utilization rate.

7. A method for forwarding multicast data, characterized in that, The method is applied to a first switching device in a communication system, the communication system further including a second switching device connected to a multicast source, the first switching device and the second switching device having at least two links that are equivalent, the method comprising: receiving a first multicast join message from a multicast receiving device, the first multicast join message including a multicast group identifier; determining the link corresponding to the multicast group identifier as a first link, the first link being the link carrying the fewest multicast groups among the at least two links; sending a second multicast join message to the multicast source through the first link; and receiving first multicast data through the first link, the first multicast data being the multicast source. Based on the second multicast join message sent; determine the used bandwidth information of the at least two links; when the used bandwidth information of the first link is not the minimum value among the used bandwidth information of the at least two links, update the link corresponding to the multicast group identifier from the first link to the second link, the second link being the link with the minimum used bandwidth information among the at least two links; send a third multicast join message to the multicast source through the second link; the first switching device receives second multicast data through the second link, the second multicast data being sent by the multicast source based on the third multicast join message; and send the second multicast data to the multicast receiving device.

8. The method according to claim 7, characterized in that, The used bandwidth information refers to the used bandwidth value or link utilization rate.

9. The method according to claim 7 or 8, characterized in that, The method further includes: when at least one of the at least two links is detected to be faulty, selecting multicast group identifiers sequentially from the multicast group identifiers corresponding to the faulty link as multicast group identifiers to be processed; associating the multicast group identifiers to be processed with normal links among the at least two links; sending a fourth multicast join message to the multicast source through the normal link associated with the multicast group identifiers to be processed; receiving third multicast data through the normal link associated with the multicast group identifiers, wherein the third multicast data is sent by the multicast source according to the fourth multicast join message; and sending the third multicast data to the multicast receiving device.

10. The method according to claim 9, characterized in that, Associating the multicast group identifier to be processed with the normal links among the at least two links includes: Step A: Determining the minimum used bandwidth information among the normal links of the at least two links; Step B: Associating the multicast group identifier to be processed with the links among the normal links of the at least two links that have the minimum used bandwidth information; Step C: Updating the used bandwidth information of the links associated with the multicast group identifier to be processed to the sum of the traffic bandwidth information corresponding to the multicast group identifier to be processed and the minimum used bandwidth information among the normal links; Repeating steps A to C until the end.

11. The method according to any one of claims 7 to 10, characterized in that, The method further includes: when the ratio of the traffic bandwidth of the first multicast data to the total bandwidth of the first link is greater than or equal to a preset ratio, triggering the step of determining the used bandwidth information of the at least two links; when the ratio of the traffic bandwidth of the first multicast data to the bandwidth of the first link is less than the preset ratio, not executing the step of determining the used bandwidth information of the at least two links.

12. A method for forwarding multicast data, characterized in that, The method is applied to a first switching device in a communication system, the communication system further including a second switching device connected to a multicast source, and there are at least two links between the first switching device and the second switching device. The method includes: configuring a primary link and a backup link for a multicast group, the primary link and the backup link being equivalent links; receiving first multicast data of the multicast group through the primary link; sending the first multicast data to a multicast receiving device; after detecting a failure of the primary link, sending a multicast join message to the multicast source through the backup link; receiving second multicast data of the multicast group through the backup link, the second multicast data being sent by the multicast source according to the multicast join message; and sending the second multicast data to the multicast receiving device.

13. A switching device, characterized in that, include: A communication interface is used to receive multicast join messages from a multicast receiving device, the multicast join message including a multicast group identifier; a processing module is also used to obtain the minimum value from the used bandwidth information of at least two links, and allocate a first link corresponding to the minimum value to the multicast group corresponding to the multicast group identifier, the first link being used to transmit the first multicast data of the multicast group.

14. The apparatus according to claim 13, characterized in that, The device further includes a storage module; when the storage module stores the historical traffic bandwidth information of the multicast group, the processing module is further configured to update the used bandwidth information of the first link to the sum of the minimum value and the historical traffic bandwidth information of the multicast group; When the storage module does not store the historical traffic bandwidth information of the multicast group, the processing module is further configured to update the used bandwidth information of the first link to the sum of the minimum value and the traffic bandwidth reference value.

15. The apparatus according to claim 13 or 14, characterized in that, The historical traffic bandwidth information stored in the storage module is greater than the bandwidth threshold.

16. The apparatus according to any one of claims 14 to 15, characterized in that, The processing module is further configured to obtain the traffic bandwidth information of the first multicast data and the current used bandwidth information of the first link; when the storage module stores the historical traffic bandwidth information of the multicast group, the processing module is further configured to update the used bandwidth information of the first link to the sum of the first difference and the traffic bandwidth information of the first multicast data, wherein the first difference is the difference between the current used bandwidth information of the first link and the historical traffic bandwidth information of the multicast group. When the storage module does not store the historical traffic bandwidth information of the multicast group, the processing module is further configured to update the used bandwidth information of the first link to the sum of the second difference and the traffic bandwidth information of the first multicast data, wherein the second difference is the difference between the current used bandwidth information of the first link and the traffic bandwidth reference value.

17. The apparatus according to claim 16, characterized in that, When the ratio of the bandwidth of the first multicast data to the total bandwidth of the first link is greater than or equal to a preset ratio and the bandwidth information of the first multicast data is less than the difference between the used bandwidth information of the first link and the used bandwidth information of the second link, the processing module is further configured to switch the link corresponding to the multicast group from the first link to the second link. The second link is the link with the minimum used bandwidth information at the current moment among the at least two links, and the second link is used to transmit the second multicast data of the multicast group.

18. The apparatus according to any one of claims 13 to 17, characterized in that, The used bandwidth information refers to the used bandwidth value or link utilization rate.

19. A switching device, characterized in that, include: A communication interface is used to receive a first multicast join message from a multicast receiving device, wherein the first multicast join message includes a multicast group identifier. The processing module is used to determine that the link corresponding to the multicast group identifier is the first link, and the first link is the link that carries the fewest multicast groups among the at least two links; The communication interface is also used to send a second multicast join message to the multicast source through the first link; The first multicast data is received through the first link, and the first multicast data is sent by the multicast source according to the second multicast join message; the processing module is further configured to determine the used bandwidth information of the at least two links; when the used bandwidth information of the first link is not the minimum value among the used bandwidth information of the at least two links, the link corresponding to the multicast group identifier is updated from the first link to the second link, and the second link is the link with the minimum used bandwidth information among the at least two links. The communication interface is also used to send a third multicast join message to the multicast source via the second link; The second multicast data is received through the second link, and the second multicast data is sent by the multicast source according to the third multicast join message; The second multicast data is sent to the multicast receiving device.

20. The apparatus according to claim 19, characterized in that, The used bandwidth information refers to the used bandwidth value or link utilization rate.

21. The apparatus according to claim 19 or 20, characterized in that, The processing module is further configured to, when detecting that at least one of the at least two links is faulty, sequentially select multicast group identifiers from the multicast group identifiers corresponding to the faulty link as multicast group identifiers to be processed; associate the multicast group identifier to be processed with the normal link among the at least two links; the communication interface is further configured to send a fourth multicast join message to the multicast source through the normal link associated with the multicast group identifier to be processed. The third multicast data is received through the normal link associated with the multicast group identifier, and the third multicast data is sent by the multicast source according to the fourth multicast join message; The third multicast data is sent to the multicast receiving device.

22. The apparatus according to claim 21, characterized in that, The processing module is specifically used to perform the following steps: Step A: Determine the minimum used bandwidth information among at least two normal links; Step B: Associate the multicast group identifier to be processed with the link that has the minimum used bandwidth information among at least two normal links. Step C: Update the used bandwidth information of the link associated with the multicast group identifier to be processed to the sum of the traffic bandwidth information corresponding to the multicast group identifier to be processed and the minimum used bandwidth information in the normal link; Repeat steps A through C until the end.

23. The apparatus according to any one of claims 19 to 22, characterized in that, When the ratio of the bandwidth of the first multicast data to the bandwidth of the first link is greater than or equal to a preset ratio, the processing module is triggered to determine the bandwidth used information of the at least two links; when the ratio of the bandwidth of the first multicast data to the bandwidth of the first link is less than the preset ratio, the processing module is not triggered to determine the bandwidth used information of the at least two links.

24. A switching device, characterized in that, include: The processing module is used to configure a primary link and a backup link for a multicast group, wherein the primary link and the backup link are equal-cost links; A communication interface is used to receive the first multicast data of the multicast group through the main link; Send the first multicast data to the multicast receiving device; After the processing module detects a failure in the primary link, it sends a multicast join message to the multicast source through the backup link. The second multicast data of the multicast group is received through the backup link, and the second multicast data is sent by the multicast source according to the multicast join message; The second multicast data is sent to the multicast receiving device.

25. A switching device, characterized in that, It includes a processor and a memory, the memory storing computer-readable instructions, the processor executing the computer-readable instructions to cause the switching device to perform the method as described in any one of claims 1 to 12.

26. A computer-readable storage medium, characterized in that, It includes computer program instructions, which, when executed by a switching device, cause the switching device to perform the method according to any one of claims 1 to 12.

27. A computer program product containing instructions, characterized in that, When the instruction is executed by the switching device, the switching device performs the method according to any one of claims 1 to 12.