CN112600720A - Method and apparatus for limiting bandwidth group, electronic device, and storage medium - Google Patents

Method and apparatus for limiting bandwidth group, electronic device, and storage medium Download PDF

Info

Publication number
CN112600720A
CN112600720A CN202110248962.9A CN202110248962A CN112600720A CN 112600720 A CN112600720 A CN 112600720A CN 202110248962 A CN202110248962 A CN 202110248962A CN 112600720 A CN112600720 A CN 112600720A
Authority
CN
China
Prior art keywords
bandwidth
bandwidth group
group
traffic
target
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
CN202110248962.9A
Other languages
Chinese (zh)
Other versions
CN112600720B (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 Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology 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 Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202110248962.9A priority Critical patent/CN112600720B/en
Publication of CN112600720A publication Critical patent/CN112600720A/en
Application granted granted Critical
Publication of CN112600720B publication Critical patent/CN112600720B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0896Bandwidth or capacity management, i.e. automatically increasing or decreasing capacities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a method and a device for limiting the speed of a bandwidth group, an electronic device and a storage medium, wherein the method comprises the following steps: respectively pulling first traffic information of a first bandwidth group and second traffic information of a second bandwidth group from a target gateway cluster, wherein the first bandwidth group is a bandwidth group of which traffic only passes through the target gateway cluster, and the second bandwidth group is a bandwidth group of which traffic passes through at least two gateway clusters including the target gateway cluster; generating first bandwidth allocation information corresponding to the first bandwidth group according to the first traffic information, and generating second bandwidth allocation information corresponding to the second bandwidth group according to the second traffic information; and sending the first bandwidth allocation information and the second bandwidth allocation information to the target gateway cluster so that the target gateway cluster limits the speed of the first bandwidth group according to the first bandwidth allocation information and limits the speed of the second bandwidth group according to the second bandwidth allocation information.

Description

Method and apparatus for limiting bandwidth group, electronic device, and storage medium
Technical Field
The present application relates to the field of computers, and in particular, to a method and an apparatus for limiting a speed of a bandwidth group, an electronic device, and a storage medium.
Background
The bandwidth group speed limiting function is an important function in cloud computing, and the cloud network limits the speed of the bandwidth group according to the bandwidth group speed limiting specification purchased by the user, so that the service quality of the user is guaranteed and the accurate charging is carried out at the same time.
In the public cloud, a group (or multiple groups) of speed limiting devices are usually deployed at the exit of the machine room boundary to realize the bandwidth group speed limiting function. In order to ensure load balance among multiple devices, traffic can be shunted in a hash mode in which an Equal-cost Multipath Routing (ECMP) switch is set as a quintuple. IP (Internet Protocol Address) traffic within the same bandwidth group will be scattered at all servers (gateway servers) within the cluster with probability.
In order to ensure cooperative speed limit in the cluster, a central control module (which can be located on central control equipment) can be added to pull and reallocate the real-time traffic threshold of each server at regular time, and each server effectively limits the speed of the bandwidth group according to the periodic speed limit threshold.
With the increase of the number of users and the increase of the total bandwidth, public cloud manufacturers can expand the capacity of the speed-limiting cluster by adopting capacity expansion means such as hardware upgrading, clustering and the like. In the diversity cluster implementation, the clusters (server clusters) are isolated according to different network segment addresses. Because the IP in the bandwidth group of the user may be hashed in the network segments of different clusters, so that different clusters have the same bandwidth group configuration after the clusters are divided, the central control device cannot accurately know the number of servers (the base number for calculating the bandwidth allocation) required for calculating the bandwidth allocation of the bandwidth group, and further the accuracy (too small) of the speed limit of the bandwidth group is influenced.
Therefore, the bandwidth group speed limiting method in the related art has the problem of low accuracy of the bandwidth group speed limiting.
Disclosure of Invention
The application provides a method and a device for limiting the speed of a bandwidth group, electronic equipment and a storage medium, which are used for solving the problem that the accuracy of the speed limitation of the bandwidth group is low in a bandwidth group speed limiting mode in the related technology.
According to an aspect of an embodiment of the present application, there is provided a method for limiting a bandwidth group, including: respectively pulling first traffic information of a first bandwidth group and second traffic information of a second bandwidth group from a target gateway cluster, wherein the first bandwidth group is a bandwidth group of which traffic only passes through the target gateway cluster, and the second bandwidth group is a bandwidth group of which traffic passes through at least two gateway clusters including the target gateway cluster; generating first bandwidth allocation information corresponding to the first bandwidth group according to the first traffic information, and generating second bandwidth allocation information corresponding to the second bandwidth group according to the second traffic information; and sending the first bandwidth allocation information and the second bandwidth allocation information to the target gateway cluster so that the target gateway cluster limits the speed of the first bandwidth group according to the first bandwidth allocation information and limits the speed of the second bandwidth group according to the second bandwidth allocation information.
According to another aspect of the embodiments of the present application, there is also provided a method for limiting a bandwidth group, including: respectively reporting first traffic information of a first bandwidth group and second traffic information of a second bandwidth group to a central control device, wherein the first bandwidth group is a bandwidth group of which traffic only passes through a target gateway cluster, and the second bandwidth group is a bandwidth group of which traffic passes through at least two gateway clusters including the target gateway cluster; receiving first bandwidth allocation information and second bandwidth allocation information sent by the central control device, wherein the first bandwidth allocation information is bandwidth allocation information which is generated according to the first traffic information and corresponds to the first bandwidth group, and the second bandwidth allocation information is bandwidth allocation information which is generated according to the second traffic information and corresponds to the second bandwidth group; and carrying out speed limitation on the first bandwidth group according to the first bandwidth allocation information, and carrying out speed limitation on the second bandwidth group according to the second bandwidth allocation information.
According to another aspect of the embodiments of the present application, there is also provided a bandwidth group rate limiting apparatus, including: a pulling unit, configured to pull first traffic information of a first bandwidth group and second traffic information of a second bandwidth group from a target gateway cluster, respectively, where the first bandwidth group is a bandwidth group in which traffic only passes through the target gateway cluster, and the second bandwidth group is a bandwidth group in which traffic passes through at least two gateway clusters including the target gateway cluster; a generating unit, configured to generate first bandwidth allocation information corresponding to the first bandwidth group according to the first traffic information, and generate second bandwidth allocation information corresponding to the second bandwidth group according to the second traffic information; a sending unit, configured to send the first bandwidth allocation information and the second bandwidth allocation information to the target gateway cluster, so that the target gateway cluster limits the speed of the first bandwidth group according to the first bandwidth allocation information, and limits the speed of the second bandwidth group according to the second bandwidth allocation information.
According to another aspect of the embodiments of the present application, there is also provided a bandwidth group rate limiting apparatus, including: a reporting unit, configured to report first traffic information of a first bandwidth group and second traffic information of a second bandwidth group to a central control device, respectively, where the first bandwidth group is a bandwidth group in which traffic only passes through a target gateway cluster, and the second bandwidth group is a bandwidth group in which traffic passes through at least two gateway clusters including the target gateway cluster; a first receiving unit, configured to receive first bandwidth allocation information and second bandwidth allocation information sent by the central control device, where the first bandwidth allocation information is bandwidth allocation information corresponding to the first bandwidth group and generated according to the first traffic information, and the second bandwidth allocation information is bandwidth allocation information corresponding to the second bandwidth group and generated according to the second traffic information; and the speed limiting unit is used for limiting the speed of the first bandwidth group according to the first bandwidth allocation information and limiting the speed of the second bandwidth group according to the second bandwidth allocation information.
According to another aspect of the embodiments of the present application, there is also provided an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory communicate with each other through the communication bus; wherein the memory is used for storing the computer program; a processor for performing the method steps in any of the above embodiments by running the computer program stored on the memory.
According to a further aspect of the embodiments of the present application, there is also provided a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to perform the method steps of any of the above embodiments when the computer program is executed.
In the embodiment of the present application, a manner of dividing a local bandwidth group and a global bandwidth group of a gateway cluster is adopted, and first traffic information of a first bandwidth group (i.e., the local bandwidth group) and second traffic information of a second bandwidth group (i.e., the global bandwidth group) are respectively pulled from a target gateway cluster, where the first bandwidth group is a bandwidth group in which traffic passes through the target gateway cluster only, and the second bandwidth group is a bandwidth group in which traffic passes through at least two gateway clusters including the target gateway cluster; generating first bandwidth allocation information corresponding to the first bandwidth group according to the first traffic information, and generating second bandwidth allocation information corresponding to the second bandwidth group according to the second traffic information; sending the first bandwidth allocation information and the second bandwidth allocation information to the target gateway cluster so that the target gateway cluster limits the speed of the first bandwidth group according to the first bandwidth allocation information and limits the speed of the second bandwidth group according to the second bandwidth allocation information, since the traffic information of the local bandwidth group and the traffic information of the global bandwidth group are respectively pulled from the gateway cluster, for the local bandwidth group, the flow only passes through the local cluster, the central control module can accurately acquire the local bandwidth group of the gateway cluster, for the global bandwidth group, the central control module can also accurately acquire the gateway cluster through which the traffic of the global bandwidth group passes, thereby realizing the purpose of accurately acquiring the base number in the process of calculating bandwidth allocation, achieving the technical effect of improving the accuracy of the speed limit of the bandwidth group, and the problem that the accuracy of the bandwidth group speed limit is low in a bandwidth group speed limit mode in the related technology is solved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
FIG. 1 is a diagram of a hardware environment for an alternative bandwidth group rate limiting method according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating a method for limiting a rate of an optional bandwidth group according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an alternative cooperative speed limit within a bandwidth group cluster according to an embodiment of the present application;
FIG. 4 is a schematic diagram of an alternative bandwidth group configuration partitioning cluster according to an embodiment of the present application;
FIG. 5 is a schematic diagram of an alternative hierarchical central control module architecture according to an embodiment of the present application;
FIG. 6 is a flow chart illustrating an alternative method for limiting bandwidth group speed according to an embodiment of the present application;
FIG. 7 is a flow chart illustrating a method for limiting a rate of a bandwidth group according to an embodiment of the present application;
FIG. 8 is a block diagram illustrating an alternative set of bandwidth throttling arrangements according to an embodiment of the present application;
FIG. 9 is a block diagram illustrating an alternative set of bandwidth throttling arrangements according to an embodiment of the present application;
fig. 10 is a block diagram of an alternative electronic device according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an aspect of an embodiment of the present application, there is provided a method for rate limiting of a bandwidth group. Alternatively, in this embodiment, the speed limiting method for the bandwidth group may be applied to a hardware environment formed by the terminal 102, the gateway server 104 and the central control device 106 as shown in fig. 1. As shown in fig. 1, the gateway server 104 is connected to the terminal 102 through a network, and may be configured to provide services (such as traffic statistics, etc.) for the terminal or a client installed on the terminal. The central control device 106 is connected to the gateway server 104 through a network, and may be configured to pull bandwidth group real-time traffic information, and perform bandwidth quota recalculation of a cluster for each bandwidth group.
The network may include, but is not limited to, at least one of: wired networks, wireless networks. The wired network may include, but is not limited to, at least one of: wide area networks, metropolitan area networks, local area networks, which may include, but are not limited to, at least one of the following: WIFI (Wireless Fidelity), bluetooth. The terminal 102 may not be limited to a PC, a mobile phone, a tablet computer, etc.
The speed limiting method for the bandwidth group according to the embodiment of the present application may be executed by the gateway server 104, may also be executed by the central control device 106 (a device running a central control module or a central control program), and may also be executed by both the gateway server 104 and the central control device 106. The rate limiting method for the bandwidth group performed by the central control device 106 according to the embodiment of the present application may also be performed by a modular program running thereon.
Taking the example that the central control device 106 executes the speed limiting method for the bandwidth group in this embodiment, fig. 2 is a schematic flow chart of the speed limiting method for the optional bandwidth group according to the embodiment of this application, and as shown in fig. 2, the flow chart of the method may include the following steps:
step S202, respectively pulling first traffic information of a first bandwidth group and second traffic information of a second bandwidth group from the target gateway cluster, where the first bandwidth group is a bandwidth group in which traffic only passes through the target gateway cluster, and the second bandwidth group is a bandwidth group in which traffic passes through at least two gateway clusters including the target gateway cluster.
The speed limiting method for the bandwidth group in this embodiment may be applied to a scenario in which a speed is limited for the bandwidth group by a speed limiting cluster in a cloud network (for example, a public cloud), where the speed limiting cluster may include a plurality of speed limiting gateways (i.e., speed limiting gateway servers). The gateway or the gateway server in this embodiment is generally referred to as a speed limiting gateway.
In a public cloud, bandwidth group speed limiting is usually implemented by deploying one (or more) groups of speed limiting devices (e.g., speed limiting gateways) at a machine room boundary exit, and the architecture thereof may be as shown in fig. 3, and the network architecture may include: a central control module (located at a central control device or other devices, which is a modular program), and a plurality of gateways (e.g., gateway 1, gateway 2, gateway 3).
A user may purchase a bandwidth group of a certain size from a public cloud vendor, for example, 200Mbps (megabits per second), which is a unit of transmission rate and refers to the number of bits transmitted per second. The management end may configure a corresponding IP set for the bandwidth group, and the IP set corresponding to the bandwidth group may include one or more IP addresses (e.g., an elastic IP, i.e., EIP), and may dynamically update the IP set corresponding to the bandwidth group through the configuration instruction. For example, a new IP address is added by an add instruction, an existing IP address in the IP set is deleted by a delete instruction, and an IP address in the IP set is replaced by an update instruction. In this embodiment, the manner of the IP set corresponding to the bandwidth group is not limited.
For a network architecture in which all speed-limiting gateways serve as a cluster, IP traffic in the same bandwidth group is scattered on all the speed-limiting gateways in the cluster in a probability manner. In order to ensure cooperative speed limit in the cluster, the central control module can pull and reallocate the real-time traffic threshold of each speed limit gateway at regular time, and each speed limit gateway can effectively limit the speed of the bandwidth group according to the periodic speed limit threshold.
The bandwidth allocation mode of the central control module is as follows: periodically pulling real-time flow information of a bandwidth group from all speed-limiting gateways in the cluster; recalculating the bandwidth quota of the cluster aiming at each bandwidth group to obtain a calculation result of bandwidth allocation; and sending the calculation result of the bandwidth allocation back to each gateway server. In the latter time period, each speed-limiting gateway limits the speed of each bandwidth group according to the calculation result of the previous period.
The central control module can perform bandwidth quota recalculation in multiple ways, and the bandwidth quota recalculation process of the central control module on a certain bandwidth group (the total speed-limited bandwidth of the bandwidth group is BWt) for a cluster is as follows: given that the flow of the last period of the speed-limiting gateway N is BWn, and all speed-limiting gateways are N, the quota of the gateway N in the next period is: (BWn/Σ BWn)% 100%. BWt.
For example, as shown in fig. 3, the total speed-limited bandwidth of the bandwidth group a is 100Mbps, the actual traffic of the gateway 1 in the last period is 10M, the actual traffic of the gateway 2 in the last period is 20M, and the actual traffic of the gateway 3 in the last period is 10M, then the quota of the gateway 1 in the next period is 25Mbps, the quota of the gateway 2 in the next period is 50Mbps, and the quota of the gateway 3 in the next period is 25 Mbps.
For a scenario in which capacity expansion is performed by a cluster-based capacity expansion means, the speed-limiting gateways in the public cloud may be divided into a plurality of clusters, or a plurality of gateway clusters, each cluster includes one or more speed-limiting gateways, and each cluster may be isolated according to different network segment addresses, that is, each cluster corresponds to one or more network segments, and different clusters correspond to different network segments.
Each IP address of the bandwidth group may belong to a network segment corresponding to a cluster (the IP address may fall into a cluster), and the traffic of the IP may fall into all the speed-limiting gateways in the cluster with probability, rather than only one speed-limiting gateway in the cluster. Correspondingly, different IP addresses of a bandwidth group may belong to a network segment corresponding to the same cluster, or may belong to network segments corresponding to different clusters, so that one bandwidth group may belong to a certain cluster or to multiple clusters.
For a cluster, according to the relationship between a bandwidth group and the cluster, the bandwidth group may be divided into three subsets, namely a local bandwidth group, a global bandwidth group and other bandwidth groups, where traffic of the local bandwidth group only passes through the local cluster, traffic of the global bandwidth group passes through the local cluster and other clusters except the local cluster, and traffic of other bandwidth groups does not pass through the local cluster. Here, the other bandwidth group of one cluster may be a local bandwidth group, a global bandwidth group, or other bandwidth groups of other clusters.
For example, as shown in fig. 4, for bandwidth groups 1 to 7 and gateway clusters a to C, according to the relationship between the EIP of the bandwidth group and the network segment set of the gateway cluster, as can be seen from fig. 4, for the gateway cluster a, the local bandwidth group is bandwidth group 1, the global bandwidth group is bandwidth groups 4, 5, and 7, and the other bandwidth groups are bandwidth groups 2, 3, and 6; for the gateway cluster B, the local bandwidth group is the bandwidth group 2, the global bandwidth group is the bandwidth groups 4, 6 and 7, and the other bandwidth groups are the bandwidth groups 1, 3 and 5; for the gateway cluster C, the local bandwidth group is bandwidth group 3, the global bandwidth group is bandwidth groups 5, 6, and 7, and the other bandwidth groups are bandwidth groups 1, 2, and 4.
Because the configuration among the clusters is the same, the central control program cannot distinguish the configuration subsets corresponding to each cluster, and when the bandwidth allocation calculation of each period is performed, the central control module cannot distinguish the attributes of the bandwidth groups of a certain configuration subset, so that the number of gateway stations in the corresponding cluster cannot be accurately determined, and the bandwidth allocation can still be performed according to all the clusters as the base number, so that a large error exists, and the accurate determination of the speed limit is influenced (the speed limit configuration is too small).
For an object gateway cluster in the multiple gateway clusters, the object gateway cluster may be any one of the multiple gateway clusters of the public cloud, and the object gateway cluster may include multiple object gateways (i.e., speed-limiting gateways), where each object gateway may obtain a network segment (i.e., an object network segment) corresponding to the local gateway cluster, and a local bandwidth group (i.e., a first bandwidth group) and a global bandwidth group (i.e., a second bandwidth group) of the local gateway cluster, so as to respectively count traffic information of the local bandwidth group of the local gateway cluster and traffic information of the global bandwidth group of the local gateway cluster.
The central control module may pull traffic information for different bandwidth group subsets of the gateway cluster, and the pulling manner may be periodic pulling. The central control module may respectively pull, from the target gateway cluster, first traffic information of a first bandwidth group in a first time period and second traffic information of a second bandwidth group in the first time period, where the first bandwidth group is a bandwidth group (i.e., a local bandwidth group) in which traffic passes through only the target gateway cluster, and the second bandwidth group is a bandwidth group (i.e., a global bandwidth group) in which traffic passes through at least two gateway clusters including the target gateway cluster.
The first traffic information and the second traffic information may be pulled simultaneously (e.g., simultaneously by one pull message tray) or may be pulled separately (e.g., separately by different pull message trays). The pulled first traffic information may be traffic information of the first bandwidth group during the first time period, and the pulled second traffic information may be traffic information of the second bandwidth group during the first time period. The first traffic information may include (for a first time period) traffic information for the first bandwidth group on respective target gateways of the cluster of target gateways, and the second traffic information may include (for a first time period) traffic information for the second bandwidth group on respective target gateways of the cluster of target gateways.
It should be noted that, the central control module may not know the local bandwidth group and the global bandwidth group of each gateway cluster when pulling, may indicate whether to pull the traffic information of the local bandwidth group or the global bandwidth group when pulling the traffic information, pull the traffic information of the first bandwidth group from the target gateway cluster when pulling the traffic information of the local bandwidth group, and pull the traffic information of the second bandwidth group from the target gateway cluster when pulling the traffic information of the global bandwidth group. Different bandwidth groups may be distinguished by different bandwidth group identifications.
Optionally, the pulling, by the central control module, the first traffic information of the first bandwidth group and the second traffic information of the second bandwidth group from the target gateway cluster, respectively, may include: respectively pulling the traffic information of a first bandwidth group (in a first time period) counted by each target gateway from each target gateway in the target gateway cluster to obtain first traffic information; and respectively pulling the traffic information of the second bandwidth group counted by each target gateway from each target gateway in the target gateway cluster to obtain second traffic information.
It should be noted that each gateway cluster and the rate-limiting gateway included in each gateway cluster may be indicated by the target configuration information. When pulling the traffic information of the target gateway cluster, the central control module may determine each target gateway included in the target gateway cluster according to the target configuration information, pull the traffic information of the local bandwidth group from each target gateway to obtain the traffic information of the first bandwidth group, and pull the traffic information of the global bandwidth group from each target gateway to obtain the traffic information of the second bandwidth group.
Step S204, generating first bandwidth allocation information corresponding to the first bandwidth group according to the first traffic information, and generating second bandwidth allocation information corresponding to the second bandwidth group according to the second traffic information.
The central control module can determine each gateway cluster and the speed-limiting gateway contained in each gateway cluster according to the configuration information. Then, for the first bandwidth group of the target gateway cluster, the central control device may determine a base number for calculating bandwidth allocation of the first bandwidth group, that is, the number of target gateways included in the target gateway cluster, so that the speed limit quota of each target gateway in the next time period may be calculated according to the first traffic information in the manner of calculating the bandwidth quota, so as to obtain the first bandwidth configuration information.
For a global bandwidth group (for example, the second bandwidth group), which may be the global bandwidth group of all gateway clusters through which the traffic of the global bandwidth group passes, according to the traffic information of the global bandwidth group reported by each gateway cluster, the central control module may determine the gateway cluster through which the traffic of each global bandwidth group passes, and further calculate a base number of bandwidth allocation of the global bandwidth group, that is, the number of rate-limiting gateways included in all gateway clusters through which the traffic of the global bandwidth group passes.
For example, as shown in fig. 4, if the traffic of the bandwidth group 4 passes through the gateway cluster a and the gateway cluster B, the traffic information of the global bandwidth group reported by the gateway cluster a includes the traffic information of the bandwidth group 4, and the traffic information of the global bandwidth group reported by the gateway cluster B also includes the traffic information of the bandwidth group 4. The central control module may determine, according to the acquired traffic information, that the gateway cluster through which the traffic of the bandwidth group 4 passes includes a gateway cluster a and a gateway cluster B.
For the second bandwidth group, the central control device may calculate, according to the second traffic information in the foregoing manner of calculating the bandwidth quota, the speed limit quota of each target gateway in the next time period, so as to obtain second bandwidth configuration information.
Step S206, the first bandwidth allocation information and the second bandwidth allocation information are sent to the target gateway cluster, so that the target gateway cluster limits the speed of the first bandwidth group according to the first bandwidth allocation information and limits the speed of the second bandwidth group according to the second bandwidth allocation information.
After the first bandwidth allocation information and/or the second bandwidth allocation information are obtained, the central control module may send the first bandwidth allocation information and the second bandwidth allocation information to the target gateway cluster. The first bandwidth allocation information and/or the second bandwidth allocation information may be sent simultaneously or sent non-simultaneously, which is not limited in this embodiment.
After each target gateway in the target gateway cluster receives the first bandwidth allocation information, the speed of the first bandwidth group can be limited according to the first bandwidth allocation information; after receiving the second bandwidth allocation information, the second bandwidth group may be rate-limited according to the second bandwidth allocation information. The specific speed limiting manner may refer to related technologies, which are not described in detail in this embodiment.
Through the steps S202 to S206, respectively pulling first traffic information of a first bandwidth group and second traffic information of a second bandwidth group from the target gateway cluster, where the first bandwidth group is a bandwidth group in which traffic only passes through the target gateway cluster, and the second bandwidth group is a bandwidth group in which traffic passes through at least two gateway clusters including the target gateway cluster; generating first bandwidth allocation information corresponding to the first bandwidth group according to the first traffic information, and generating second bandwidth allocation information corresponding to the second bandwidth group according to the second traffic information; the first bandwidth allocation information and the second bandwidth allocation information are sent to the target gateway cluster, so that the target gateway cluster limits the speed of the first bandwidth group according to the first bandwidth allocation information and limits the speed of the second bandwidth group according to the second bandwidth allocation information, the problem that the speed limiting accuracy of the bandwidth group is low in a bandwidth group speed limiting mode in the related technology is solved, and the speed limiting accuracy of the bandwidth group is improved.
As an alternative embodiment, the pulling the first traffic information of the first bandwidth group and the second traffic information of the second bandwidth group from the target gateway cluster respectively includes:
s11, pulling first traffic information of a first bandwidth group from a target gateway cluster through a first central control module, wherein the first central control module is used for performing bandwidth allocation on the bandwidth group of which the traffic only passes through one gateway cluster;
and S12, pulling second traffic information of a second bandwidth group from the target gateway cluster through a second central control module, wherein the second central control module is used for performing bandwidth allocation on the bandwidth group of the traffic passing through the plurality of gateway clusters.
When multiple clusters are divided according to network segments, the deployment functions of all gateway clusters can be borne by a single central control module. The central control module needs to perform uniform pulling processing on each cluster. When the cluster is expanded horizontally, the pressure on the central control module is larger.
Optionally, in this embodiment, the processing pressure of a single central control module may be effectively reduced by hierarchically instantiating the central control module, for example, dividing the central control module to have global and local attributes. The central control module can comprise: the first central control module is used for performing bandwidth allocation on a bandwidth group (namely, a local bandwidth group of a gateway cluster) of which the traffic only passes through one gateway cluster; and the second central control module is used for performing bandwidth allocation on a bandwidth group (namely, a global bandwidth group) of which the traffic passes through the plurality of gateway clusters. The first central control module and the second central control module can be different central control modules (different modular central control programs).
For the target gateway cluster, the first central control module may pull the traffic information of the first bandwidth group from the target gateway cluster at regular time (pull the traffic information of the first bandwidth group from each target gateway of the target gateway cluster at regular time), and for the first time period, pull the first traffic information. The second central control module may pull the traffic information of the second bandwidth group from the target gateway cluster at regular time (pull the traffic information of the second bandwidth group from each target gateway of the target gateway cluster at regular time), and for the first time period, pull the second traffic information.
Through the embodiment, the central control module is layered and instantiated, and the flow information of the local bandwidth group and the flow information of the global bandwidth group are drawn through different central control modules, so that the processing pressure of a single central control module can be effectively reduced.
As an optional embodiment, the first central control module includes a plurality of central control sub-modules, and each central control sub-module corresponds to one gateway cluster. Correspondingly, the pulling, by the first central control module, the first traffic information of the first bandwidth group from the target gateway cluster includes:
s21, pulling first traffic information of a first bandwidth group from the target gateway cluster through a target central control submodule corresponding to the target gateway cluster in the plurality of central control submodules;
and the target central control sub-module is used for carrying out bandwidth allocation on the bandwidth group of which the flow only passes through the target gateway cluster.
Because the local bandwidth groups of different gateway clusters are different, bandwidth allocation calculation of the local bandwidth groups of different gateway clusters has no influence, and in order to improve the efficiency of bandwidth allocation calculation and avoid the increase of processing pressure of a central control module of the local bandwidth groups caused by horizontal extension of the clusters, the flow information of the local bandwidth groups of different gateway clusters can be pulled through different central control modules.
The first central control module may include a plurality of central control sub-modules (i.e., local central control modules), each of the plurality of central control sub-modules being configured to pull traffic information of a local bandwidth group from a corresponding gateway cluster. Different ones of the plurality of central control sub-modules correspond to different gateway clusters. And the central control submodule corresponding to the target gateway cluster is a target central control submodule, and the first traffic information of the first bandwidth group can be pulled from the target gateway cluster through the target central control submodule.
For example, a hierarchical central control module architecture may be employed to relieve processing pressure on a single central control module. As shown in fig. 5, after the gateways are clustered, a corresponding local central control module is deployed for each gateway cluster, and each local central control module is only responsible for the gateway cluster under the control of the local central control module and is responsible for the deployment logic of the local bandwidth group. Meanwhile, a global central control module is deployed for all the clusters, and the global central control module still governs all the cluster gateways but is only responsible for the dispatching logic of the global bandwidth group. Through the adjustment, the overall pressure of the single central control module can be greatly reduced. With the subsequent expansion of more clusters, no more pressure is brought to the local and global central control modules.
With the hierarchical central control module architecture shown in fig. 5, each gateway device of all clusters periodically performs bandwidth allocation communication with the global central control module and the local central control module corresponding to the cluster, and it needs to report all the effective bandwidth group traffic conditions to the central control module for real-time global allocation. The bandwidth group information reported to the global central control module by a certain gateway only contains a global bandwidth group subset (i.e. the global bandwidth group of the gateway cluster to which the gateway belongs); the bandwidth group information reported to its corresponding local central control module only contains a local bandwidth group subset (i.e., the local bandwidth group of the gateway cluster to which the gateway belongs).
In the related art, for a local bandwidth group, the traffic only passes through a local cluster, but the central control module cannot distinguish the attribute of the bandwidth group, and bandwidth allocation is still performed according to all clusters as a base number, so that a large error exists. After the above adjustment of the central control module architecture, the local bandwidth group is only allocated with the bandwidth by the corresponding local central control module, and the base number is also the total number of the local clusters, so that the bandwidth is accurately and effectively allocated.
By the embodiment, bandwidth allocation of the local bandwidth groups of different gateway clusters is performed through different central control modules, so that increase of processing pressure of the central control module of the local bandwidth group caused by horizontal extension of the clusters can be avoided.
As an alternative embodiment, generating the first bandwidth allocation information corresponding to the first bandwidth group according to the first traffic information includes:
s31, determining first sub-flow information of the first bandwidth group on each target gateway of the target gateway cluster in a first time period according to the first flow information, where the first flow information includes first sub-flow information corresponding to each target gateway;
and S32, generating first bandwidth allocation information according to the total speed-limited bandwidth of the first bandwidth group and the first sub-flow information corresponding to each target gateway, wherein the first bandwidth allocation information is used for indicating the bandwidth allocated to each target gateway and of the first bandwidth group in a second time period after the first time period.
The first traffic information includes first sub-traffic information (e.g., BWn) for a first bandwidth group pulled from each target gateway of the target gateway cluster. Based on the first traffic information, the central control module (i.e., the target central control module) may determine first sub-traffic information on each target gateway.
In the foregoing manner of calculating the gateway bandwidth quotas, first bandwidth allocation information may be generated according to the total speed-limited bandwidth (BWt) of the first bandwidth group and the first sub-flow information corresponding to each target gateway, where the first bandwidth allocation information is used to indicate the bandwidth allocated to each target gateway for the first bandwidth group in a second time period (e.g., a next time period of the first time period) after the first time period.
By the embodiment, the bandwidth quota calculation is performed according to the total speed-limiting bandwidth of the local bandwidth group and the traffic information counted by each gateway in the local cluster, so that the convenience and the accuracy of the bandwidth quota calculation can be improved.
As an alternative embodiment, generating the second bandwidth allocation information corresponding to the second bandwidth group according to the second traffic information includes:
s41, determining second sub-flow information of the second bandwidth group on each target gateway of the target gateway cluster in the first time period according to the second flow information, where the second flow information includes second sub-flow information corresponding to each target gateway;
and S42, generating second bandwidth allocation information according to the total speed-limited bandwidth of the second bandwidth group, the second sub-flow information corresponding to each target gateway, and the flow information of the second bandwidth group on each gateway of other gateway clusters, wherein the second bandwidth allocation information is used for indicating the bandwidth allocated to each target gateway and of the second bandwidth group in a second time period after the first time period, and the other gateway clusters are gateway clusters except the target gateway cluster in at least two gateway clusters.
The second traffic information includes second sub-traffic information (e.g., BWn) for a second bandwidth group pulled from each target gateway of the target gateway cluster. Based on the second traffic information, a central control module (e.g., a second central control module) may determine second sub-traffic information on each target gateway.
The central control module can pull the traffic information of the global bandwidth group of different gateway clusters. According to the bandwidth group identifier, the second central control module may determine which bandwidth group is a global bandwidth group of which gateway clusters, that is, which gateway clusters the traffic of the bandwidth group passes through. For the second bandwidth group, the at least two gateway clusters through which traffic passes include the target gateway cluster and other gateway clusters except the target gateway cluster. The central control module may also obtain (e.g., during the first time period) traffic information for the second bandwidth group on the respective gateways of the other gateway clusters.
The central control module may generate second bandwidth allocation information according to the total speed-limited bandwidth (BWt) of the second bandwidth group, the second sub-traffic information (BWn) corresponding to each target gateway, and the traffic information (BWn) on each gateway of the other gateway clusters, and may also generate bandwidth allocation information of the second bandwidth group on each gateway of the other gateway clusters. The second bandwidth allocation information is used to indicate bandwidths allocated for the respective target gateways for the second bandwidth group in a second time period after the first time period.
It should be noted that, for the global bandwidth group, bandwidth allocation may be performed using all clusters as bases, but the bandwidth allocation method has a problem of low bandwidth display accuracy. By the embodiment, the gateways of all gateway clusters through which the traffic of the global bandwidth group passes are used as the base numbers to perform bandwidth allocation, so that the accuracy of bandwidth allocation can be improved.
According to another aspect of the embodiment of the application, a method for limiting the speed of the bandwidth group is also provided. Alternatively, in this embodiment, the speed limiting method for the bandwidth group may be applied to a hardware environment formed by the terminal 102, the gateway server 104 and the central control device 106 as shown in fig. 1. The description is already given and will not be repeated herein.
Taking the method for limiting the speed of the bandwidth group in this embodiment as an example, the gateway server 104 executes the method for limiting the speed of the bandwidth group in this embodiment, and fig. 6 is a schematic flowchart of another optional method for limiting the speed of the bandwidth group according to this embodiment, as shown in fig. 6, the flowchart of the method may include the following steps:
step S602, respectively reporting first traffic information of a first bandwidth group and second traffic information of a second bandwidth group to a central control device, where the first bandwidth group is a bandwidth group in which traffic only passes through a target gateway cluster, and the second bandwidth group is a bandwidth group in which traffic passes through at least two gateway clusters including the target gateway cluster.
The speed limiting method of the bandwidth group provided in this embodiment may be corresponding to the speed limiting method of the bandwidth group in the foregoing embodiments, and the speed limiting method of the bandwidth group may be executed by the gateway cluster, for example, by each speed limiting gateway of the gateway cluster.
The target gateway cluster may report the first traffic information of the first bandwidth group and the second traffic information of the second bandwidth group to the central control device, respectively. For each target gateway in the target gateway cluster, the target gateway cluster may report the first sub-flow information of the first bandwidth group and the second sub-flow information of the second bandwidth group to the central control device, respectively. The central control device may pull first sub-flow information of the first bandwidth group and second sub-flow information of the second bandwidth group from each target gateway, respectively, to obtain the first flow information and the second flow information.
Optionally, in this embodiment, for the hierarchical central control module architecture, the target gateway cluster may report the first traffic information of the first bandwidth group to the first central control module, or report the first traffic information of the first bandwidth group to a target central control module in the plurality of central control modules; and reporting the second traffic information of the second bandwidth group to a second central control module. The first central control module, the plurality of central control modules, the target central control module and the second central control module have similar meanings to those of the previous modules, and are not described herein again.
Step S604, receiving first bandwidth allocation information and second bandwidth allocation information sent by the central control device, where the first bandwidth allocation information is bandwidth allocation information corresponding to the first bandwidth group and generated according to the first traffic information, and the second bandwidth allocation information is bandwidth allocation information corresponding to the second bandwidth group and generated according to the second traffic information.
The central control device may generate the first bandwidth allocation information and the second bandwidth allocation information by using the speed limiting method of the bandwidth group in any of the foregoing embodiments, and send the first bandwidth allocation information and the second bandwidth allocation information to the target gateway cluster, for example, each target gateway in the target gateway cluster. The bandwidth allocation information sent to each target gateway may be bandwidth allocation information corresponding to each target gateway in the first bandwidth allocation information and bandwidth allocation information corresponding to each target gateway in the second bandwidth allocation information.
The first bandwidth allocation information and the second bandwidth allocation information may be sent through the same message or different messages, and the bandwidth allocation information of different target gateways may be sent through the same message or different messages, which is not limited in this embodiment.
Step S606, speed-limiting the first bandwidth group according to the first bandwidth allocation information, and speed-limiting the second bandwidth group according to the second bandwidth allocation information.
After receiving the first bandwidth allocation information, the target gateway cluster may rate-limit the first bandwidth group according to the first bandwidth allocation information. For each target gateway in the target gateway cluster, the target gateway may limit the speed of the first bandwidth group according to the bandwidth allocation information corresponding to the target gateway in the first bandwidth allocation information.
After receiving the second bandwidth allocation information, the target gateway cluster may rate-limit the second bandwidth group according to the second bandwidth allocation information. For each target gateway in the target gateway cluster, the target gateway may limit the speed of the second bandwidth group according to the bandwidth allocation information corresponding to the target gateway in the second bandwidth allocation information.
Through the steps S602 to S606, reporting first traffic information of a first bandwidth group and second traffic information of a second bandwidth group to the central control device, respectively, where the first bandwidth group is a bandwidth group in which traffic only passes through a target gateway cluster, and the second bandwidth group is a bandwidth group in which traffic passes through at least two gateway clusters including the target gateway cluster; receiving first bandwidth allocation information and second bandwidth allocation information sent by a central control device, wherein the first bandwidth allocation information is bandwidth allocation information which is generated according to first traffic information and corresponds to a first bandwidth group, and the second bandwidth allocation information is bandwidth allocation information which is generated according to second traffic information and corresponds to a second bandwidth group; the method and the device for limiting the speed of the bandwidth group solve the problem that the speed limiting accuracy of the bandwidth group is low in a bandwidth group speed limiting mode in the related technology and improve the speed limiting accuracy of the bandwidth group.
As an optional embodiment, the reporting the first traffic information of the first bandwidth group and the second traffic information of the second bandwidth group to the central control device respectively includes:
s51, receiving a first pulling request sent by the central control device, wherein the first pulling request is used for requesting to pull traffic information of a bandwidth group of which the traffic only passes through the target gateway cluster;
s52, responding to the first pulling request, and reporting first traffic information of the first bandwidth group to the central control equipment;
s53, receiving a second pulling request sent by the central control device, wherein the second pulling request is used for requesting to pull traffic information of the traffic passing through a bandwidth group comprising at least two gateway clusters of the target gateway cluster;
and S54, responding to the second pulling request, and reporting the second traffic information of the second bandwidth group to the central control device.
The first traffic information and the second traffic information are pulled by different pull requests. The target gateway cluster may receive a first pull request sent by the central control device, where the first pull request is used to request to pull traffic information that the traffic only passes through a bandwidth group of the target gateway cluster (i.e., a local bandwidth group of the target gateway cluster). The target gateway cluster may further receive a second pull request sent by the central control device, where the second pull request is used to pull traffic information of traffic passing through a bandwidth group including at least two gateway clusters of the target gateway cluster (i.e., a global bandwidth group of the target gateway cluster).
In response to the first pull request, the target gateway cluster may determine a local bandwidth group of the local gateway cluster, that is, a first bandwidth group, and report the traffic information of the counted first bandwidth group (that is, the first traffic information) to the central control device (for example, the first central control module, the target central control sub-module, and the like). For each target gateway in the target gateway cluster, it may report the traffic information of the statistical first bandwidth group (i.e., the first sub-traffic information) to the central control device (i.e., the second central control module).
In response to the second pull request, the target gateway cluster may determine a global bandwidth group of the local gateway cluster, that is, a second bandwidth group, and report the traffic information of the counted second bandwidth group (that is, second traffic information) to the central control device. For each target gateway in the target gateway cluster, it may report the traffic information of the second bandwidth group (i.e., the second traffic information) to the central control device.
Through the embodiment, the flow information of the local bandwidth group and the flow information of the global bandwidth group are pulled through different pulling requests, so that the flexibility of pulling the flow information can be improved, meanwhile, the method and the device can be suitable for a hierarchical central control module structure, and the processing pressure of a single central control module is reduced.
As an optional embodiment, before reporting the first traffic information of the first bandwidth group and the second traffic information of the second bandwidth group to the central control device, respectively, the method further includes:
s61, according to the network address in each bandwidth group in the plurality of bandwidth groups, a first bandwidth group and a second bandwidth group are respectively determined from the plurality of bandwidth groups, wherein the network addresses in the first bandwidth group are all the local network addresses belonging to the target network segment corresponding to the target gateway cluster, and the network addresses in the second bandwidth group comprise the local network addresses belonging to the target network segment and the non-local network addresses not belonging to the target network segment.
The local bandwidth group and the global bandwidth group may be determined by a relationship between a network address (e.g., an IP address) within the bandwidth group and a network segment corresponding to the gateway cluster. The target gateway cluster or each target gateway in the target gateway cluster may determine the first bandwidth group and the second bandwidth group from the plurality of bandwidth groups according to a network address in each of the plurality of bandwidth groups, respectively.
The network addresses of the local bandwidth groups are all network segments corresponding to the local cluster, that is, the local network addresses of the network segments corresponding to the local cluster. The network address of the global bandwidth group partially belongs to the network segment corresponding to the local cluster, and partially does not belong to the network segment corresponding to the local cluster, that is, the network address is the local network address of the network segment corresponding to the local cluster, and the network address is the non-local network address of the network segment not corresponding to the local cluster.
And for the target gateway cluster, the network segment corresponding to the target gateway cluster is the target network segment. For a plurality of existing bandwidth groups, the target gateway cluster (or each target gateway) may determine, according to the network address in each of the plurality of bandwidth groups, a first bandwidth group and a second bandwidth group from the plurality of bandwidth groups, respectively:
determining a bandwidth group of local network addresses of which the network addresses are the target network segments as a local bandwidth group of the target gateway cluster, namely a first bandwidth group;
and determining a bandwidth group of which the network address comprises a local network address belonging to the target network segment and a non-local network address not belonging to the target network segment as a global bandwidth group of the target gateway cluster, namely a second bandwidth group.
By the embodiment, the local bandwidth group and the global bandwidth group are determined according to the corresponding relation between the network address contained in the bandwidth group and the network segment corresponding to the gateway cluster, so that the accuracy of determining the local bandwidth group and the global bandwidth group can be improved.
As an alternative embodiment, determining the first bandwidth group from the plurality of bandwidth groups based on the network address within each of the plurality of bandwidth groups comprises:
s71, determining a first bandwidth group and a second bandwidth group from the plurality of bandwidth groups according to the number of local network addresses and the number of non-local network addresses included in each bandwidth group, wherein the number of local network addresses included in the first bandwidth group is not zero, the number of non-local network addresses included in the first bandwidth group is zero, and the number of local network addresses included in the second bandwidth group and the number of non-local network addresses included in the second bandwidth group are not zero.
Determining the local bandwidth group and the global bandwidth group according to the network addresses in the bandwidth group may be a dynamic process, and dynamically count the number of local network addresses and the number of non-local network addresses included in the bandwidth group. The target gateway cluster may count all network addresses in all bandwidth groups, or may not count all network addresses in all bandwidth groups (only count part of the network addresses, for example, only count local network addresses), and only record the number of local network addresses and the number of non-local network addresses included in each bandwidth group.
For the network segment range of the gateway cluster, local and non-local attributes can be added to the corresponding network address (IP) configuration. The number of local and non-local network addresses (IP) in the bandwidth group can be counted and recorded as m and n, respectively. According to the number of local network addresses contained in each bandwidth group and the number of non-local network addresses contained in each bandwidth group, a local bandwidth group (i.e., a first bandwidth group) and a global bandwidth group (i.e., a second bandwidth group) of the target gateway cluster can be determined: when m =0, n =0, it may be a default local bandwidth group; when m >0, n =0, is a local bandwidth group; when m >0 and n >0, it is a global bandwidth group.
In addition, the bandwidth group subset attribute can be dynamically changed according to the real-time configuration condition of the management terminal, so that other bandwidth groups can be counted: when m =0, n >0, other bandwidth groups.
According to the embodiment, the local bandwidth group and the global bandwidth group are determined according to the number of the local network addresses contained in the bandwidth group and the number of the non-local network addresses contained in the bandwidth group, so that the accuracy and convenience of determining the bandwidth group subset can be improved.
As an optional embodiment, before reporting the first traffic information of the first bandwidth group and the second traffic information of the second bandwidth group to the central control device, respectively, the method further includes:
s81, identifying the bandwidth group attributes in the plurality of bandwidth groups as a first identified bandwidth group, and determining the bandwidth group as a first bandwidth group, wherein the first identification is used for identifying the bandwidth group of which the traffic only passes through the target gateway cluster;
and S82, identifying the bandwidth group attribute in the plurality of bandwidth groups as a second identified bandwidth group, and determining the bandwidth group as a second bandwidth group, wherein the second identification is used for identifying that the traffic passes through the bandwidth groups of at least two gateway clusters including the target gateway cluster.
When pulling the traffic data, the first bandwidth group and the second bandwidth group may be determined directly according to the number of local network addresses included in each bandwidth group and the number of non-local network addresses included in each bandwidth group. Optionally, in this embodiment, a bandwidth group attribute identifier (i.e., a bandwidth group subset identifier) may be respectively set for each bandwidth group, and different attribute identifiers may be used to identify different bandwidth group subsets:
the first identifier is used for identifying a bandwidth group of which the traffic only passes through the target gateway cluster, namely a local bandwidth group;
the second identifier is used for identifying a bandwidth group, namely a global bandwidth group, of the traffic passing through at least two gateway clusters including the target gateway cluster;
the third identification is used to identify bandwidth groups, i.e., other bandwidth groups, for which traffic does not traverse the target gateway cluster.
When pulling traffic data, the target gateway cluster (or the target gateway) may identify a bandwidth group attribute in the multiple bandwidth groups as a first identified bandwidth group, and determine the bandwidth group attribute as a second identified bandwidth group.
For example, when issuing an IP configuration within a bandwidth group, the bandwidth group attribute identification of the bandwidth group may be: when m =0, n =0, may be a default local bandwidth group subset, corresponding to the first identifier; when m >0, n =0, is a local bandwidth group subset, corresponding to a first identity; when m is greater than 0 and n is greater than 0, the global bandwidth group subset is corresponding to the second identifier; when m =0, n >0, for other bandwidth group subsets, corresponding to the third identification.
By the embodiment, the local bandwidth group and the global bandwidth group are determined according to the bandwidth group attribute identification, so that the determination convenience of the local bandwidth group and the global bandwidth group can be improved, and the bandwidth allocation efficiency can be improved.
The management end can configure the network address in the bandwidth group through the configuration instruction. Each speed limiting gateway in each gateway cluster can receive a configuration instruction issued by a management end and respond to the received configuration instruction to configure the network address in the bandwidth group.
As an alternative embodiment, after rate limiting the first bandwidth group according to the first bandwidth allocation information and rate limiting the second bandwidth group according to the second bandwidth allocation information, the method further includes:
s91, receiving a first configuration instruction sent by the target management terminal, wherein the first configuration instruction is used for indicating that the first network address is added to the third bandwidth group;
s92, adding the first network address to the third bandwidth group according to the first configuration instruction;
and S93, modifying the bandwidth group attribute identifier of the third bandwidth group into a second identifier under the condition that the first network address does not belong to the target network segment corresponding to the target gateway cluster and the bandwidth group attribute identifier of the third bandwidth group is the first identifier.
Alternatively, the configuration instruction may be an add instruction for adding a certain network address to a certain bandwidth group. The target gateway cluster (or, the target gateway) may receive a first configuration instruction sent by the target management side, where the first configuration instruction is used to instruct to add the first network address to the third bandwidth group.
In response to the first configuration instruction, the target gateway cluster may add the first network address to the third bandwidth group. Alternatively, if the first network address is not a local network address, only the number (n) of non-local network addresses included in the third bandwidth group may be updated.
The first network address may be a local network address of the target gateway cluster or may be a non-local network address. And the third bandwidth group may be a local bandwidth group of the target gateway cluster, a global bandwidth group, or any of the other gateway clusters.
If the first network address is a non-local network address (i.e., not belonging to a target network segment corresponding to the target gateway cluster) and the third bandwidth group is a local bandwidth group (i.e., the bandwidth group attribute identifier is the first identifier), the third bandwidth group is updated to the global bandwidth group after the first network address is added, and the bandwidth group attribute identifier of the third bandwidth group may be modified to the second identifier.
In addition, if the first network address is a non-local network address and the third bandwidth group is a global bandwidth group or other bandwidth groups, after the first network address is added, the bandwidth group attribute of the third bandwidth group is not changed, and the bandwidth group attribute identification of the third bandwidth group does not need to be changed.
By the embodiment, when the non-local network address is added to the local bandwidth group, the local bandwidth group is updated to the global bandwidth group, so that the accuracy and timeliness of updating the bandwidth group attribute can be improved.
As an optional embodiment, after receiving the first configuration instruction sent by the target management end, the method further includes:
s101, under the condition that the first network address belongs to a target network segment corresponding to a target gateway cluster and the bandwidth group attribute identification of a third bandwidth group is a third identification, modifying the bandwidth group attribute identification of the third bandwidth group into a second identification, wherein the third identification is used for identifying the bandwidth group of which the flow does not pass through the target gateway cluster.
If the first network address is a local network address (i.e., belonging to a target network segment corresponding to the target gateway cluster) and the third bandwidth group is another bandwidth group (i.e., the bandwidth group attribute identifier is the third identifier), the third bandwidth group is updated to the global bandwidth group after the first network address is added, and the bandwidth group attribute identifier of the third bandwidth group may be modified to the second identifier.
In addition, if the first network address is a local network address and the third bandwidth group is a local bandwidth group or a global bandwidth group, after the first network address is added, the bandwidth group attribute of the third bandwidth group is not changed, and the bandwidth group attribute identification of the third bandwidth group does not need to be changed.
By the embodiment, when the local network address is added to other bandwidth groups, the other bandwidth groups are updated to the global bandwidth group, so that the accuracy and timeliness of updating the bandwidth group attribute can be improved.
As an alternative embodiment, after rate limiting the first bandwidth group according to the first bandwidth allocation information and rate limiting the second bandwidth group according to the second bandwidth allocation information, the method further includes:
s111, receiving a second configuration instruction sent by the target management terminal, wherein the second configuration instruction is used for indicating that the second network address is removed from the fourth bandwidth group;
s112, removing the second network address from the fourth bandwidth group according to the second configuration instruction;
s113, modifying the bandwidth group attribute identifier of the fourth bandwidth group to the first identifier when the bandwidth group attribute identifier of the fourth bandwidth group is the second identifier and the network addresses in the fourth bandwidth group all belong to the target network segment corresponding to the target gateway cluster after the second network address is removed.
Alternatively, the configuration instruction may be a removal instruction for removing a certain network address from a certain bandwidth group. The target gateway cluster (or, the target gateway) may receive a second configuration instruction sent by the target management terminal, where the second configuration instruction is used to instruct to remove the second network address from the fourth bandwidth group.
In response to the first configuration instruction, the target gateway cluster may remove the second network address from the fourth bandwidth group. Alternatively, if the first network address is a local network address, only the number (m) of local network addresses included in the fourth bandwidth group may be updated.
The second network address may be a local network address of the target gateway cluster or may be a non-local network address. And the fourth bandwidth group may be a local bandwidth group of the target gateway cluster, a global bandwidth group, or any of the other gateway clusters.
If the second network address is a non-local network address and the fourth bandwidth group is a global bandwidth group (i.e., the bandwidth group attribute identification is the second identification), and after the second network address is removed, the non-local network address may no longer be contained in the fourth bandwidth group (e.g., n = 1), the fourth bandwidth group may be updated to the local bandwidth group, and the bandwidth group attribute identification of the fourth bandwidth group modified to the first identification.
Further, if the second network address is a non-local network address and the fourth bandwidth group is the other bandwidth group (i.e., the bandwidth group attribute is identified as the third identification), the bandwidth group attribute of the fourth bandwidth group may remain unchanged after the second network address is removed. If there is no network address in the third bandwidth group after removing the second network address (m =0, n = 0), at this time, the bandwidth group attribute of the third bandwidth group may be kept unchanged, or may be updated to the first identifier, which is not limited in this embodiment.
By the embodiment, when the non-local network address is not included after the non-local network address is removed from the global bandwidth group, the global bandwidth group is updated to the local bandwidth group, and the accuracy and timeliness of updating the bandwidth group attribute can be improved.
As an optional embodiment, after receiving the second configuration instruction sent by the target management end, the method further includes:
and S121, modifying the bandwidth group attribute identifier of the fourth bandwidth group into a third identifier under the condition that the bandwidth group attribute identifier of the fourth bandwidth group is the second identifier and the network addresses in the fourth bandwidth group do not belong to the target network segment corresponding to the target gateway cluster after the second network address is removed, wherein the third identifier is used for identifying the bandwidth group of which the traffic does not pass through the target gateway cluster.
If the second network address is a local network address (i.e., belongs to a target network segment corresponding to the target gateway cluster) and the third bandwidth group is a global bandwidth group (i.e., the bandwidth group attribute identifier is the second identifier), after removing the second network address, the fourth bandwidth group does not contain the local network address of the target gateway cluster, the third bandwidth group may be updated to another bandwidth group, and the bandwidth group attribute identifier of the third bandwidth group may be modified to the third identifier.
Further, if the second network address is a local network address and the fourth bandwidth group is a local bandwidth group, the bandwidth group attribute of the fourth bandwidth group may remain unchanged after the second network address is removed. If there is no network address in the fourth bandwidth group after the second network address is removed (m =0, n = 0), at this time, the bandwidth group attribute of the fourth bandwidth group may remain unchanged, or may be updated to the third identifier, which is not limited in this embodiment.
Through the embodiment, when the local network address is removed from the global bandwidth group, if the local network address is not contained in the global bandwidth group after the local network address is removed, the global bandwidth group is updated to other bandwidth groups, and the accuracy and timeliness of updating the bandwidth group attribute can be improved.
The following explains a speed limiting method of a bandwidth group in the embodiment of the present application with an alternative example. In this example, a hierarchical central control module architecture is employed as shown in fig. 5, with the network address being an IP address.
In the related art, when a plurality of clusters are divided according to network segments, the following disadvantages exist: the central control module needs to perform uniform pulling processing on each cluster, and when the clusters are horizontally expanded, the pressure on the central control module is higher; because the configuration among the clusters is the same, the central control module cannot distinguish the configuration subset corresponding to each cluster, and when the bandwidth allocation of each period is calculated, the cardinality of the bandwidth quota calculation cannot be accurately determined for a certain bandwidth group, so that the speed limit accuracy is influenced.
After the speed-limiting gateways are clustered, the embodiment provides a multi-cluster cooperative speed-limiting method, and the problem of pressure processing of a single central control module can be effectively solved by layering and instantiating the central control module; by identifying the configured subsets among the clusters (the local bandwidth group subset, the global bandwidth group subset and other bandwidth group subsets), accurate speed limitation can be performed on each cluster configuration subset, and the problem of inaccurate speed limitation of the central control module is solved.
In order to effectively solve the problem of inaccurate allocation of the central control module caused by the fact that the cluster and the bandwidth group have no definite mapping relationship after being clustered, a mechanism for effectively identifying the bandwidth group can be adopted: and dividing the bandwidth into three subsets, namely a local bandwidth group, a global bandwidth group and other bandwidth groups according to the relation between the bandwidth groups and the clusters.
As shown in fig. 7, the flow of the speed limiting method for the bandwidth group in this alternative example may include the following steps:
step S702, each local central control module periodically pulls the flow information of the local bandwidth group from the corresponding gateway cluster, and re-allocates the real-time flow threshold of the local bandwidth group at each speed-limiting gateway of the gateway cluster, and each speed-limiting gateway of the gateway cluster limits the speed of the local bandwidth group according to the periodic speed-limiting threshold.
Step S704, the global central control module periodically pulls the traffic information of the global bandwidth group from each gateway cluster, re-allocates the real-time traffic threshold of the global bandwidth group at each speed-limiting gateway of each gateway cluster, and each speed-limiting gateway of each gateway cluster limits the speed of the global bandwidth group according to the periodic speed-limiting threshold.
By adopting the example, the calculation pressure of a single central control module can be relieved by adopting a layered multi-instantiation mode of the central control module, and the overload problem of the single central control module is effectively solved; the configuration of the bandwidth group is subjected to sub-set splitting by a single set, so that the speed limit configuration is converted from the single configuration set into a plurality of configuration sub-sets, the bandwidth group corresponding to each cluster configuration sub-set can be subjected to accurate speed limit by the central control module, and the problem of inaccurate speed limit of the central control module can be solved.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (e.g., a ROM (Read-Only Memory)/RAM (Random Access Memory), a magnetic disk, an optical disk) and includes several instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the methods according to the embodiments of the present application.
According to still another aspect of the embodiments of the present application, there is also provided a bandwidth group rate limiting device for implementing the above-mentioned bandwidth group rate limiting method. The rate limiter of the bandwidth group may be a central control device, i.e., a device running a central control module. Fig. 8 is a block diagram of a structure of a rate limiter for an alternative bandwidth group according to an embodiment of the present application, and as shown in fig. 8, the device may include:
a pulling unit 802, configured to pull, from a target gateway cluster, first traffic information of a first bandwidth group and second traffic information of a second bandwidth group, respectively, where the first bandwidth group is a bandwidth group in which traffic only passes through the target gateway cluster, and the second bandwidth group is a bandwidth group in which traffic passes through at least two gateway clusters including the target gateway cluster;
a generating unit 804, connected to the pulling unit 802, configured to generate first bandwidth allocation information corresponding to the first bandwidth group according to the first traffic information, and generate second bandwidth allocation information corresponding to the second bandwidth group according to the second traffic information;
and a sending unit 806, connected to the generating unit 804, configured to send the first bandwidth allocation information and the second bandwidth allocation information to the target gateway cluster, so that the target gateway cluster limits the speed of the first bandwidth group according to the first bandwidth allocation information and limits the speed of the second bandwidth group according to the second bandwidth allocation information.
It should be noted that the pulling unit 802 in this embodiment may be configured to execute the step S202, the generating unit 804 in this embodiment may be configured to execute the step S204, and the sending unit 806 in this embodiment may be configured to execute the step S206.
Through the module, first traffic information of a first bandwidth group and second traffic information of a second bandwidth group are respectively pulled from a target gateway cluster, wherein the first bandwidth group is a bandwidth group of which the traffic only passes through the target gateway cluster, and the second bandwidth group is a bandwidth group of which the traffic passes through at least two gateway clusters including the target gateway cluster; generating first bandwidth allocation information corresponding to the first bandwidth group according to the first traffic information, and generating second bandwidth allocation information corresponding to the second bandwidth group according to the second traffic information; the first bandwidth allocation information and the second bandwidth allocation information are sent to the target gateway cluster, so that the target gateway cluster limits the speed of the first bandwidth group according to the first bandwidth allocation information and limits the speed of the second bandwidth group according to the second bandwidth allocation information, the problem that the speed limiting accuracy of the bandwidth group is low in a bandwidth group speed limiting mode in the related technology is solved, and the speed limiting accuracy of the bandwidth group is improved.
As an alternative embodiment, the pulling unit 802 includes:
the first central control module is used for carrying out bandwidth allocation on the bandwidth group of which the flow only passes through one gateway cluster;
and the second pulling module is used for pulling second traffic information of a second bandwidth group from the target gateway cluster through the second central control module, wherein the second central control module is used for performing bandwidth allocation on the bandwidth group of the traffic passing through the plurality of gateway clusters.
As an optional embodiment, the first central control module includes a plurality of central control sub-modules, and each central control sub-module corresponds to one gateway cluster. Correspondingly, the first pulling module comprises:
the pull sub-module is used for pulling the first traffic information of the first bandwidth group from the target gateway cluster through a target central control sub-module corresponding to the target gateway cluster in the plurality of central control sub-modules;
and the target central control sub-module is used for carrying out bandwidth allocation on the bandwidth group of which the flow only passes through the target gateway cluster.
As an alternative embodiment, the generating unit 804 includes:
a first determining module, configured to determine, according to first traffic information, first sub-traffic information of a first bandwidth group on each target gateway of a target gateway cluster in a first time period, where the first traffic information includes first sub-traffic information corresponding to each target gateway;
and the first generation module is used for generating first bandwidth allocation information according to the total speed-limited bandwidth of the first bandwidth group and the first sub-flow information corresponding to each target gateway, wherein the first bandwidth allocation information is used for indicating the bandwidth allocated to each target gateway and of the first bandwidth group in a second time period after the first time period.
As an alternative embodiment, the generating unit 804 includes:
a second determining module, configured to determine, according to second traffic information, second sub-traffic information of a second bandwidth group on each target gateway of the target gateway cluster in a first time period, where the second traffic information includes the second sub-traffic information corresponding to each target gateway;
and a second generating module, configured to generate second bandwidth allocation information according to the total speed-limited bandwidth of the second bandwidth group, the second sub-traffic information corresponding to each target gateway, and the traffic information of the second bandwidth group on each gateway of another gateway cluster, where the second bandwidth allocation information is used to indicate a bandwidth allocated to each target gateway and of the second bandwidth group in a second time period after the first time period, and the another gateway cluster is a gateway cluster other than the target gateway cluster in the at least two gateway clusters.
According to still another aspect of the embodiments of the present application, there is also provided a bandwidth group rate limiting device for implementing the above-mentioned bandwidth group rate limiting method. The speed limiting device of the bandwidth group can be a speed limiting gateway cluster or a speed limiting gateway. Fig. 9 is a block diagram of a structure of a rate limiter of another optional bandwidth group according to an embodiment of the present application, and as shown in fig. 9, the rate limiter may include:
a reporting unit 902, configured to report first traffic information of a first bandwidth group and second traffic information of a second bandwidth group to a central control device, respectively, where the first bandwidth group is a bandwidth group in which traffic only passes through a target gateway cluster, and the second bandwidth group is a bandwidth group in which traffic passes through at least two gateway clusters including the target gateway cluster;
a first receiving unit 904, connected to the reporting unit 902, configured to receive first bandwidth allocation information and second bandwidth allocation information sent by the central control device, where the first bandwidth allocation information is bandwidth allocation information corresponding to a first bandwidth group and generated according to the first traffic information, and the second bandwidth allocation information is bandwidth allocation information corresponding to a second bandwidth group and generated according to the second traffic information;
and a speed limiting unit 906, connected to the first receiving unit 904, configured to limit the speed of the first bandwidth group according to the first bandwidth allocation information, and limit the speed of the second bandwidth group according to the second bandwidth allocation information.
It should be noted that the reporting unit 902 in this embodiment may be configured to execute the step S602, the first receiving unit 904 in this embodiment may be configured to execute the step S604, and the speed limiting unit 906 in this embodiment may be configured to execute the step S606.
Respectively reporting first traffic information of a first bandwidth group and second traffic information of a second bandwidth group to a central control device through the modules, wherein the first bandwidth group is a bandwidth group of which traffic only passes through a target gateway cluster, and the second bandwidth group is a bandwidth group of which traffic passes through at least two gateway clusters including the target gateway cluster; receiving first bandwidth allocation information and second bandwidth allocation information sent by a central control device, wherein the first bandwidth allocation information is bandwidth allocation information which is generated according to first traffic information and corresponds to a first bandwidth group, and the second bandwidth allocation information is bandwidth allocation information which is generated according to second traffic information and corresponds to a second bandwidth group; the method and the device for limiting the speed of the bandwidth group solve the problem that the speed limiting accuracy of the bandwidth group is low in a bandwidth group speed limiting mode in the related technology and improve the speed limiting accuracy of the bandwidth group.
As an alternative embodiment, the reporting unit 902 includes:
the system comprises a first receiving module, a second receiving module and a sending module, wherein the first receiving module is used for receiving a first pulling request sent by a central control device, and the first pulling request is used for requesting to pull traffic information of a bandwidth group of which the traffic only passes through a target gateway cluster;
the first reporting module is used for responding to the first pulling request and reporting the first traffic information of the first bandwidth group to the central control equipment;
the second receiving module is used for receiving a second pulling request sent by the central control device, wherein the second pulling request is used for requesting to pull traffic information of the traffic passing through a bandwidth group comprising at least two gateway clusters of the target gateway cluster;
and the second reporting module is configured to report the second traffic information of the second bandwidth group to the central control device in response to the second pull request.
As an alternative embodiment, the apparatus further comprises:
the first determining unit is configured to determine, before reporting first traffic information of a first bandwidth group and second traffic information of a second bandwidth group to a central control device, the first bandwidth group and the second bandwidth group from the plurality of bandwidth groups respectively according to a network address in each of the plurality of bandwidth groups, where the network addresses in the first bandwidth group are local network addresses belonging to a target network segment corresponding to a target gateway cluster, and the network addresses in the second bandwidth group include a local network address belonging to the target network segment and a non-local network address not belonging to the target network segment.
As an alternative embodiment, the determining unit includes:
and a third determining module, configured to determine, according to the number of local network addresses included in each bandwidth group and the number of non-local network addresses included in the bandwidth group, a first bandwidth group and a second bandwidth group from the plurality of bandwidth groups, respectively, where the number of local network addresses included in the first bandwidth group is not zero, the number of non-local network addresses included in the first bandwidth group is zero, and the number of local network addresses included in the second bandwidth group and the number of non-local network addresses included in the second bandwidth group are not zero.
As an alternative embodiment, the apparatus further comprises:
a second determining unit, configured to identify, before reporting first traffic information of a first bandwidth group and second traffic information of a second bandwidth group to a central control device, a bandwidth group attribute in the multiple bandwidth groups as a bandwidth group of a first identifier, and determine the bandwidth group as the first bandwidth group, where the first identifier is used to identify a bandwidth group in which traffic only passes through a target gateway cluster;
and a third determining unit, configured to identify the bandwidth group attribute in the plurality of bandwidth groups as a second identified bandwidth group, and determine the bandwidth group as a second bandwidth group, where the second identification is used to identify that traffic passes through the bandwidth groups of at least two gateway clusters including the target gateway cluster.
As an alternative embodiment, the apparatus further comprises:
a second receiving unit, configured to receive a first configuration instruction sent by a target management end after performing speed limitation on a first bandwidth group according to the first bandwidth allocation information and performing speed limitation on a second bandwidth group according to the second bandwidth allocation information, where the first configuration instruction is used to instruct to add a first network address to a third bandwidth group;
an adding unit, configured to add the first network address to the third bandwidth group according to the first configuration instruction;
and the first modifying unit is used for modifying the bandwidth group attribute identifier of the third bandwidth group into the second identifier under the condition that the first network address does not belong to the target network segment corresponding to the target gateway cluster and the bandwidth group attribute identifier of the third bandwidth group is the first identifier.
As an alternative embodiment, the apparatus further comprises:
and the second modifying unit is used for modifying the bandwidth group attribute identifier of the third bandwidth group into a second identifier under the condition that the first network address belongs to a target network segment corresponding to the target gateway cluster and the bandwidth group attribute identifier of the third bandwidth group is a third identifier after receiving the first configuration instruction sent by the target management terminal, wherein the third identifier is used for identifying the bandwidth group of which the traffic does not pass through the target gateway cluster.
As an alternative embodiment, the apparatus further comprises:
a third receiving unit, configured to receive a second configuration instruction sent by the target management end after performing speed limitation on the first bandwidth group according to the first bandwidth allocation information and performing speed limitation on the second bandwidth group according to the second bandwidth allocation information, where the second configuration instruction is used to instruct to remove the second network address from the fourth bandwidth group;
a removal unit configured to remove the second network address from the fourth bandwidth group according to the second configuration instruction;
and a third modifying unit, configured to modify the bandwidth group attribute identifier of the fourth bandwidth group to the first identifier when the bandwidth group attribute identifier of the fourth bandwidth group is the second identifier and the network addresses in the fourth bandwidth group all belong to the target network segment corresponding to the target gateway cluster after the second network address is removed.
As an alternative embodiment, the apparatus further comprises:
and a fourth modification unit, configured to modify, after receiving a second configuration instruction sent by the target management end, the bandwidth group attribute identifier of the fourth bandwidth group to be a second identifier, and modify, when the network address in the fourth bandwidth group does not belong to the target network segment corresponding to the target gateway cluster after the second network address is removed, the bandwidth group attribute identifier of the fourth bandwidth group to be a third identifier, where the third identifier is used to identify a bandwidth group whose traffic does not pass through the target gateway cluster.
It should be noted here that the modules described above are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of the above embodiments. It should be noted that the modules described above as a part of the apparatus may be operated in a hardware environment as shown in fig. 1, and may be implemented by software, or may be implemented by hardware, where the hardware environment includes a network environment.
According to another aspect of the embodiments of the present application, there is also provided an electronic device for implementing the speed limiting method for a bandwidth group, where the electronic device may be a central control device, a gateway server, or a combination thereof.
Fig. 10 is a block diagram of an alternative electronic device according to an embodiment of the present application, as shown in fig. 10, including a processor 1002, a communication interface 1004, a memory 1006, and a communication bus 1008, where the processor 1002, the communication interface 1004, and the memory 1006 communicate with each other via the communication bus 1008, where,
a memory 1006 for storing a computer program;
the processor 1002, when executing the computer program stored in the memory 1006, implements the following steps:
s1, respectively pulling first traffic information of a first bandwidth group and second traffic information of a second bandwidth group from a target gateway cluster, wherein the first bandwidth group is a bandwidth group of which the traffic only passes through the target gateway cluster, and the second bandwidth group is a bandwidth group of which the traffic passes through at least two gateway clusters including the target gateway cluster;
s2, generating first bandwidth allocation information corresponding to the first bandwidth group according to the first traffic information, and generating second bandwidth allocation information corresponding to the second bandwidth group according to the second traffic information;
and S3, sending the first bandwidth allocation information and the second bandwidth allocation information to the target gateway cluster, so that the target gateway cluster limits the speed of the first bandwidth group according to the first bandwidth allocation information and limits the speed of the second bandwidth group according to the second bandwidth allocation information.
Optionally, the processor 1002, when executing the computer program stored in the memory 1006, implements the following steps:
s1, reporting first traffic information of a first bandwidth group and second traffic information of a second bandwidth group to a central control device respectively, wherein the first bandwidth group is a bandwidth group of which traffic only passes through a target gateway cluster, and the second bandwidth group is a bandwidth group of which traffic passes through at least two gateway clusters including the target gateway cluster;
s2, receiving first bandwidth allocation information and second bandwidth allocation information sent by a central control device, where the first bandwidth allocation information is bandwidth allocation information corresponding to a first bandwidth group and generated according to first traffic information, and the second bandwidth allocation information is bandwidth allocation information corresponding to a second bandwidth group and generated according to second traffic information;
and S3, limiting the speed of the first bandwidth group according to the first bandwidth allocation information, and limiting the speed of the second bandwidth group according to the second bandwidth allocation information.
Alternatively, in this embodiment, the communication bus may be a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 10, but this is not intended to represent only one bus or type of bus. The communication interface is used for communication between the electronic equipment and other equipment.
The memory may include RAM, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory. Alternatively, the memory may be at least one memory device located remotely from the processor.
As an example, the memory 1006 may include, but is not limited to, a pulling unit 802, a generating unit 804, and a transmitting unit 806 in the speed limiting device including the bandwidth group. In addition, the bandwidth group may further include, but is not limited to, other module units in the speed limiting device of the bandwidth group, which is not described in detail in this example.
As another example, the memory 1006 may include, but is not limited to, a reporting unit 902, a first receiving unit 904, and a speed limiting unit 906 in the speed limiting device of the bandwidth group. In addition, the bandwidth group may further include, but is not limited to, other module units in the speed limiting device of the bandwidth group, which is not described in detail in this example.
The processor may be a general-purpose processor, and may include but is not limited to: a CPU (Central Processing Unit), an NP (Network Processor), and the like; but also a DSP (Digital Signal Processing), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
It will be understood by those skilled in the art that the structure shown in fig. 10 is only an illustration, and the device implementing the speed limiting method of the bandwidth group may also be a terminal device. Fig. 10 is a diagram illustrating a structure of the electronic device. For example, the electronic device may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 10, or have a different configuration than shown in FIG. 10.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disk, ROM, RAM, magnetic or optical disk, and the like.
According to still another aspect of an embodiment of the present application, there is also provided a storage medium. Optionally, in this embodiment, the storage medium may be configured to execute a program code of any one of the bandwidth group speed limiting methods in this embodiment of the present application.
Optionally, in this embodiment, the storage medium may be located on at least one of a plurality of network devices in a network shown in the above embodiment.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps:
s1, respectively pulling first traffic information of a first bandwidth group and second traffic information of a second bandwidth group from a target gateway cluster, wherein the first bandwidth group is a bandwidth group of which the traffic only passes through the target gateway cluster, and the second bandwidth group is a bandwidth group of which the traffic passes through at least two gateway clusters including the target gateway cluster;
s2, generating first bandwidth allocation information corresponding to the first bandwidth group according to the first traffic information, and generating second bandwidth allocation information corresponding to the second bandwidth group according to the second traffic information;
and S3, sending the first bandwidth allocation information and the second bandwidth allocation information to the target gateway cluster, so that the target gateway cluster limits the speed of the first bandwidth group according to the first bandwidth allocation information and limits the speed of the second bandwidth group according to the second bandwidth allocation information.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps:
s1, reporting first traffic information of a first bandwidth group and second traffic information of a second bandwidth group to a central control device respectively, wherein the first bandwidth group is a bandwidth group of which traffic only passes through a target gateway cluster, and the second bandwidth group is a bandwidth group of which traffic passes through at least two gateway clusters including the target gateway cluster;
s2, receiving first bandwidth allocation information and second bandwidth allocation information sent by a central control device, where the first bandwidth allocation information is bandwidth allocation information corresponding to a first bandwidth group and generated according to first traffic information, and the second bandwidth allocation information is bandwidth allocation information corresponding to a second bandwidth group and generated according to second traffic information;
and S3, limiting the speed of the first bandwidth group according to the first bandwidth allocation information, and limiting the speed of the second bandwidth group according to the second bandwidth allocation information.
Optionally, the specific example in this embodiment may refer to the example described in the above embodiment, which is not described again in this embodiment.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing program codes, such as a U disk, a ROM, a RAM, a removable hard disk, a magnetic disk, or an optical disk.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a storage medium, and including instructions for causing one or more computer devices (which may be personal computers, servers, network devices, or the like) to execute all or part of the steps of the method described in the embodiments of the present application.
In the above embodiments of the present application, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, and may also be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution provided in the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (18)

1. A method for rate limiting a bandwidth group, comprising:
respectively pulling first traffic information of a first bandwidth group and second traffic information of a second bandwidth group from a target gateway cluster, wherein the first bandwidth group is a bandwidth group of which traffic only passes through the target gateway cluster, and the second bandwidth group is a bandwidth group of which traffic passes through at least two gateway clusters including the target gateway cluster;
generating first bandwidth allocation information corresponding to the first bandwidth group according to the first traffic information, and generating second bandwidth allocation information corresponding to the second bandwidth group according to the second traffic information;
and sending the first bandwidth allocation information and the second bandwidth allocation information to the target gateway cluster so that the target gateway cluster limits the speed of the first bandwidth group according to the first bandwidth allocation information and limits the speed of the second bandwidth group according to the second bandwidth allocation information.
2. The method of claim 1, wherein pulling the first traffic information for the first bandwidth group and the second traffic information for the second bandwidth group from the target gateway cluster, respectively, comprises:
pulling the first traffic information of the first bandwidth group from the target gateway cluster through a first central control module, wherein the first central control module is used for performing bandwidth allocation on a bandwidth group of which traffic only passes through one gateway cluster;
and pulling the second traffic information of the second bandwidth group from the target gateway cluster through a second central control module, wherein the second central control module is used for performing bandwidth allocation on the bandwidth groups of which the traffic passes through the plurality of gateway clusters.
3. The method of claim 2, wherein the first central control module comprises a plurality of central control sub-modules, each central control sub-module corresponds to one gateway cluster, and wherein pulling the first traffic information of the first bandwidth group from the target gateway cluster through the first central control module comprises:
pulling the first traffic information of the first bandwidth group from the target gateway cluster through a target central control sub-module corresponding to the target gateway cluster among the plurality of central control sub-modules;
and the target central control sub-module is used for carrying out bandwidth allocation on the bandwidth group of which the flow only passes through the target gateway cluster.
4. The method according to any one of claims 1 to 3, wherein generating the first bandwidth allocation information corresponding to the first bandwidth group from the first traffic information comprises:
determining first sub-flow information of the first bandwidth group on each target gateway of the target gateway cluster in a first time period according to the first flow information, wherein the first flow information comprises the first sub-flow information corresponding to each target gateway;
and generating the first bandwidth allocation information according to the total speed-limited bandwidth of the first bandwidth group and the first sub-flow information corresponding to each target gateway, wherein the first bandwidth allocation information is used for indicating the bandwidth allocated to each target gateway in a second time period after the first time period of the first bandwidth group.
5. The method of any of claims 1-3, wherein generating the second bandwidth allocation information corresponding to the second bandwidth group according to the second traffic information comprises:
determining second sub-flow information of the second bandwidth group on each target gateway of the target gateway cluster in a first time period according to the second flow information, wherein the second flow information includes the second sub-flow information corresponding to each target gateway;
and generating second bandwidth allocation information according to the total speed-limiting bandwidth of the second bandwidth group, the second sub-traffic information corresponding to each target gateway, and the traffic information of the second bandwidth group on each gateway of other gateway clusters, where the second bandwidth allocation information is used to indicate the bandwidth allocated to each target gateway and of the second bandwidth group in a second time period after the first time period, and the other gateway clusters are gateway clusters other than the target gateway cluster in the at least two gateway clusters.
6. A method for rate limiting a bandwidth group, comprising:
respectively reporting first traffic information of a first bandwidth group and second traffic information of a second bandwidth group to a central control device, wherein the first bandwidth group is a bandwidth group of which traffic only passes through a target gateway cluster, and the second bandwidth group is a bandwidth group of which traffic passes through at least two gateway clusters including the target gateway cluster;
receiving first bandwidth allocation information and second bandwidth allocation information sent by the central control device, wherein the first bandwidth allocation information is bandwidth allocation information which is generated according to the first traffic information and corresponds to the first bandwidth group, and the second bandwidth allocation information is bandwidth allocation information which is generated according to the second traffic information and corresponds to the second bandwidth group;
and carrying out speed limitation on the first bandwidth group according to the first bandwidth allocation information, and carrying out speed limitation on the second bandwidth group according to the second bandwidth allocation information.
7. The method of claim 6, wherein reporting the first traffic information of the first bandwidth group and the second traffic information of the second bandwidth group to the central control device respectively comprises:
receiving a first pulling request sent by the central control device, wherein the first pulling request is used for requesting to pull traffic information of a bandwidth group of which the traffic only passes through the target gateway cluster;
responding to the first pulling request, and reporting the first traffic information of the first bandwidth group to the central control equipment;
receiving a second pulling request sent by the central control device, wherein the second pulling request is used for requesting to pull traffic information of the traffic passing through a bandwidth group comprising at least two gateway clusters of the target gateway cluster;
and reporting the second traffic information of the second bandwidth group to the central control device in response to the second pull request.
8. The method of claim 6, wherein before reporting the first traffic information of the first bandwidth group and the second traffic information of the second bandwidth group to the central control device, respectively, the method further comprises:
and respectively determining the first bandwidth group and the second bandwidth group from the plurality of bandwidth groups according to the network address in each of the plurality of bandwidth groups, wherein the network addresses in the first bandwidth group are all local network addresses belonging to a target network segment corresponding to the target gateway cluster, and the network addresses in the second bandwidth group comprise local network addresses belonging to the target network segment and non-local network addresses not belonging to the target network segment.
9. The method of claim 8, wherein determining the first bandwidth group from the plurality of bandwidth groups based on the network address within the each of the plurality of bandwidth groups comprises:
and according to the number of local network addresses contained in each bandwidth group and the number of non-local network addresses contained in each bandwidth group, respectively determining the first bandwidth group and the second bandwidth group from the plurality of bandwidth groups, wherein the number of local network addresses contained in the first bandwidth group is not zero, the number of non-local network addresses contained in the first bandwidth group is zero, and the number of local network addresses contained in the second bandwidth group and the number of non-local network addresses contained in the second bandwidth group are not zero.
10. The method according to any one of claims 6 to 9, wherein before reporting the first traffic information of the first bandwidth group and the second traffic information of the second bandwidth group to the central control device, respectively, the method further comprises:
identifying a bandwidth group attribute in a plurality of bandwidth groups as a bandwidth group of a first identification, and determining the bandwidth group as the first bandwidth group, wherein the first identification is used for identifying the bandwidth group of which the traffic only passes through the target gateway cluster;
and identifying the bandwidth group attributes in the plurality of bandwidth groups as a second identified bandwidth group, and determining the second bandwidth group as the second bandwidth group, wherein the second identification is used for identifying that the traffic passes through the bandwidth groups of at least two gateway clusters including the target gateway cluster.
11. The method of claim 10, wherein after rate limiting the first bandwidth group according to the first bandwidth allocation information and rate limiting the second bandwidth group according to the second bandwidth allocation information, the method further comprises:
receiving a first configuration instruction sent by a target management terminal, wherein the first configuration instruction is used for indicating that a first network address is added into a third bandwidth group;
adding the first network address to the third bandwidth group according to the first configuration instruction;
and modifying the bandwidth group attribute identifier of the third bandwidth group into the second identifier under the condition that the first network address does not belong to a target network segment corresponding to the target gateway cluster and the bandwidth group attribute identifier of the third bandwidth group is the first identifier.
12. The method according to claim 11, wherein after receiving the first configuration instruction sent by the target management terminal, the method further comprises:
and modifying the bandwidth group attribute identifier of the third bandwidth group into the second identifier under the condition that the first network address belongs to a target network segment corresponding to the target gateway cluster and the bandwidth group attribute identifier of the third bandwidth group is the third identifier, wherein the third identifier is used for identifying the bandwidth group of which the flow does not pass through the target gateway cluster.
13. The method of claim 10, wherein after rate limiting the first bandwidth group according to the first bandwidth allocation information and rate limiting the second bandwidth group according to the second bandwidth allocation information, the method further comprises:
receiving a second configuration instruction sent by a target management terminal, wherein the second configuration instruction is used for indicating that a second network address is removed from a fourth bandwidth group;
removing the second network address from the fourth bandwidth group according to the second configuration instruction;
and modifying the bandwidth group attribute identifier of the fourth bandwidth group to be the first identifier under the condition that the bandwidth group attribute identifier of the fourth bandwidth group is the second identifier and the network addresses in the fourth bandwidth group all belong to the target network segments corresponding to the target gateway cluster after the second network address is removed.
14. The method according to claim 13, wherein after receiving the second configuration instruction sent by the target management terminal, the method further comprises:
and modifying the bandwidth group attribute identifier of the fourth bandwidth group into a third identifier under the condition that the bandwidth group attribute identifier of the fourth bandwidth group is the second identifier and the network addresses in the fourth bandwidth group do not belong to the target network segments corresponding to the target gateway cluster after the second network address is removed, wherein the third identifier is used for identifying the bandwidth group of which the traffic does not pass through the target gateway cluster.
15. A device for limiting a bandwidth group, comprising:
a pulling unit, configured to pull first traffic information of a first bandwidth group and second traffic information of a second bandwidth group from a target gateway cluster, respectively, where the first bandwidth group is a bandwidth group in which traffic only passes through the target gateway cluster, and the second bandwidth group is a bandwidth group in which traffic passes through at least two gateway clusters including the target gateway cluster;
a generating unit, configured to generate first bandwidth allocation information corresponding to the first bandwidth group according to the first traffic information, and generate second bandwidth allocation information corresponding to the second bandwidth group according to the second traffic information;
a sending unit, configured to send the first bandwidth allocation information and the second bandwidth allocation information to the target gateway cluster, so that the target gateway cluster limits the speed of the first bandwidth group according to the first bandwidth allocation information, and limits the speed of the second bandwidth group according to the second bandwidth allocation information.
16. A device for limiting a bandwidth group, comprising:
a reporting unit, configured to report first traffic information of a first bandwidth group and second traffic information of a second bandwidth group to a central control device, respectively, where the first bandwidth group is a bandwidth group in which traffic only passes through a target gateway cluster, and the second bandwidth group is a bandwidth group in which traffic passes through at least two gateway clusters including the target gateway cluster;
a first receiving unit, configured to receive first bandwidth allocation information and second bandwidth allocation information sent by the central control device, where the first bandwidth allocation information is bandwidth allocation information corresponding to the first bandwidth group and generated according to the first traffic information, and the second bandwidth allocation information is bandwidth allocation information corresponding to the second bandwidth group and generated according to the second traffic information;
and the speed limiting unit is used for limiting the speed of the first bandwidth group according to the first bandwidth allocation information and limiting the speed of the second bandwidth group according to the second bandwidth allocation information.
17. An electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein said processor, said communication interface and said memory communicate with each other via said communication bus,
the memory for storing a computer program;
the processor configured to perform the method steps of any one of claims 1 to 5 or to perform the method steps of any one of claims 6 to 14 by running the computer program stored on the memory.
18. A computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to carry out the method steps of any of claims 1 to 5 or the method steps of any of claims 6 to 14 when executed.
CN202110248962.9A 2021-03-08 2021-03-08 Method and apparatus for limiting bandwidth group, electronic device, and storage medium Active CN112600720B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110248962.9A CN112600720B (en) 2021-03-08 2021-03-08 Method and apparatus for limiting bandwidth group, electronic device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110248962.9A CN112600720B (en) 2021-03-08 2021-03-08 Method and apparatus for limiting bandwidth group, electronic device, and storage medium

Publications (2)

Publication Number Publication Date
CN112600720A true CN112600720A (en) 2021-04-02
CN112600720B CN112600720B (en) 2021-05-11

Family

ID=75210207

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110248962.9A Active CN112600720B (en) 2021-03-08 2021-03-08 Method and apparatus for limiting bandwidth group, electronic device, and storage medium

Country Status (1)

Country Link
CN (1) CN112600720B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114900560A (en) * 2022-04-01 2022-08-12 阿里云计算有限公司 Control method, system, device and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7161907B2 (en) * 2002-03-05 2007-01-09 Sun Microsystems, Inc. System and method for dynamic rate flow control
CN103874133A (en) * 2012-12-10 2014-06-18 深圳国人通信有限公司 Method and device for bandwidth control and access point
CN107347198A (en) * 2016-05-05 2017-11-14 北京金山云网络技术有限公司 A kind of method for limiting speed, Control for Speed Limitation node and speed limiting device
CN110858808A (en) * 2018-08-23 2020-03-03 阿里巴巴集团控股有限公司 Method, system and device for realizing speed limit
CN112039796A (en) * 2020-08-28 2020-12-04 北京字节跳动网络技术有限公司 Data packet transmission method and device, storage medium and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7161907B2 (en) * 2002-03-05 2007-01-09 Sun Microsystems, Inc. System and method for dynamic rate flow control
CN103874133A (en) * 2012-12-10 2014-06-18 深圳国人通信有限公司 Method and device for bandwidth control and access point
CN107347198A (en) * 2016-05-05 2017-11-14 北京金山云网络技术有限公司 A kind of method for limiting speed, Control for Speed Limitation node and speed limiting device
CN110858808A (en) * 2018-08-23 2020-03-03 阿里巴巴集团控股有限公司 Method, system and device for realizing speed limit
CN112039796A (en) * 2020-08-28 2020-12-04 北京字节跳动网络技术有限公司 Data packet transmission method and device, storage medium and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114900560A (en) * 2022-04-01 2022-08-12 阿里云计算有限公司 Control method, system, device and medium

Also Published As

Publication number Publication date
CN112600720B (en) 2021-05-11

Similar Documents

Publication Publication Date Title
CN109618002B (en) Micro-service gateway optimization method, device and storage medium
CN112153700B (en) Network slice resource management method and equipment
US10481935B2 (en) Management system, overall management node, and management method for managing virtualization resources in a mobile communication network
US10827366B2 (en) System and methods for monitoring performance of slices
US10594580B2 (en) Network function virtualization management system
US10481953B2 (en) Management system, virtual communication-function management node, and management method for managing virtualization resources in a mobile communication network
CN105940377B (en) Methods, systems, and computer readable media for cloud-based virtualization orchestrators
CN112789832B (en) Dynamic slice priority handling
CN108667777B (en) Service chain generation method and network function orchestrator NFVO
US20190281503A1 (en) Management Method, Management Unit, and System
CN109327856B (en) Passenger flow volume statistical method, network equipment and storage medium
CN111490890A (en) Hierarchical registration method, device, storage medium and equipment based on micro-service architecture
CN112039799A (en) Method, server, system, device and medium for network bandwidth management
CN110795202B (en) Resource allocation method and device of virtualized cluster resource management system
JP2017126238A (en) System management device, information processing system, system management method, and program
WO2016119389A1 (en) Management method, device and system for system docking
CN105594158B (en) The configuration method and device of resource
CN108847999B (en) Equipment network connectivity detection method, device, terminal equipment and storage medium
CN112600720B (en) Method and apparatus for limiting bandwidth group, electronic device, and storage medium
CN105490829A (en) Message transmission control methods and apparatuses, and network functions virtualization system
CN115766336B (en) Resource allocation method, device, equipment and storage medium
CN110620811A (en) ONU management method and system under vOLT cluster architecture
CN109661005B (en) Load sharing adjustment method and device of local access controller
KR102451832B1 (en) Method for allocating resources in a cellular communication network and its nodes
US10623260B2 (en) Software defined network (SDN) information distribution across an SDN data-plane

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant