Multicast communication method, communication equipment and computer readable storage medium
Through the multicast receiving network equipment independently detects packet loss and switches paths, the continuous packet loss problem caused by link packet loss in the multicast network is solved, and the multicast communication quality is improved and the path switching complexity is reduced.
Patent Information
- Application Number
- CN202410164775.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-02
- Publication Date
- 2025-08-05
AI Technical Summary
In a multicast network, if there is packet loss on the link, the multicast route will not be updated, resulting in continuous packet loss of multicast services. The existing technology requires the devices on both ends of the link to cooperate with each other, and the deployment is complex and compatibility is poor.
The network equipment of the multicast receiving end independently detects packet loss and calculates the path health value. When it is lower than the threshold, the multicast traffic is switched to other paths by switching packets to avoid continuous packet loss. The path switching is low in complexity and does not affect unicast traffic.
It has achieved the improvement of multicast communication quality, high path switching efficiency, independent completion without manual intervention, avoiding continuous packet loss of multicast traffic, and ensuring the normal transmission of unicast traffic.
Smart Images

Figure CN120434070A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a multicast communication method, a communication device, and a computer-readable storage medium. Background Art
[0002] Multicast is a communication method between network devices. A network device, acting as a multicast source, transmits multicast messages across a multicast network to multiple network devices that are members of a multicast group. To build a multicast network, a multicast protocol must be configured. The Protocol Independent Multicast (PIM) protocol is currently the mainstream intra-domain multicast protocol.
[0003] In a multicast network, network devices select routes based on the unicast routes used by multicast group members to reach the multicast source device. They use this unicast routing information to build and maintain multicast routing tables to forward multicast packets. Therefore, if packet loss occurs on a link carrying multicast packets, but the multicast routes in the multicast network are not updated, this can lead to continued packet loss in the multicast service. Summary of the Invention
[0004] The present application provides a multicast communication method, a communication device, and a computer-readable storage medium for improving the communication quality of multicast communication.
[0005] In a first aspect, the present application provides a method for multicast communication. First, a first network device receives multicast traffic through a first single-hop path and senses that packet loss has occurred in the multicast traffic received through the first single-hop path. The first network device may be a multicast group member (also called a multicast receiver) in a multicast network, or the first network device may be a multicast forwarding device (such as a router or switch) in a multicast network, responsible for delivering the received multicast traffic to the next hop in the multicast network (which may be a multicast group member or other multicast forwarding device).
[0006] In this application, the first single-hop path is a single-hop path (Single-Hop Link) with the first network device as the receiving end. Specifically, the complete path of the multicast traffic from the multicast source device to the multicast receiver includes several single-hop paths. Among them, the complete path refers to the complete transmission path that the traffic passes through from the source network device to the destination network device. That is, the complete path includes several single-hop paths, and the single-hop path is a one-hop path between two directly connected network devices. In other words, the complete path describes the set of all single-hop paths that the traffic passes through from the source network device to the destination network device. The single-hop path is the basic unit that constitutes the complete path.
[0007] Therefore, after the first network device determines that multicast traffic received via the first single-hop path has experienced packet loss, the first network device, as the receiving-end network device of the first single-hop path, can obtain a path health value corresponding to the first single-hop path. The path health value is calculated by the receiving-end network device of the single-hop path based on at least one of error detection information, path oscillation detection information, Bidirectional Forwarding Detection (BFD) technical information, and fault detection information of the receiving-end network device. In practical applications, the path health value can also be calculated using other information, which is not specifically limited here.
[0008] If the first network device determines that multicast traffic received via a first single-hop path has experienced packet loss, and the path health value of the first single-hop path is lower than a first threshold, the first network device sends a first switching message to a second network device on a second single-hop path, instructing the second network device to send the multicast traffic to the first network device via the second single-hop path. The second network device is the previous hop of the first network device on the second single-hop path; in other words, the second network device is the sending end network device on the second single-hop path.
[0009] After the first network device sends the first switching message to the second network device on the second single-hop path, the multicast traffic originally transmitted through the first single-hop path can be transmitted by the second network device through the second single-hop path, so that the first network device can receive the multicast traffic through the second single-hop path.
[0010] In an embodiment of the present application, a receiving-end network device (e.g., a first network device) of multicast traffic can proactively send a switching message to a sending-end network device of another transmission path when packet loss occurs in the multicast traffic and a transmission path for the multicast traffic fails, thereby switching the multicast traffic to another transmission path for transmission. This allows the multicast traffic to be delivered to the receiving-end network device (the first network device) via the other transmission path, thereby avoiding continuous packet loss of the multicast traffic and improving the communication quality of the multicast communication. Furthermore, the first network device independently completes the entire process from determining that packet loss has occurred in the multicast traffic to sending the first switching message, without the need for participation and cooperation from the opposite-end network device. The implementation complexity of path switching is low, and there is no need for manual fault path location and path switching, thereby improving the efficiency of path switching.
[0011] On the other hand, the first switching message sent by the first network device is only used to switch the transmission path of multicast traffic, so the unicast traffic transmitted through the first single-hop path will not be affected. The unicast traffic can continue to be transmitted to the first network device through the first single-hop path, ensuring the service quality of the unicast traffic on the first single-hop path.
[0012] It should be understood that in the embodiments of the present application, only the same multicast traffic is taken as an example to introduce the path switching process of the multicast traffic. Among them, the same multicast traffic refers to a data stream originating from the same multicast source device and sent to the same multicast group. In actual applications, if multiple different multicast traffics are transmitted on a single-hop path, each multicast traffic on the single-hop path can be applied to the multicast communication method exemplified in the embodiments of the present application. Specifically, the first network device sends a switching message for each multicast traffic. Optionally, the first network device can switch these multicast traffics to the same single-hop path for transmission, or it can switch these multicast traffics to different single-hop paths for transmission, and the embodiments of the present application do not limit this.
[0013] Based on the first aspect, in an optional implementation, the multicast source device of the multicast traffic and the first network device include N single-hop paths leading to the first network device, where N is an integer greater than 1. In other words, the above-mentioned N single-hop paths all use the first network device as the receiving end network device, and the multicast traffic can reach the first network device through any single-hop path among the N single-hop paths. The first single-hop path is one of the N single-hop paths. Since packet loss occurs during the transmission of the multicast traffic on the first single-hop path, and the path health value of the first single-hop path is less than the first threshold, the first network device needs to receive the multicast traffic through other single-hop paths among the above-mentioned N single-hop paths. Therefore, the second single-hop path can be any single-hop path among the N single-hop paths except the first single-hop path.
[0014] Based on the first aspect, in an optional implementation, after a first network device determines that packet loss has occurred in the transmission of multicast traffic on a first single-hop path and that the path health value of the first single-hop path is less than a first threshold, in order to switch the multicast traffic to another single-hop path for transmission, the first network device may update (recalculate) routing information with the multicast source device of the multicast traffic as the destination address, and the updated routing information indicates a reverse path of the second single-hop path. The first network device then sends a first switching message to a second network device on the second single-hop path.
[0015] Based on the first aspect, in an optional implementation, the first network device may increase the cost of a third single-hop path, where the third single-hop path is the reverse path of the first single-hop path, i.e., the third single-hop path is a single-hop path in the direction from the multicast group members to the multicast source. Because each network device in the multicast network selects multicast traffic based on the unicast route from the multicast group members to the multicast source, a change (increase) in the cost of the third single-hop path triggers each network device in the multicast network (including the first network device) to recalculate routing information with the multicast source device of the multicast traffic as the destination address.
[0016] Based on the first aspect, in an optional implementation, after the first network device sends the first switching message to the second network device on the second single-hop path, the first single-hop path may not have begun to fail, and the multicast traffic can still be transmitted to the first network device through the first single-hop path. Therefore, the first network device can send a pruning message for the first single-hop path to a third network device, wherein the third network device is the previous hop of the first network device on the first single-hop path. After the third network device receives the pruning message for the first single-hop path, it determines that the first single-hop path is an invalid path, and the third network device will not transmit multicast traffic through the first single-hop path, thereby reducing the waste of network resources.
[0017] Based on the first aspect, in an optional implementation, although the first network device switches the multicast traffic on the first single-hop path to the second single-hop path for transmission, the unicast traffic transmitted through the first single-hop path will not be affected, and the unicast traffic can continue to be transmitted to the first network device through the first single-hop path. Therefore, the first network device can calculate the path health value of the first single-hop path based on the unicast traffic transmitted on the first single-hop path. If the path health value of the first single-hop path is greater than or equal to the second threshold, it means that the path failure of the first single-hop path has been restored and can meet the transmission requirements of the multicast traffic. Then, the first network device sends a second switching message to the third network device on the first single-hop path. The second switching message is used to instruct the third network device to send multicast traffic to the first network device through the first single-hop path. Among them, the third network device is the previous hop of the first network device on the first single-hop path. In other words, the third network device is the sending end network device of the first single-hop path. The second threshold is greater than or equal to the first threshold. In practical applications, when the second threshold is greater than the first threshold, it can prevent the transmission path of multicast traffic from switching frequently, thereby ensuring the communication quality of multicast communication.
[0018] After the first network device sends the first handover message to the third network device on the first single-hop path, the multicast traffic originally transmitted via the second single-hop path can now be transmitted by the third network device via the first single-hop path, allowing the first network device to receive the multicast traffic via the first single-hop path. This allows multicast traffic to continue to be transmitted on the single-hop path with a higher path health value, improving the communication quality of multicast communication.
[0019] Based on the first aspect, in an optional embodiment, a threshold for the number of times the first network device sends a handover message within a preset time period can be pre-configured to obtain a third threshold, where the handover message includes but is not limited to the first handover message, the second handover message, and the third handover message (if any). When the path health value of the first single-hop path is less than the first threshold, but the number of times the first network device sends a handover message within the preset time period is greater than or equal to the third threshold, it indicates that the number of times the first network device sends a handover message is too frequent. At this time, the first network device will not send the first handover message to the second network device on the second single-hop path. When the path health value of the first single-hop path is less than the first threshold, and the number of times the first network device sends a handover message within the preset time period is less than the third threshold, the first network device sends the first handover message to the network device on the second single-hop path. By configuring the third threshold to limit the number of times the first network device sends a handover message within the preset time period, it is possible to avoid frequent switching of transmission paths for multicast traffic. On the other hand, it can also effectively reduce the impact caused by instantaneous fluctuations and instantaneous packet loss in the network environment, thereby improving the stability of multicast communication.
[0020] Based on the first aspect, in an optional embodiment, a first network device receives multiple multicast messages in multicast traffic via a first single-hop path. These multicast messages belong to the same multicast traffic. The same multicast traffic refers to a data stream originating from the same multicast source device and destined for the same multicast group. The multicast traffic is transmitted between various network devices in the multicast network via the Real-time Transport Protocol (RTP). Therefore, each multicast message in the multicast traffic received by the first network device via the first single-hop path includes an RTP sequence number corresponding to the multicast message. The first network device determines whether packet loss has occurred in the multicast traffic based on the RTP sequence numbers of the multiple multicast messages. Because the RTP sequence numbers of multicast messages are incremented according to the order in which the multicast messages are sent, the first network device can quickly identify lost multicast messages based on the RTP sequence numbers, thereby improving the efficiency of packet loss detection. Furthermore, packet loss detection based on RTP sequence numbers can promptly detect situations in which a small amount of packet loss has occurred in the multicast traffic, avoiding the situation in which service quality is impaired and cannot be self-recovered due to a small amount of packet loss.
[0021] Based on the first aspect, in an optional implementation, if N RTP sequence numbers are consecutively lost among the RTP sequence numbers of multiple multicast packets, the first network device determines that packet loss has occurred in the multicast traffic. In practical applications, the value of N can be flexibly configured based on multicast service needs or scenario requirements, thereby improving the flexibility of packet loss detection. For example, in scenarios with high Quality of Service (QoS) requirements for multicast services, the value of N can be reduced; in scenarios with low QoS requirements for multicast services, the value of N can be increased.
[0022] Based on the first aspect, in an optional implementation, if the packet loss rate of multicast packets received by the first network device is greater than a fourth threshold, the first network device determines that packet loss has occurred in the multicast traffic. In practical applications, the value of the fourth threshold can be flexibly configured based on multicast service needs or scenario requirements, thereby increasing the flexibility of packet loss detection. For example, in scenarios with high QoS requirements for multicast services, the value of the fourth threshold can be lowered; in scenarios with low QoS requirements for multicast services, the value of the fourth threshold can be increased.
[0023] Based on the first aspect, in an optional implementation, the first handover message may be a first join message in multicast communication. The first join message carries the multicast group address of the multicast traffic. After receiving the first join message, the second network device determines, based on the multicast group address in the first join message, that the multicast traffic should be transmitted via a second single-hop path (i.e., a reverse path of the single-hop path used to transmit the first join message).
[0024] In a second aspect, the present application provides a first network device, including:
[0025] a processing unit, configured to determine that packet loss occurs in multicast traffic received through the first single-hop path;
[0026] The processing unit is further configured to, when a path health value of the first single-hop path is less than a first threshold, send a first switching message to a second network device on a second single-hop path, wherein the second network device is a previous hop of the first network device on the second single-hop path, and the first switching message is used to instruct the second network device to send multicast traffic to the first network device via the second single-hop path, and the path health value is calculated based on at least one of error detection information, path oscillation detection information, bidirectional forwarding detection (BFD) information, and fault detection information of the first network device;
[0027] The transceiver unit is configured to receive multicast traffic through the second single-hop path.
[0028] Based on the second aspect, in an optional implementation, there are N single-hop paths between the multicast source device of the multicast traffic and the first network device leading to the first network device, the N single-hop paths include a first single-hop path, and the second single-hop path is another single-hop path in the N single-hop paths except the first single-hop path, where N is an integer greater than 1.
[0029] Based on the second aspect, in an optional implementation, the processing unit is further configured to update routing information with the multicast source device of the multicast traffic as the destination address, and the updated routing information indicates a reverse path of the second single-hop path.
[0030] Based on the second aspect, in an optional implementation, the processing unit is specifically configured to increase a cost value of a third single-hop path, where the third single-hop path is a reverse path of the first single-hop path;
[0031] Updates the routing information with the multicast source device of the multicast traffic as the destination address based on the cost value.
[0032] Based on the second aspect, in an optional implementation, the processing unit is further configured to send a prune message for the first single-hop path to a third network device, where the third network device is the previous hop of the first network device on the first single-hop path.
[0033] Based on the second aspect, in an optional implementation, the processing unit is further configured to, when a path health value of the first single-hop path is greater than or equal to a second threshold, send a second switching message to a third network device on the first single-hop path, wherein the third network device is a previous hop of the first network device on the first single-hop path, and the second switching message is used to instruct the third network device to send multicast traffic to the first network device through the first single-hop path, and the second threshold is greater than or equal to the first threshold;
[0034] The transceiver unit is further configured to receive multicast traffic through the first single-hop path.
[0035] Based on the second aspect, in an optional implementation, the processing unit is specifically used to send a first switching message to the second network device on the second single-hop path when the path health value of the first single-hop path is less than the first threshold and the number of switching messages sent by the first network device within a preset time period is less than a third threshold.
[0036] Based on the second aspect, in an optional implementation, the processing unit is specifically configured to receive multicast traffic through a first single-hop path, where the multicast traffic includes a plurality of multicast packets, and each multicast packet includes a Real-time Transport Protocol RTP sequence number;
[0037] Based on the RTP sequence numbers of multiple multicast packets, it is determined that multicast traffic has been lost.
[0038] Based on the second aspect, in an optional implementation, the processing unit is specifically configured to determine that packet loss occurs in the multicast traffic when N RTP sequence numbers are lost consecutively among the RTP sequence numbers of multiple multicast packets, where N is an integer greater than or equal to 1.
[0039] Based on the second aspect, in an optional implementation, the transceiver unit is specifically configured to receive multicast traffic through a first single-hop path, where the multicast traffic includes multiple multicast packets;
[0040] The processing unit is specifically configured to determine that packet loss occurs in the multicast traffic when the packet loss rate of the plurality of multicast messages is greater than a fourth threshold.
[0041] Based on the second aspect, in an optional implementation manner, the first switching message is a first join message, and the first join message includes a multicast group address of the multicast traffic.
[0042] The information interaction and execution process and other contents of the embodiment shown in this aspect are based on the same concept as the embodiment shown in the first aspect. Therefore, for the description of the beneficial effects shown in this aspect, please refer to the above-mentioned first aspect, and the details will not be repeated here.
[0043] In a third aspect, the present application provides a communication device comprising: a processor coupled to a memory, the memory being used to store instructions, which, when executed by the processor, enables the computing device to implement the method of the above-mentioned first aspect, or any possible implementation of the first aspect.
[0044] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having instructions stored thereon, which, when executed, enables a computer to execute the method in the above-mentioned first aspect or any possible implementation of the first aspect.
[0045] In a fifth aspect, an embodiment of the present application provides a computer program product, which stores computer-readable instructions. When the computer-readable instructions are executed by a processor, the method in the first aspect or any possible implementation of the first aspect is implemented.
[0046] In a sixth aspect, an embodiment of the present application provides a chip, comprising: a processor, the processor being coupled to a memory, the memory being used to store instructions, and when the instructions are executed by the processor, the chip implements the method in the above-mentioned first aspect, or any possible implementation of the first aspect.
[0047] Among them, the technical effects brought about by any implementation method of the third to sixth aspects can refer to the technical effects brought about by the implementation method of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without any creative work.
[0049] Figure 1 A possible, non-limiting system architecture diagram of the multicast communication method in the embodiments of the present application;
[0050] Figure 2 A schematic diagram of a flow chart of a multicast communication method in an embodiment of the present application;
[0051] Figure 3 A schematic diagram of a possible scenario of the multicast communication method in an embodiment of the present application;
[0052] Figure 4 A schematic diagram of another possible scenario of the multicast communication method in an embodiment of the present application;
[0053] Figure 5 Another flowchart of the multicast communication method in the embodiment of the present application is shown;
[0054] Figure 6 A schematic diagram of the structure of a first network device provided in an embodiment of the present application;
[0055] Figure 7 A schematic diagram of the logical structure of a communication device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0056] Embodiments of the present application provide a multicast communication method, a communication device, and a computer-readable storage medium for improving the communication quality of multicast communication.
[0057] The embodiments of the present application are described below in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation methods of the present application are only used to explain the specific embodiments of the present application and are not intended to limit the embodiments of the present application. It is known to those skilled in the art that with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0058] In the embodiments of the present application, "at least one" refers to one or more, and "more" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0059] The terms "first," "second," "third," "fourth," etc. (if any) in the specification and claims of the present application and in the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential sequence. It should be understood that the numbers used in this way are interchangeable where appropriate, so that the embodiments of the present application described herein can, for example, be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having," and any variations thereof, are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or apparatus comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or apparatus.
[0060] The following is an explanation of some nouns or terms used in the embodiments of the present application, which are also considered part of the content of the invention.
[0061] Multicast: Multicast is a network transmission technology that allows information to be efficiently transmitted from a single sender (source network device) to multiple receivers (destination network devices) without having to send a separate data stream to each individual receiver. In multicast, data packets are sent to a specific multicast address, which corresponds to a group of receivers. When multicast traffic is forwarded through routers or switches in the network, the routers or switches will replicate and forward the multicast traffic to all receivers in the network that have subscribed to this multicast address based on the multicast routing table and protocol rules. The multicast mechanism greatly reduces bandwidth consumption and improves the efficiency of large-scale data distribution. It is particularly widely used in scenarios such as live video broadcasts, online meetings, or real-time financial data updates.
[0062] Multicast group: A multicast group is a collection of addresses identified by an Internet Protocol (IP) multicast address. When a network device joins a multicast group, it becomes a member of that multicast group and can identify and receive multicast traffic sent to that group.
[0063] Multicast source: The sender of multicast traffic is called a multicast source. A multicast source can send data to multiple multicast groups simultaneously, and multiple multicast sources can send packets to a single multicast group simultaneously. Multicast sources generally do not need to join a multicast group.
[0064] Multicast group members: Network devices in a multicast group are called members of the multicast group. Multicast group membership is dynamic; members can choose to join or leave the multicast group. Multicast group members can be widely distributed across the network.
[0065] Multicast forwarding device: A multicast forwarding device refers to a forwarding device (including but not limited to routers or switches) that supports multicast communication. A multicast forwarding device not only provides multicast routing but also manages multicast group membership on the terminal network segments connected to users.
[0066] Protocol Independent Multicast (PIM): PIM is a multicast routing protocol used to build multicast networks. Independent of unicast routing protocols, PIM leverages routing information in the unicast routing table to perform a Reverse Path Forwarding (RPF) check on multicast traffic. If the check passes, it creates a multicast routing table entry, thereby forwarding the multicast traffic.
[0067] A prune message is a control message used in network routing protocols to optimize data transmission paths. It maintains the multicast distribution tree and removes unnecessary branches to conserve network resources. In a multicast network, when certain branches no longer have multicast receivers, they can be removed from the multicast distribution tree. This process is called pruning. By sending a prune message directed to a specific branch, a network device notifies upstream nodes to stop sending multicast traffic to that branch, thereby optimizing routing within the multicast distribution tree.
[0068] Real-time Transport Protocol (RTP): RTP is a standard protocol for end-to-end transmission of real-time data (such as audio, video, or analog signals). In RTP, packets contain sequence numbers, timestamps, and other relevant information. This information is used to recover from lost packets, adjust the playback rate, and provide other functions required for real-time streaming, ensuring that packets arrive at the receiver in the correct order.
[0069] RTP sequence number: In RTP, the RTP sequence number is used to mark the order of successively transmitted data packets. Each RTP packet contains a unique RTP sequence number. The continuity of RTP sequence numbers is crucial for the receiver to correctly reconstruct the data stream. The RTP sequence number helps the receiver detect and correct potential packet loss, out-of-order transmission, or duplication.
[0070] Next, possible application scenarios involved in the embodiments of the present application are introduced.
[0071] Multicast is a communication method between network devices. A network device, acting as a multicast source, transmits multicast traffic across a multicast network to multiple network devices that are members of a multicast group. To build a multicast network, a multicast protocol must be configured. The Protocol Independent Multicast (PIM) protocol is currently the mainstream intra-domain multicast protocol.
[0072] In a multicast network, network devices select routes based on the unicast routes from multicast group members to the multicast source device. They use this unicast routing information to build and maintain multicast routing tables to forward multicast traffic. If packet loss occurs on a link carrying multicast traffic but the multicast routes in the multicast network are not updated, this can lead to persistent packet loss.
[0073] Currently, in IP networks, by monitoring the link bit error rate or using Bidirectional Forwarding Detection (BFD) technology for link status detection, it is possible to achieve linkage adjustment with the Interior Gateway Protocol (IGP) cost (COST) value, thereby optimizing routing selection and improving network stability and service quality.
[0074] Link bit error rate monitoring: Network devices can monitor the bit errors in data transmission on links in real time. If the bit error rate of a link exceeds a preset threshold, it indicates that the link may have transmission quality issues. The cost value of this link in the IGP protocol can be increased, lowering its priority in routing calculations. This reduces the probability of this link being selected as the optimal path, encouraging traffic to be forwarded over links with higher quality.
[0075] BFD: BFD is a fast fault detection mechanism used to quickly detect and monitor the forwarding connectivity of links or IP routes in a network. BFD can quickly detect communication failures and take appropriate measures, such as establishing a backup channel to restore communication, thereby ensuring network reliability. Once BFD detects a link problem, it increases the link's cost in the IGP protocol, lowering its priority in route calculations. This reduces the probability of this link being selected as the optimal path, encouraging traffic to be forwarded over higher-quality links.
[0076] However, adjusting link cost by monitoring the link's bit error rate or BFD results requires coordination between network devices at both ends of the link, meaning both devices must implement the solution, making deployment more complex. Furthermore, adjusting link cost based on BFD results requires extending the existing BFD protocol, which reduces compatibility.
[0077] On the other hand, increasing the link cost value is equivalent to increasing the cost values of both ports on the link, and the routing of unicast traffic transmitted through these two ports will also be affected and changed.
[0078] In view of this, the present application provides a multicast communication method, a communication device and a computer-readable storage medium for improving the communication quality of multicast communication. For ease of understanding, first, a possible, non-restrictive system architecture of the multicast communication method in the embodiment of the present application is introduced. Figure 1 , Figure 1 FIG. 1 is a possible, non-limiting system architecture diagram of the multicast communication method in the embodiment of the present application. Figure 1 As shown, the multicast communication method in the embodiment of the present application is applicable to Figure 1 At least one network device in the multicast network shown, where the network device can be a multicast forwarding device in the multicast network, or a multicast group member in the multicast network. In practical applications, a network device is a communication entity used to send or receive signals, or both. Optionally, the communication entity can be a router, switch, virtual switch, virtual router, or smart network card, etc., the specific details of which are not limited here.
[0079] like Figure 1 As shown, the network device periodically sends a join message to the upstream node to indicate that the network device needs to receive multicast traffic from the upstream node. In the multicast communication method of the embodiment of the present application, when the path of the multicast traffic from the upstream node to the network device fails (including situations such as path disconnection or path quality deterioration), the network device can determine whether it needs to continue to receive the multicast traffic through another path based on the received multicast traffic, thereby avoiding the multicast traffic from being continuously transmitted on the faulty path, resulting in continuous packet loss of the multicast service.
[0080] Next, the multicast communication method in the embodiment of the present application is introduced. Figure 2 , Figure 2 This is a flow chart of the multicast communication method in the embodiment of the present application. The server migration method in the embodiment of the present application takes the first network device as the execution subject as an example to illustrate the method, but the present application does not limit the execution subject of the interactive illustration, nor does it limit the specific hardware form or software form of the first network device. For example, Figure 2 The first network device in the embodiment may be a chip, a chip system, or a processor for supporting the first network device to implement the method; or the first network device may be a logical node, a logical module, or software for implementing all or part of the functions of the first network device; the first network device may also be a collective term for multiple logical nodes, multiple logical modules, or multiple software for implementing the multicast communication method. Figure 2 As shown, the multicast communication method in the embodiment of the present application includes but is not limited to steps 101 to 103.
[0081] 101. A first network device determines that multicast traffic received through a first single-hop path has packet loss.
[0082] First, a first network device receives multicast traffic via a first single-hop path and detects packet loss in the multicast traffic received via the first single-hop path. The first network device may be a multicast group member (also known as a multicast receiver) in the multicast network, or a multicast forwarding device (e.g., a router or switch) in the multicast network, responsible for forwarding the received multicast traffic to the next hop in the multicast network (which may be a multicast group member or another multicast forwarding device).
[0083] In the embodiment of the present application, the first single-hop path is a single-hop path (Single-Hop Link) with the first network device as the receiving end. Specifically, the complete path of the multicast traffic from the multicast source device to the multicast receiver includes several single-hop paths. Among them, the complete path refers to the complete transmission path that the traffic passes through from the source network device to the destination network device. That is, the complete path includes several single-hop paths, and the single-hop path is a one-hop path between two directly connected network devices. In other words, the complete path describes the collection of all single-hop paths that the traffic passes through from the source network device to the destination network device. The single-hop path is the basic unit that constitutes the complete path.
[0084] For example, multicast traffic originates from a source network device (network device A), passes through multiple transit nodes (network device B, network device C, and network device D), and finally reaches the destination network device (network device E). In this scenario, the multicast traffic traverses the single-hop path from network device A to network device B (single-hop path 1), the single-hop path from network device B to network device C (single-hop path 2), the single-hop path from network device C to network device D (single-hop path 3), and the single-hop path from network device D to network device E (single-hop path 4). The complete path of the multicast traffic includes all single-hop paths between network devices A and network device E. In other words, the complete path is the set of single-hop paths 1, 2, 3, and 4.
[0085] In one possible implementation, a first network device receives multiple multicast messages in multicast traffic via a first single-hop path. These multicast messages belong to the same multicast traffic. The same multicast traffic refers to a data stream originating from the same multicast source device and sent to the same multicast group. The multicast traffic is transmitted between various network devices in the multicast network via the Real-time Transport Protocol (RTP). Therefore, each multicast message in the multicast traffic received by the first network device via the first single-hop path includes an RTP sequence number corresponding to the multicast message. The first network device determines whether packet loss has occurred in the multicast traffic based on the RTP sequence numbers of the multiple multicast messages. Since the RTP sequence numbers of the multicast messages are incremented according to the order in which the multicast messages are sent, the first network device can quickly identify lost multicast messages based on the RTP sequence numbers, thereby improving the efficiency of packet loss detection. Furthermore, packet loss detection based on RTP sequence numbers can promptly detect situations where a small amount of packet loss occurs in the multicast traffic, avoiding the situation where service quality is impaired and cannot be self-recovered due to a small amount of packet loss.
[0086] In one possible implementation, if N RTP sequence numbers are lost consecutively among the RTP sequence numbers of multiple multicast packets, the first network device determines that packet loss has occurred in the multicast traffic. In practical applications, the value of N can be flexibly configured based on multicast service needs or scenario requirements to improve the flexibility of packet loss detection. For example, in scenarios with high Quality of Service (QoS) requirements for multicast services, the value of N can be lowered; in scenarios with low QoS requirements for multicast services, the value of N can be increased.
[0087] In one possible implementation, if the packet loss rate of multicast packets received by the first network device is greater than a fourth threshold, the first network device determines that packet loss has occurred in the multicast traffic. In practical applications, the value of the fourth threshold can be flexibly configured based on multicast service needs or scenario requirements, thereby increasing the flexibility of packet loss detection. For example, in scenarios with high QoS requirements for multicast services, the value of the fourth threshold can be lowered; in scenarios with low QoS requirements for multicast services, the value of the fourth threshold can be increased.
[0088] In actual applications, the first network device may also use other methods or other criteria to determine whether multicast traffic has packet loss, which is not limited in this embodiment of the present application. For example, the first network device may query the log of the application receiving the multicast traffic to see whether there is any record of packet loss or reception error.
[0089] In multicast communications, when a single-hop path fails, resulting in multicast traffic packet loss, the single-hop path downstream of the single-hop path may experience packet loss due to the inability to receive the correct multicast traffic, causing the impact of the packet loss on the upstream single-hop path to continue to propagate along the downstream single-hop path. However, if these downstream single-hop paths are normal and have not failed, there is no need to switch to the normal downstream single-hop path. Therefore, after the first network device determines that the multicast traffic received through the first single-hop path has experienced packet loss, it is necessary to further determine whether it is due to the failure of the first single-hop path, thereby reducing the impact of the failure and packet loss of the upstream single-hop path on the downstream single-hop path.
[0090] 102. If the path health value of the first single-hop path is less than a first threshold, the first network device sends a first switching message to the second network device on the second single-hop path.
[0091] In the embodiment of the present application, whether the path health value corresponding to a single-hop path is less than a preset first threshold value indicates whether the single-hop path has failed. If it is less than the first threshold value, it indicates that the single-hop path has failed. If it is greater than or equal to the first threshold value, it indicates that the single-hop path has not failed. The path health value is calculated by the receiving-end network device of the single-hop path based on at least one of error detection information, path oscillation detection information, bidirectional forwarding detection (BFD) technology information, and fault detection information of the receiving-end network device. In actual applications, the path health value can also be calculated using other information, which is not limited here.
[0092] Therefore, after the first network device determines that the multicast traffic received through the first single-hop path has packet loss, the first network device, as the receiving end network device of the first single-hop path, can obtain the path health value corresponding to the first single-hop path. If the path health value of the first single-hop path is less than the first threshold, it means that the first single-hop path has failed. Since the first network device determines that the multicast traffic received through the first single-hop path has packet loss, and the path health value of the first single-hop path is low (failure has occurred), the first network device sends a first switching message to the second network device on the second single-hop path. The first switching message is used to instruct the second network device to send multicast traffic to the first network device via the second single-hop path. Among them, the second network device is the previous hop of the first network device on the second single-hop path. In other words, the second network device is the sending end network device of the second single-hop path.
[0093] Optionally, the first handover message may be a first join message in multicast communication. The first join message carries the multicast group address of the multicast traffic. After receiving the first join message, the second network device determines, based on the multicast group address in the first join message, that the multicast traffic should be transmitted via a second single-hop path (i.e., a reverse path of the single-hop path used to transmit the first join message).
[0094] In one possible implementation, there are N single-hop paths between the multicast source device of the multicast traffic and the first network device leading to the first network device, where N is an integer greater than 1. In other words, the above-mentioned N single-hop paths all use the first network device as the receiving end network device, and the multicast traffic can reach the first network device through any single-hop path among the N single-hop paths. The first single-hop path is one of the N single-hop paths. Since packet loss occurs during the transmission of the multicast traffic on the first single-hop path, and the path health value of the first single-hop path is less than the first threshold, the first network device needs to receive the multicast traffic through other single-hop paths among the above-mentioned N single-hop paths. Therefore, the second single-hop path can be any single-hop path among the N single-hop paths except the first single-hop path.
[0095] For easier understanding, see Figure 3 , Figure 3 This is a possible scenario diagram of the multicast communication method in the embodiment of the present application. Figure 3 In the scenario shown, network device C is used as the first network device in the embodiment of the present application. There are four single-hop paths between the multicast source device and network device C, which are used to achieve load balancing when transmitting multicast traffic of multiple multicast groups. Among them, these four single-hop paths include two single-hop paths (single-hop path 1 and single-hop path 2) between network device A and network device C, and two single-hop paths (single-hop path 3 and single-hop path 4) between network device B and network device C. Figure 3 In the scenario shown, if packet loss occurs in the multicast traffic on the single-hop path 1 and the path health value of the single-hop path 1 is lower than the first threshold, the network device C can switch the multicast traffic transmitted on the single-hop path 1 to the single-hop path 2, the single-hop path 3 or the single-hop path 4 for transmission by executing the multicast communication method in the embodiment of the present application.
[0096] It should be understood that in the embodiments of the present application, only the same multicast traffic is taken as an example to introduce the path switching process of the multicast traffic. Among them, the same multicast traffic refers to a data stream originating from the same multicast source device and sent to the same multicast group. In actual applications, if multiple different multicast traffics are transmitted on a single-hop path, each multicast traffic on the single-hop path can be applied to the multicast communication method exemplified in the embodiments of the present application. Specifically, the first network device sends a switching message for each multicast traffic. Optionally, the first network device can switch these multicast traffics to the same single-hop path for transmission, or it can switch these multicast traffics to different single-hop paths for transmission, and the embodiments of the present application do not limit this.
[0097] Assume that Figure 3In the scenario shown, 30 multicast flows are transmitted over single-hop path 1, belonging to 30 different multicast groups. Network device C can then switch these 30 multicast flows to the same single-hop path (e.g., single-hop path 2, single-hop path 3, or single-hop path 4) for transmission; alternatively, it can switch these 30 multicast flows to different single-hop paths (single-hop path 2, single-hop path 3, and single-hop path 4) for transmission to achieve load balancing.
[0098] In one possible implementation, after a first network device determines that multicast traffic has experienced packet loss during transmission on a first single-hop path and that the path health value of the first single-hop path is less than a first threshold, the first network device may update (recalculate) routing information with the multicast source device of the multicast traffic as the destination address to switch the multicast traffic to another single-hop path for transmission. The updated routing information indicates a reverse path for the second single-hop path. The first network device then sends a first switching message to a second network device on the second single-hop path.
[0099] Optionally, the first network device may increase the cost of a third single-hop path, where the third single-hop path is the reverse path of the first single-hop path, i.e., the third single-hop path is a single-hop path in the direction from the multicast group members to the multicast source. Because each network device in the multicast network selects multicast traffic based on the unicast route from the multicast group members to the multicast source, a change (increase) in the cost of the third single-hop path triggers each network device in the multicast network (including the first network device) to recalculate routing information with the multicast source device of the multicast traffic as the destination address.
[0100] For easier understanding, see Figure 4 , Figure 4 FIG. 1 is another possible scenario diagram of the multicast communication method in the embodiment of the present application. Figure 4In the scenario shown, network device A is used as the first network device in the embodiment of the present application. If multicast traffic is lost on the single-hop path from network device D to network device A (equivalent to the first single-hop path in the embodiment of the present application), and the path health value of the single-hop path is lower than the first threshold, network device A increases the cost value of the single-hop path from network device A to network device D (equivalent to the third single-hop path in the embodiment of the present application). The change in the cost value will trigger each network device in the multicast network to recalculate the routing information with the multicast source device as the destination address. Among them, the updated routing information indicates the single-hop path from network device A to network device B (equivalent to the reverse path of the second single-hop path, and the second single-hop path is the single-hop path from network device B to network device A). The first network device then sends a first switching message (for example) to the second network device (i.e., network device B) on the second single-hop path. Figure 4 Join message shown).
[0101] 103. The first network device receives multicast traffic via a second single-hop path.
[0102] After the first network device sends the first switching message to the second network device on the second single-hop path, the multicast traffic originally transmitted through the first single-hop path can be transmitted by the second network device through the second single-hop path, so that the first network device can receive the multicast traffic through the second single-hop path.
[0103] In an embodiment of the present application, a receiving-end network device (e.g., a first network device) of multicast traffic can proactively send a switching message to a sending-end network device of another transmission path when packet loss occurs in the multicast traffic and a transmission path for the multicast traffic fails, thereby switching the multicast traffic to another transmission path for transmission. This allows the multicast traffic to be delivered to the receiving-end network device (the first network device) via the other transmission path, thereby avoiding continuous packet loss of the multicast traffic and improving the communication quality of the multicast communication. Furthermore, the first network device independently completes the entire process from determining that packet loss has occurred in the multicast traffic to sending the first switching message, without the need for participation and cooperation from the opposite-end network device. The implementation complexity of path switching is low, and there is no need for manual fault path location and path switching, thereby improving the efficiency of path switching.
[0104] On the other hand, the first switching message sent by the first network device is only used to switch the transmission path of multicast traffic, so the unicast traffic transmitted through the first single-hop path will not be affected. The unicast traffic can continue to be transmitted to the first network device through the first single-hop path, ensuring the service quality of the unicast traffic on the first single-hop path.
[0105] After the multicast traffic is switched to the second single-hop path for transmission, the embodiment of the present application provides another process of the multicast communication method. Figure 5 , Figure 5 FIG. 1 is another flow chart of the multicast communication method in the embodiment of the present application. Figure 5 As shown, another process of the multicast communication method in the embodiment of the present application includes:
[0106] 201. The first network device sends a prune message for a first single-hop path to the third network device.
[0107] After the first network device sends the first switching message to the second network device on the second single-hop path, the first single-hop path may not have yet begun to fail, and multicast traffic can still be transmitted to the first network device via the first single-hop path. Therefore, the first network device can send a prune message for the first single-hop path to a third network device, where the third network device is the previous hop of the first network device on the first single-hop path. After receiving the prune message for the first single-hop path, the third network device determines that the first single-hop path is an invalid path and will not transmit multicast traffic via the first single-hop path, thereby reducing the waste of network resources.
[0108] In a possible implementation, the second network device and the third network device may be the same network device. In other words, the first single-hop path and the second single-hop path are different single-hop paths connecting the same sending network device and the same receiving network device.
[0109] 202. If the path health value of the first single-hop path is greater than or equal to the second threshold, the first network device sends a second switching message to the third network device on the first single-hop path.
[0110] In an embodiment of the present application, although the first network device switches multicast traffic on the first single-hop path to a second single-hop path for transmission, the unicast traffic transmitted via the first single-hop path is not affected and can continue to be transmitted to the first network device via the first single-hop path. Therefore, the first network device can calculate the path health value of the first single-hop path based on the unicast traffic transmitted on the first single-hop path. If the path health value of the first single-hop path is greater than or equal to a second threshold, indicating that the path failure of the first single-hop path has been restored and can meet the transmission requirements of the multicast traffic, the first network device then sends a second switching message to a third network device on the first single-hop path. The second switching message is used to instruct the third network device to send multicast traffic to the first network device via the first single-hop path. The third network device is the previous hop of the first network device on the first single-hop path; in other words, the third network device is the sending end network device of the first single-hop path. The second threshold is greater than or equal to the first threshold. In practical applications, when the second threshold is greater than the first threshold, frequent switching of the transmission path of the multicast traffic can be prevented, thereby ensuring the communication quality of the multicast communication.
[0111] Optionally, the second handover message may be a second join message in multicast communication. The second join message carries the multicast group address of the multicast traffic. After receiving the second join message, the third network device determines, based on the multicast group address in the second join message, that the multicast traffic should be transmitted via the first single-hop path.
[0112] 203. The first network device receives multicast traffic via a first single-hop path.
[0113] After the first network device sends the first handover message to the third network device on the first single-hop path, the multicast traffic originally transmitted via the second single-hop path can now be transmitted by the third network device via the first single-hop path, allowing the first network device to receive the multicast traffic via the first single-hop path. This allows multicast traffic to continue to be transmitted on the single-hop path with a higher path health value, improving the communication quality of multicast communication.
[0114] In one possible implementation, a threshold for the number of times a first network device sends a handover message within a preset time period can be pre-configured to obtain a third threshold value, where the handover message includes but is not limited to the first handover message, the second handover message, and the third handover message (if any). When the path health value of the first single-hop path is less than the first threshold value, but the number of times the first network device sends a handover message within the preset time period is greater than or equal to the third threshold value, it indicates that the first network device sends the handover message too frequently. In this case, the first network device will not send the first handover message to the second network device on the second single-hop path. When the path health value of the first single-hop path is less than the first threshold value, and the number of times the first network device sends a handover message within the preset time period is less than the third threshold value, the first network device sends the first handover message to the network device on the second single-hop path. By configuring the third threshold value to limit the number of times the first network device sends a handover message within the preset time period, it is possible to avoid frequent switching of transmission paths for multicast traffic. On the other hand, it can also effectively reduce the impact caused by instantaneous fluctuations and instantaneous packet loss in the network environment, thereby improving the stability of multicast communication.
[0115] Accordingly, the present application also provides a device for implementing the above solution. Figure 6 , Figure 6 A structural diagram of the first network device provided in the embodiment of the present application. Figure 6 As shown, the first network device includes:
[0116] The processing unit 301 is configured to determine whether packet loss occurs in multicast traffic received through a first single-hop path;
[0117] The processing unit 301 is further configured to, when the path health value of the first single-hop path is less than a first threshold, send a first switching message to a second network device on a second single-hop path, wherein the second network device is a previous hop of the first network device on the second single-hop path, and the first switching message is used to instruct the second network device to send multicast traffic to the first network device via the second single-hop path, and the path health value is calculated based on at least one of error detection information, path oscillation detection information, bidirectional forwarding detection (BFD) information, and fault detection information of the first network device;
[0118] The transceiver unit 302 is configured to receive multicast traffic through a second single-hop path.
[0119] In one possible implementation, there are N single-hop paths between the multicast source device of the multicast traffic and the first network device leading to the first network device, the N single-hop paths include a first single-hop path, and the second single-hop path is another single-hop path in the N single-hop paths except the first single-hop path, where N is an integer greater than 1.
[0120] In a possible implementation, the processing unit 301 is further configured to update routing information with the multicast source device of the multicast traffic as the destination address, and the updated routing information indicates a reverse path of the second single-hop path.
[0121] In a possible implementation, the processing unit 301 is specifically configured to increase a cost value of a third single-hop path, where the third single-hop path is a reverse path of the first single-hop path;
[0122] Updates the routing information with the multicast source device of the multicast traffic as the destination address based on the cost value.
[0123] In a possible implementation, the processing unit 301 is further configured to send a prune message for the first single-hop path to a third network device, where the third network device is the previous hop of the first network device on the first single-hop path.
[0124] In one possible implementation, the processing unit 301 is further configured to, when the path health value of the first single-hop path is greater than or equal to a second threshold, send a second switching message to a third network device on the first single-hop path, where the third network device is the previous hop of the first network device on the first single-hop path, and the second switching message is used to instruct the third network device to send multicast traffic to the first network device through the first single-hop path, and the second threshold is greater than or equal to the first threshold;
[0125] The transceiver unit 302 is further configured to receive multicast traffic through the first single-hop path.
[0126] In one possible implementation, the processing unit 301 is specifically configured to send a first switching message to a second network device on a second single-hop path when the path health value of the first single-hop path is less than a first threshold and the number of switching messages sent by the first network device within a preset time period is less than a third threshold.
[0127] In one possible implementation, the processing unit 301 is specifically configured to receive multicast traffic through a first single-hop path, where the multicast traffic includes a plurality of multicast packets, and each multicast packet includes a Real-time Transport Protocol RTP sequence number;
[0128] Based on the RTP sequence numbers of multiple multicast packets, it is determined that multicast traffic has been lost.
[0129] In a possible implementation, the processing unit 301 is specifically configured to determine that packet loss occurs in the multicast traffic when N RTP sequence numbers are lost consecutively among the RTP sequence numbers of the plurality of multicast packets, where N is an integer greater than or equal to 1.
[0130] In one possible implementation, the processing unit 301 is specifically configured to receive multicast traffic through a first single-hop path, where the multicast traffic includes a plurality of multicast packets;
[0131] The processing unit 301 is specifically configured to determine that packet loss occurs in the multicast traffic when the packet loss rate of the plurality of multicast messages is greater than a fourth threshold.
[0132] In a possible implementation, the first switching message is a first join message, and the first join message includes a multicast group address of multicast traffic.
[0133] It should be noted that the information interaction, execution process, etc. between the modules / units in the first network device are the same as those in this application. Figure 2 The corresponding method embodiments are based on the same concept. For specific contents, please refer to the description in the method embodiments shown above in this application, which will not be repeated here.
[0134] See also Figure 7 , Figure 7 A logical structure diagram of the communication device 40 provided in the embodiment of the present application. The communication device 40 may be deployed with Figure 6 The first network device described in the corresponding embodiment is used to implement Figure 2 The communication device 40 includes a memory 401, a processor 402, a communication interface 403, and a bus 404. The memory 401, the processor 402, and the communication interface 403 are connected to each other via the bus 404.
[0135] Memory 401 may be a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). Memory 401 may store programs. When the program stored in memory 401 is executed by processor 402, processor 402 and communication interface 403 are configured to perform steps 101-103 of the multicast communication method embodiment described above.
[0136] The processor 402 can be a central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), a graphics processing unit (GPU), a digital signal processor (DSP), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component or any combination thereof, used to execute relevant programs to implement one or more steps 101-103 of the multicast communication method embodiment in this application. The steps of the data processing method disclosed in the embodiment of the present application can be executed by a compiler and an executor, wherein the compiler and executor can be executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers, etc. The storage medium is located in the memory 401, and the processor 402 reads the information in the memory 401 and executes one or more steps 101-103 of the multicast communication method embodiment in this application in combination with its hardware.
[0137] The communication interface 403 uses a transceiver device such as, but not limited to, a transceiver to implement communication between the communication device 40 and other devices or a communication network.
[0138] The bus 404 can implement a path for transmitting information between the various components of the computer device 40 (for example, the memory 401, the processor 402, and the communication interface 403). The bus 404 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. Buses can be divided into address buses, data buses, control buses, etc. For ease of representation, Figure 7 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.
[0139] The present application also provides a computer program product including instructions. The computer program product may be a software or program product including instructions that can be run on a computing device or stored in any available medium. When the computer program product is run on at least one computing device, the at least one computing device executes the aforementioned Figure 2 The illustrated embodiment describes the method.
[0140] The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by a computing device or a data storage device such as a data center that contains one or more available media. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid-state hard disk). The computer-readable storage medium includes instructions that instruct the computing device to execute the above application to execute the above application. Figure 2 The illustrated embodiment describes the method.
[0141] The communication device provided in the embodiment of the present application may be a chip, which includes: a processing unit and a communication unit. The processing unit may be, for example, a processor, and the communication unit may be, for example, an input / output interface, a pin, or a circuit. The processing unit may execute the computer-executable instructions stored in the storage unit to enable the chip to execute the above-mentioned Figure 2 The method described in the embodiment shown. Optionally, the storage unit is a storage unit within the chip, such as a register, a cache, etc. The storage unit may also be a storage unit located outside the chip within the wireless access device, such as a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM), etc.
[0142] It should be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed across multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided in the embodiments of the present application, the connection relationship between the modules indicates that there is a communication connection between them, which can be specifically implemented as one or more communication buses or signal lines.
[0143] Through the description of the above embodiments, it is clear to those skilled in the art that the embodiments of the present application can be implemented by means of software plus necessary general hardware, and of course can also be implemented by dedicated hardware including application-specific integrated circuits, dedicated CPUs, dedicated memories, dedicated components, etc. In general, all functions performed by computer programs can be easily implemented with corresponding hardware, and the specific hardware structures used to implement the same function can also be various, such as analog circuits, digital circuits, or application-specific circuits, etc. However, for the embodiments of the present application, software program implementation is a better implementation method in most cases. Based on such an understanding, the technical solutions of the embodiments of the present application are essentially or partly contributed to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer's floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, training equipment, or network equipment, etc.) to execute the methods described in each embodiment of the present application.
[0144] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
[0145] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, a computer, a training device or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website, a computer, a training device or a data center. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).
Claims
1. A multicast communication method, characterized in that: include: The first network device determines that packet loss occurs in multicast traffic received through the first single-hop path; If the path health value of the first single-hop path is less than a first threshold, the first network device sends a first switching message to a second network device on a second single-hop path, wherein the second network device is the previous hop of the first network device on the second single-hop path, and the first switching message is used to instruct the second network device to send the multicast traffic to the first network device through the second single-hop path, and the path health value is calculated based on at least one of error detection information, path oscillation detection information, bidirectional forwarding detection (BFD) information, and fault detection information of the first network device; The first network device receives the multicast traffic through the second single-hop path.
2. The method according to claim 1, characterized in that There are N single-hop paths between the multicast source device of the multicast traffic and the first network device leading to the first network device, the N single-hop paths include the first single-hop path, the second single-hop path is another single-hop path in the N single-hop paths except the first single-hop path, and N is an integer greater than 1.
3. The method according to claim 1, characterized in that Before the first network device sends the first switching message to the second network device on the second single-hop path, the method further includes: The first network device updates routing information with the multicast source device of the multicast traffic as the destination address, and the updated routing information indicates a reverse path of the second single-hop path.
4. The method according to claim 3, characterized in that The first network device updates routing information with the multicast source device of the multicast traffic as the destination address, including: The first network device increases the cost value of a third single-hop path, where the third single-hop path is a reverse path of the first single-hop path; The first network device updates routing information with the multicast source device of the multicast traffic as the destination address according to the cost value.
5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: The first network device sends a prune message for the first single-hop path to a third network device, where the third network device is a previous hop of the first network device on the first single-hop path.
6. The method according to any one of claims 1 to 5, characterized in that After the first network device receives the multicast traffic through the second single-hop path, the method further includes: If the path health value of the first single-hop path is greater than or equal to a second threshold, the first network device sends a second switching message to a third network device on the first single-hop path, wherein the third network device is the previous hop of the first network device on the first single-hop path, and the second switching message is used to instruct the third network device to send the multicast traffic to the first network device through the first single-hop path, and the second threshold is greater than or equal to the first threshold; The first network device receives the multicast traffic through the first single-hop path.
7. The method according to claims 1 to 6, characterized in that If the path health value of the first single-hop path is less than a first threshold, the first network device sending a first switching message to a second network device on a second single-hop path, including: If the path health value of the first single-hop path is less than a first threshold, and the number of times the first network device sends switching messages within a preset time period is less than a third threshold, the first network device sends a first switching message to the second network device on the second single-hop path.
8. The method according to any one of claims 1 to 7, characterized in that The first network device determines that packet loss occurs in multicast traffic received through the first single-hop path, including: The first network device receives multicast traffic through a first single-hop path, the multicast traffic including a plurality of multicast packets, each of the multicast packets including a Real-time Transport Protocol RTP sequence number; The first network device determines, based on the RTP sequence numbers of the multiple multicast messages, that packet loss occurs in the multicast traffic.
9. The method according to claim 8, characterized in that The first network device determines, according to the RTP sequence numbers of the multiple multicast packets, that packet loss occurs in the multicast traffic, including: If N RTP sequence numbers are lost consecutively among the RTP sequence numbers of the multiple multicast messages, the first network device determines that packet loss occurs in the multicast traffic, where N is an integer greater than or equal to 1.
10. The method according to any one of claims 1 to 7, characterized in that The first network device determines that packet loss occurs in multicast traffic received through the first single-hop path, including: The first network device receives multicast traffic through a first single-hop path, where the multicast traffic includes multiple multicast packets; If the packet loss rate of the multiple multicast packets is greater than a fourth threshold, the first network device determines that packet loss occurs in the multicast traffic.
11. The method according to any one of claims 1 to 10, characterized in that The first switching message is a first join message, and the first join message includes the multicast group address of the multicast traffic.
12. A first network device, characterized in that: include: a processing unit, configured to determine that packet loss occurs in multicast traffic received through the first single-hop path; The processing unit is further configured to, when the path health value of the first single-hop path is less than a first threshold, send a first switching message to a second network device on a second single-hop path, wherein the second network device is a previous hop of the first network device on the second single-hop path, and the first switching message is used to instruct the second network device to send the multicast traffic to the first network device via the second single-hop path, and the path health value is calculated based on at least one of error detection information, path oscillation detection information, bidirectional forwarding detection (BFD) information, and fault detection information of the first network device; A transceiver unit is configured to receive the multicast traffic through the second single-hop path.
13. A communication device, characterized in that: comprising a processor coupled to a memory, The memory is used to store instructions; The processor is configured to execute instructions in the memory, so that the communication device performs the method according to any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.
15. A computer program product, characterized in that The computer program product stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the method according to any one of claims 1 to 11 is implemented.
16. A chip, characterized in that: The chip includes a processor coupled to a memory. The memory is used to store instructions; The processor is configured to execute instructions in the memory, so that the chip executes the method according to any one of claims 1 to 11.
