Movatterモバイル変換


[0]ホーム

URL:


CN104468147A - Load balance method and device - Google Patents

Load balance method and device
Download PDF

Info

Publication number
CN104468147A
CN104468147ACN201410764800.0ACN201410764800ACN104468147ACN 104468147 ACN104468147 ACN 104468147ACN 201410764800 ACN201410764800 ACN 201410764800ACN 104468147 ACN104468147 ACN 104468147A
Authority
CN
China
Prior art keywords
multicast group
group set
multicast
mapping
flow
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410764800.0A
Other languages
Chinese (zh)
Other versions
CN104468147B (en
Inventor
彭维
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Huawei Digital Technologies Co Ltd
Original Assignee
Beijing Huawei Digital Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Huawei Digital Technologies Co LtdfiledCriticalBeijing Huawei Digital Technologies Co Ltd
Priority to CN201410764800.0ApriorityCriticalpatent/CN104468147B/en
Publication of CN104468147ApublicationCriticalpatent/CN104468147A/en
Application grantedgrantedCritical
Publication of CN104468147BpublicationCriticalpatent/CN104468147B/en
Expired - Fee Relatedlegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Landscapes

Abstract

The embodiment of the invention provides a load balance method and device. The method includes the steps that first mapping and second mapping are obtained, the first mapping is used for representing the corresponding relation between a first RP and a first multicast group set, the second mapping is used for representing the corresponding relation between a second RP and a second multicast group set, and the first multicast group set and the second multicast group set comprise different multicast groups; the multicast groups contained in the first multicast group set and the multicast groups contained in the second multicast group set are grouped again so that a third multicast group set and a fourth multicast group set can be obtained; third mapping and fourth mapping are generated through the third multicast group set and the fourth multicast group set, the third mapping is used for representing the corresponding relation between the first RP and the third multicast group set, and the fourth mapping is used for representing the corresponding relation between the second RP and the fourth multicast group set; the third mapping and the fourth mapping are broadcast. In this way, overload RPs can be avoided, and the message forwarding efficiency of the RPs can be improved easily.

Description

Translated fromChinese
一种负载均衡方法及装置A load balancing method and device

技术领域technical field

本发明涉及通信技术领域,具体涉及一种负载均衡方法及装置。The present invention relates to the technical field of communications, in particular to a load balancing method and device.

背景技术Background technique

通常,针对大型网络且用户分布较为分散的场景中,采用稀疏模式独立组播协议(英文:Protocol Independent Multicast-Sparse Mode,简称:PIM-SM)进行点到多点的报文传输。Usually, for a large-scale network and a scenario where users are scattered, the Sparse Mode Independent Multicast Protocol (English: Protocol Independent Multicast-Sparse Mode, PIM-SM for short) is used for point-to-multipoint message transmission.

基于PIM-SM,有报文传输需求时,组播成员可向汇聚点(英文:RendezvousPoint,简称:RP)发起加入请求,在RP上创建(*,G)表项,构建以RP为根的共享树(英文:Rendezvous Point Tree,简称:RPT)。其中,*为缺省参数,G为组播组的组播地址,(*,G)表示组播地址标识的组播组可以接收任何组播源发送的报文。对应地,组播源可向RP发起注册请求,在RP上创建(S,G)表项。其中,S为组播源的地址,(S,G)表示组播源可以向组播地址标识的组播组发送报文。如此处理后,在进行组播通信时,组播源便可将报文发送至RP,并由RP将所述报文下发给组播组的组播成员。Based on PIM-SM, when there is a need for message transmission, the multicast member can initiate a join request to the rendezvous point (English: RendezvousPoint, RP for short), create (*, G) entries on the RP, and build a network with the RP as the root. Shared tree (English: Rendezvous Point Tree, referred to as: RPT). Wherein, * is a default parameter, G is a multicast address of a multicast group, and (*, G) indicates that the multicast group identified by the multicast address can receive messages sent by any multicast source. Correspondingly, the multicast source can initiate a registration request to the RP, and create (S, G) entries on the RP. Wherein, S is the address of the multicast source, and (S, G) indicates that the multicast source can send packets to the multicast group identified by the multicast address. After such processing, during multicast communication, the multicast source can send a message to the RP, and the RP sends the message to the multicast members of the multicast group.

通常,网络中可能存在多个RP,每个RP又可能会是多个组播组在RPT上的根,若RP发生故障或者RP承载的负载较重等原因,均可能会影响RP的报文转发效率,进而影响组播通信效率。Usually, there may be multiple RPs in the network, and each RP may be the root of multiple multicast groups on the RPT. If the RP fails or the load carried by the RP is heavy, the packets of the RP may be affected. Forwarding efficiency, which in turn affects the efficiency of multicast communication.

发明内容Contents of the invention

本发明实施例提供的负载均衡方法及装置,有助于通过负载均衡技术提高组播通信效率。The load balancing method and device provided by the embodiments of the present invention help to improve the efficiency of multicast communication through the load balancing technology.

为此,本发明实施例提供如下技术方案:For this reason, the embodiment of the present invention provides following technical scheme:

第一方面,提供了一种负载均衡方法,所述方法包括:In a first aspect, a load balancing method is provided, the method comprising:

控制器获得第一映射和第二映射,所述第一映射用于表示第一汇聚点RP与第一组播组集合之间的对应关系,所述第二映射用于表示第二RP与第二组播组集合之间的对应关系,所述第一组播组集合和所述第二组播组集合包括不同的组播组;The controller obtains a first mapping and a second mapping, the first mapping is used to represent the correspondence between the first rendezvous point RP and the first multicast group set, and the second mapping is used to represent the correspondence between the second RP and the first multicast group set Correspondence between two multicast group sets, the first multicast group set and the second multicast group set include different multicast groups;

所述控制器对所述第一组播组集合包括的组播组和所述第二组播组集合包括的组播组,进行重新分组,获得第三组播组集合和第四组播组集合;The controller regroups the multicast groups included in the first multicast group set and the multicast groups included in the second multicast group set to obtain a third multicast group set and a fourth multicast group gather;

所述控制器利用所述第三组播组集合和所述第四组播组集合,生成第三映射和第四映射,所述第三映射用于表示所述第一RP与所述第三组播组集合之间的对应关系,所述第四映射用于表示所述第二RP与所述第四组播组集合之间的对应关系;The controller uses the third multicast group set and the fourth multicast group set to generate a third mapping and a fourth mapping, and the third mapping is used to represent the first RP and the third Correspondence between multicast group sets, the fourth mapping is used to represent the correspondence between the second RP and the fourth multicast group set;

所述控制器广播所述第三映射和所述第四映射。The controller broadcasts the third mapping and the fourth mapping.

结合第一方面,在第一方面的第一种可能的实现方式中,所述控制器对所述第一组播组集合包括的组播组和所述第二组播组集合包括的组播组,进行重新分组,获得第三组播组集合和第四组播组集合包括:With reference to the first aspect, in a first possible implementation manner of the first aspect, the controller configures the multicast group included in the first multicast group set and the multicast group included in the second multicast group set Groups are regrouped to obtain the third multicast group set and the fourth multicast group set including:

所述控制器获得第一数目和第二数目,所述第一数目为所述第一组播组集合包括的组播组的个数,所述第二数目为所述第二组播组集合包括的组播组的个数;The controller obtains a first number and a second number, the first number is the number of multicast groups included in the first multicast group set, and the second number is the number of multicast groups included in the second multicast group set The number of multicast groups included;

所述控制器利用所述第一数目和所述第二数目,将所述第一组播组集合包括的组播组和所述第二组播组集合包括的组播组,平衡分组到所述第三组播组集合和所述第四组播组集合。The controller uses the first number and the second number to balance the multicast groups included in the first multicast group set and the multicast groups included in the second multicast group set into the set The third multicast group set and the fourth multicast group set.

结合第一方面,在第一方面的第二种可能的实现方式中,所述第一组播组集合还包括每个组播组对应的流量信息,所述第二组播组集合还包括每个组播组对应的流量信息,所述控制器对所述第一组播组集合包括的组播组和所述第二组播组集合包括的组播组,进行重新分组,获得第三组播组集合和第四组播组集合包括:With reference to the first aspect, in a second possible implementation manner of the first aspect, the first multicast group set further includes traffic information corresponding to each multicast group, and the second multicast group set further includes each flow information corresponding to multicast groups, the controller regroups the multicast groups included in the first multicast group set and the multicast groups included in the second multicast group set to obtain a third group The broadcast group set and the fourth multicast group set include:

所述控制器获得第一流量和第二流量,所述第一流量为所述第一组播组集合包括的组播组的流量之和,所述第二流量为所述第二组播组集合包括的组播组的流量之和;The controller obtains a first flow and a second flow, the first flow is the sum of the flows of the multicast groups included in the first multicast group set, and the second flow is the flow of the second multicast group The sum of the flows of the multicast groups included in the set;

所述控制器利用所述第一流量和所述第二流量,将所述第一组播组集合包括的组播组和所述第二组播组集合包括的组播组,平衡分组到所述第三组播组集合和所述第四组播组集合。The controller uses the first flow and the second flow to balance the multicast groups included in the first multicast group set and the multicast groups included in the second multicast group set into the set The third multicast group set and the fourth multicast group set.

结合第一方面,在第一方面的第三种可能的实现方式中,所述控制器对所述第一组播组集合包括的组播组和所述第二组播组集合包括的组播组,进行重新分组,获得第三组播组集合和第四组播组集合包括:With reference to the first aspect, in a third possible implementation manner of the first aspect, the controller configures the multicast group included in the first multicast group set and the multicast group included in the second multicast group set Groups are regrouped to obtain the third multicast group set and the fourth multicast group set including:

所述控制器确定所述第一RP和所述第二RP中是否存在故障RP;the controller determines whether there is a faulty RP in the first RP and the second RP;

如果确定所述第一RP为故障RP,所述控制器将所述第一组播组集合包括的组播组和所述第二组播组集合包括的组播组,分组到所述第四组播组集合,所述第三组播组集合为空集;If it is determined that the first RP is a faulty RP, the controller groups the multicast groups included in the first multicast group set and the multicast groups included in the second multicast group set into the fourth A multicast group set, the third multicast group set is an empty set;

如果确定所述第二RP为故障RP,所述控制器将所述第一组播组集合包括的组播组和所述第二组播组集合包括的组播组,分组到所述第三组播组集合,所述第四组播组集合为空集。If it is determined that the second RP is a faulty RP, the controller groups the multicast groups included in the first multicast group set and the multicast groups included in the second multicast group set into the third A multicast group set, the fourth multicast group set is an empty set.

结合第一方面或第一方面的第一种至第三种任一种可能的实现方式,在第一方面的第四种可能的实现方式中,所述方法还包括:In combination with the first aspect or any of the first to third possible implementation manners of the first aspect, in a fourth possible implementation manner of the first aspect, the method further includes:

在所述第一映射和/或所述第二映射发生变化时,所述控制器更新所述第三映射和/或所述第四映射。When the first mapping and/or the second mapping changes, the controller updates the third mapping and/or the fourth mapping.

第二方面,提供了一种负载均衡装置,所述装置包括:In a second aspect, a load balancing device is provided, the device comprising:

获得单元,用于获得第一映射和第二映射,所述第一映射用于表示第一汇聚点RP与第一组播组集合之间的对应关系,所述第二映射用于表示第二RP与第二组播组集合之间的对应关系,所述第一组播组集合和所述第二组播组集合包括不同的组播组;An obtaining unit, configured to obtain a first mapping and a second mapping, the first mapping is used to represent the correspondence between the first rendezvous point RP and the first multicast group set, and the second mapping is used to represent the second A correspondence relationship between the RP and the second multicast group set, the first multicast group set and the second multicast group set include different multicast groups;

分组单元,用于对所述第一组播组集合包括的组播组和所述第二组播组集合包括的组播组,进行重新分组,获得第三组播组集合和第四组播组集合;A grouping unit, configured to regroup the multicast groups included in the first multicast group set and the multicast groups included in the second multicast group set, to obtain the third multicast group set and the fourth multicast group set group collection;

生成单元,用于利用所述第三组播组集合和所述第四组播组集合,生成第三映射和第四映射,所述第三映射用于表示所述第一RP与所述第三组播组集合之间的对应关系,所述第四映射用于表示所述第二RP与所述第四组播组集合之间的对应关系;A generating unit, configured to use the third multicast group set and the fourth multicast group set to generate a third mapping and a fourth mapping, where the third mapping is used to represent the relationship between the first RP and the fourth multicast group The correspondence between the three multicast group sets, the fourth mapping is used to represent the correspondence between the second RP and the fourth multicast group set;

广播单元,用于广播所述第三映射和所述第四映射。A broadcast unit, configured to broadcast the third mapping and the fourth mapping.

结合第二方面,在第二方面的第一种可能的实现方式中,所述分组单元包括:With reference to the second aspect, in a first possible implementation manner of the second aspect, the grouping unit includes:

数目获得单元,用于获得第一数目和第二数目,所述第一数目为所述第一组播组集合包括的组播组的个数,所述第二数目为所述第二组播组集合包括的组播组的个数;A number obtaining unit, configured to obtain a first number and a second number, the first number is the number of multicast groups included in the first multicast group set, and the second number is the number of multicast groups included in the second multicast group set. The number of multicast groups included in the group set;

第一分组子单元,用于利用所述第一数目和所述第二数目,将所述第一组播组集合包括的组播组和所述第二组播组集合包括的组播组,平衡分组到所述第三组播组集合和所述第四组播组集合。The first grouping subunit is configured to use the first number and the second number to group the multicast groups included in the first multicast group set and the multicast groups included in the second multicast group set, Balancing packets into the third set of multicast groups and the fourth set of multicast groups.

结合第二方面,在第二方面的第二种可能的实现方式中,所述第一组播组集合还包括每个组播组对应的流量信息,所述第二组播组集合还包括每个组播组对应的流量信息,所述分组单元包括:With reference to the second aspect, in a second possible implementation manner of the second aspect, the first multicast group set further includes traffic information corresponding to each multicast group, and the second multicast group set further includes each traffic information corresponding to a multicast group, the grouping unit includes:

流量获得单元,用于获得第一流量和第二流量,所述第一流量为所述第一组播组集合包括的组播组的流量之和,所述第二流量为所述第二组播组集合包括的组播组的流量之和;A flow obtaining unit, configured to obtain a first flow and a second flow, the first flow is the sum of the flows of the multicast groups included in the first multicast group set, and the second flow is the sum of the flows of the second group The sum of the traffic of the multicast groups included in the broadcast group set;

第二分组子单元,用于利用所述第一流量和所述第二流量,将所述第一组播组集合包括的组播组和所述第二组播组集合包括的组播组,平衡分组到所述第三组播组集合和所述第四组播组集合。The second grouping subunit is configured to use the first flow and the second flow to combine the multicast groups included in the first multicast group set and the multicast groups included in the second multicast group set, Balancing packets into the third set of multicast groups and the fourth set of multicast groups.

结合第二方面,在第二方面的第三种可能的实现方式中,所述分组单元包括:With reference to the second aspect, in a third possible implementation manner of the second aspect, the grouping unit includes:

确定单元,用于确定所述第一RP和所述第二RP中是否存在故障RP;a determining unit, configured to determine whether there is a faulty RP in the first RP and the second RP;

第三分组子单元,用于在所述确定单元确定所述第一RP为故障RP时,将所述第一组播组集合包括的组播组和所述第二组播组集合包括的组播组,分组到所述第四组播组集合,所述第三组播组集合为空集;A third grouping subunit, configured to combine the multicast groups included in the first multicast group set and the groups included in the second multicast group set when the determining unit determines that the first RP is a faulty RP broadcast group, grouped into the fourth multicast group set, and the third multicast group set is an empty set;

第四分组子单元,用于在所述确定单元确定所述第二RP为故障RP时,将所述第一组播组集合包括的组播组和所述第二组播组集合包括的组播组,分组到所述第三组播组集合,所述第四组播组集合为空集。A fourth grouping subunit, configured to combine the multicast groups included in the first multicast group set and the groups included in the second multicast group set when the determining unit determines that the second RP is a faulty RP broadcast groups are grouped into the third multicast group set, and the fourth multicast group set is an empty set.

结合第二方面或第二方面的第一种至第三种任一种可能的实现方式,在第二方面的第四种可能的实现方式中,所述装置还包括:In combination with the second aspect or any one of the first to third possible implementations of the second aspect, in a fourth possible implementation of the second aspect, the device further includes:

更新单元,用于在所述第一映射和/或所述第二映射发生变化时,更新所述第三映射和/或所述第四映射。An updating unit, configured to update the third mapping and/or the fourth mapping when the first mapping and/or the second mapping changes.

第三方面,提供了一种负载均衡设备,所述设备包括:处理器和存储器;In a third aspect, a load balancing device is provided, and the device includes: a processor and a memory;

所述存储器,用于存储程序指令和数据;The memory is used to store program instructions and data;

所述处理器,用于读取所述存储器中存储的程序指令和数据,执行以下操作:The processor is configured to read program instructions and data stored in the memory, and perform the following operations:

所述处理器获得第一映射和第二映射,所述第一映射用于表示第一汇聚点RP与第一组播组集合之间的对应关系,所述第二映射用于表示第二RP与第二组播组集合之间的对应关系,所述第一组播组集合和所述第二组播组集合包括不同的组播组;The processor obtains a first mapping and a second mapping, the first mapping is used to represent the correspondence between the first rendezvous point RP and the first multicast group set, and the second mapping is used to represent the second RP Correspondence with the second multicast group set, the first multicast group set and the second multicast group set include different multicast groups;

所述处理器对所述第一组播组集合包括的组播组和所述第二组播组集合包括的组播组,进行重新分组,获得第三组播组集合和第四组播组集合;The processor regroups the multicast groups included in the first multicast group set and the multicast groups included in the second multicast group set to obtain a third multicast group set and a fourth multicast group gather;

所述处理器利用所述第三组播组集合和所述第四组播组集合,生成第三映射和第四映射,所述第三映射用于表示所述第一RP与所述第三组播组集合之间的对应关系,所述第四映射用于表示所述第二RP与所述第四组播组集合之间的对应关系;The processor uses the third multicast group set and the fourth multicast group set to generate a third mapping and a fourth mapping, and the third mapping is used to represent the first RP and the third Correspondence between multicast group sets, the fourth mapping is used to represent the correspondence between the second RP and the fourth multicast group set;

所述处理器广播所述第三映射和所述第四映射。The processor broadcasts the third mapping and the fourth mapping.

结合第三方面,在第三方面的第一种可能的实现方式中,所述处理器对所述第一组播组集合包括的组播组和所述第二组播组集合包括的组播组,进行重新分组,获得第三组播组集合和第四组播组集合包括:With reference to the third aspect, in a first possible implementation manner of the third aspect, the processor configures the multicast group included in the first multicast group set and the multicast group included in the second multicast group set Groups are regrouped to obtain the third multicast group set and the fourth multicast group set including:

所述处理器获得第一数目和第二数目,所述第一数目为所述第一组播组集合包括的组播组的个数,所述第二数目为所述第二组播组集合包括的组播组的个数;The processor obtains a first number and a second number, the first number is the number of multicast groups included in the first multicast group set, and the second number is the number of multicast groups included in the second multicast group set The number of multicast groups included;

所述处理器利用所述第一数目和所述第二数目,将所述第一组播组集合包括的组播组和所述第二组播组集合包括的组播组,平衡分组到所述第三组播组集合和所述第四组播组集合。The processor uses the first number and the second number to balance the multicast groups included in the first multicast group set and the multicast groups included in the second multicast group set into the The third multicast group set and the fourth multicast group set.

结合第三方面,在第三方面的第二种可能的实现方式中,所述第一组播组集合还包括每个组播组对应的流量信息,所述第二组播组集合还包括每个组播组对应的流量信息,所述处理器对所述第一组播组集合包括的组播组和所述第二组播组集合包括的组播组,进行重新分组,获得第三组播组集合和第四组播组集合包括:With reference to the third aspect, in a second possible implementation manner of the third aspect, the first multicast group set further includes traffic information corresponding to each multicast group, and the second multicast group set further includes each flow information corresponding to multicast groups, the processor regroups the multicast groups included in the first multicast group set and the multicast groups included in the second multicast group set to obtain a third group The broadcast group set and the fourth multicast group set include:

所述处理器获得第一流量和第二流量,所述第一流量为所述第一组播组集合包括的组播组的流量之和,所述第二流量为所述第二组播组集合包括的组播组的流量之和;The processor obtains a first flow and a second flow, the first flow is the sum of the flows of the multicast groups included in the first multicast group set, and the second flow is the flow of the second multicast group The sum of the flows of the multicast groups included in the set;

所述处理器利用所述第一流量和所述第二流量,将所述第一组播组集合包括的组播组和所述第二组播组集合包括的组播组,平衡分组到所述第三组播组集合和所述第四组播组集合。The processor uses the first flow and the second flow to balance the multicast groups included in the first multicast group set and the multicast groups included in the second multicast group set into the set The third multicast group set and the fourth multicast group set.

结合第三方面,在第三方面的第三种可能的实现方式中,所述处理器对所述第一组播组集合包括的组播组和所述第二组播组集合包括的组播组,进行重新分组,获得第三组播组集合和第四组播组集合包括:With reference to the third aspect, in a third possible implementation manner of the third aspect, the processor configures the multicast group included in the first multicast group set and the multicast group included in the second multicast group set Groups are regrouped to obtain the third multicast group set and the fourth multicast group set including:

所述处理器确定所述第一RP和所述第二RP中是否存在故障RP;the processor determines whether there is a faulty RP in the first RP and the second RP;

如果确定所述第一RP为故障RP,所述处理器将所述第一组播组集合包括的组播组和所述第二组播组集合包括的组播组,分组到所述第四组播组集合,所述第三组播组集合为空集;If it is determined that the first RP is a faulty RP, the processor groups the multicast groups included in the first multicast group set and the multicast groups included in the second multicast group set into the fourth A multicast group set, the third multicast group set is an empty set;

如果确定所述第二RP为故障RP,所述处理器将所述第一组播组集合包括的组播组和所述第二组播组集合包括的组播组,分组到所述第三组播组集合,所述第四组播组集合为空集。If it is determined that the second RP is a faulty RP, the processor groups the multicast groups included in the first multicast group set and the multicast groups included in the second multicast group set into the third A multicast group set, the fourth multicast group set is an empty set.

结合第三方面或第三方面的第一种至第三种任一种可能的实现方式,在第三方面的第四种可能的实现方式中,所述处理器还执行以下操作:With reference to the third aspect or any of the first to third possible implementation manners of the third aspect, in a fourth possible implementation manner of the third aspect, the processor further performs the following operations:

在所述第一映射和/或所述第二映射发生变化时,所述处理器更新所述第三映射和/或所述第四映射。When the first mapping and/or the second mapping changes, the processor updates the third mapping and/or the fourth mapping.

本发明实施例的负载均衡方法及装置,控制器获得第一RP对应的第一组播组集合和第二RP对应的第二组播组集合,并对第一组播组集合包括的组播组和第二组播组集合包括的组播组,进行重新分组,获得第三组播组集合和第四组播组集合,再建立第一RP与第三组播组集合间的第三映射、以及第二RP与第四组播组集合间的第四映射,最后将更新后的第三映射和第四映射广播至网络中,使网络中的组播组按照更新后的第三映射和第四映射构建RPT。如此,便可避免出现负载过重的RP,有助于提高RP的报文转发效率,进而提高组播通信的效率。In the load balancing method and device of the embodiments of the present invention, the controller obtains the first multicast group set corresponding to the first RP and the second multicast group set corresponding to the second RP, and Group and the multicast groups included in the second multicast group set are regrouped to obtain the third multicast group set and the fourth multicast group set, and then establish the third mapping between the first RP and the third multicast group set , and the fourth mapping between the second RP and the fourth multicast group set, and finally broadcast the updated third mapping and the fourth mapping to the network, so that the multicast groups in the network follow the updated third mapping and the fourth mapping A fourth mapping constructs the RPT. In this way, an RP that is overloaded can be avoided, which helps to improve the packet forwarding efficiency of the RP, thereby improving the efficiency of multicast communication.

附图说明Description of drawings

为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请中记载的一些实施例,对于本领域普通技术人员来讲,还可以根据这些附图获得其它的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments described in this application, and those skilled in the art can also obtain other drawings based on these drawings.

图1是本发明实施例负载均衡方法的流程图;Fig. 1 is the flowchart of the load balancing method of the embodiment of the present invention;

图2是本发明实施例中的一种网络示意图;Fig. 2 is a schematic diagram of a network in an embodiment of the present invention;

图3是本发明实施例负载均衡装置的示意图;3 is a schematic diagram of a load balancing device according to an embodiment of the present invention;

图4是本发明实施例负载均衡设备的硬件构成示意图。FIG. 4 is a schematic diagram of a hardware configuration of a load balancing device according to an embodiment of the present invention.

具体实施方式detailed description

为了使本技术领域的人员更好地理解本发明方案,下面结合附图和实施方式对本发明实施例作进一步的详细说明。In order to enable those skilled in the art to better understand the solution of the present invention, the embodiments of the present invention will be further described in detail below in conjunction with the accompanying drawings and implementation manners.

本发明实施例中用于负载均衡的控制器可以是一台独立的设备;或者,控制器也可以是集成了控制器功能的自举路由器(英文:Bootstrap Router,简称:BSR);再者,控制器还可以是共同实现控制器功能的多台设备,即,将控制器的功能拆分到所述多台设备上,通过分布式方式实现控制器的功能。本发明实施例对控制器在网络中的存在形式不做具体限定。The controller used for load balancing in the embodiment of the present invention can be an independent device; or, the controller can also be a bootstrap router (English: Bootstrap Router, referred to as: BSR) integrating the controller function; moreover, The controller may also be a plurality of devices that jointly realize the controller function, that is, the function of the controller is split to the plurality of devices, and the function of the controller is realized in a distributed manner. The embodiment of the present invention does not specifically limit the existence form of the controller in the network.

参见图1,示出了本发明实施例的负载均衡方法,可包括:Referring to Fig. 1, the load balancing method of the embodiment of the present invention is shown, which may include:

101,控制器获得第一映射和第二映射,所述第一映射用于表示第一汇聚点RP与第一组播组集合之间的对应关系,所述第二映射用于表示第二RP与第二组播组集合之间的对应关系,所述第一组播组集合和所述第二组播组集合包括不同的组播组。101. The controller obtains a first mapping and a second mapping, the first mapping is used to represent the correspondence between the first rendezvous point RP and the first multicast group set, and the second mapping is used to represent the second RP In correspondence with the second multicast group set, the first multicast group set and the second multicast group set include different multicast groups.

举例来说,本发明实施例中的映射可以理解为RP与组播组之间的对应关系,通过该映射,属于所述组播组的组播成员可以请求加入所述RP,创建以所述RP为根的RPT,以便在后续进行组播通信时使用。For example, the mapping in this embodiment of the present invention can be understood as the correspondence between RPs and multicast groups. Through this mapping, multicast members belonging to the multicast group can request to join the RP and create The RP is the root RPT for use in subsequent multicast communication.

以第一映射为例,至少可通过以下方式获得所述第一映射:Taking the first mapping as an example, the first mapping can be obtained at least in the following manner:

方式一,通过手动配置的方式,建立第一RP与第一组播组集合之间的对应关系,获得第一映射。Way 1: Establish a correspondence relationship between the first RP and the first multicast group set through manual configuration to obtain the first mapping.

方式二,通过PIM-SM协议中指定的哈希(英文:Hash)算法,建立第一RP与第一组播组集合之间的对应关系,获得第一映射。通常,组播组可以利用公式Value(G,M,C(i))=(1103515245*((1103515245*(G&M)+12345)XOR C(i))+12345)mod 2^31,确定本组播组映射的RP,其中,G表示组播组的组播地址,M表示Hash掩码,C(i)表示RP的地址。举例来说,组播组可将Value值最大的RP确定为本组播组映射的RP;或者,若存在至少两个Value值相同的RP时,组播组可将C(i)最大的RP确定为本组播组映射的RP。举例来说,本发明实施例中的第一组播组集合指的是,所有将第一RP确定为本组播组映射的RP的组播组。Method 2: Establish a corresponding relationship between the first RP and the first multicast group set through a hash (English: Hash) algorithm specified in the PIM-SM protocol, and obtain the first mapping. Usually, the multicast group can use the formula Value(G,M,C(i))=(1103515245*((1103515245*(G&M)+12345)XOR C(i))+12345)mod 2^31 to determine the group The RP mapped to the broadcast group, where G represents the multicast address of the multicast group, M represents the Hash mask, and C(i) represents the address of the RP. For example, the multicast group can determine the RP with the largest Value as the RP mapped to the multicast group; or, if there are at least two RPs with the same Value, the multicast group can determine the RP with the largest C(i) Determine the RP mapped to this multicast group. For example, the first multicast group set in this embodiment of the present invention refers to all multicast groups that determine the first RP as the RP mapped to the multicast group.

获得第二映射的方式,可参照上文获得第一映射的方式,此处不再赘述。For the manner of obtaining the second mapping, refer to the manner of obtaining the first mapping above, which will not be repeated here.

举例来说,控制器可以按照预设周期,周期性的从第一RP获得第一映射和从第二RP获得第二映射。或者,控制器可以按照预设周期,周期性的从BSR获得第一映射和第二映射,其中,BSR可以在PIM-SM网络启动后,从网络中收集第一映射和第二映射。或者,控制器可以在第一映射发生变化时,从第一RP或BSR获得第一映射。或者,控制器可以在第二映射发生变化时,从第二RP或BSR获得第二映射。本发明实施例对控制器获得第一映射和第二映射的方式,可不做具体限定。For example, the controller may periodically obtain the first mapping from the first RP and the second mapping from the second RP according to a preset period. Alternatively, the controller may periodically obtain the first mapping and the second mapping from the BSR according to a preset period, where the BSR may collect the first mapping and the second mapping from the network after the PIM-SM network is started. Alternatively, the controller may obtain the first mapping from the first RP or BSR when the first mapping changes. Alternatively, the controller may obtain the second mapping from the second RP or BSR when the second mapping changes. In this embodiment of the present invention, the manner in which the controller obtains the first mapping and the second mapping may not be specifically limited.

以图2所示网络为例,控制器获得的第一映射表示的是RP1与组播组G1之间的对应关系,即,第一RP为RP1,第一组播组集合包括组播组G1;控制器获得的第二映射表示的是RP2与组播组G2、G3、G4之间的对应关系,即,第二RP为RP2,第二组播组集合包括组播组G2、G3和G4。Taking the network shown in Figure 2 as an example, the first mapping obtained by the controller represents the correspondence between RP1 and the multicast group G1, that is, the first RP is RP1, and the first multicast group set includes the multicast group G1 ; The second mapping obtained by the controller represents the correspondence between RP2 and the multicast groups G2, G3, and G4, that is, the second RP is RP2, and the second multicast group set includes multicast groups G2, G3, and G4 .

102,所述控制器对所述第一组播组集合包括的组播组和所述第二组播组集合包括的组播组,进行重新分组,获得第三组播组集合和第四组播组集合。102. The controller regroups the multicast groups included in the first multicast group set and the multicast groups included in the second multicast group set to obtain a third multicast group set and a fourth multicast group set broadcast group set.

103,所述控制器利用所述第三组播组集合和所述第四组播组集合,生成第三映射和第四映射,所述第三映射用于表示所述第一RP与所述第三组播组集合之间的对应关系,所述第四映射用于表示所述第二RP与所述第四组播组集合之间的对应关系。103. The controller uses the third multicast group set and the fourth multicast group set to generate a third mapping and a fourth mapping, where the third mapping is used to represent the relationship between the first RP and the The correspondence between the third multicast group set, the fourth mapping is used to represent the correspondence between the second RP and the fourth multicast group set.

104,所述控制器广播所述第三映射和所述第四映射。104. The controller broadcasts the third mapping and the fourth mapping.

控制器获得第一映射和第二映射后,便可确定当前是否需要进行负载均衡处理,如果需要,则获得第三组播组集合和第四组播组集合,并建立第一RP与第三组播组集合之间的第三映射,以及第二RP与第四组播组集合之间的第四映射,然后将第三映射和第四映射广播至网络中,使所述网络中的设备知晓更新后的映射,并利用更新后的映射构建RPT。以图2所示网络为例,举例来说,第三组播组集合包括组播组G1和G2,第四组播组集合包括组播组G3和G4,即,第三映射表示的是RP1与组播组G1和G2之间的对应关系,第四映射表示的是RP2与组播组G3和G4之间的对应关系。After the controller obtains the first mapping and the second mapping, it can determine whether load balancing processing is currently required, and if necessary, obtain the third multicast group set and the fourth multicast group set, and establish the first RP and the third RP the third mapping between the multicast group sets, and the fourth mapping between the second RP and the fourth multicast group set, and then broadcast the third mapping and the fourth mapping to the network, so that the devices in the network The updated mapping is known and the RPT is constructed using the updated mapping. Taking the network shown in Figure 2 as an example, for example, the third multicast group set includes multicast groups G1 and G2, and the fourth multicast group set includes multicast groups G3 and G4, that is, the third mapping represents RP1 For the corresponding relationship between the multicast groups G1 and G2, the fourth mapping represents the corresponding relationship between the RP2 and the multicast groups G3 and G4.

举例来说,如果在接收到控制器广播的映射之前,各组播组均未加入RPT,则本发明实施例中,利用更新后的映射构建RPT,可以为:G1的组播成员和G2的组播成员向RP1发起加入请求,加入以RP1为根的PRT1;G3的组播成员和G4的组播成员向RP2发起加入请求,加入以RP2为根的PRT2。For example, if all multicast groups have not joined the RPT before receiving the mapping broadcasted by the controller, in this embodiment of the present invention, the updated mapping is used to construct the RPT, which can be: multicast members of G1 and members of G2 The multicast members send join requests to RP1 to join PRT1 with RP1 as the root; the multicast members of G3 and G4 send join requests to RP2 to join PRT2 with RP2 as the root.

举例来说,如果在接收到控制器广播的映射之前,各组播组已加入各自对应的RPT,则本发明实施例中,利用更新后的映射构建RPT,可以为:G2的组播成员向RP1发起加入请求,加入以RP1为根的PRT1;同时,G2的组播成员还向RP2发起剪枝(英文:prune)请求,从以RP2为根的PRT2中退出。For example, if before receiving the mapping broadcasted by the controller, each multicast group has joined its corresponding RPT, then in the embodiment of the present invention, using the updated mapping to construct the RPT can be: the multicast member of G2 sends RP1 initiates a join request to join PRT1 with RP1 as the root; at the same time, the multicast members of G2 also initiate a pruning (English: prune) request to RP2 to exit from PRT2 with RP2 as the root.

举例来说,如果在接收到控制器广播的映射之前,部分组播组已加入对应的RPT,且部分组播组未加入RPT,则可参照上文所做介绍,通过加入请求、剪枝请求,实现利用更新后的映射构建RPT的目的,此处不再举例说明。For example, if some multicast groups have joined the corresponding RPT and some multicast groups have not joined the RPT before receiving the mapping broadcasted by the controller, you can , to realize the purpose of constructing the RPT by using the updated mapping, and no more examples are given here.

综上,本发明实施例通过负载均衡技术,可调整网络中RP承载的负载,避免出现负载过重的RP,有助于提高RP的报文转发效率,进而提高组播通信的效率。To sum up, the embodiment of the present invention can adjust the load carried by RPs in the network through the load balancing technology, avoiding the occurrence of overloaded RPs, which helps to improve the packet forwarding efficiency of RPs, and further improves the efficiency of multicast communication.

举例来说,本发明实施例中的负载可以为RP承载的组播组的个数,对应于此,在第一RP和第二RP承载的组播组的个数不平衡时,控制器便可确定当前需要进行负载均衡处理。举例来说,第一RP和第二RP承载的组播组的个数不平衡,可以为:第一RP承载的组播组的个数与第二RP承载的组播组的个数之差,超过了第一预设值。举例来说,第一预设值可以为1,如上文针对图2所举示例,RP1承载的组播组个数为1,RP2承载的组播组个数为3,二者之差超过了第一预设值1,故控制器确定当前需要进行负载均衡处理。For example, the load in this embodiment of the present invention may be the number of multicast groups carried by the RP. Correspondingly, when the number of multicast groups carried by the first RP and the second RP is unbalanced, the controller will It can be determined that load balancing processing is currently required. For example, the imbalance between the number of multicast groups carried by the first RP and the second RP may be: the difference between the number of multicast groups carried by the first RP and the number of multicast groups carried by the second RP , exceeding the first preset value. For example, the first preset value may be 1. As in the example shown in FIG. 2 above, the number of multicast groups carried by RP1 is 1, and the number of multicast groups carried by RP2 is 3. The difference between the two exceeds The first preset value is 1, so the controller determines that load balancing processing is currently required.

具体地,负载均衡过程可体现为:所述控制器获得第一数目和第二数目,所述第一数目为所述第一组播组集合包括的组播组的个数,所述第二数目为所述第二组播组集合包括的组播组的个数;所述控制器利用所述第一数目和所述第二数目,将所述第一组播组集合包括的组播组和所述第二组播组集合包括的组播组,平衡分组到所述第三组播组集合和所述第四组播组集合。Specifically, the load balancing process may be embodied as follows: the controller obtains a first number and a second number, the first number is the number of multicast groups included in the first multicast group set, and the second The number is the number of multicast groups included in the second multicast group set; the controller uses the first number and the second number to set the number of multicast groups included in the first multicast group set and the multicast groups included in the second multicast group set, and balance grouping into the third multicast group set and the fourth multicast group set.

控制器通过调整RP承载的组播组的个数,实现第一RP和第二RP之间的平衡,如此,便可避免出现负载过重的RP,有助于提高RP的报文转发效率。举例来说,控制器利用RP1承载的组播组个数1和RP2承载的组播组个数3,调整G1、G2、G3和G4的分组,将G1和G2调整到一个组播组集合,获得第三组播组集合;将G3和G4调整到一个组播组集合,获得第四组播组集合。此时,第三组播组集合包括的组播组个数与第四组播组集合包括的组播组个数之差,未超过第一预设值,即,第一RP和第二RP承载的组播组个数达到了平衡。The controller realizes the balance between the first RP and the second RP by adjusting the number of multicast groups carried by the RP. In this way, the RP with heavy load can be avoided, which helps to improve the message forwarding efficiency of the RP. For example, the controller adjusts the grouping of G1, G2, G3, and G4 by using the number of multicast groups carried by RP1 as 1 and the number of multicast groups carried by RP2 as 3, and adjusts G1 and G2 to a set of multicast groups. A third multicast group set is obtained; G3 and G4 are adjusted to a multicast group set to obtain a fourth multicast group set. At this time, the difference between the number of multicast groups included in the third multicast group set and the number of multicast groups included in the fourth multicast group set does not exceed the first preset value, that is, the first RP and the second RP The number of multicast groups carried has reached balance.

举例来说,本发明实施例中的负载可以为RP承载的报文流量,对应于此,在第一RP和第二RP承载的报文流量不平衡时,控制器便可确定当前需要进行负载均衡处理。举例来说,第一RP和第二RP承载的报文流量不平衡,可以为:第一RP承载的报文流量与第二RP承载的报文流量之差,超过了第二预设值。举例来说,第二预设值可以为30kbps,如上文针对图2所举示例,RP1承载的报文流量为50kbps,其中,组播组G1对应的流量信息W1=50kbps;RP2承载的报文流量为(20+30+40)=90kbps,其中,组播组G2对应的流量信息W2=20kbps,组播组G3对应的流量信息W3=30kbps,组播组G4对应的流量信息W4=40kbps;RP1承载的报文流量50kbps与RP2承载的报文流量90kbps之差40kbps,超过了第二预设值30kbps,故控制器确定当前需要进行负载均衡处理。For example, the load in this embodiment of the present invention may be the packet flow carried by the RP. Correspondingly, when the packet flow carried by the first RP and the second RP is unbalanced, the controller can determine that the current load Balanced processing. For example, the unbalanced packet flow carried by the first RP and the second RP may be: the difference between the packet flow carried by the first RP and the packet flow carried by the second RP exceeds a second preset value. For example, the second preset value may be 30kbps. As shown above for the example shown in FIG. 2, the packet traffic carried by RP1 is 50kbps, wherein, the traffic information W1=50kbps corresponding to the multicast group G1; the packet traffic carried by RP2 Flow is (20+30+40)=90kbps, wherein, the flow information W2=20kbps corresponding to multicast group G2, the flow information W3=30kbps corresponding to multicast group G3, the flow information W4=40kbps corresponding to multicast group G4; The difference between the packet traffic of 50 kbps carried by RP1 and the packet traffic of 90 kbps carried by RP2 is 40 kbps, which exceeds the second preset value of 30 kbps, so the controller determines that load balancing processing is currently required.

举例来说,流量信息可以携带于第一组播集合和第二组播集合中,即,所述第一组播组集合包括至少一个组播组,以及每个组播组对应的流量信息;所述第二组播组集合包括至少一个组播组,以及每个组播组对应的流量信息。For example, the traffic information may be carried in the first multicast set and the second multicast set, that is, the first multicast group set includes at least one multicast group, and traffic information corresponding to each multicast group; The second multicast group set includes at least one multicast group and traffic information corresponding to each multicast group.

具体地,负载均衡过程可体现为:所述控制器获得第一流量和第二流量,所述第一流量为所述第一组播组集合包括的组播组的流量之和,所述第二流量为所述第二组播组集合包括的组播组的流量之和;所述控制器利用所述第一流量和所述第二流量,将所述第一组播组集合包括的组播组和所述第二组播组集合包括的组播组,平衡分组到所述第三组播组集合和所述第四组播组集合。Specifically, the load balancing process may be embodied as follows: the controller obtains a first flow and a second flow, the first flow is the sum of the flows of the multicast groups included in the first multicast group set, and the second flow The second flow is the sum of the flows of the multicast groups included in the second multicast group set; the controller uses the first flow and the second flow to transfer the flow of the groups included in the first multicast group set The multicast group and the multicast groups included in the second multicast group set are balanced into the third multicast group set and the fourth multicast group set.

控制器通过调整RP承载的报文流量,实现第一RP和第二RP之间的平衡,如此,便可避免出现负载过重的RP,有助于提高RP的报文转发效率。举例来说,基于各组播组对应的流量信息,控制器可利用RP1承载的报文流量50kbps和RP2承载的报文流量90kbps,调整G1、G2、G3和G4的分组,将G1和G2调整到一个组播组集合,获得第三组播组集合;将G3和G4调整到一个组播组集合,获得第四组播组集合。此时,第三组播组集合对应的报文流量(50+20)=70kbps与第四组播组集合对应的报文流量(30+40)=70kbps之差0kbps,未超过第二预设值,即,第一RP和第二RP承载的报文流量达到了平衡。The controller realizes the balance between the first RP and the second RP by adjusting the message flow carried by the RP, so that the occurrence of an RP with an overload can be avoided, and the message forwarding efficiency of the RP can be improved. For example, based on the traffic information corresponding to each multicast group, the controller can use the packet traffic carried by RP1 at 50 kbps and the packet traffic carried by RP2 at 90 kbps to adjust the grouping of G1, G2, G3, and G4, and adjust G1 and G2 to a multicast group set to obtain a third multicast group set; adjust G3 and G4 to a multicast group set to obtain a fourth multicast group set. Now, the difference 0kbps between the message flow (50+20)=70kbps corresponding to the third multicast group set and the message flow (30+40)=70kbps corresponding to the fourth multicast group set is 0kbps, which does not exceed the second preset value, that is, the packet traffic carried by the first RP and the second RP is balanced.

上文所举示例中,RP承载的组播组个数和报文流量,均达到了平衡,举例来说,基于报文流量进行负载均衡的方案中,还可能存在以下情况:RP1承载的报文流量为10kbps,其中,组播组G1对应的流量信息W1=10kbps;RP2承载的报文流量为(20+20+40)=80kbps,其中,组播组G2对应的流量信息W2=20kbps,组播组G3对应的流量信息W3=20kbps,组播组G4对应的流量信息W4=40kbps。控制器进行重新分组后,将G1、G2和G3调整到第三组播组集合,将G4调整到第四组播组集合。此时,第三组播组集合对应的报文流量(10+20+20)=50kbps与第四组播组集合对应的报文流量40kbps之差10kbps,未超过第二预设值,即,第一RP和第二RP承载的报文流量达到了平衡。In the above example, the number of multicast groups carried by RP and the packet flow are balanced. For example, in the load balancing solution based on packet flow, the following situations may also exist: The text flow is 10kbps, wherein, the flow information W1=10kbps corresponding to the multicast group G1; The traffic information corresponding to the multicast group G3 is W3=20kbps, and the traffic information corresponding to the multicast group G4 is W4=40kbps. After regrouping, the controller adjusts G1, G2, and G3 to the third multicast group set, and adjusts G4 to the fourth multicast group set. Now, the difference 10kbps between the message flow (10+20+20)=50kbps corresponding to the third multicast group set and the 40kbps corresponding to the fourth multicast group set does not exceed the second preset value, that is, The packet traffic carried by the first RP and the second RP is balanced.

可选地,考虑到RP故障可能会影响RP的报文转发效率,本发明实施例还提供了如下负载均衡方案:所述控制器确定所述第一RP和所述第二RP中是否存在故障RP;如果确定所述第一RP为故障RP,所述控制器将所述第一组播组集合包括的组播组和所述第二组播组集合包括的组播组,分组到所述第四组播组集合,所述第三组播组集合为空集;如果确定所述第二RP为故障RP,所述控制器将所述第一组播组集合包括的组播组和所述第二组播组集合包括的组播组,分组到所述第三组播组集合,所述第四组播组集合为空集。Optionally, considering that an RP failure may affect the packet forwarding efficiency of the RP, the embodiment of the present invention further provides the following load balancing solution: the controller determines whether there is a failure in the first RP and the second RP RP; if it is determined that the first RP is a faulty RP, the controller groups the multicast groups included in the first multicast group set and the multicast groups included in the second multicast group set into the The fourth multicast group set, the third multicast group set is an empty set; if it is determined that the second RP is a faulty RP, the controller sets the multicast groups included in the first multicast group set and the The multicast groups included in the second multicast group set are grouped into the third multicast group set, and the fourth multicast group set is an empty set.

控制器利用上文介绍的方式,通过组播组个数或者报文流量,重新进行分组之前,可先确定第一RP和第二RP中是否存在故障RP,如果其中一个RP为故障RP,控制器可将故障RP对应的组播组迁移至非故障RP。如上文针对图2所举示例,如果RP1为故障RP,控制器可将G1、G2、G3和G4调整到一个组播组集合,获得第四组播组集合,对应地,第三组播组集合为空集。如果RP2为故障RP,控制器可将G1、G2、G3和G4调整到一个组播组集合,获得第三组播组集合,对应地,第四组播组集合为空集。如此负载均衡方案,就可在RP出现故障时,通过组播组迁移的方式,保证报文的正常转发。Using the method described above, the controller can first determine whether there is a faulty RP in the first RP and the second RP through the number of multicast groups or message flow, and before regrouping, if one of the RPs is a faulty RP, the controller The router can migrate the multicast group corresponding to the faulty RP to the non-faulty RP. As mentioned above for the example in Figure 2, if RP1 is a faulty RP, the controller can adjust G1, G2, G3, and G4 to a multicast group set to obtain the fourth multicast group set, correspondingly, the third multicast group collection is the empty set. If RP2 is a faulty RP, the controller can adjust G1, G2, G3, and G4 to one multicast group set to obtain a third multicast group set, and correspondingly, the fourth multicast group set is an empty set. Such a load balancing solution can ensure the normal forwarding of packets through multicast group migration when the RP fails.

举例来说,控制器至少可通过以下方式获得RP的状态:接收各RP上报的本RP的工作状态,或者,接收BSR上报的各RP的工作状态,本发明实施例对此可不做具体限定。举例来说,RP的工作状态可以为正常或者故障。For example, the controller can at least obtain the status of the RP in the following manner: receiving the working status of the RP reported by each RP, or receiving the working status of each RP reported by the BSR, which is not specifically limited in this embodiment of the present invention. For example, the working state of the RP can be normal or faulty.

可选地,如果第一RP和第二RP中不存在故障RP,控制器可按照上文介绍的方式,通过组播组个数或者报文流量,重新进行分组。Optionally, if there is no faulty RP in the first RP and the second RP, the controller may perform grouping again according to the number of multicast groups or message flow according to the manner described above.

举例来说,作为本发明实施例的一种实现方式,第一组播组集合可为空集或者第二组播组可为空集,对应于此,若控制器确定第一RP和第二RP均为正常RP,仍可按照上文介绍的方式,通过组播组个数或者报文流量,重新进行分组,获得第三组播组集合和第四组播组集合。可以理解地,本实现方式,是将一个RP承载的部分负载迁移到另一个空闲RP,如此,亦有助于提高RP的报文转发效率,进而提高组播通信的效率。For example, as an implementation of the embodiment of the present invention, the first multicast group set may be an empty set or the second multicast group set may be an empty set. Correspondingly, if the controller determines that the first RP and the second The RPs are all normal RPs, and the third multicast group set and the fourth multicast group set can be obtained by re-grouping according to the number of multicast groups or message traffic according to the method described above. It can be understood that in this implementation method, part of the load carried by one RP is migrated to another idle RP, which also helps to improve the packet forwarding efficiency of the RP, thereby improving the efficiency of multicast communication.

可选地,基于图1所示实施例,本发明实施例还提供一种负载均衡的方案,具体为:在所述第一映射和/或所述第二映射发生变化时,所述控制器更新所述第三映射和/或所述第四映射。举例来说,如果第一映射发生变化,控制器可以利用第二映射和变化后的第一映射,重新进行分组,获得更新后的第三映射和/或第四映射。或者,如果第二映射发生变化,控制器可以利用第一映射和变化后的第二映射,重新进行分组,获得更新后的第三映射和/或第四映射。或者,如果第一映射和第二映射发生变化,控制器可以利用变化后的第一映射和变化后的第二映射,重新进行分组,获得更新后的第三映射和/或第四映射。具体分组方式,可参照上文所做介绍,此处不再举例说明。Optionally, based on the embodiment shown in FIG. 1 , this embodiment of the present invention further provides a load balancing solution, specifically: when the first mapping and/or the second mapping changes, the controller updating the third mapping and/or the fourth mapping. For example, if the first mapping changes, the controller may use the second mapping and the changed first mapping to perform grouping again to obtain an updated third mapping and/or fourth mapping. Or, if the second mapping changes, the controller may use the first mapping and the changed second mapping to perform grouping again to obtain an updated third mapping and/or fourth mapping. Alternatively, if the first mapping and the second mapping are changed, the controller may use the changed first mapping and the changed second mapping to perform grouping again to obtain an updated third mapping and/or fourth mapping. For the specific grouping method, refer to the introduction made above, and no more examples are given here.

对应地,本发明实施例还提供了一种负载均衡装置,所述负载均衡装置可设于BSR上,或者,所述负载均衡装置还可设置于一台独立设备上,在此不再逐一举例说明。所述负载均衡装置可执行图1对应的实施例提供的方法。参见图3所示示意图,所述装置可包括:Correspondingly, the embodiment of the present invention also provides a load balancing device, the load balancing device can be set on the BSR, or the load balancing device can also be set on an independent device, no more examples here illustrate. The load balancing device may execute the method provided in the embodiment corresponding to FIG. 1 . Referring to the schematic diagram shown in Figure 3, the device may include:

获得单元201,用于获得第一映射和第二映射,所述第一映射用于表示第一汇聚点RP与第一组播组集合之间的对应关系,所述第二映射用于表示第二RP与第二组播组集合之间的对应关系,所述第一组播组集合和所述第二组播组集合包括不同的组播组;The obtaining unit 201 is configured to obtain a first mapping and a second mapping, the first mapping is used to represent the correspondence between the first rendezvous point RP and the first multicast group set, and the second mapping is used to represent the first multicast group set Two correspondences between the RP and the second multicast group set, the first multicast group set and the second multicast group set include different multicast groups;

分组单元202,用于对所述第一组播组集合包括的组播组和所述第二组播组集合包括的组播组,进行重新分组,获得第三组播组集合和第四组播组集合;A grouping unit 202, configured to regroup the multicast groups included in the first multicast group set and the multicast groups included in the second multicast group set, to obtain a third multicast group set and a fourth multicast group set set of broadcast groups;

生成单元203,用于利用所述第三组播组集合和所述第四组播组集合,生成第三映射和第四映射,所述第三映射用于表示所述第一RP与所述第三组播组集合之间的对应关系,所述第四映射用于表示所述第二RP与所述第四组播组集合之间的对应关系;A generating unit 203, configured to use the third multicast group set and the fourth multicast group set to generate a third mapping and a fourth mapping, where the third mapping is used to represent the relationship between the first RP and the Correspondence between the third multicast group set, the fourth mapping is used to represent the correspondence between the second RP and the fourth multicast group set;

广播单元204,用于广播所述第三映射和所述第四映射。A broadcasting unit 204, configured to broadcast the third mapping and the fourth mapping.

综上,本发明实施例的负载均衡装置,利用负载均衡技术,调整网络中RP承载的负载,避免出现负载过重的RP,有助于提高RP的报文转发效率,进而提高组播通信的效率。To sum up, the load balancing device of the embodiment of the present invention uses the load balancing technology to adjust the load carried by the RP in the network, avoiding the occurrence of an RP with an overload, which helps to improve the packet forwarding efficiency of the RP, and further improves the efficiency of multicast communication. efficiency.

可选地,所述分组单元包括:Optionally, the grouping unit includes:

数目获得单元,用于获得第一数目和第二数目,所述第一数目为所述第一组播组集合包括的组播组的个数,所述第二数目为所述第二组播组集合包括的组播组的个数;A number obtaining unit, configured to obtain a first number and a second number, the first number is the number of multicast groups included in the first multicast group set, and the second number is the number of multicast groups included in the second multicast group set. The number of multicast groups included in the group set;

第一分组子单元,用于利用所述第一数目和所述第二数目,将所述第一组播组集合包括的组播组和所述第二组播组集合包括的组播组,平衡分组到所述第三组播组集合和所述第四组播组集合。The first grouping subunit is configured to use the first number and the second number to group the multicast groups included in the first multicast group set and the multicast groups included in the second multicast group set, Balancing packets into the third set of multicast groups and the fourth set of multicast groups.

可选地,所述第一组播组集合还包括每个组播组对应的流量信息,所述第二组播组集合还包括每个组播组对应的流量信息,所述分组单元包括:Optionally, the first multicast group set further includes traffic information corresponding to each multicast group, the second multicast group set further includes traffic information corresponding to each multicast group, and the grouping unit includes:

流量获得单元,用于获得第一流量和第二流量,所述第一流量为所述第一组播组集合包括的组播组的流量之和,所述第二流量为所述第二组播组集合包括的组播组的流量之和;A flow obtaining unit, configured to obtain a first flow and a second flow, the first flow is the sum of the flows of the multicast groups included in the first multicast group set, and the second flow is the sum of the flows of the second group The sum of the traffic of the multicast groups included in the broadcast group set;

第二分组子单元,用于利用所述第一流量和所述第二流量,将所述第一组播组集合包括的组播组和所述第二组播组集合包括的组播组,平衡分组到所述第三组播组集合和所述第四组播组集合。The second grouping subunit is configured to use the first flow and the second flow to combine the multicast groups included in the first multicast group set and the multicast groups included in the second multicast group set, Balancing packets into the third set of multicast groups and the fourth set of multicast groups.

可选地,所述分组单元包括:Optionally, the grouping unit includes:

确定单元,用于确定所述第一RP和所述第二RP中是否存在故障RP;a determining unit, configured to determine whether there is a faulty RP in the first RP and the second RP;

第三分组子单元,用于在所述确定单元确定所述第一RP为故障RP时,将所述第一组播组集合包括的组播组和所述第二组播组集合包括的组播组,分组到所述第四组播组集合,所述第三组播组集合为空集;A third grouping subunit, configured to combine the multicast groups included in the first multicast group set and the groups included in the second multicast group set when the determining unit determines that the first RP is a faulty RP broadcast group, grouped into the fourth multicast group set, and the third multicast group set is an empty set;

第四分组子单元,用于在所述确定单元确定所述第二RP为故障RP时,将所述第一组播组集合包括的组播组和所述第二组播组集合包括的组播组,分组到所述第三组播组集合,所述第四组播组集合为空集。A fourth grouping subunit, configured to combine the multicast groups included in the first multicast group set and the groups included in the second multicast group set when the determining unit determines that the second RP is a faulty RP broadcast groups are grouped into the third multicast group set, and the fourth multicast group set is an empty set.

可选地,所述装置还包括:Optionally, the device also includes:

更新单元,用于在所述第一映射和/或所述第二映射发生变化时,更新所述第三映射和/或所述第四映射。An updating unit, configured to update the third mapping and/or the fourth mapping when the first mapping and/or the second mapping changes.

对应地,本发明实施例还提供了一种负载均衡设备,所述负载均衡设备可设于BSR上,或者,所述负载均衡设备还可设置于一台独立设备上,在此不再逐一举例说明。所述负载均衡设备可执行图1对应的实施例提供的方法。参见图4所示示意图,所述负载均衡设备300可包括:处理器301、存储器302和通信接口303。其中,处理器301、存储器302和通信接口303可通过通信总线304连接。存储器302用于存储程序,处理器301根据从存储器302中读取的程序所包括的可执行指令执行具体操作。Correspondingly, the embodiment of the present invention also provides a load balancing device. The load balancing device can be set on the BSR, or the load balancing device can also be set on an independent device, and no more examples will be given here. illustrate. The load balancing device may execute the method provided in the embodiment corresponding to FIG. 1 . Referring to the schematic diagram shown in FIG. 4 , the load balancing device 300 may include: a processor 301 , a memory 302 and a communication interface 303 . Wherein, the processor 301 , the memory 302 and the communication interface 303 may be connected through a communication bus 304 . The memory 302 is used to store programs, and the processor 301 executes specific operations according to executable instructions included in the programs read from the memory 302 .

可选地,图3中的获得单元201、分组单元202、生成单元203和广播单元204可由图4中的处理器301根据存储器302存储的可执行指令实现,处理器301可以包括至少一个物理处理器。Optionally, the obtaining unit 201, the grouping unit 202, the generating unit 203, and the broadcasting unit 204 in FIG. 3 can be realized by the processor 301 in FIG. device.

需要说明的是,图3所示的负载均衡装置和图4所示的负载均衡设备可以是同一个装置,可以认为,图3是从物理的角度显示了一个负载均衡装置包括的内容,而图4则是从逻辑的角度显示了一个负载均衡设备包括的内容。It should be noted that the load balancing device shown in Figure 3 and the load balancing device shown in Figure 4 may be the same device, and it can be considered that Figure 3 shows the contents of a load balancing device from a physical point of view, while Figure 3 4 shows the contents of a load balancing device from a logical point of view.

图4所示负载均衡设备中,所述处理器301,用于读取存储器302中存储的指令和数据,执行以下操作:In the load balancing device shown in FIG. 4, the processor 301 is configured to read instructions and data stored in the memory 302, and perform the following operations:

所述处理器获得第一映射和第二映射,所述第一映射用于表示第一汇聚点RP与第一组播组集合之间的对应关系,所述第二映射用于表示第二RP与第二组播组集合之间的对应关系,所述第一组播组集合和所述第二组播组集合包括不同的组播组;The processor obtains a first mapping and a second mapping, the first mapping is used to represent the correspondence between the first rendezvous point RP and the first multicast group set, and the second mapping is used to represent the second RP Correspondence with the second multicast group set, the first multicast group set and the second multicast group set include different multicast groups;

所述处理器对所述第一组播组集合包括的组播组和所述第二组播组集合包括的组播组,进行重新分组,获得第三组播组集合和第四组播组集合;The processor regroups the multicast groups included in the first multicast group set and the multicast groups included in the second multicast group set to obtain a third multicast group set and a fourth multicast group gather;

所述处理器利用所述第三组播组集合和所述第四组播组集合,生成第三映射和第四映射,所述第三映射用于表示所述第一RP与所述第三组播组集合之间的对应关系,所述第四映射用于表示所述第二RP与所述第四组播组集合之间的对应关系;The processor uses the third multicast group set and the fourth multicast group set to generate a third mapping and a fourth mapping, and the third mapping is used to represent the first RP and the third Correspondence between multicast group sets, the fourth mapping is used to represent the correspondence between the second RP and the fourth multicast group set;

所述处理器广播所述第三映射和所述第四映射。The processor broadcasts the third mapping and the fourth mapping.

通过以上的实施方式的描述可知,本领域的技术人员可以清楚地了解到上述实施例方法中的全部或部分可借助软件加通用硬件平台的方式来实现。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者诸如媒体网关等网络通信设备)执行本发明各个实施例或者实施例的某些部分所述的方法。From the above description of the implementation manners, it can be seen that those skilled in the art can clearly understand that all or part of the methods in the above embodiments can be implemented by means of software plus a general hardware platform. Based on this understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art can be embodied in the form of software products, and the computer software products can be stored in storage media, such as ROM/RAM, disk , optical disk, etc., including several instructions to make a computer device (which may be a personal computer, a server, or a network communication device such as a media gateway) execute the methods described in various embodiments or some parts of the embodiments of the present invention.

