Multicast tunnel load balancing method, apparatus, gateway device, and storage medium
The multicast tunnel load balancing method addresses inefficient multicast data forwarding by establishing AMT tunnels with multiple relay devices and selecting target devices based on priority and load values, optimizing resource utilization and enhancing network performance.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-06-26
- Publication Date
- 2026-04-02
AI Technical Summary
The existing Automatic Multicast Tunneling (AMT) protocol results in low multicast data stream forwarding efficiency when a relay device has a high forwarding load and its resources are not completely depleted, leading to inefficient use of network resources.
A multicast tunnel load balancing method that involves a gateway device establishing AMT tunnels with multiple relay devices, determining priority and load values for each relay, and selecting a target relay device based on these values to distribute multicast data streams in a load-balancing manner, using anycast addresses and periodic updates to ensure efficient resource utilization.
The method improves multicast data stream forwarding efficiency by distributing streams across multiple relay devices, making full use of available resources and enhancing network performance.
Smart Images

Figure 2026510255000001_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet communication technology, and particularly to a multicast tunnel load balancing method, apparatus, gateway device, and storage medium.
Background Art
[0002] By using the Automatic Multicast Tunneling (AMT) protocol, even multicast receivers that do not support the native multicast protocol can connect to the multicast source and receive multicast traffic from the multicast source.
[0003] The AMT protocol adopts the client-server mode. The gateway device identifies the relay device closest in distance by the unicast method. Further, the gateway device joins the multicast group maintained by this relay device as a multicast member, and thus, the establishment of the AMT tunnel between the gateway device and this relay device is successful. Then, after the relay device receives the multicast data stream from the multicast source, it can send the multicast data stream to the gateway device via the AMT tunnel, and the gateway device sends the multicast data stream to the multicast receiver.
[0004] After the establishment of the AMT tunnel is successful, if this relay device is always the closest to the gateway in terms of topology and the routing between this relay device and the gateway device is maintained, the gateway device can always obtain the multicast data stream via this relay device. In this case, if the transfer load of this relay device is high and the transfer resources are not completely depleted, the transfer efficiency of the multicast data stream will be low.
Summary of the Invention
[0005] The present invention provides a multicast tunnel load balancing method, apparatus, gateway device, and storage medium, thereby solving the problem of low multicast data stream forwarding efficiency when a gateway device acquires a multicast data stream via a relay device with a high forwarding load and where forwarding resources are not completely exhausted. The specific technical means are as follows. [Means for solving the problem]
[0006] In a first aspect, an embodiment of the present invention provides a multicast tunnel load balancing method, wherein the method is applied to a gateway device, the gateway device establishes an AMT tunnel with a plurality of relay devices, and the method is Receiving a multicast join request packet sent from a multicast receiver, wherein the multicast join request packet contains multicast group information, The process involves obtaining the priority value and load value of each relay device in the aforementioned plurality of relay devices, wherein the priority value indicates the multicast service quality of the relay device, Based on the priority and load values of each relay device, one target relay device is selected from the multiple relay devices for the multicast group. This includes sending a first membership update packet containing information about the multicast group to the target relay device, thereby causing the target relay device to forward the multicast data stream of the multicast group to the multicast receiver.
[0007] In one possible embodiment, the gateway device is configured with the anycast address of each relay device included in the relay device group, and the process by which the gateway device establishes an AMT tunnel with the plurality of relay devices is as follows: After the gateway device comes online, a relay discovery packet is sent to each relay device included in the relay device group, wherein each relay discovery packet contains a different anycast address. Receiving relay advertisement packets transmitted from a first quantity of relay devices within a first preset time, wherein the relay advertisement packets include the priority value of the relay device. Establish an AMT tunnel with each of the first number of relay devices, and record the priority value of each of the first number of relay devices. The method includes recording the priority value of a second quantity of relay devices as 0, wherein the second quantity of relay devices are relay devices that did not transmit relay advertisement packets within the first preset time in the relay device group, and the sum of the first quantity and the second quantity is the number of relay devices included in the relay device group.
[0008] In one possible embodiment, after recording the priority values of the first number of relay devices, the method further: At each second preset time interval, a request packet is sent to the first number of relay devices, Receiving membership query packets transmitted from the first number of relay devices, wherein the membership query packets include the priority value of the relay device, This includes updating the priority values of the recorded first number of relay devices based on the priority values included in the membership query packet.
[0009] In one possible embodiment, selecting a target relay device for the multicast group from the plurality of relay devices based on the priority value and load value of each relay device is: Obtain the variance weight values for each relay device, Selecting variance weight values that exceed a predetermined threshold from multiple variance weight values, This includes selecting the relay device with the smallest load value from among the relay devices corresponding to the selected variance weight values as the target relay device.
[0010] In one possible embodiment, obtaining the variance weight values of each relay device is: Based on the established mapping relationship between priority values and distribution weight values, determine the distribution weight value corresponding to the priority value of each relay device, or This includes determining the distribution weight value of each relay device such that the distribution weight value of the relay device is the ratio between the priority value of the relay device and the sum of the priority values of the multiple relay devices.
[0011] In one possible embodiment, after transmitting the first membership update packet to the target relay device, the method further: If the target relay device fails, the priority values of each relay device other than the target relay device among the multiple relay devices are obtained, Based on the priority and load values of each relay device acquired, one target relay device is re-selected for the multicast group from among the relay devices other than the target relay device among the multiple relay devices, This includes sending a second membership update packet containing information about the multicast group to a re-selected target relay device, thereby causing the re-selected target relay device to forward the multicast data stream of the multicast group to the multicast receiver.
[0012] In one possible embodiment, the relay advertisement packet includes a priority field, the priority field holding a priority value for a relay device.
[0013] In one possible embodiment, the membership query packet includes a first flag bit field and a priority field, wherein the first flag bit field has a first value, indicating that the priority field holds a priority value for a relay device.
[0014] In one possible embodiment, the membership query packet further includes a second flag bit field, If the second flag bit field has a first value, it indicates that the priority field is located after the gateway address field and adjacent to the gateway address field. If the second flag bit field has a value of 2, it indicates that the priority field is located after the encapsulation information of a normal query message and adjacent to the encapsulation information.
[0015] In one possible embodiment, the priority field occupies 8 reserved bits, and a value of 0 in the priority field indicates that the priority field does not carry a priority value.
[0016] In one possible embodiment, the priority value is determined based on the health parameters of the relay equipment, and the health parameters are The number of accessible multicast sources, Network quality between multicast source and network source, Failure rate of the transmission path to and from the multicast source, and This includes one or more of the routing link quality characteristics between the multicast source and the destination.
[0017] In one possible embodiment, the load value is the number of multicast groups handled by the relay device.
[0018] In a second aspect, an embodiment of the present invention provides a multicast tunnel load balancing device, wherein the device is applied to a gateway device, the gateway device establishes an AMT tunnel with a plurality of relay devices, and the device is A receiving module that receives multicast join request packets sent from multicast receivers, wherein the multicast join request packets contain multicast group information, An acquisition module that acquires the priority value and load value of each relay device among the plurality of relay devices, wherein the priority value indicates the multicast service quality of the relay device; A selection module that selects one target relay device for the multicast group from the plurality of relay devices based on the priority value and load value of each relay device; A transmission module that transmits a first membership update packet including information of the multicast group to the target relay device, so that the target relay device transfers the multicast data stream of the multicast group to the multicast receiver.
[0019] In one possible embodiment, the gateway device is provided with the unicast address of each relay device included in the relay device group, and the process by which the gateway device establishes an AMT tunnel with the plurality of relay devices is as follows: After the gateway device comes online, it transmits relay discovery packets to each relay device included in the relay device group, and each relay discovery packet includes a different unicast address; Receiving relay advertisement packets transmitted from a first quantity of relay devices within a first preset time, wherein the relay advertisement packets include the priority value of the relay device; Establishing an AMT tunnel with each of the first quantity of relay devices respectively, and recording the priority value of the first quantity of relay devices; Recording the priority value of a second quantity of relay devices as 0, wherein the second quantity of relay devices are the relay devices that did not transmit relay advertisement packets within the first preset time in the relay device group, and the sum of the first quantity and the second quantity is the quantity of relay devices included in the relay device group.
[0020] In one possible embodiment, after recording the priority values of the first number of relay devices, the device further comprises an update module, The transmission module is used to transmit request packets to the first number of relay devices at second preset time intervals. The receiving module is used to receive membership query packets transmitted from the first number of relay devices, and the membership query packets include the priority value of the relay device. The update module is used to update the priority values of the recorded first number of relay devices based on the priority values included in the membership query packet.
[0021] In one possible embodiment, the selection module is Obtain the variance weight values for each relay device, Selecting variance weight values that exceed a predetermined threshold from multiple variance weight values, It is used to select the relay device with the smallest load value from among the relay devices corresponding to the selected variance weight values as the target relay device.
[0022] In one possible embodiment, the selection module is Based on a pre-defined mapping relationship between priority values and variance weight values, determine the variance weight value corresponding to the priority value of each relay device, or This is used to determine the distribution weight value of each relay device as the ratio of the priority value of that relay device to the sum of the priority values of the multiple relay devices.
[0023] In one possible embodiment, the acquisition module is used to acquire the priority values of each relay device other than the target relay device among the plurality of relay devices when the target relay device fails. The selection module is used to re-select one target relay device for the multicast group from among the relay devices other than the target relay device in the plurality of relay devices, based on the priority value and load value of each relay device acquired. The transmitting module is used to enable the re-selected target relay device to forward the multicast data stream of the multicast group to the multicast receiver by transmitting a second membership update packet containing the multicast group information to the re-selected target relay device.
[0024] In one possible embodiment, the relay advertisement packet includes a priority field, the priority field holding a priority value for a relay device.
[0025] In one possible embodiment, the membership query packet includes a first flag bit field and a priority field, wherein the first flag bit field has a first value, indicating that the priority field holds a priority value for a relay device.
[0026] In one possible embodiment, the membership query packet further includes a second flag bit field, If the second flag bit field has a first value, it indicates that the priority field is located after the gateway address field and adjacent to the gateway address field. If the second flag bit field has a value of 2, it indicates that the priority field is located after the encapsulation information of a normal query message and adjacent to the encapsulation information.
[0027] In one possible embodiment, the priority field occupies 8 reserved bits, and a value of 0 in the priority field indicates that the priority field does not carry a priority value.
[0028] In one possible embodiment, the priority value is determined based on the health parameters of the relay equipment, and the health parameters are The number of accessible multicast sources, Network quality between multicast source and network source, Failure rate of the transmission path to and from the multicast source, and This includes one or more of the routing link quality characteristics between the multicast source and the destination.
[0029] In one possible embodiment, the load value is the number of multicast groups handled by the relay device.
[0030] In a third aspect, an embodiment of the present invention provides a gateway device, the gateway device establishes an AMT tunnel with a plurality of relay devices, and the gateway device Processor and Transmitter and receiver, The system comprises a machine-readable storage medium in which machine-executable instructions that can be executed by the processor are stored, The machine-executable instruction is given to the processor, The transceiver receives a multicast join request packet transmitted from a multicast receiver, wherein the multicast join request packet contains multicast group information. The process involves obtaining the priority value and load value of each relay device in the aforementioned plurality of relay devices, wherein the priority value indicates the multicast service quality of the relay device, Based on the priority and load values of each relay device, one target relay device is selected from the multiple relay devices for the multicast group. The transceiver transmits a first membership update packet containing the multicast group information to the target relay device, thereby causing the target relay device to forward the multicast data stream of the multicast group to the multicast receiver.
[0031] In one possible embodiment, the gateway device has the anycast address of each relay device included in the relay device group, and the machine-executable instructions are sent to the processor, After the gateway device comes online, the transceiver transmits a relay discovery packet to each relay device included in the relay device group, wherein each relay discovery packet contains a different anycast address. Within a first preset time, the transceiver receives relay advertisement packets transmitted from a first number of relay devices, wherein the relay advertisement packets include the priority value of the relay device. Establish an AMT tunnel with each of the first number of relay devices, and record the priority value of each of the first number of relay devices. The system is configured to record the priority value of the second quantity of relay devices as 0, wherein the second quantity of relay devices are relay devices that did not transmit relay advertisement packets within the first preset time in the relay device group, and the sum of the first quantity and the second quantity is the total number of relay devices included in the relay device group.
[0032] In one possible embodiment, the machine-executable instruction is transmitted to the processor, At each second preset time interval, the transceiver transmits a request packet to the first number of relay devices, The transceiver receives membership query packets transmitted from the first number of relay devices, wherein the membership query packets include the priority value of the relay device. Based on the priority values included in the membership query packets, the system updates the priority values of the recorded first number of relay devices.
[0033] In one possible embodiment, the machine-executable instruction is transmitted to the processor, Obtain the variance weight values for each relay device, Selecting variance weight values that exceed a predetermined threshold from multiple variance weight values, The system is instructed to select the relay device with the smallest load value from among the relay devices corresponding to the selected variance weight values as the target relay device.
[0034] In one possible embodiment, the machine-executable instruction is transmitted to the processor, Based on a pre-defined mapping relationship between priority values and variance weight values, determine the variance weight value corresponding to the priority value of each relay device, or For each relay device, the system is instructed to determine its distribution weight value as the ratio of its priority value to the sum of the priority values of the multiple relay devices.
[0035] In one possible embodiment, the machine-executable instruction is transmitted to the processor, If the target relay device fails, the priority values of each relay device other than the target relay device among the multiple relay devices are obtained, Based on the priority and load values of each relay device acquired, one target relay device is re-selected for the multicast group from among the relay devices other than the target relay device among the multiple relay devices, The transceiver sends a second membership update packet containing the multicast group information to the target relay device re-selected by the transceiver, causing the re-selected target relay device to forward the multicast data stream of the multicast group to the multicast receiver.
[0036] In one possible embodiment, the relay advertisement packet includes a priority field, the priority field holding a priority value for a relay device.
[0037] In one possible embodiment, the membership query packet includes a first flag bit field and a priority field, wherein the first flag bit field has a first value, indicating that the priority field holds a priority value for a relay device.
[0038] In one possible embodiment, the membership query packet further includes a second flag bit field, If the second flag bit field has a first value, it indicates that the priority field is located after the gateway address field and adjacent to the gateway address field. If the second flag bit field has a value of 2, it indicates that the priority field is located after the encapsulation information of a normal query message and adjacent to the encapsulation information.
[0039] In one possible embodiment, the priority field occupies 8 reserved bits, and a value of 0 in the priority field indicates that the priority field does not carry a priority value.
[0040] In one possible embodiment, the priority value is determined based on the health parameters of the relay equipment, and the health parameters are The number of accessible multicast sources, Network quality between multicast source and network source, Failure rate of the transmission path to and from the multicast source, and This includes one or more of the routing link quality characteristics between the multicast source and the destination.
[0041] In one possible embodiment, the load value is the number of multicast groups handled by the relay device.
[0042] In a fourth aspect, an embodiment of the present invention provides a machine-readable storage medium in which machine-executable instructions are stored, and when called and executed by a processor, the machine-executable instructions cause the processor to implement the method according to the first aspect.
[0043] In a fifth aspect, an embodiment of the present invention provides a computer program product, which causes the processor to implement the method described in the first aspect. [Effects of the Invention]
[0044] According to the above technical means, the gateway device can establish an AMT tunnel with multiple relay devices. After receiving a multicast join request packet sent from a multicast receiver, it can select one target relay device for the multicast group that the multicast receiver is requesting to join, based on the priority and load values of each relay device, and further forward the multicast data stream of the multicast group to the multicast receiver via that target relay device. By comprehensively considering the priority and load values when selecting a target relay device, each relay device can distribute and forward the multicast data streams of multiple multicast groups in a load-balancing manner, making full use of the resources of multiple relay devices and improving the forwarding efficiency of multicast data streams. [Brief explanation of the drawing]
[0045] The drawings described herein are for further understanding of the present invention and constitute part of the present invention. Exemplary embodiments and their descriptions are for illustrative purposes only and do not constitute an inappropriate limitation to the present invention.
[0046] [Figure 1] Figure 1 is a schematic diagram of an AMT internet architecture provided in an embodiment of the present invention. [Figure 2]Figure 2 is a flowchart illustrating a method for establishing an AMT tunnel between a gateway device and a relay device provided in an embodiment of the present invention. [Figure 3] Figure 3 is a flowchart of the multicast tunnel load balancing method provided in an embodiment of the present invention. [Figure 4] Figure 4 is an illustrative schematic diagram of a membership query packet provided in an embodiment of the present invention. [Figure 5] Figure 5 is an exemplary schematic diagram of a relay advertisement packet provided in an embodiment of the present invention. [Figure 6] Figure 6 is a flowchart of another multicast tunnel load balancing method provided in an embodiment of the present invention. [Figure 7] Figure 7 is a schematic diagram of the structure of a multicast tunnel load balancing device provided in an embodiment of the present invention. [Figure 8] Figure 8 is a schematic diagram of the structure of a gateway device provided in an embodiment of the present invention. [Modes for carrying out the invention]
[0047] The present invention will be described in more detail below with reference to the drawings, with reference to examples, in order to further clarify its objectives, technical proposals, and advantages. Clearly, the examples described are only some, and not all, examples of the present invention. All other examples that can be obtained by those skilled in the art based on the examples of the present invention are all within the scope of protection of the present invention.
[0048] To facilitate understanding of the technical concepts provided in the embodiments of the present invention, first, the AMT network architecture according to the embodiments of the present invention will be described. As shown in Figure 1, the AMT network architecture comprises a multicast receiver, a gateway device, a relay device R1, a relay device R2, a multicast source S1, a multicast source S2, and a multicast source S3.
[0049] The number of devices shown in Figure 1 is merely illustrative and, in reality, is not limited to this number.
[0050] Here, a multicast receiver may be a recipient such as a site, host, or application program that does not support multicast routing protocols but needs to receive multicast data.
[0051] The gateway device is located in a network that does not support multicast routing protocols, and multicast receivers can access the gateway device.
[0052] Each relay device can connect to at least one multicast source. For example, both relay devices R1 and R2 in Figure 1 are connected to multicast sources S1, S2, and S3.
[0053] The gateway device can establish an AMT tunnel with a relay device using the anycast method, and furthermore, can receive multicast data from a multicast source transmitted from the relay device via the AMT tunnel.
[0054] In Figure 1, as an example, the gateway device establishes an AMT tunnel with the relay device R1. After receiving multicast data from any multicast source, the relay device R1 can forward the multicast data to the gateway device via the AMT tunnel. Furthermore, the gateway device can forward the multicast data to the multicast receivers.
[0055] The following describes the process by which the gateway device establishes an AMT tunnel with the relay device.
[0056] As shown in Figure 2, the process by which the gateway device establishes an AMT tunnel with the relay device includes the following steps.
[0057] S201, the gateway device sends a Relay Discovery packet to the relay device.
[0058] Here, relay devices supporting the AMT protocol advertise routing with the same IP address prefix, and after the gateway device learns these routes, it can generate anycast addresses based on that IP address prefix. For example, an anycast address includes that IP address prefix, and all the remaining bits are set to 0.
[0059] When a gateway device sends a relay discovery packet based on an anycast address, the gateway device forwards the relay discovery packet to the relay device that is closest in the topology and has already advertised the IP address prefix, based on its anycast routing table.
[0060] Preferably, the relay discovery packet includes a nonce.
[0061] Preferably, the relay discovery packet includes a nonce.
[0062] S202, after receiving a relay discovery packet, the relay device sends a relay advertisement packet to the gateway device.
[0063] After receiving a relay discovery packet, the relay device can obtain a nonce from the packet. Furthermore, the relay advertisement packet transmitted from the relay device contains this nonce and the relay device's unicast Internet Protocol (IP) address.
[0064] After receiving a relay advertisement packet, the gateway device verifies whether the nonce in the relay advertisement packet matches the nonce it itself sent. If they match, the gateway device can then use the unicast IP address in the relay advertisement packet when communicating with the relay device using the AMT protocol.
[0065] Here, steps S201 to S202 above represent the relay device discovery stage, and through these steps, the gateway device can identify relay devices with which it can establish an AMT tunnel.
[0066] S203, the gateway device sends a request packet to the relay device. In response, the relay device receives the request packet.
[0067] Here, the request packet contains a request nonce and a query identifier, which indicates whether the relay device needs to send back a packet containing either an Internet Group Management Protocol (IGMPv3) normal query message or a Multicast Listener Discover (MLDv2) normal query message to the gateway device.
[0068] For example, the query identifier can be 1 or 0. If the query identifier is 1, it instructs the relay device to send a packet containing an IGMPv3 normal query message or an MLDv2 normal query message to the gateway device. If the query identifier is 0, it instructs the relay device to not send a packet containing an IGMPv3 normal query message or an MLDv2 normal query message to the gateway device.
[0069] S204, the relay device sends a Membership Query packet to the gateway device. In response, the gateway device receives the Membership Query packet.
[0070] After receiving a request packet, the relay device can extract information such as the source IP address, source User Datagram Protocol (UDP) port, request nonce, and secret key from the request information, and then calculate a hash digest from the extracted information to obtain a message authentication code.
[0071] Furthermore, the relay device can send a membership query packet back to the gateway device, which includes the request nonce, message authentication code, and either an IGMPv3 or MLDv2 normal query message.
[0072] S205, the gateway device sends a Membership Update packet to the relay device.
[0073] After receiving a membership query packet, the gateway device can verify whether the request nonce in the membership query packet matches the request nonce contained in the request packet it itself sent.
[0074] If a match is found, the gateway device can activate a periodic query keep-alive timer (Query Timer), and each time the periodic query keep-alive timer times out, the gateway device triggers the relay device to send new request information.
[0075] Simultaneously, the gateway device stores the request nonce and message authentication code, retrieves the IGMPv3 normal query message or MLDv2 normal query message within the membership query packet, and the IGMP protocol module in the gateway device processes the IGMPv3 normal query message, or the MLD protocol module processes the MLDv2 normal query message.
[0076] After the gateway device receives a multicast join request sent from a multicast receiver, the gateway device can send a membership update packet to the relay device.
[0077] Here, the membership renewal packet includes a request nonce, a message authentication code, and either an IGMPv3 report message or an MLDv2 report message.
[0078] Furthermore, when a gateway device periodically sends request information to a relay device using a periodic query keep-alive timer, the nonce carried in the membership update packet sent each time by the gateway device is understood to be the request nonce in the last membership query packet received by the gateway device, and the message authentication code carried is understood to be the message authentication code in the last membership query packet received by the gateway device.
[0079] S206, the relay device sends multicast data packets to the gateway device.
[0080] After receiving a membership update packet, the relay device calculates a message authentication code based on information within the packet, such as the source IP address, source UDP port, request nonce, and secret key. If the calculated message authentication code matches the message authentication code in the membership update packet, the relay device receives and processes the packet, successfully establishing an AMT tunnel between the gateway device and the relay device. If the calculated message authentication code differs from the message authentication code in the membership update packet, the relay device ignores the membership update packet.
[0081] After an AMT tunnel is established between the gateway device and the relay device, if the relay device receives multicast data from a multicast source and the gateway device determines that it belongs to the multicast group corresponding to that multicast source, i.e., if the gateway device is interested in the multicast data of that multicast source, the relay device can encapsulate the multicast data in a multicast data packet and then transmit the multicast data packet to the gateway device via the AMT tunnel.
[0082] After receiving a multicast data packet, the gateway device extracts the multicast data from the multicast data packet and sends that multicast data to the multicast recipient.
[0083] After an AMT tunnel is established between the gateway device and the relay device, if the relay device has a high forwarding load and its forwarding resources are not completely exhausted, the gateway device will continue to obtain the multicast data stream via the relay device, resulting in reduced multicast data stream forwarding efficiency.
[0084] To solve the above problems, an embodiment of the present invention provides a multicast tunnel load balancing method, which is applied to a gateway device and which has established AMT tunnels with multiple relay devices. As shown in Figure 3, the method includes the following steps.
[0085] S301 receives a multicast join request packet sent from a multicast receiver.
[0086] Here, the multicast join request packet contains information about the multicast group.
[0087] Multicast group information can be represented as (S,G) or (*,G), where S is the address of the multicast source, G is the address of the multicast group, and "*" means that the multicast source is not specified.
[0088] S302 obtains the priority value and load value of each relay device in multiple relay devices.
[0089] Here, the priority value indicates the multicast service quality of the relay device. The higher the multicast service quality of the relay device, the higher its priority value. The lower the multicast service quality of the relay device, the lower its priority value.
[0090] The load value indicates the load status of the relay equipment. For example, the load value may be the number of multicast groups handled by the relay equipment. The more multicast groups handled by the relay equipment, the higher the load value will be.
[0091] S303 selects one target relay device for a multicast group from among multiple relay devices, based on the priority and load values of each relay device.
[0092] Based on the principle of load balancing, the gateway device can integrate the priority and load values of relay devices to select a single target relay device for a multicast group.
[0093] S304 sends the first membership update packet to the target relay device.
[0094] Here, since the first membership update packet contains multicast group information, the target relay device forwards the multicast data stream of the multicast group to the multicast receiver.
[0095] After receiving the first membership update packet, the target relay device requests a copy of the multicast data stream of the multicast group from the upstream multicast source and forwards the multicast data stream of the multicast group to the multicast receiver via the gateway device.
[0096] According to the above technical means, the gateway device can establish an AMT tunnel with multiple relay devices. After receiving a multicast join request packet sent from a multicast receiver, it can select one target relay device for the multicast group that the multicast receiver is requesting to join, based on the priority and load values of each relay device, and further forward the multicast data stream of the multicast group to the multicast receiver via that target relay device. By comprehensively considering the priority and load values when selecting a target relay device, each relay device can distribute and forward the multicast data streams of multiple multicast groups in a load-balancing manner, making full use of the resources of multiple relay devices and improving the forwarding efficiency of multicast data streams.
[0097] In an embodiment of the present invention, the gateway device is configured with the anycast addresses of each relay device included in the relay device group, and before the flow shown in Figure 3 is executed, the gateway device needs to establish AMT tunnels with the relay devices in the relay device group.
[0098] The process by which a gateway device establishes an AMT tunnel with multiple relay devices includes the following steps:
[0099] Step 1: After the gateway device comes online, it sends a relay discovery packet to each relay device included in the relay device group, with each relay discovery packet containing a different anycast address.
[0100] In an embodiment of the present invention, a predetermined number of relay addresses can be pre-assigned to each relay device in a relay device group, each relay address contains a different IP address prefix, and the forwarding paths between the gateway device and the predetermined number of relay addresses are different. Here, the predetermined number is the number of relay devices included in the relay device group.
[0101] Furthermore, each relay device advertises routing for a specified number of different IP address prefixes, and the gateway device can learn the routing advertised by the relay devices.
[0102] In one embodiment, the gateway device can create one pseudo-interface for each relay device, and each pseudo-interface is assigned a Relay Discovery Address Prefix and a Relay Discovery Address that has the Relay Discovery Address Prefix.
[0103] For example, assuming a specified quantity of 2, two pseudo-interfaces can be created. The Relay Discovery Address Prefix placed on pseudo-interface 1 is one of the IP address prefixes advertised by the relay device, and the Relay Discovery Address Prefix placed on pseudo-interface 2 is the other IP address prefix advertised by the relay device.
[0104] In another embodiment, the gateway device can create a pseudo-interface and simultaneously place a specified number of Relay Discovery Address Prefixes and a specified number of Relay Discovery Addresses on that pseudo-interface.
[0105] Assuming that the above relay discovery address is an anycast address and the relay device group includes two relay devices, and that the two relay discovery addresses placed on the gateway device are anycast address 1 and anycast address 2, then the destination address of one transmitted relay discovery packet is anycast address 1, and it is understood that this relay discovery packet can be routed to the relay device closest to the gateway device according to anycast address 1. Similarly, the destination address of another relay discovery packet sent from the gateway device is anycast address 2, and this relay discovery packet is routed to the relay device closest to the gateway device according to anycast address 2. Since the pology path between the gateway device and anycast address 1 is different from the pology path between the gateway device and anycast address 2, the two relay discovery packets sent from the gateway device are sent to two different relay devices.
[0106] Step 2: Within a first preset time, receive relay advertisement packets transmitted from a first quantity of relay devices, the relay advertisement packets containing the priority value of the relay device. Preferably, after the gateway device transmits the relay discovery packet, it activates an Advertisement Timer, and the timeout period of the Advertisement Timer is the first preset time. In this way, it is possible to determine whether the first preset time has been reached by using the timer's timeout mechanism.
[0107] The first quantity is the number of relay devices corresponding to relay advertisement packets received within the first preset time after the gateway device sends a relay discovery packet to each relay device included in the relay device group.
[0108] The first quantity is less than or equal to the number of relay devices included in the relay device group.
[0109] Step 3: Establish AMT tunnels with each of the first quantity of relay devices and record the priority value of the first quantity of relay devices.
[0110] After receiving relay advertisement packets transmitted from a first number of relay devices, the gateway device can record the priority value of each relay device in the first number of relay devices.
[0111] Step 4, record the priority value of the second quantity of relay devices as 0, where the second quantity of relay devices are relay devices that did not transmit relay advertisement packets within the first preset time in the relay device group, and the sum of the first quantity and the second quantity is the number of relay devices included in the relay device group.
[0112] If, within the first preset time, the gateway device does not receive a relay advertisement packet sent from any relay device in the relay device group, it may resend a relay discovery packet to that relay device in accordance with the provisions of the AMT protocol. The priority value of that relay device is then temporarily recorded as 0, meaning that the relay device temporarily does not participate in load balancing.
[0113] Subsequently, within one hour after the retransmission of the relay discovery packet, the gateway device can receive a relay advertisement packet sent from the relay device, obtain the priority value carried by the relay advertisement packet, and record the priority value of the relay device. Then, an AMT tunnel is established with the relay device, and the relay device participates in subsequent load balancing.
[0114] According to this method, a gateway device can simultaneously establish AMT tunnels with multiple relay devices in a relay device group and record the priority values of multiple relay devices. In this way, different multicast streams can be distributed to multiple relay devices in a load-balancing manner based on the priority and load values of each relay device, thereby making full use of the internet resources of the relay devices and improving the multicast forwarding efficiency.
[0115] In some embodiments of the present invention, the priority value may change because the multicast service quality of the relay devices may change. To obtain the priority value of the relay devices in a timely manner after the change, an AMT tunnel is established in each internet device with respect to a first number of relay devices, and the priority value of the first number of relay devices is recorded. Subsequently, the gateway device can further perform steps A to C.
[0116] Step A: At every second preset time interval, a request packet is sent to a first quantity of relay devices.
[0117] Here, the gateway device sends request packets to each relay device in the process of establishing an AMT tunnel with each relay device. After the gateway device receives the membership query packet returned from the main relay device and verifies that the request nonce carried in the membership query packet is correct, it can activate the periodic query keep-alive timer (Query Timer), the timeout period of the periodic query keep-alive timer is the second preset time.
[0118] Furthermore, each time the query keep-alive timer times out, the gateway device sends a new request packet to the main relay device.
[0119] The request packet is a Request packet in the AMT protocol, and the membership query packet is a Membership Query packet in the AMT protocol.
[0120] Step B: The system receives a membership query packet sent from the first relay device, which contains the relay device's priority value.
[0121] Each time a relay device receives a request packet, it can obtain its own latest priority value and encapsulate that priority value in the membership query packet.
[0122] Furthermore, it is understood that each time the gateway device sends a request packet to a relay device, it can receive a membership query packet returned by the relay device, thereby allowing the gateway device to periodically obtain the priority value of each relay device.
[0123] Step C: Update the priority values of the first recorded number of relay devices based on the priority values contained in the membership query packet.
[0124] For each relay device in the first quantity of relay devices, the priority value of that relay device can be updated to the priority value carried by the membership query packet each time the relay device receives a membership query packet.
[0125] In the above embodiment, if an AMT tunnel can be successfully established with a relay device that did not send a relay advertisement packet within the first preset time, the priority value of the relay device recorded according to steps A to C can be updated.
[0126] According to an embodiment of the present invention, the gateway device can periodically acquire the priority value of the relay device by utilizing a keep-alive mechanism with the relay device, that is, it can perform load balancing based on the accurate multicast service quality of each relay device, thereby improving multicast service quality.
[0127] In an embodiment of the present invention, the priority value is determined based on the health parameters of the relay equipment, and the health parameters are The number of accessible multicast sources, Network quality between multicast source and network source, Failure rate of the transmission path to and from the multicast source, and This includes, but is not limited to, one or more of the routing link quality characteristics between the multicast source and the network.
[0128] Here, network quality may include transmission delay, jitter, and packet loss rate between the relay device and the multicast source.
[0129] The relay device can use a detection mechanism to detect the failure rate of the transmission path to and from the multicast source. For example, the detection mechanism may be a point-to-multipoint bidirectional forwarding detection (P2MP BFD) mechanism.
[0130] Each health parameter of a relay device corresponds to a preset weight value and threshold, and the relay device's priority value is the sum of the weight values of each health parameter. Each time a health parameter is acquired, if a health parameter is smaller than the threshold corresponding to that health parameter, the priority value is decreased by the weight value corresponding to that health parameter. After the health parameter becomes equal to or greater than the threshold corresponding to that health parameter again, the priority parameter is increased by the weight value corresponding to that health parameter.
[0131] Relay devices can periodically refresh their own priority values.
[0132] In one embodiment, a relay device can calculate its own priority value based on its own health parameters.
[0133] In another embodiment, the network controller can centrally monitor the health parameters of each relay device, calculate a priority value for each relay device, and issue a priority value to each relay device.
[0134] In some embodiments of the present invention, selecting one target relay device for a multicast group from among multiple relay devices based on the priority value and load value of each relay device in S303, specifically, This can be achieved by obtaining the variance weight values of each relay device, selecting variance weight values that exceed a predetermined threshold from among multiple variance weight values, and then selecting the relay device with the smallest load value from among the relay devices corresponding to the selected variance weight values as the target relay device.
[0135] Here, the gateway device can obtain the variance weight values of each relay device in one of the following two forms.
[0136] Method 1: Based on a pre-defined mapping relationship between priority values and variance weight values, the variance weight value corresponding to the priority value of each relay device is determined.
[0137] Here, the higher the priority value, the larger the variance weight value, and the above-mentioned pre-configured mapping relationships can be pre-configured based on experience.
[0138] Form 2: For each relay device, the distribution weight value of that relay device is determined as the ratio of the priority value of that relay device to the sum of the priority values of multiple relay devices.
[0139] If there are N relay devices participating in load balancing, and the priority values of the N relay devices are priority-1 to priority-N, then the load balancing weight for relay device n is: The formula is priority-n / (priority-1+priority-2+...+Priority-N)*100. However, the range of n is 1 to N.
[0140] The above formula allows for the calculation of the variance weight value for each relay device, and furthermore, it allows for the selection of variance weight values that exceed a predetermined threshold. The predetermined threshold can be set based on experience.
[0141] If the variance weight values of relay device 1, relay device 3, and relay device 5 in N relay devices are greater than a preset threshold, then the magnitude of the load values of relay device 1, relay device 3, and relay device 5 can be compared.
[0142] Assuming that relay device 1 has the smallest load, relay device 1 can be identified as the target relay device.
[0143] Here, the load value is the number of multicast groups handled by the relay device, and the gateway device can maintain the number of multicast groups handled by each relay device, and each time a target relay device is selected for a multicast group, 1 can be added to the load value of that target relay device.
[0144] Preferably, the method for selecting the target relay device in embodiments of the present invention is not limited. In other load balancing configurations, one target relay device may be selected for a multicast group from among multiple relay devices based on the priority and load values of each relay device. Embodiments of the present invention are not specifically limited.
[0145] For example, by sequentially determining whether the load balancing value of each relay device corresponding to the load balancing value falls below a predetermined load threshold, in descending order of load balancing value, the relay device whose load balancing value falls below the predetermined load threshold can be identified as the target relay device.
[0146] Specifically, the system first selects the largest variance weight value. If the load value of the relay device corresponding to this largest variance weight value falls below a preset load threshold, that relay device is identified as the target relay device. If the load value of that relay device is equal to or greater than the preset load threshold, the next largest variance weight value is selected. If the load value of the relay device corresponding to this next largest variance weight value falls below a preset load threshold, that relay device is identified as the target relay device. Otherwise, the next largest load variance weight value is selected, and this process is repeated until a target relay device is selected.
[0147] According to the above technical means, the gateway device can integrate the distributed weight and load values of the relay devices to select a target relay device for the multicast group. The selected target relay device can provide better multicast service quality, avoid selecting a relay device that is overloaded or has poor multicast service quality, fully utilize the resources of the relay device, and improve multicast forwarding efficiency.
[0148] In some embodiments of the present invention, after a gateway device selects a target relay device for a multicast group, the multicast data stream of the multicast group is continuously forwarded by the target relay device unless the gateway device receives a request from the multicast receiver to leave the multicast group. Even if the priority or load value of the target relay device changes, it is not necessary to re-select the target relay device for the multicast group.
[0149] However, if the gateway device detects that the target relay device is unreachable by the keep-alive mechanism, i.e., if the target relay device has failed, after sending the first membership update packet to the target relay device in S304, the method further... If the target relay device fails, the priority values of each relay device other than the target relay device are obtained, Based on the priority and load values of each relay device acquired, a single target relay device is re-selected for the multicast group from among the relay devices other than the target relay device. This includes sending a second membership update packet containing multicast group information to a re-selected target relay device, which then forwards the multicast data stream of the multicast group to the multicast receiver.
[0150] Here, the method for re-selecting the target relay device is the same as the method for selecting the target relay device described in the above embodiment, and it is necessary to re-select the target relay device from the relay device group for each multicast group that the failed target relay device was responsible for.
[0151] In this way, after a target relay device fails, a new target relay device can be promptly selected for the multicast group that the failed target relay device was responsible for, improving the reliability of the AMT tunnel and avoiding interruptions to multicast operations.
[0152] As described above for the embodiments, in the embodiments of the present invention, priority values were added to both the membership query packet and the relay advertisement packet. The packet formats of the membership query packet and the relay advertisement packet are described below.
[0153] In one embodiment of the present invention, a membership query packet includes a first flag bit field and a priority field, wherein a first flag bit field indicates that the priority field holds the priority value of a relay device.
[0154] Furthermore, the membership query packet also includes a second flag bit field.
[0155] If the second flag bit field is valued as 1, it indicates that the priority field is located after the gateway address field and adjacent to the gateway address field. A second flag bit field with a value of 2 indicates that the priority field is located after the encapsulation information in a typical query message, and adjacent to it.
[0156] For example, the first value may be 1, and the second value may be 0.
[0157] As an example, Figure 4 shows a schematic diagram of the configuration of a membership query packet when the second flag bit field is the first value.
[0158] A membership query packet includes the following fields: Version, Type, Reserved, P flag bit, L flag bit, G flag bit, Response Media Access Control (Response MAC) address, Request Nonce, Encapsulated General Query Message, Gateway Port Number, Gateway IP Address, and Priority.
[0159] Here, the value of the Version field is 0, and the value of the Type field is 4. When communicating between the gateway device and the relay device based on the IPv4 protocol, the query message is usually a Membership Query based on the IGMPv3 protocol. When communicating between the gateway device and the relay device based on the IPv6 protocol, the query message is usually a Listener Query based on the MLDv2 protocol. The IP address of the gateway device is either an IPv4 address or an IPv6 address.
[0160] Here, the first flag bit field is the P flag bit field, and the second flag bit field is the G flag bit field. The fact that both the P flag bit field and the G flag bit field are 1 indicates that the priority field follows the Gateway IP Address field in Figure 4.
[0161] If the P flag bit field is 1 and the G flag bit field is 0, it indicates that the membership query packet does not contain the Gateway Port Number field and Gateway IP Address field, and the priority field is after the Encapsulated General Query Message in Figure 4.
[0162] In another embodiment of the present invention, the relay advertisement packet includes a priority field, the priority field holding the priority value of the relay device.
[0163] As an example, Figure 5 shows a schematic diagram of a relay advertisement packet provided in an embodiment of the present invention. The relay advertisement packet includes the fields Version, Type, Priority, Reserved, Discovery Nonce, and Relay Address. Here, the Version field takes the value 1, the Type field takes the value 2, and the Relay Address field includes an IPv4 address or an IPv6 address. The Priority field is located after the Type field and adjacent to the Type field.
[0164] In the above membership query packets and relay query packets, the priority field occupies 8 reserved bits and may be an unsigned integer with a valid range of 1 to 255. A priority field of 0 indicates that the priority field does not hold the priority value of the relay device.
[0165] As shown in Figure 6, using relay equipment 1 and relay equipment 2 included in the relay equipment group as an example, Figure 6 is a flowchart of a multicast tunnel load balancing method provided in an embodiment of the present invention, which may include the following steps S601 to S611.
[0166] S601, the gateway device, sends relay discovery packets to relay device 1 and relay device 2, respectively. In response, relay device 1 and relay device 2 receive the relay discovery packets sent from the gateway device.
[0167] S602, after receiving the relay discovery packet, relay device 1 sends a relay advertisement packet to the gateway device. In response, the gateway device can receive the relay advertisement packet.
[0168] Here, the relay advertisement packet contains the priority value Priority-1 for relay device 1.
[0169] After S602, execute S604.
[0170] S603, after receiving the relay discovery packet, relay device 2 sends a relay advertisement packet to the gateway device. In response, the gateway device can receive the relay advertisement packet.
[0171] After S603, execute S606.
[0172] Here, the relay advertisement packet contains the priority value Priority-2 for relay device 2.
[0173] S604, the gateway device sends a request packet to relay device 1.
[0174] Here, the gateway device can execute S604 after receiving the relay advertisement packet transmitted from relay device 1.
[0175] S605, relay device 1, after receiving the request packet, sends a Membership Query packet to the gateway device.
[0176] Here, the membership query packet contains the latest priority value Priority-1 from relay device 1.
[0177] After the gateway device receives a membership query packet sent from relay device 1, it can activate a periodic query keep-alive timer (Query Timer) 1 between itself and relay device 1. Whenever the periodic query keep-alive timer 1 times out, the gateway device is triggered to resend the request packet to relay device 1.
[0178] S606, the gateway device, sends a request packet to relay device 2.
[0179] Here, the gateway device can execute S606 after receiving the relay advertisement packet transmitted from relay device 2.
[0180] S607, relay device 2, after receiving the request packet, sends a Membership Query packet to the gateway device.
[0181] Here, the membership query packet contains the latest priority value, Priority-2, from relay device 2.
[0182] After the gateway device receives a membership query packet sent from relay device 2, it can activate a periodic query keep-alive timer (Query Timer) 2 between itself and relay device 2. Whenever the periodic query keep-alive timer 2 times out, the gateway device is triggered to resend the request packet to relay device 2.
[0183] Subsequently, when the gateway device receives a multicast join request packet sent from multicast receiver 1, and the multicast join request packet requests to join multicast group (S1,G1), the gateway device selects one target relay device for multicast group (S1,G1) based on the priority and load values of relay device 1 and relay device 2. Assuming the selected target relay device is relay device 1, the device continues to execute S608.
[0184] S608, the gateway device sends a Membership Update packet to relay device 1. In response, relay device 1 receives the Membership Update packet.
[0185] In this case, the membership update packet contains information about the multicast group (S1, G1).
[0186] S609, relay device 1 transmits a multicast data stream (S1, G1) to the gateway device. In response, the gateway device receives the multicast data stream (S1, G1) transmitted from relay device 1.
[0187] The gateway device can then forward the multicast data stream from (S1,G1) to multicast receiver 1.
[0188] After S607, if the gateway device receives a multicast join request packet sent from multicast receiver 2 and the multicast join request packet requests to join multicast group (S1,G2), the gateway device selects one target relay device for multicast group (S1,G2) based on the priority and load values of relay device 1 and relay device 2. Assuming the selected target relay device is relay device 2, the gateway device continues executing S610.
[0189] The S610 gateway device sends a Membership Update packet to relay device 2. In response, relay device 2 receives the Membership Update packet.
[0190] The membership update packet contains information about the multicast groups (S1, G2).
[0191] S611, relay device 2 transmits the multicast data stream (S1, G2) to the gateway device. In response, the gateway device receives the multicast data stream (S1, G2) transmitted from relay device 2.
[0192] The gateway device can then forward the multicast data stream from (S1, G2) to multicast receiver 2.
[0193] According to this method, a gateway device can simultaneously establish AMT tunnels with multiple relay devices. After receiving a multicast join request packet, the gateway device selects one relay device for the multicast group based on the priority and load values of multiple relay devices in a load-balancing manner. The selected relay device can then forward the multicast data stream of the multicast group requested by the multicast join request, thereby improving multicast forwarding efficiency.
[0194] Based on the same inventive concept, an embodiment of the present invention provides a multicast tunnel load balancing device, which is applied to a gateway device, and the gateway device establishes an AMT tunnel with multiple relay devices, as shown in Figure 7, the device, A receiving module 701 that receives multicast join request packets sent from multicast receivers, wherein the multicast join request packets contain multicast group information, An acquisition module 702 that acquires the priority value and load value of each relay device in multiple relay devices, wherein the priority value indicates the multicast service quality of the relay device, A selection module 703 selects one target relay device for a multicast group from among multiple relay devices based on the priority and load values of each relay device. The system includes a transmitting module 704 that transmits a first membership update packet containing multicast group information to a target relay device, causing the target relay device to forward the multicast data stream of the multicast group to a multicast receiver.
[0195] Preferably, the gateway device is configured with the anycast address of each relay device included in the relay device group, and the process by which the gateway device establishes an AMT tunnel with multiple relay devices is as follows: After the gateway device comes online, it sends a relay discovery packet to each relay device included in the relay device group, and each relay discovery packet contains a different anycast address. Within a first preset time, receive relay advertisement packets transmitted from a first quantity of relay devices, wherein the relay advertisement packets include the priority value of the relay device. Establish an AMT tunnel with each of the first number of relay devices, and record the priority value of the first number of relay devices. The priority value of the second quantity of relay devices is recorded as 0, wherein the second quantity of relay devices are relay devices that did not transmit relay advertisement packets within the first preset time in the relay device group, and the sum of the first quantity and the second quantity is the number of relay devices included in the relay device group.
[0196] Preferably, after recording the priority values of a first number of relay devices, the device further includes an update module. The transmitting module 704 is used to send request packets to a first number of relay devices at second preset time intervals. The receiving module 701 is used to receive membership query packets transmitted from a first number of relay devices, and the membership query packets contain the priority value of the relay device. The update module is used to update the priority values of the first recorded number of relay devices based on the priority values contained in the membership query packets.
[0197] Preferably, the selection module 703 is, specifically, Obtain the variance weight values for each relay device, Selecting variance weight values that exceed a predetermined threshold from multiple variance weight values, It is used to select the relay device with the smallest load value from among the relay devices corresponding to the selected variance weight values as the target relay device.
[0198] Preferably, the selection module 703 is, specifically, Based on a pre-defined mapping relationship between priority values and variance weight values, determine the variance weight value corresponding to the priority value of each relay device, or This is used to determine the distribution weight value of each relay device as the ratio of the priority value of that relay device to the sum of the priority values of multiple relay devices.
[0199] Preferably, when the target relay device fails, the acquisition module 702 is used to acquire the priority values of each relay device other than the target relay device among multiple relay devices. The selection module 703 is used to re-select a single target relay device for a multicast group from among multiple relay devices other than the target relay device, based on the priority and load values of each relay device acquired. The transmitting module 704 is used to enable the re-selected target relay device to forward the multicast data stream of the multicast group to the multicast receiver by sending a second membership update packet containing multicast group information to the re-selected target relay device.
[0200] Preferably, the relay advertisement packet includes a priority field, where the priority field holds the priority value of the relay device.
[0201] Preferably, the membership query packet includes a first flag bit field and a priority field, where a first flag bit field is a first value, indicating that the priority field holds the priority value of the relay device.
[0202] Preferably, the membership query packet further includes a second flag bit field. If the second flag bit field is valued as 1, it indicates that the priority field is located after the gateway address field and adjacent to the gateway address field. A second flag bit field with a value of 2 indicates that the priority field is located after the encapsulation information in a typical query message, and adjacent to it.
[0203] Preferably, the priority field occupies 8 reserved bits, and a priority field of 0 indicates that the priority field does not carry a priority value.
[0204] Preferably, the priority value is determined based on the health parameters of the relay equipment, and the health parameters are, The number of accessible multicast sources, Network quality between multicast source and network source, Failure rate of the transmission path to and from the multicast source, and This includes one or more of the routing link quality characteristics between the multicast source and the destination.
[0205] Preferably, the load value is the number of multicast groups handled by the relay device.
[0206] Based on the same inventive concept, an embodiment of the present invention provides a gateway device, which, as shown in Figure 8, establishes an AMT tunnel with a plurality of relay devices, and the gateway device Processor 801 and, Transmitter / receiver 804 and, The system comprises a machine-readable storage medium 802 in which machine-executable instructions that can be executed by a processor are stored, The machine-executable instructions are sent to processor 801. The transceiver 804 receives a multicast join request packet sent from a multicast receiver, and the multicast join request packet contains multicast group information. This involves obtaining the priority value and load value of each relay device in multiple relay devices, wherein the priority value indicates the multicast service quality of the relay device, Based on the priority and load values of each relay device, one target relay device is selected from multiple relay devices for a multicast group. The transceiver 804 sends a first membership update packet containing multicast group information to the target relay device, causing the target relay device to forward the multicast data stream of the multicast group to the multicast receiver.
[0207] Preferably, the gateway device has the anycast address of each relay device included in the relay device group, and the machine-executable instructions are sent to the processor 801, After the gateway device comes online, the transceiver 804 sends a relay discovery packet to each relay device included in the relay device group, and each relay discovery packet contains a different anycast address. Within a first preset time, the transceiver 804 receives relay advertisement packets transmitted from a first number of relay devices, wherein the relay advertisement packets include the priority value of the relay device. Establish an AMT tunnel with each of the first number of relay devices, and record the priority value of the first number of relay devices. The system is configured to record the priority value of the second quantity of relay devices as 0, wherein the second quantity of relay devices are relay devices that did not transmit relay advertisement packets within the first preset time in the relay device group, and the sum of the first quantity and the second quantity equals the total number of relay devices included in the relay device group.
[0208] Preferably, the machine-executable instructions are given to the processor 801, At every second preset time interval, the transceiver 804 transmits a request packet to a first number of relay devices, The transceiver 804 receives a membership query packet transmitted from a first number of relay devices, wherein the membership query packet contains the priority value of the relay device. Based on the priority values contained in the membership query packets, update the priority values of the first recorded number of relay devices.
[0209] Preferably, the machine-executable instructions are given to the processor 801, Obtain the variance weight values for each relay device, Selecting variance weight values that exceed a predetermined threshold from multiple variance weight values, The system will then select the relay device with the smallest load value from among the relay devices corresponding to the selected variance weight values, and execute the following:
[0210] Preferably, the machine-executable instructions are given to the processor 801, Based on a pre-defined mapping relationship between priority values and variance weight values, determine the variance weight value corresponding to the priority value of each relay device, or For each relay device, the system determines its distribution weight value as the ratio of its priority value to the sum of the priority values of multiple relay devices.
[0211] Preferably, the machine-executable instructions are given to the processor 801, If the target relay device fails, the priority values of each relay device other than the target relay device are obtained, Based on the priority and load values of each relay device acquired, a single target relay device is re-selected for the multicast group from among the relay devices other than the target relay device. The transceiver 804 sends a second membership update packet containing multicast group information to the re-selected target relay device, causing the re-selected target relay device to forward the multicast data stream of the multicast group to the multicast receiver.
[0212] Preferably, the relay advertisement packet includes a priority field, where the priority field holds the priority value of the relay device.
[0213] Preferably, the membership query packet includes a first flag bit field and a priority field, where a first flag bit field is a first value, indicating that the priority field holds the priority value of the relay device.
[0214] Preferably, the membership query packet further includes a second flag bit field. If the second flag bit field is valued as 1, it indicates that the priority field is located after the gateway address field and adjacent to the gateway address field. A second flag bit field with a value of 2 indicates that the priority field is located after the encapsulation information in a typical query message, and adjacent to it.
[0215] Preferably, the priority field occupies 8 reserved bits, and a priority field of 0 indicates that the priority field does not carry a priority value.
[0216] Preferably, the priority value is determined based on the health parameters of the relay equipment, and the health parameters are, The number of accessible multicast sources, Network quality between multicast source and network source, Failure rate of the transmission path to and from the multicast source, and This includes one or more of the routing link quality characteristics between the multicast source and the destination.
[0217] Preferably, the load value is the number of multicast groups handled by the relay device.
[0218] In Figure 8, a communication bus 803 may be further included. The processor 801, the machine-readable storage medium 802, and the transceiver 804 communicate with each other via the communication bus 803. The communication bus 803 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc.
[0219] The transceiver 804 may also be a wireless communication module, and the transceiver 804 exchanges data with other devices under the control of the processor 801.
[0220] The machine-readable storage medium 802 may include random access memory (RAM) or non-volatile memory (NVM), and may be, for example, at least one magnetic disk memory. Alternatively, the machine-readable storage medium may be at least one storage device located away from the processor.
[0221] The processor 801 may be a general-purpose processor including a Central Processing Unit (CPU), a Network Processor (NP), a Digital Signal Processing Unit (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, or discrete hardware components.
[0222] Based on the same inventive concept, according to the multicast tunnel load balancing method provided in the above embodiment of the present invention, the embodiment of the present invention further provides a machine-readable storage medium in which machine-executable instructions that can be executed by a processor are stored. The machine-executable instructions cause the processor to execute the steps of the multicast tunnel load balancing method described above.
[0223] Another embodiment provided in the present invention further provides a computer program product which, when executed on a computer, causes the computer to perform the steps of the multicast tunnel load balancing method in the above embodiment.
[0224] In this text, relational terms such as those in Sections 1 and 2 are used merely to distinguish one entity or action from another, and do not necessarily request or suggest that such an actual relationship or order exists between these entities or actions. Furthermore, the terms “encompassing,” “including,” or other variations thereof are intended to cover non-exclusive inclusion, meaning that a process, method, article, or device containing a set of elements may further include not only those elements but also other elements not explicitly enumerated, or elements inherent to such a process, method, article, or device. Unless otherwise specified, an element limited by “including one…” does not preclude a process, method, article, or device containing such element from having other identical elements.
[0225] The above description is merely a preferred embodiment of the present invention and does not limit the invention. Any amendments, equivalent substitutions, modifications, etc., made within the spirit and principles of the present invention shall all be within the scope of protection of the present invention.
Claims
1. A multicast tunnel load balancing method applicable to a gateway device, wherein the gateway device has established AMT tunnels with a plurality of relay devices, and the method is: Receiving a multicast join request packet sent from a multicast receiver, wherein the multicast join request packet contains multicast group information, The process involves obtaining the priority value and load value of each relay device in the aforementioned plurality of relay devices, wherein the priority value indicates the multicast service quality of the relay device, Based on the priority and load values of each relay device, one target relay device is selected from the multiple relay devices for the multicast group. This includes sending a first membership update packet containing information about the multicast group to the target relay device, thereby causing the target relay device to forward the multicast data stream of the multicast group to the multicast receiver. A multicast tunnel load balancing method characterized by the following features.
2. The gateway device is configured with the anycast addresses of each relay device included in the relay device group, and the process by which the gateway device establishes an AMT tunnel with the plurality of relay devices is as follows: After the gateway device comes online, a relay discovery packet is sent to each relay device included in the relay device group, wherein each relay discovery packet contains a different anycast address. Receiving relay advertisement packets transmitted from a first number of relay devices within a first preset time, wherein the relay advertisement packets include the priority value of the relay device. Establish an AMT tunnel with each of the first number of relay devices, and record the priority value of each of the first number of relay devices. Recording the priority value of a second quantity of relay devices as 0, wherein the second quantity of relay devices are relay devices that did not transmit relay advertisement packets within the first preset time in the relay device group, and the sum of the first quantity and the second quantity is the number of relay devices included in the relay device group, The multicast tunnel load balancing method according to claim 1, characterized in that
3. After recording the priority values of the first quantity of relay devices, the method further: At each second preset time interval, a request packet is sent to the first number of relay devices, Receiving membership query packets transmitted from the first number of relay devices, wherein the membership query packets include the priority value of the relay device, This includes updating the priority values of the recorded first number of relay devices based on the priority values included in the membership query packet, The multicast tunnel load balancing method according to claim 2, characterized in that
4. Based on the priority and load values of each relay device, selecting one target relay device for the multicast group from the multiple relay devices is: Obtain the variance weight values for each relay device, Selecting variance weight values that exceed a predetermined threshold from multiple variance weight values, This includes selecting the relay device with the smallest load value from among the relay devices corresponding to the selected variance weight values as the target relay device, The multicast tunnel load balancing method according to claim 1, characterized in that
5. Obtaining the variance weight values of each relay device is: Based on a pre-defined mapping relationship between priority values and distribution weight values, determine the distribution weight value corresponding to the priority value of each relay device, or This includes determining the distribution weight value of each relay device as the ratio of the priority value of the relay device to the sum of the priority values of the multiple relay devices, The multicast tunnel load balancing method according to claim 4, characterized in that
6. After transmitting the first membership update packet to the target relay device, the method further: If the target relay device fails, the priority values of each relay device other than the target relay device among the multiple relay devices are obtained, Based on the priority and load values of each relay device acquired, one target relay device is re-selected for the multicast group from among the relay devices other than the target relay device among the multiple relay devices, This includes sending a second membership update packet containing information about the multicast group to a re-selected target relay device, thereby causing the re-selected target relay device to forward the multicast data stream of the multicast group to the multicast receiver. The multicast tunnel load balancing method according to claim 1, characterized in that
7. The relay advertisement packet includes a priority field, the priority field holds the priority value of the relay device. The multicast tunnel load balancing method according to claim 2, characterized in that
8. The membership query packet includes a first flag bit field and a priority field, wherein the first flag bit field has a first value, indicating that the priority field holds the priority value of the relay device. The multicast tunnel load balancing method according to claim 3, characterized in that
9. The membership query packet further includes a second flag bit field, If the second flag bit field has a first value, it indicates that the priority field is located after the gateway address field and adjacent to the gateway address field. If the second flag bit field has a value of 2, it indicates that the priority field is located after the encapsulation information of a normal query message and adjacent to the encapsulation information. The multicast tunnel load balancing method according to claim 8, characterized in that
10. The priority field occupies 8 reserved bits, and a value of 0 in the priority field indicates that the priority field does not carry a priority value. A multicast tunnel load balancing method according to claim 7 or 8, characterized in that
11. The priority value is determined based on the health parameters of the relay equipment, and the health parameters are, The number of accessible multicast sources, Network quality between multicast source and network source, Failure rate of the transmission path to and from the multicast source, and Including one or more of the routing link quality to and from the multicast source, The multicast tunnel load balancing method according to claim 1, characterized in that
12. The aforementioned load value is the number of multicast groups handled by the relay equipment. The multicast tunnel load balancing method according to claim 1, characterized in that
13. A multicast tunnel load balancing device applied to a gateway device, wherein the gateway device has established an AMT tunnel with a plurality of relay devices, and the device, A receiving module that receives multicast join request packets sent from multicast receivers, wherein the multicast join request packets contain multicast group information, An acquisition module that acquires the priority value and load value of each relay device in the plurality of relay devices, wherein the priority value indicates the multicast service quality of the relay device, A selection module that selects one target relay device for the multicast group from among the multiple relay devices based on the priority value and load value of each relay device, The system includes a transmitting module that transmits a first membership update packet containing information about the multicast group to the target relay device, causing the target relay device to forward the multicast data stream of the multicast group to the multicast receiver. A multicast tunnel load balancing device characterized by the following features.
14. The gateway device is configured with the anycast addresses of each relay device included in the relay device group, and the process by which the gateway device establishes an AMT tunnel with the plurality of relay devices is as follows: After the gateway device comes online, a relay discovery packet is sent to each relay device included in the relay device group, wherein each relay discovery packet contains a different anycast address. Receiving relay advertisement packets transmitted from a first number of relay devices within a first preset time, wherein the relay advertisement packets include the priority value of the relay device. Establish an AMT tunnel with each of the first number of relay devices, and record the priority value of each of the first number of relay devices. Recording the priority value of a second quantity of relay devices as 0, wherein the second quantity of relay devices are relay devices that did not transmit relay advertisement packets within the first preset time in the relay device group, and the sum of the first quantity and the second quantity is the number of relay devices included in the relay device group, A multicast tunnel load balancing device according to claim 13, characterized in that...
15. After recording the priority values of the first number of relay devices, the device further includes an update module, The transmission module is used to transmit request packets to the first number of relay devices at second preset time intervals. The receiving module is used to receive membership query packets transmitted from the first number of relay devices, and the membership query packets include the priority value of the relay device. The update module is used to update the priority values of the recorded first number of relay devices based on the priority values included in the membership query packet. A multicast tunnel load balancing device according to claim 14, characterized in that...
16. The aforementioned selection module is Obtain the variance weight values for each relay device, Selecting variance weight values that exceed a predetermined threshold from multiple variance weight values, Selecting the relay device with the smallest load value from among the relay devices corresponding to the selected variance weight values as the target relay device, and using this, A multicast tunnel load balancing device according to claim 13, characterized in that...
17. The aforementioned selection module is Based on a pre-defined mapping relationship between priority values and distribution weight values, determine the distribution weight value corresponding to the priority value of each relay device, or This method is used to determine the distribution weight value of each relay device as the ratio of the priority value of that relay device to the sum of the priority values of the multiple relay devices. A multicast tunnel load balancing device according to claim 16, characterized in that...
18. The acquisition module is used to acquire the priority values of each relay device other than the target relay device among the plurality of relay devices when the target relay device fails. The selection module is used to re-select one target relay device for the multicast group from among the relay devices other than the target relay device in the plurality of relay devices, based on the priority value and load value of each relay device acquired. The transmitting module is used to enable the re-selected target relay device to forward the multicast data stream of the multicast group to the multicast receiver by transmitting a second membership update packet containing the multicast group information to the re-selected target relay device. A multicast tunnel load balancing device according to claim 13, characterized in that...
19. The relay advertisement packet includes a priority field, the priority field holds the priority value of the relay device. A multicast tunnel load balancing device according to claim 14, characterized in that...
20. The membership query packet includes a first flag bit field and a priority field, wherein the first flag bit field has a first value, indicating that the priority field holds the priority value of the relay device. A multicast tunnel load balancing device according to claim 15, characterized in that...
21. The membership query packet further includes a second flag bit field, If the second flag bit field has a first value, it indicates that the priority field is located after the gateway address field and adjacent to the gateway address field. If the second flag bit field has a value of 2, it indicates that the priority field is located after the encapsulation information of a normal query message and adjacent to the encapsulation information. A multicast tunnel load balancing device according to claim 20, characterized in that...
22. The priority field occupies 8 reserved bits, and a value of 0 in the priority field indicates that the priority field does not carry a priority value. A multicast tunnel load balancing device according to claim 19 or 20, characterized in that...
23. The priority value is determined based on the health parameters of the relay equipment, and the health parameters are, The number of accessible multicast sources, Network quality between multicast source and network source, Failure rate of the transmission path to and from the multicast source, and Including one or more of the routing link quality to and from the multicast source, A multicast tunnel load balancing device according to claim 13, characterized in that...
24. The aforementioned load value is the number of multicast groups handled by the relay equipment. A multicast tunnel load balancing device according to claim 13, characterized in that...
25. A gateway device, wherein the gateway device establishes an AMT tunnel with a plurality of relay devices, and the gateway device Processor and Transmitter and receiver, The system comprises a machine-readable storage medium in which machine-executable instructions that can be executed by the processor are stored, The machine-executable instruction is given to the processor, The transceiver receives a multicast join request packet transmitted from a multicast receiver, wherein the multicast join request packet contains multicast group information. The process involves obtaining the priority value and load value of each relay device in the aforementioned plurality of relay devices, wherein the priority value indicates the multicast service quality of the relay device, Based on the priority and load values of each relay device, one target relay device is selected from the multiple relay devices for the multicast group. The transceiver transmits a first membership update packet containing the multicast group information to the target relay device, thereby causing the target relay device to forward the multicast data stream of the multicast group to the multicast receiver. A gateway device characterized by the following features.
26. The gateway device has the anycast addresses of each relay device included in the relay device group, and the machine-executable instructions are sent to the processor, After the gateway device comes online, the transceiver transmits a relay discovery packet to each relay device included in the relay device group, wherein each relay discovery packet contains a different anycast address. Within a first preset time, the transceiver receives relay advertisement packets transmitted from a first number of relay devices, wherein the relay advertisement packets include the priority value of the relay device. Establish an AMT tunnel with each of the first number of relay devices, and record the priority value of each of the first number of relay devices. The priority value of the second quantity of relay devices is recorded as 0, wherein the second quantity of relay devices are relay devices that did not transmit relay advertisement packets within the first preset time in the relay device group, and the sum of the first quantity and the second quantity is the number of relay devices included in the relay device group. The gateway device according to claim 25, characterized in that...
27. The machine-executable instruction is given to the processor, At each second preset time interval, the transceiver transmits a request packet to the first number of relay devices, The transceiver receives membership query packets transmitted from the first number of relay devices, wherein the membership query packets include the priority value of the relay device. Based on the priority values included in the membership query packet, the priority values of the first number of relay devices recorded are updated, and the following is performed: The gateway device according to claim 26, characterized in that...
28. The machine-executable instruction is given to the processor, Obtain the variance weight values for each relay device, Selecting variance weight values that exceed a predetermined threshold from multiple variance weight values, The system will perform the following actions: select the relay device with the smallest load value from among the relay devices corresponding to the selected variance weight values as the target relay device. The gateway device according to claim 25, characterized in that...
29. The machine-executable instruction is given to the processor, Based on a pre-defined mapping relationship between priority values and distribution weight values, determine the distribution weight value corresponding to the priority value of each relay device, or For each relay device, the system is made to determine the distribution weight value of the relay device as the ratio of the priority value of the relay device to the sum of the priority values of the multiple relay devices. The gateway device according to claim 28, characterized in that...
30. The machine-executable instruction is given to the processor, If the target relay device fails, the priority values of each relay device other than the target relay device among the multiple relay devices are obtained, Based on the priority and load values of each relay device acquired, one target relay device is re-selected for the multicast group from among the relay devices other than the target relay device among the multiple relay devices, By sending a second membership update packet containing the multicast group information to the target relay device re-selected by the transceiver, the re-selected target relay device is instructed to forward the multicast data stream of the multicast group to the multicast receiver. The gateway device according to claim 25, characterized in that...
31. The relay advertisement packet includes a priority field, the priority field holds the priority value of the relay device. The gateway device according to claim 26, characterized in that...
32. The membership query packet includes a first flag bit field and a priority field, wherein the first flag bit field has a first value, indicating that the priority field holds the priority value of the relay device. The gateway device according to claim 27, characterized in that...
33. The membership query packet further includes a second flag bit field, If the second flag bit field has a first value, it indicates that the priority field is located after the gateway address field and adjacent to the gateway address field. If the second flag bit field has a value of 2, it indicates that the priority field is located after the encapsulation information of a normal query message and adjacent to the encapsulation information. The gateway device according to claim 32, characterized in that...
34. The priority field occupies 8 reserved bits, and a value of 0 in the priority field indicates that the priority field does not carry a priority value. A gateway device according to claim 31 or 32, characterized in that it is a gateway device according to claim 31 or 32.
35. The priority value is determined based on the health parameters of the relay equipment, and the health parameters are, The number of accessible multicast sources, Network quality between multicast source and network source, Failure rate of the transmission path to and from the multicast source, and Including one or more of the routing link quality to and from the multicast source, The gateway device according to claim 25, characterized in that...
36. The aforementioned load value is the number of multicast groups handled by the relay equipment. The gateway device according to claim 25, characterized in that...
37. A machine-readable storage medium storing machine-executable instructions, which, when called and executed by a processor, causes the processor to implement the multicast tunnel load balancing method described in any one of claims 1 to 12. A machine-readable storage medium characterized by the following features.
38. A computer program product that enables a processor to implement the multicast tunnel load balancing method described in any one of claims 1 to 12. A computer program product characterized by the following features.