需要说明的是,本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置及设备实施例而言,由于其基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。以上所描述的设备及系统实施例仅仅是示意性的,其中作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。It should be noted that each embodiment in this specification is described in a progressive manner, the same and similar parts of each embodiment can be referred to each other, and each embodiment focuses on the differences from other embodiments. place. In particular, for the device and device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and for relevant parts, please refer to part of the description of the method embodiments. The device and system embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in One place, or it can be distributed to multiple network elements. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. It can be understood and implemented by those skilled in the art without creative effort.

以上所述仅是本发明的可选实施方式,并非用于限定本发明的保护范围。应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以作出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。The above descriptions are only optional implementations of the present invention, and are not intended to limit the protection scope of the present invention. It should be pointed out that those skilled in the art can make some improvements and modifications without departing from the principle of the present invention, and these improvements and modifications should also be regarded as the protection scope of the present invention.

Claims (10)

CN201410764800.0A2014-12-112014-12-11A kind of load-balancing method and deviceExpired - Fee RelatedCN104468147B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201410764800.0ACN104468147B (en)2014-12-112014-12-11A kind of load-balancing method and device

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201410764800.0ACN104468147B (en)2014-12-112014-12-11A kind of load-balancing method and device

Publications (2)

Publication NumberPublication Date
CN104468147Atrue CN104468147A (en)2015-03-25
CN104468147B CN104468147B (en)2018-05-18

Family

ID=52913576

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201410764800.0AExpired - Fee RelatedCN104468147B (en)2014-12-112014-12-11A kind of load-balancing method and device

Country Status (1)

CountryLink
CN (1)CN104468147B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
WO2016155312A1 (en)*2015-03-272016-10-06华为技术有限公司Multicast group allocation method, centralized control point, and multicast router
US11431635B2 (en)2020-03-092022-08-30Vmware, Inc.Load balancing designated routers for multicast groups

Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101227430A (en)*2008-02-192008-07-23中兴通讯股份有限公司Multicast data forwarding method
CN101651609A (en)*2008-08-142010-02-17华为技术有限公司Method and device for realizing multicast load sharing
WO2010139115A1 (en)*2009-06-032010-12-09上海贝尔股份有限公司Method and device for multiple rendezvous points processing multicast services of mobile multicast source jointly
CN102281204A (en)*2011-09-082011-12-14杭州华三通信技术有限公司Method and routing equipment for implementing rendezvous point (RP) load sharing of multicast group and routing equipment
CN103457776A (en)*2013-09-042013-12-18杭州华三通信技术有限公司Method and device for dynamically deploying rendezvous points in two-way protocol independent multicast

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101227430A (en)*2008-02-192008-07-23中兴通讯股份有限公司Multicast data forwarding method
CN101651609A (en)*2008-08-142010-02-17华为技术有限公司Method and device for realizing multicast load sharing
WO2010139115A1 (en)*2009-06-032010-12-09上海贝尔股份有限公司Method and device for multiple rendezvous points processing multicast services of mobile multicast source jointly
CN102281204A (en)*2011-09-082011-12-14杭州华三通信技术有限公司Method and routing equipment for implementing rendezvous point (RP) load sharing of multicast group and routing equipment
CN103457776A (en)*2013-09-042013-12-18杭州华三通信技术有限公司Method and device for dynamically deploying rendezvous points in two-way protocol independent multicast

Cited By (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
WO2016155312A1 (en)*2015-03-272016-10-06华为技术有限公司Multicast group allocation method, centralized control point, and multicast router
JP2018509861A (en)*2015-03-272018-04-05華為技術有限公司Huawei Technologies Co.,Ltd. Multicast group assignment method, centralized control point, and multicast router
US11431635B2 (en)2020-03-092022-08-30Vmware, Inc.Load balancing designated routers for multicast groups

Also Published As

Publication numberPublication date
CN104468147B (en)2018-05-18

Similar Documents

PublicationPublication DateTitle
CN104767682B (en)The method and apparatus of method for routing and system and distributing routing information
EP2783480B1 (en)Method for multicast flow routing selection
US9509636B2 (en)Multicast traffic management within a wireless mesh network
US9591069B2 (en)Peer-to-peer assist for live media streaming
CN104601467B (en)A kind of method and apparatus for sending message
CN110324159B (en)Link configuration method, controller and storage medium
CN102792649A (en)Service prioritization in link state controlled layer two networks
CN102884767A (en)Per-graph link cost assignment in layer 2 multipath networks
JP2018191290A (en) Method, apparatus, and network system for realizing load balancing
EP2989755B1 (en)Efficient multicast delivery to dually connected (vpc) hosts in overlay networks
US9525560B2 (en)Method, device, and system for transmitting multicast packet across layer 2 virtual network
US20170237689A1 (en)Two-Stage Port-Channel Resolution in a Multistage Fabric Switch
CN103036787A (en)Network route convergence processing method and network route convergence processing device
EP3130106A1 (en)Network device with service and client routing elements configured to support any-source multicast extranets
CN105721328B (en)VRRP load balancing method, device and router
CN104980368A (en)Bandwidth guarantee method and apparatus in software defined network (SDN)
JP2019532587A (en) Multicast service providing method and software-defined networking controller
JP2019525681A (en) Method for synchronizing topology information in an SFC network and routing network element
CN105227458B (en)The route computing method and device of TRILL ISIS
CN104468147B (en)A kind of load-balancing method and device
US9306856B2 (en)Optimal tree root selection for trees spanning multiple sites
CN103200119B (en)A kind of Ethernet virtual interconnection site inner load sharing method and edge device
CN101442422A (en)Data transmission method, system and device
WO2014199924A1 (en)Control device, communication system, and control method and program of relay device
CN109274591A (en)A kind of method for forwarding multicast message and device

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant
CF01Termination of patent right due to non-payment of annual fee

Granted publication date:20180518

Termination date:20211211

CF01Termination of patent right due to non-payment of annual fee

[8]ページ先頭

©2009-2025 Movatter.jp