CN113949670A - Method, device, system, equipment and storage medium for allocating bandwidth of uplink channel - Google Patents
Method, device, system, equipment and storage medium for allocating bandwidth of uplink channel Download PDFInfo
- Publication number
- CN113949670A CN113949670A CN202010609669.6A CN202010609669A CN113949670A CN 113949670 A CN113949670 A CN 113949670A CN 202010609669 A CN202010609669 A CN 202010609669A CN 113949670 A CN113949670 A CN 113949670A
- Authority
- CN
- China
- Prior art keywords
- message
- bandwidth
- cloud platform
- message forwarding
- priority
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 100
- 238000012545 processing Methods 0.000 claims abstract description 97
- 238000004891 communication Methods 0.000 claims abstract description 11
- 238000011144 upstream manufacturing Methods 0.000 claims description 23
- 238000004422 calculation algorithm Methods 0.000 claims description 9
- 238000004364 calculation method Methods 0.000 claims description 7
- 230000008569 process Effects 0.000 description 16
- 230000006870 function Effects 0.000 description 14
- 238000007726 management method Methods 0.000 description 13
- 238000012423 maintenance Methods 0.000 description 6
- 238000012544 monitoring process Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 230000006855 networking Effects 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 3
- 230000007246 mechanism Effects 0.000 description 3
- 238000012806 monitoring device Methods 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000002349 favourable effect Effects 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 206010033799 Paralysis Diseases 0.000 description 1
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000007723 transport mechanism Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/24—Traffic characterised by specific attributes, e.g. priority or QoS
- H04L47/245—Traffic characterised by specific attributes, e.g. priority or QoS using preemption
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/50—Queue scheduling
- H04L47/52—Queue scheduling by attributing bandwidth to queues
- H04L47/525—Queue scheduling by attributing bandwidth to queues by redistribution of residual bandwidth
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/50—Queue scheduling
- H04L47/62—Queue scheduling characterised by scheduling criteria
- H04L47/625—Queue scheduling characterised by scheduling criteria for service slots or service orders
- H04L47/6275—Queue scheduling characterised by scheduling criteria for service slots or service orders based on priority
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The application discloses a method, equipment and a storage medium for allocating an uplink channel bandwidth, and belongs to the technical field of communication bandwidth allocation. The method comprises the following steps: acquiring first information, wherein the first information comprises a CPU utilization rate of message forwarding equipment, residual processing capacity of a cloud platform and an uploading rate of the message forwarding equipment; determining the allocable bandwidth of the message forwarding equipment according to the first information; and sending the allocable bandwidth to the message forwarding equipment so that the message forwarding equipment allocates the bandwidth of the uplink channel of the first message according to the allocable bandwidth and the priority of the first message. According to the technical scheme, the bandwidth of the uploading channel is dynamically adjusted through the matching of the cloud platform, so that reasonable bandwidth is allocated within the processing capacity of a CPU (central processing unit) of the message forwarding equipment, and the uploading message with high priority is guaranteed to preferentially pass.
Description
Technical Field
The present application relates to the field of communication bandwidth allocation technologies, and in particular, to a method, an apparatus, a system, a device, and a storage medium for allocating an uplink channel bandwidth.
Background
With the development of network communication, the processing performance of message forwarding devices such as routers becomes an important parameter for measuring the message forwarding devices. The message is uploaded, and the influence of the message on the CPU performance of the message forwarding equipment is large. The upload message mainly includes a protocol message, a fault management message, and the like. In the sent messages, fault management messages and the like belong to key messages which need to be processed, and the key messages need to be ensured not to be discarded, otherwise, serious consequences of network paralysis can be caused. When the uplink packet is transmitted through an uplink channel (a channel for communication between the packet forwarding device and the server or other monitoring devices), a certain channel bandwidth needs to be occupied, but the bandwidth of the uplink channel is limited, which often causes insufficient bandwidth due to too large amount of the uplink packet, affects the processing speed of the system, and becomes a bottleneck of network communication.
Therefore, the message forwarding device can allocate certain bandwidths for messages with different priorities, and it is ensured that the upper message with high priority passes through the upper channel without being discarded, the method is applicable to the situation that the upper channel is occupied by only one message forwarding device, but the upper channel is shared by more than two message forwarding devices, and if the method is still used for bandwidth allocation, the resource utilization is insufficient or the message with high priority is discarded to cause the message forwarding devices to be abnormal, because the allocation of the bandwidths by each message forwarding device is independent.
Disclosure of Invention
The embodiments of the present application mainly aim to provide a method, an apparatus, a system, a device, and a storage medium for allocating an upload channel bandwidth, which aim to dynamically adjust the upload channel bandwidth through the cooperation of a cloud platform, so as to allocate a reasonable bandwidth within the processing capability of a CPU of a message forwarding device, and ensure that an upload message with a high priority passes preferentially.
In order to achieve the above object, an embodiment of the present application provides a method for allocating bandwidth of an upload channel, where the method is used for a cloud platform, and the method includes:
acquiring first information, wherein the first information comprises a CPU utilization rate of message forwarding equipment, residual processing capacity of a cloud platform and an uploading rate of the message forwarding equipment;
determining the allocable bandwidth of the message forwarding equipment according to the first information;
and sending the allocable bandwidth to the message forwarding equipment so that the message forwarding equipment allocates the bandwidth of the uplink channel of the first message according to the allocable bandwidth and the priority of the first message.
The embodiment of the present application further provides a method for allocating bandwidth of an upload channel, where the method is used for a packet forwarding device, and the method includes:
receiving an allocable bandwidth of a message forwarding device sent by a cloud platform, wherein the allocable bandwidth is determined by the cloud platform according to first information, and the first information comprises a CPU utilization rate of the message forwarding device, the remaining processing capacity of the cloud platform and an uploading rate of the message forwarding device;
and allocating the bandwidth of the uplink channel of the first message according to the allocable bandwidth and the priority of the first message.
The embodiment of the present application further provides a method for allocating bandwidth of an upload channel, where the method is used in a system composed of a cloud platform and a packet forwarding device, and the method includes:
the method comprises the steps that a cloud platform acquires first information, wherein the first information comprises the CPU utilization rate of message forwarding equipment, the residual processing capacity of the cloud platform and the uploading rate of the message forwarding equipment;
the cloud platform determines the allocable bandwidth of the message forwarding equipment according to the first information;
the cloud platform sends the allocable bandwidth to the message forwarding equipment;
the message forwarding equipment receives the allocable bandwidth;
and the message forwarding equipment allocates the bandwidth of the uplink channel of the first message according to the allocable bandwidth and the priority of the first message.
The embodiment of the application also provides a device for allocating the bandwidth of the uploading channel, which is used for a cloud platform, and comprises the following modules:
the bandwidth allocation module is used for acquiring first information and determining the allocable bandwidth of the message forwarding equipment according to the first information; the first information comprises the CPU utilization rate of the message forwarding equipment, the residual processing capacity of a cloud platform and the uploading rate of the message forwarding equipment;
and the first transceiver module is used for sending the allocable bandwidth to the message forwarding equipment so that the message forwarding equipment allocates the bandwidth of the uplink channel of the first message according to the allocable bandwidth and the priority of the first message.
The embodiment of the present application further provides an apparatus for allocating bandwidth of an upload channel, where the apparatus is used for a packet forwarding device, and the apparatus includes the following modules:
the second transceiving module is used for receiving an allocable bandwidth of the message forwarding device sent by a cloud platform, wherein the allocable bandwidth is determined by the cloud platform according to first information, and the first information comprises a CPU utilization rate of the message forwarding device, the residual processing capacity of the cloud platform and an uploading rate of the message forwarding device;
and the bandwidth adjusting module is used for allocating the bandwidth of the uploading channel of the first message according to the allocable bandwidth and the priority of the first message.
The embodiment of the application also provides a system for distributing the bandwidth of the uploading channel, which comprises the following modules:
the bandwidth allocation module is used for acquiring first information and determining the allocable bandwidth of the message forwarding equipment according to the first information; the first information comprises the CPU utilization rate of the message forwarding equipment, the residual processing capacity of a cloud platform and the uploading rate of the message forwarding equipment;
the first transceiving module is used for sending the allocable bandwidth to the message forwarding equipment;
a second transceiver module, configured to receive the allocable bandwidth;
and the bandwidth adjusting module is used for allocating the bandwidth of the uploading channel of the first message according to the allocable bandwidth and the priority of the first message.
The embodiment of the present application further provides an apparatus for allocating bandwidth of an upload channel, where the apparatus includes a memory, a processor, a program stored on the memory and executable on the processor, and a data bus for implementing connection communication between the processor and the memory, and the program, when executed by the processor, implements the steps of the method for allocating bandwidth of an upload channel as described above.
The present embodiments also provide a storage medium for a computer-readable storage, where one or more programs are stored, and the one or more programs are executable by one or more processors to implement the steps of the method for allocating bandwidth of an upload channel as described above.
The method, the device, the system, the equipment and the storage medium for allocating the bandwidth of the uploading channel determine the allocable bandwidth of the message forwarding equipment based on the first information such as the CPU utilization rate of the message forwarding equipment, the residual processing capacity of the cloud platform, the uploading rate of the message forwarding equipment and the like, and allocate the bandwidth of the uploading channel by combining the allocable bandwidth and the priority of the uploading message of the first message through the message forwarding equipment. Therefore, the available bandwidth can be dynamically allocated to one or more message forwarding devices in the uploading channel as the allocable bandwidth by utilizing the unified control function of the cloud platform according to various factors of the first information, so that the over-high utilization rate of the CPU is avoided, the allocable bandwidth of the message forwarding devices is ensured to be within the processing capacity of the CPU of the message forwarding devices, and the method is not only suitable for the situation that the uploading channel is occupied by only one message forwarding device, but also suitable for the situation that the uploading channel is shared by more than two message forwarding devices; in addition, the message forwarding equipment allocates the bandwidth of the uplink channel according to the allocable bandwidth and the priority of the first message, so that the uplink message with high priority is guaranteed to pass preferentially. Therefore, the technical scheme realizes the function of dynamically adjusting the bandwidth of the uploading channel of the uploading message, can allocate reasonable bandwidth within the processing capacity of the CPU of the message forwarding equipment, and ensures that the uploading message with high priority passes preferentially.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required to be used in the description of the embodiments will be described below.
Fig. 1 is a network architecture diagram of a system for allocating upstream channel bandwidth according to an embodiment of the present application;
fig. 2 is a schematic diagram of a specific structure of a cloud platform and a message forwarding device according to an embodiment of the present application;
fig. 3 is a flowchart illustrating a method for allocating bandwidth of an upload channel according to an embodiment of the present application when the method is applied to a cloud platform;
fig. 4 is a flowchart illustrating that a cloud platform acquires first information in an embodiment of a method for allocating bandwidth of an upload channel according to the present application;
fig. 5 is a flowchart illustrating that, in an embodiment of the method for allocating bandwidth of an upload channel according to the present application, a cloud platform determines allocable bandwidth of a message forwarding device according to first information;
fig. 6 is a flowchart illustrating a method for allocating bandwidth of an upload channel according to an embodiment of the present application, when the method is applied to a packet forwarding device;
fig. 7 is a flowchart illustrating that, in an embodiment of the method for allocating a bandwidth of an uplink channel according to the present application, a message forwarding device allocates the bandwidth of the uplink channel of a first message according to an allocable bandwidth and a priority of the first message;
FIG. 8 is a flowchart illustrating a method for allocating bandwidth of an upload channel according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of an allocation apparatus for upstream channel bandwidth according to an embodiment of the present application when applied to a cloud platform;
fig. 10 is a schematic structural diagram of an apparatus for allocating an upload channel bandwidth according to an embodiment of the present application when the apparatus is applied to a packet forwarding device;
fig. 11 is a schematic structural diagram of an apparatus for allocating upstream channel bandwidth 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.
The terms "first," "second," "third," and "fourth," etc. in the description and claims of this application and in the accompanying drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The embodiment of the application provides a method, a device, a system, equipment and a storage medium for allocating bandwidth of an uploading channel, wherein the allocable bandwidth of message forwarding equipment is determined based on a cloud platform according to first information such as the CPU utilization rate of the message forwarding equipment, the residual processing capacity of the cloud platform, the uploading rate of the message forwarding equipment and the like, and then the uploading channel bandwidth is allocated by the message forwarding equipment in combination with the allocable bandwidth and the priority of the uploading message, namely the first message. Therefore, the available bandwidth can be dynamically allocated to one or more message forwarding devices in the uploading channel as the allocable bandwidth by utilizing the unified control function of the cloud platform according to various factors of the first information, so that the over-high utilization rate of the CPU is avoided, the allocable bandwidth of the message forwarding devices is ensured to be within the processing capacity of the CPU of the message forwarding devices, and the method is not only suitable for the situation that the uploading channel is occupied by only one message forwarding device, but also suitable for the situation that the uploading channel is shared by more than two message forwarding devices; in addition, the message forwarding equipment allocates the bandwidth of the uplink channel according to the allocable bandwidth and the priority of the first message, so that the uplink message with high priority is guaranteed to pass preferentially. Therefore, the technical scheme of the embodiment of the application realizes the function of dynamically adjusting the bandwidth of the uploading channel of the uploading message, can allocate reasonable bandwidth within the processing capacity of the CPU of the message forwarding equipment, and ensures that the uploading message with high priority passes preferentially.
Based on the above description, an embodiment of the present application provides a system for allocating bandwidth of an upload channel, and referring to fig. 1, the system includes a message forwarding device 100 and a cloud platform 200. The message forwarding device 100 and the cloud platform 200 may be directly or indirectly connected through wired or wireless communication, and the application is not limited herein.
The cloud platform 200 is mainly responsible for resource management of the controller, maintaining resources in a network, and forming a cloud center control platform. The cloud platform monitors the message forwarding devices 100 in real time and intelligently adjusts the message forwarding devices 100 according to the resource use states of the message forwarding devices 100 in a centralized control mode. The cloud platform 200 may be an independent physical server, or may be a cloud server cluster or a distributed cloud system formed by a plurality of physical servers.
In an alternative embodiment, the cloud platform 200 may be further divided into a first transceiver module 201, a queue processing module 202, a message forwarding device maintenance module 203, and a bandwidth allocation module 204, as shown in fig. 2.
Specifically, the first transceiver module 201 is configured to receive a message sent by the message forwarding device 100, and send a message (for example, a message including a bandwidth assignable by each message forwarding device 100) sent by the cloud platform 200 to each message forwarding device to the corresponding message forwarding device.
The queue processing module 202 is configured to, after receiving an upload message sent by each message forwarding device 100, cache messages sent by different message forwarding devices 100 through a priority queue, and process the messages cached in the different priority queues by using a preemptive priority algorithm. The queue processing module 202 divides the queue into a high priority queue, a medium priority queue, and a low priority queue. For example, the message cached in the high-priority queue (i.e., the high-priority message) may be, but is not limited to, a fault management message, an interworking message between the cloud platform 200 and the message forwarding device 100, and the like; the messages (i.e., medium priority messages) cached in the medium priority queue may be, but are not limited to, responses issued by the cloud platform 200 to the message forwarding device 100, some keep-alive messages of the access user, and the like; the packets buffered in the low priority queue (i.e., low priority packets) are the rest of the packets except for high priority packets and medium priority packets.
The queue processing module 202 may process the messages buffered in each priority queue according to the following preemptive priority algorithm:
1) and preferentially processing the messages cached in the high-priority queue, then processing the messages cached in the medium-priority queue, and finally processing the messages cached in the low-priority queue. That is, the high priority queue has the message to process preferentially, and after the high priority queue completes the message processing, the middle and low priority queue messages are processed again.
2) In the process of processing a low-priority message or a medium-priority message, if a high-priority message arrives, the current processing process is interrupted, the high-priority message is processed preferentially, and after the processing is finished, the medium-priority message or the low-priority message is processed.
3) Among the messages cached in the same priority queue, the messages transmitted by different message forwarding devices 100 process the queue cache messages sent by each message forwarding device 100 by adopting a polling scheduling mode based on time slices.
Optionally, the processing of the message includes, but is not limited to, sending the message to other servers or devices (e.g., a monitoring server, a remote monitoring terminal, a control center, etc.).
The message forwarding device maintenance module 203 is configured to maintain a device information table of the message forwarding devices 100, so that the cloud platform can monitor the states of the message forwarding devices 100 conveniently, where the device information table is shown in table 1 below.
TABLE 1 Equipment information Table
The parameters of table 1 are illustrated below:
(1) equipment numbering: the message forwarding equipment id recorded by the cloud platform can be 1,2, once.n, and n is an integer;
(2) last allocated bandwidth (i.e. last packet forwarding device allocable bandwidth): the cloud platform allocates bandwidth UR (n, T-1) allocated to the message forwarding equipment last time, wherein T-1 represents the last time period, and T represents the current time period;
(3) current upload rate: the current message uploading rate CRin (n, T) of the message forwarding equipment;
(4) cpu utilization: the current CPU utilization rate CPU (n, T) of the message forwarding equipment;
(5) packet loss rate: the current packet loss ratio URdrop (n, T) of the message forwarding equipment;
(6) minimum value: the minimum value rmin (N) of the bandwidth (that is, the allocable bandwidth) that can be allocated to the message forwarding device is crcar (t)/N, where crcar (t) represents the total processing capacity of the current cloud platform (set according to the performance of the cloud platform and networking parameters), and N is the number of the message forwarding devices managed and controlled by the cloud platform;
(7) maximum value: a maximum value rmax (n) crcar (t) of a bandwidth (that is, an allocable bandwidth) that can be allocated to the packet forwarding apparatus;
(8) the currently allocated bandwidth (i.e. the allocable bandwidth of the current packet forwarding device) UR (n, T).
Optionally, the message forwarding device 100 may count data such as the current uploading rate, the Cpu utilization rate, and the packet loss rate in table 1 once every fixed time (the time may be set and changed by default), and report the counted data to the message forwarding device maintenance module 203 of the cloud platform in the form of a message, so as to update the information in table 1.
The bandwidth allocation module 203 is configured to obtain information such as a CPU utilization rate, an upload rate, and a remaining processing capability of the cloud platform as first information, and further calculate, according to the first information, a bandwidth allocated to the current packet forwarding device 100 (that is, an allocable bandwidth) by using a bandwidth allocable calculation algorithm. Specifically, the manner of acquiring the first information may include, but is not limited to: (1) after the message forwarding device 100 establishes a connection with the cloud platform 200, it directly reads from the device information table (i.e., table 1) of the message forwarding device maintenance module 203; (2) and obtaining a second message sent from the message forwarding device 100, where the second message includes a bandwidth allocation request and information of a current CPU utilization rate, a current sending rate, and the like, and at this time, after receiving the second message, the cloud platform may obtain the current CPU utilization rate and the current sending rate from the second message according to the bandwidth allocation request, and at the same time, the cloud platform may also obtain the remaining processing capacity of the cloud platform according to the total processing capacity of the cloud platform and the current total message receiving rate of the cloud platform.
In an optional implementation manner, the bandwidth allocation module 203 of the cloud platform may calculate, according to the first information in the device information table (i.e., table 1), a bandwidth allocated to the current packet forwarding device 100 (i.e., an allocable bandwidth), and specifically implement the following steps:
step 1: and determining a calculation method of the allocable bandwidth according to the current CPU utilization rate, the first threshold and the second threshold.
The first threshold and the second threshold are both preset thresholds, which can be preset, and the second threshold is greater than the first threshold. The first threshold may be a reference CPU utilization, which may be a relatively small value (e.g., 20%), and if the current CPU utilization CPU (n, T) is smaller than the first threshold, it indicates that the CPU utilization of the current packet forwarding device is not high, and at this time, the assignable bandwidth is a bandwidth calculated by the cloud platform (i.e., a theoretical value of the assignable bandwidth). The first threshold may be a relatively large value (e.g., 80%), and if the current CPU utilization CPU (n, T) is greater than the second threshold, it indicates that the CPU utilization of the message forwarding device is high at this time, and to avoid exceeding the processing capability of the message forwarding device, the allocable bandwidth at this time may be set to the minimum value in table 1.
Step 2: and (3) calculating the allocable bandwidth of the message forwarding equipment according to the calculation method of the allocable bandwidth obtained in the step (1) and the first information in the table (1).
Specifically, it is assumed that an initial value of the allocable bandwidth UR (N, T) of the packet forwarding device is urnt (N, T) ═ crcar (T)/N, and according to a relationship between 2 adjacent allocable bandwidths, there are: UR (n, T) ═ UR (n, T-1) + urmodii (n, T-1), where urmodii (n, T-1) is the bandwidth adjustment value. Considering the influence of the remaining capacity of the last cloud platform and the ratio of the last message sending rate, the bandwidth adjustment value can be calculated by the following formula:
the residual processing capacity CRremain (T-1) ═ 2 × CRcar-CRinsum (T-1) of the previous cloud platform, and the introduction of the coefficient 2 in 2 × CRcar is to prevent the phenomenon that a plurality of messages are discarded due to less allocable bandwidth when a plurality of message forwarding devices are operated at full load (for example, messages are sent at full load). The CRinsum (T-1) is the total message receiving rate of the last cloud platform.
In addition, considering the total processing capacity constraint of the cloud platform (i.e. the theoretical value of the allocable bandwidth cannot exceed the total processing capacity of the cloud platform), the expression of the allocable bandwidth UR (n, T) may be obtained as follows:
wherein MIN is a function of the minimum.
as can be seen from the description of step 1 and the formula (1), the allocable bandwidth of the packet forwarding device can be calculated as follows:
(1) at present, Cpu (N, T) utilization rate is greater than or equal to the second threshold, at this time, the allocable bandwidth UR (N, T) of the message forwarding device may be set to the minimum value rmin (N) ═ crcar (T)/N in table 1, which is favorable for reducing Cpu utilization rate;
(2) the current Cpu utilization CPU (n, T) is less than or equal to the first threshold, and the theoretical value UR of the bandwidth UR (n, T) can be allocated at the momenttheory(n, T) will be smaller than crcar (T), then the assignable bandwidth UR (n, T) expression of the message forwarding device can be obtained from formula (1):
(3) the first threshold value is less than the current Cpu utilization rate CPU (n, T) and less than the second threshold value, the CPU utilization rate is moderate, and at the moment, in order to ensure that the number of the messages sent by the message forwarding equipment does not exceed the bandwidth of a sending channel and avoid unnecessary message loss caused by congestion, the calculated theoretical value UR of the allocable bandwidth can be usedtheory(n, T) performing backpressure control to avoid that the uplink bandwidth of a certain message forwarding device exceeds the bandwidth of an uplink channel, where the assignable bandwidth UR (n, T) expression of the message forwarding device is:
The message forwarding device 100 is mainly responsible for controlling its own state, and receives information reported by the bottom layer (i.e., an upload message). In addition, the message forwarding device 100 is also responsible for receiving messages (such as messages including bandwidth allocable by each message forwarding device 100) sent by the cloud platform 200 to each message forwarding device and reporting messages (such as CPU utilization rate of the message forwarding device 100, current uploading rate, and the like) that need to be reported at regular time. The message forwarding device 100 may be a router, a switch, a computer terminal, or an access server (e.g., X86 server, etc.) of an underlying server networking architecture, and has a message forwarding capability.
In an alternative embodiment, the message forwarding device 100 may be further divided into an uplink message receiving module 101, a transceiver management unit 102, and a second transceiver module 103, as shown in fig. 2.
Specifically, the uplink message receiving module 101 is configured to receive and distinguish message priorities of uplink messages, for example, 0,1, 2.. pri, where pri is the lowest message priority (e.g., 6 levels).
The message forwarding device management unit 102 is configured to maintain a message information table of the message forwarding device 100 itself, and perform bandwidth allocation of an upload channel of an upload message of each priority according to an allocable bandwidth issued by the cloud platform. As shown in fig. 2, the message forwarding device management unit 102 may be divided into a management module 1021 and a bandwidth adjustment module 1022.
The management module 1021 is configured to maintain a message information table of the message forwarding apparatus 100 itself, count data such as a current uploading rate and a comprehensive packet loss number in the message information table at regular intervals (the time may be set and changed by default), and report the counted data to the cloud platform 200 through the second transceiving module 103 in a message form. The message information table includes parameters such as message priority, current message uploading rate, comprehensive packet loss number, and this allocated bandwidth, as shown in table 2 below.
Table 2 message information table
The parameters in table 2 are illustrated below:
(1) message priority (which can be set or adjusted according to actual needs): 0 is highest, 1 is the next, and so on, for example, 7 priorities 0,1,2 … … 6 can be set;
(2) current message upload rate: the uplink rate Ri, i of the message with the current message priority i is 0,1,2 … …
(3) Comprehensive packet loss number Err [0 ]: the sum of the packet loss numbers of the messages of each message priority;
(4) the bandwidth allocated this time: the bandwidth of an uploading channel allocated to the message with each message priority;
the total bandwidth BW allocated this time is equal to the allocable bandwidth UR (n, T) issued by the cloud platform, that is: BW ═ UR (n, T).
In table 2, if the message priority is set to 3-level 0,1, and 2, the fault management message and the protocol message communicated between the cloud platform 200 and the message forwarding device 100 are classified as the highest priority 0; the protocol message and the keep-alive message sent by the user access are classified into the second priority level 1; the update message sent by the user access information is classified as the lowest priority 2.
The bandwidth adjusting module 1022 is configured to allocate or adjust the bandwidth of the uplink channel of the uplink message at each message priority according to the allocable bandwidth and the requirement of each priority issued by the cloud platform. The bandwidth adjustment module 1022 may allocate bandwidth to each priority based on the priority allocation manner according to the current uploading rate and the packet loss number. The distribution mode based on the priority follows that the priority (highest priority) message is satisfied preferentially by the 0 priority message, the priority (next highest priority) message is satisfied again on the premise of satisfying the 0 priority message, the priority (third highest priority) message is satisfied again on the premise of satisfying the 1 priority message, and so on until the distributable bandwidth is distributed or the uploading channel bandwidth is distributed to each message priority. And messages of the same priority can be distributed by adopting a polling mechanism.
The second transceiving module 103 is configured to report the second message containing the bandwidth allocation request or data of the current uploading rate, the comprehensive packet loss number, and the like counted by the message forwarding device 100 to the cloud platform 200, and receive information of the allocable bandwidth, and the like, which is issued by the cloud platform 200.
Taking an access server with a message forwarding device as a computer terminal networking architecture as an example, the system of the embodiment is applied to allocate the bandwidth of the message sent by the access server, and the method specifically includes the following steps 1-4:
step 1: the cloud platform is in intercommunication with the access server.
In an embodiment, the cloud platform may establish a connection with a preset access server and allocate a unique identifier to each access server, and the access servers may be uniformly managed through the cloud platform.
After the cloud platform establishes connection with the access servers, the cloud platform can allocate a unique identifier for each access server to distinguish the access servers. In one embodiment, the identification may be, for example, a series of digital codes generated based on the number of access servers.
Step 2: and the cloud platform processes the message sent by the access server.
In an embodiment, the cloud platform may divide the common queue buffer into different queues, that is, into a high priority queue, a medium priority queue, and a low priority queue, and then process the packets in the queues by using the preemptive priority algorithm, that is, preferentially perform the packet processing in the high priority queue, then perform the packet processing in the medium priority queue, and finally perform the packet processing in the low priority queue. And processing the same priority in a polling mode.
And step 3: and the cloud platform calculates the bandwidth of the message sent by the access server.
Specifically, the cloud platform may calculate the allocable bandwidth of the access server according to the aforementioned allocable bandwidth calculation algorithm according to the first information such as the CPU utilization of the access server, the remaining processing capacity of the cloud platform, and the uploading rate of the access server, and issue the allocable bandwidth of the access server to the corresponding access server.
And 4, step 4: the access server adjusts the message bandwidth according to the allocable bandwidth and the priority of the received message.
After the cloud platform issues the allocable bandwidth to the access server, the access server can adjust the bandwidth according to the requirement condition of each message priority. In an embodiment, the access server may allocate an upload channel bandwidth to the packets of each packet priority according to the current upload rate and the number of packets lost. The priority-based allocation described above may be used to allocate or adjust the bandwidth of the upstream channel.
Based on the description of the above-mentioned embodiment of the distribution system of the bandwidth of the uplink channel, an embodiment of the present invention provides a distribution method of the bandwidth of the uplink channel, which may be applied to the distribution system of the bandwidth of the uplink channel shown in fig. 1 or fig. 2, and may be specifically executed by the cloud platform 200 shown in fig. 1 or fig. 2. Referring to fig. 3, the method for allocating bandwidth of an upstream channel includes the following steps S301 to S303:
s301, first information is obtained, wherein the first information comprises the CPU utilization rate of the message forwarding equipment, the residual processing capacity of the cloud platform and the uploading rate of the message forwarding equipment.
Specifically, the CPU utilization of the message forwarding device in the first information and the sending rate of the message forwarding device may be read from the device information table in table 1, or may be obtained by analyzing the second message received by the cloud platform in real time. The remaining processing capacity of the cloud platform is related to the total processing capacity of the cloud platform and the current total message receiving rate (i.e., the sum of incoming message rates) of the cloud platform. Alternatively, the cloud platform may set the total processing capacity CRcar of the cloud platform according to the performance and networking parameters. As described above, after receiving the upload message sent by each message forwarding device, the cloud platform caches the messages sent by different message forwarding devices through the priority queues. Correspondingly, the current total message receiving rate of the cloud platform may be the sum of the message receiving rates of the current messages of each priority of the cloud platform, that is:
CRinsum(T)=CRinsum(high,T)+CRinsum(medium,T)+CRinsum(low,T)
wherein, the total message receiving rate of the current time period T is CRinsum (T);
clinnum (high, T): the receiving rate of the high-priority messages entering the cloud platform in the current time period T;
CRinsum (medium, T): the receiving rate of the incoming medium priority messages of the T cloud platform in the current time period;
CRinsum (low, T): and (4) entering the receiving rate of the low-priority messages by the cloud platform in the current time period T.
Therefore, the remaining processing capacity crremain (T) of the cloud platform is CRcar-crinsum (T) in the current time period T.
As shown in fig. 4, in an embodiment, step S301 may be subdivided into the following steps S3011-S3013:
s3011, receive a second message sent by the message forwarding device, where the second message includes a bandwidth allocation request.
The bandwidth allocation request is used for the message forwarding device to request the cloud platform for allocating bandwidth, so that the message forwarding device subsequently allocates bandwidth of the uploading channel for the first message to be uploaded. Optionally, the second packet may further include data of a current uploading rate, a comprehensive packet loss number, and the like counted by the packet forwarding device, so that the cloud platform is convenient to monitor and maintain the state of the packet forwarding device.
S3012, obtaining the current CPU utilization rate of the message forwarding equipment and the current uploading rate of the message forwarding equipment from the second message, and updating the current CPU utilization rate and the current uploading rate to an equipment information table;
specifically, the current CPU utilization and the current uploading rate of the message forwarding device may be obtained by analyzing the second message, and updated to the device information table in table 1.
S3013, obtaining the total processing capacity of the cloud platform and the total message receiving rate of the cloud platform, and further determining the remaining processing capacity of the cloud platform according to the total message receiving rate and the total processing capacity.
As described above, the total processing capacity of the cloud platform may be set according to the performance and the networking parameters, and the total packet receiving rate of the cloud platform may be the sum of the packet receiving rates of the respective priorities of the cloud platform. And subtracting the total message receiving rate of the cloud platform from the total processing capacity of the cloud platform to obtain the residual processing capacity of the cloud platform.
As shown in fig. 4, in an embodiment, step S301 may further include the following steps S3014-S3015:
s3014, caching the second message into a priority queue according to the priority, wherein the priority queue is a high priority queue, a medium priority queue or a low priority queue.
In particular, the cloud platform may divide the queues into queues of different priorities, i.e., a high priority queue, a medium priority queue, and a low priority queue. When receiving a second message of different message forwarding devices, the second message may be cached in a corresponding queue according to the priority, and wait for the cloud platform to perform subsequent processing.
S3015, processing the second message cached in the priority queue by adopting a preemptive priority algorithm.
Specifically, the cloud platform may process the second packet buffered in the priority queue by using a preemptive priority algorithm as follows:
1) and preferentially processing the messages cached in the high-priority queue, then processing the messages cached in the medium-priority queue, and finally processing the messages cached in the low-priority queue. That is, the high priority queue has the message to process preferentially, and after the high priority queue completes the message processing, the middle and low priority queue messages are processed again.
2) In the process of processing a low-priority message or a medium-priority message, if a high-priority message arrives, the current processing process is interrupted, the high-priority message is processed preferentially, and after the processing is finished, the medium-priority message or the low-priority message is processed.
3) Among the messages cached in the same priority queue, the messages transmitted by different message forwarding devices 100 process the queue cache messages sent by each message forwarding device 100 by adopting a polling scheduling mode based on time slices.
According to the cloud platform, the received messages are firstly cached in the queues with different priorities, and then the cached messages in the queues are processed by adopting the preemptive priority algorithm, so that the messages with high priorities can be processed preferentially, and therefore the key services can be served uninterruptedly.
S302, determining the allocable bandwidth of the message forwarding equipment according to the first information.
In one embodiment, as shown in FIG. 5, step S302 may be subdivided into steps S3021-S3022:
s3021, determining a calculation method for allocable bandwidth according to the current CPU utilization rate of the message forwarding device, a preset first threshold and a preset second threshold;
and S3022, determining the allocable bandwidth of the message forwarding device according to the first information and the calculation method of the allocable bandwidth.
Specifically, the first threshold and the second threshold are both preset thresholds, which may be preset, and the second threshold is greater than the first threshold. The first threshold may be a reference CPU utilization, which may be a relatively small value (e.g., 20%), and if the current CPU utilization CPU (n, T) is smaller than the first threshold, it indicates that the CPU utilization of the current packet forwarding device is not high, and at this time, the assignable bandwidth is a bandwidth calculated by the cloud platform (i.e., a theoretical value of the assignable bandwidth). The first threshold may be a relatively large value (e.g., 80%), and if the current CPU utilization CPU (n, T) is greater than the second threshold, it indicates that the CPU utilization of the message forwarding device is high at this time, and to avoid exceeding the processing capability of the message forwarding device, the allocable bandwidth at this time may be set to the minimum value in table 1.
Assuming that the initial value of the allocable bandwidth UR (N, T) of the message forwarding device is URint (N, T) ═ crcar (T)/N, and according to the relationship of the allocable bandwidth of 2 adjacent times, there are: UR (n, T) ═ UR (n, T-1) + urmodii (n, T-1), where urmodii (n, T-1) is the bandwidth adjustment value. Considering the influence of the remaining capacity of the last cloud platform and the ratio of the last message sending rate, the bandwidth adjustment value can be calculated by the following formula:
the residual processing capacity CRremain (T-1) ═ 2 × CRcar-CRinsum (T-1) of the previous cloud platform, and the introduction of the coefficient 2 in 2 × CRcar is to prevent the phenomenon that a plurality of messages are discarded due to less allocable bandwidth when a plurality of message forwarding devices are operated at full load (for example, messages are sent at full load). The CRinsum (T-1) is the total message receiving rate of the last cloud platform.
In addition, in consideration of the total processing capacity constraint of the cloud platform (i.e., the theoretical value of the allocable bandwidth cannot exceed the total processing capacity of the cloud platform), an expression of the allocable bandwidth UR (n, T) shown in formula (1) may be obtained.
Will be provided withSo-called dispensable tapeTheoretical value UR of wide UR (n, T)theory(n, T), namely:
thus, the allocable bandwidth of the message forwarding device may be calculated as follows:
(1) at present, Cpu (N, T) utilization rate is greater than or equal to the second threshold, at this time, the allocable bandwidth UR (N, T) of the message forwarding device may be set to the minimum value rmin (N) ═ crcar (T)/N in table 1, which is favorable for reducing Cpu utilization rate;
(2) the current Cpu utilization CPU (n, T) is less than or equal to the first threshold, and the theoretical value UR of the bandwidth UR (n, T) can be allocated at the momenttheory(n, T) will be smaller than crcar (T), then the assignable bandwidth UR (n, T) expression of the message forwarding device can be obtained from formula (1):
(3) the first threshold value is less than the current Cpu utilization rate CPU (n, T) and less than the second threshold value, the CPU utilization rate is moderate, and at the moment, in order to ensure that the number of the messages sent by the message forwarding equipment does not exceed the bandwidth of a sending channel and avoid unnecessary message loss caused by congestion, the calculated theoretical value UR of the allocable bandwidth can be usedtheory(n, T) performing backpressure control (i.e. reducing the allocable bandwidth of the message forwarding device), and avoiding that the uplink bandwidth of a certain message forwarding device exceeds the bandwidth of the uplink channel, where the expression of the allocable bandwidth UR (n, T) of the message forwarding device is:
wherein,is a first threshold (i.e., a baseline CPU utilization). Coefficient of back pressure controlBy taking the square root back pressure control mode, the (descending) change of the allocable bandwidth of the message forwarding equipment tends to be smooth, and the stability of the system is improved.
And S303, sending the allocable bandwidth to the message forwarding equipment so that the message forwarding equipment allocates the bandwidth of the uplink channel of the first message according to the allocable bandwidth and the priority of the first message.
Specifically, one or more message forwarding devices managed and controlled by the cloud platform may be provided, which is not specifically limited in this application. It can be understood that, when there are a plurality of message forwarding devices, after calculating the allocable bandwidth of each message forwarding device, the cloud platform will issue the calculated allocable bandwidth to the corresponding message forwarding device, so as to perform uniform bandwidth allocation on each message forwarding device in the uplink channel.
The first message is a message sent to a server or other monitoring devices on the message forwarding device, and may be a fault management message, a keep-alive message of an access user, or the like. Like the second packet, the first packet also has a priority, e.g., 0 (highest priority), 1, 2.. pri (lowest priority). Therefore, when the message forwarding device distributes the bandwidth of the uplink channel, the bandwidth priority of the uplink channel can be adjusted according to the requirement condition of each priority, the message with 0 priority (highest priority) is preferentially met, the message with 1 priority (next highest priority) is met under the condition of meeting the message with 0 priority, the message with 2 priority (third highest priority) is met under the condition of meeting the message with 1 priority, and the like until the distributable bandwidth is distributed or the bandwidth of the uplink channel is distributed to each message priority. And messages of the same priority can be distributed by adopting a polling mechanism.
To sum up, the cloud platform in the embodiment of the present application determines the allocable bandwidth of the packet forwarding device according to the first information, such as the CPU utilization of the packet forwarding device, the remaining processing capacity of the cloud platform, and the upload rate of the packet forwarding device, and then allocates the upload channel bandwidth by using the packet forwarding device in combination with the allocable bandwidth and the priority of the first packet, which is the upload packet. Therefore, the available bandwidth can be dynamically allocated to one or more message forwarding devices in the uploading channel as the allocable bandwidth by utilizing the unified control function of the cloud platform according to various factors of the first information, so that the over-high utilization rate of the CPU is avoided, the allocable bandwidth of the message forwarding devices is ensured to be within the processing capacity of the CPU of the message forwarding devices, and the method is not only suitable for the situation that the uploading channel is occupied by only one message forwarding device, but also suitable for the situation that the uploading channel is shared by more than two message forwarding devices; in addition, the message forwarding equipment allocates the bandwidth of the uplink channel according to the allocable bandwidth and the priority of the first message, so that the uplink message with high priority is guaranteed to pass preferentially. Therefore, the technical scheme realizes the function of dynamically adjusting the bandwidth of the uploading channel of the uploading message, can allocate reasonable bandwidth within the processing capacity of the CPU of the message forwarding equipment, and ensures that the uploading message with high priority passes preferentially.
Based on the description of the above-mentioned embodiment of the distribution system of the bandwidth of the uplink channel, the embodiment of the present invention provides a distribution method of the bandwidth of the uplink channel, which may be applied to the distribution system of the bandwidth of the uplink channel shown in fig. 1 or fig. 2, and may be specifically executed by the message forwarding device 100 shown in fig. 1 or fig. 2. Referring to fig. 6, the method for allocating bandwidth of an uplink channel includes the following steps S602 to S603:
and S602, receiving an allocable bandwidth of the message forwarding device sent by the cloud platform, wherein the allocable bandwidth is determined by the cloud platform according to a bandwidth allocation request and first information, and the first information comprises a CPU utilization rate of the message forwarding device, the residual processing capacity of the cloud platform and an uploading rate of the message forwarding device.
Specifically, the allocable bandwidth of the message forwarding device may be calculated by the cloud platform by using the method in the embodiment shown in any one of fig. 3 to 5. After the cloud platform calculates the allocable bandwidth of the message forwarding device, the cloud platform issues the calculated allocable bandwidth to the corresponding message forwarding device.
As described above, after the message forwarding device 100 establishes a connection with the cloud platform 200, the cloud platform may directly read the first information from the device information table (i.e., table 1) of the message forwarding device maintenance module 203, or may obtain the first information from the second message that contains the bandwidth allocation request and is sent by the message forwarding device 100. Optionally, if the cloud platform acquires the first information from the second packet containing the bandwidth allocation request sent by the packet forwarding device 100, the method for allocating the bandwidth of the sending channel before step S602 further includes the following step S601, as shown in fig. 6:
s601, sending a bandwidth allocation request to the cloud platform.
Different from the prior art that the message forwarding device performs bandwidth allocation on the uplink channel, in consideration of the fact that the uplink channel is shared by more than two message forwarding devices, when the message forwarding device performs bandwidth allocation on the uplink channel, the message forwarding device in the embodiment of the present application first sends a bandwidth allocation request to the cloud platform to request the cloud platform to allocate bandwidth to each message forwarding device as allocable bandwidth. Optionally, the bandwidth allocation request is sent to the cloud platform in the form of a second message. The second packet may also include data of the current uploading rate, the comprehensive packet loss number, and the like counted by the packet forwarding device, so that the cloud platform can monitor and maintain the state of the packet forwarding device through the device information table in table 1.
S603, allocating the bandwidth of the uploading channel of the first message according to the allocable bandwidth and the priority of the first message.
As shown in fig. 7, step S603 may be further subdivided into the following steps:
s6031, acquiring each message priority of the first message;
specifically, the first packet is a packet sent by the packet forwarding device to the server or other monitoring devices, and may be a fault management packet, a keep-alive packet of an access user, or the like. Like the second packet, the first packet also has a priority, e.g., 0 (highest priority), 1, 2.. pri (lowest priority). Taking the message priority levels of 0,1 and 2 as examples, the message with the priority level of 0 (i.e. the highest priority level) may be but is not limited to a fault management message, an interworking message between a cloud platform and a message forwarding device, and the like; the message with the priority level of 1 (i.e. the second highest priority level) may be, but is not limited to, a response of the cloud platform to a command issued by the message forwarding device, some keep-alive messages of the access user, and the like; the 2-priority (i.e., lowest priority) packet is the rest of the packets except for the 0-priority packet and the 1-priority packet. Optionally, after receiving the upload message (i.e., the first message) through the upload message receiving module 101, the message forwarding device may distinguish the message priority of the upload message and update the message priority to the message information table in table 2.
S6032, acquiring the current message uploading rate and the packet loss number of each message priority;
specifically, after the priority of the packet is obtained, the corresponding current packet sending rate and packet loss number may be found from table 2 by table lookup.
And S6033, allocating uplink channel bandwidths to the first message of each message priority in a priority-based allocation mode according to the current message uplink rate and the packet loss number, wherein the priority-based allocation mode allocates the uplink channel bandwidths in sequence from high message priority to low message priority.
Here, the current packet uploading rate may determine at which rate the first packet uploaded by the packet device is transmitted in the uploading channel. In some embodiments, to meet the message uploading requirement, the message forwarding device may allocate an uploading channel bandwidth for the first message, which is greater than or equal to the current message uploading rate.
The packet loss number (packet loss rate) in the current period can reflect the probability that packet loss may occur in the process that the message device sends the first message, and the higher the packet loss number in the current period is, the higher the possibility of packet loss is. Those skilled in the art can understand that, when the packet forwarding device allocates the uplink channel bandwidth for the first packet, more uplink channel bandwidths may be allocated for the packet with the higher packet loss number, so as to prevent the occurrence of the packet loss phenomenon of the uplink packet due to the insufficient uplink channel bandwidth.
In some embodiments, in order to ensure uninterrupted service of the critical service, and ensure that the high-priority packet is preferentially uploaded (i.e., preferentially passes through the upload channel), the packet forwarding device may allocate or adjust the bandwidth of the upload channel to the first packet of each packet priority by using a priority-based allocation method. Specifically, based on the priority distribution mode, the bandwidth of the uplink channel can be sequentially distributed according to the priority of the messages from high to low, the bandwidth requirement of the high-priority message is preferentially met, the bandwidth requirement of the low-priority message is then met after the bandwidth requirement of the high-priority message is met until the distributable bandwidth is completely distributed or the bandwidth of the uplink channel is already distributed to each message priority, and the messages with the same priority can be distributed by adopting a polling mechanism. Taking three priority messages of 0,1 and 2 as an example, when the uplink channel bandwidth is allocated based on the priority allocation mode, the message which satisfies the priority of 0 (highest priority) is preferentially satisfied, the message which satisfies the priority of 1 (next highest priority) is satisfied under the condition of satisfying the priority of 0, and the message which satisfies the priority of 2 (third highest priority) is satisfied under the condition of satisfying the priority of 1.
After the message forwarding device allocates the bandwidth of the uploading channel of the first message, the message forwarding device may upload the first message to the cloud platform through the uploading channel and then upload the first message to the server or other devices (such as a remote monitoring terminal, a remote server, a control center, etc.) by the cloud platform, or upload the first message to the server or other devices (such as a remote monitoring terminal, a remote server, a control center, etc.) through the uploading channel without passing through the cloud platform.
To sum up, the message forwarding device in the embodiment of the present application sends the bandwidth allocation request to the cloud platform, receives the allocable bandwidth determined by the cloud platform according to the first information, such as the CPU utilization of the message forwarding device, the remaining processing capacity of the cloud platform, and the upload rate of the message forwarding device, and finally allocates the upload channel bandwidth by combining the allocable bandwidth and the priority of the upload message, which is the first message. Therefore, the available bandwidth can be dynamically allocated to one or more message forwarding devices in the uploading channel as the allocable bandwidth by utilizing the unified control function of the cloud platform according to various factors of the first information, so that the over-high utilization rate of the CPU is avoided, the allocable bandwidth of the message forwarding devices is ensured to be within the processing capacity of the CPU of the message forwarding devices, and the method is not only suitable for the situation that the uploading channel is occupied by only one message forwarding device, but also suitable for the situation that the uploading channel is shared by more than two message forwarding devices; in addition, the message forwarding equipment allocates the bandwidth of the uplink channel according to the allocable bandwidth and the priority of the first message, so that the uplink message with high priority is guaranteed to pass preferentially. Therefore, the technical scheme realizes the function of dynamically adjusting the bandwidth of the uploading channel of the uploading message, can allocate reasonable bandwidth within the processing capacity of the CPU of the message forwarding equipment, and ensures that the uploading message with high priority passes preferentially.
Based on the description of the above-mentioned allocation system embodiment of the upload channel bandwidth, an embodiment of the present invention provides a method for allocating an upload channel bandwidth, which may be applied to the allocation system of the upload channel bandwidth shown in fig. 1 or fig. 2, and specifically may be interactively executed by the packet forwarding device 100 and the cloud platform 200 shown in fig. 1 or fig. 2. Referring to fig. 8, the method for allocating bandwidth of an upstream channel includes the following steps S802 to S805:
s802, the cloud platform acquires first information, wherein the first information comprises the CPU utilization rate of the message forwarding equipment, the residual processing capacity of the cloud platform and the sending rate of the message forwarding equipment.
As described above, after the message forwarding device 100 establishes a connection with the cloud platform 200, the cloud platform may directly read the first information from the device information table (i.e., table 1) of the message forwarding device maintenance module 203, or may obtain the first information from the second message that contains the bandwidth allocation request and is sent by the message forwarding device 100. Optionally, if the cloud platform acquires the first information from the second packet containing the bandwidth allocation request sent by the packet forwarding device 100, the method for allocating the bandwidth of the sending channel before step S802 further includes the following step S801, as shown in fig. 8:
s801, the message forwarding device sends a bandwidth allocation request to the cloud platform.
Different from the prior art that the message forwarding device performs bandwidth allocation on the uplink channel, in consideration of the fact that the uplink channel is shared by more than two message forwarding devices, when the message forwarding device performs bandwidth allocation on the uplink channel, the message forwarding device in the embodiment of the present application first sends a bandwidth allocation request to the cloud platform to request the cloud platform to allocate bandwidth to each message forwarding device as allocable bandwidth. Optionally, the bandwidth allocation request is sent to the cloud platform in the form of a second message. The second packet may also include data of the current uploading rate, the comprehensive packet loss number, and the like counted by the packet forwarding device, so that the cloud platform can monitor and maintain the state of the packet forwarding device through the device information table in table 1.
And S803, the cloud platform determines the allocable bandwidth of the message forwarding device according to the first information.
Specifically, the cloud platform may calculate the allocable bandwidth of the message forwarding device by using the method in the embodiment shown in any one of fig. 3 to 5.
S804, the cloud platform sends the allocable bandwidth to the message forwarding device.
Specifically, after calculating the allocable bandwidth of the message forwarding device, the cloud platform issues the calculated allocable bandwidth to the corresponding message forwarding device, so that the message forwarding device subsequently performs bandwidth allocation on each uplink message.
S805, the message forwarding equipment allocates the bandwidth of the uplink channel of the first message according to the allocable bandwidth and the priority of the first message.
Specifically, the message forwarding device may allocate the bandwidth of the uplink channel of the first message by using the method in the embodiment shown in fig. 6 or fig. 7.
After the message forwarding device allocates the bandwidth of the uploading channel of the first message, the message forwarding device may upload the first message to the cloud platform through the uploading channel and then upload the first message to the server or other devices (such as a remote monitoring terminal, a remote server, a control center, etc.) by the cloud platform, or upload the first message to the server or other devices (such as a remote monitoring terminal, a remote server, a control center, etc.) through the uploading channel without passing through the cloud platform.
To sum up, the message forwarding device in the embodiment of the present application sends the bandwidth allocation request to the cloud platform, the cloud platform returns the allocable bandwidth determined by the first information, such as the CPU utilization of the message forwarding device, the remaining processing capacity of the cloud platform, and the upload rate of the message forwarding device, to the message forwarding device, and finally the message forwarding device allocates the upload channel bandwidth in combination with the allocable bandwidth and the priority of the first message, which is the upload message. Therefore, the available bandwidth can be dynamically allocated to one or more message forwarding devices in the uploading channel as the allocable bandwidth by utilizing the unified control function of the cloud platform according to various factors of the first information, so that the over-high utilization rate of the CPU is avoided, the allocable bandwidth of the message forwarding devices is ensured to be within the processing capacity of the CPU of the message forwarding devices, and the method is not only suitable for the situation that the uploading channel is occupied by only one message forwarding device, but also suitable for the situation that the uploading channel is shared by more than two message forwarding devices; in addition, the message forwarding equipment allocates the bandwidth of the uplink channel according to the allocable bandwidth and the priority of the first message, so that the uplink message with high priority is guaranteed to pass preferentially. Therefore, the technical scheme realizes the function of dynamically adjusting the bandwidth of the uploading channel of the uploading message, can allocate reasonable bandwidth within the processing capacity of the CPU of the message forwarding equipment, and ensures that the uploading message with high priority passes preferentially.
Based on the description of the above method for allocating an upstream channel bandwidth, an embodiment of the present application further provides an apparatus for allocating an upstream channel bandwidth, where the apparatus for allocating an upstream channel bandwidth may be applied to an apparatus for allocating an upstream channel bandwidth shown in fig. 1 or fig. 2, and specifically, the apparatus for allocating an upstream channel bandwidth may operate on the cloud platform 200 shown in fig. 1 or fig. 2. As shown in fig. 9, the apparatus for allocating bandwidth of an upstream channel includes the following modules:
a bandwidth allocation module 901, configured to obtain the first information, and determine an allocable bandwidth of the message forwarding device according to the first information; the first information comprises the CPU utilization rate of the message forwarding equipment, the residual processing capacity of the cloud platform and the uploading rate of the message forwarding equipment;
the first transceiver module 902 is configured to send the assignable bandwidth to the message forwarding device, so that the message forwarding device assigns an uplink channel bandwidth of the first message according to the assignable bandwidth and the priority of the first message.
The embodiment of the present application is an embodiment of an apparatus corresponding to the embodiment of the method for applying fig. 3 to a cloud platform, and the contents in the embodiment of the method for applying fig. 3 to a cloud platform are all applicable to the embodiment of the present application, and the functions specifically implemented by the embodiment of the apparatus are the same as those in the embodiment of the method for applying fig. 3 to a cloud platform, and the beneficial effects achieved by the embodiment of the method for applying fig. 3 to a cloud platform are also the same as those achieved by the embodiment of the method for applying fig. 3 to a cloud platform.
Based on the description of the above-mentioned method for allocating an uplink channel bandwidth, an embodiment of the present application further provides an apparatus for allocating an uplink channel bandwidth, where the apparatus for allocating an uplink channel bandwidth may be applied to an uplink channel bandwidth allocation system shown in fig. 1 or fig. 2, and specifically, the apparatus for allocating an uplink channel bandwidth may operate in the message forwarding device 100 shown in fig. 1 or fig. 2. As shown in fig. 10, the apparatus for allocating bandwidth of an upstream channel includes the following modules:
a second transceiving module 1001, configured to receive an allocable bandwidth of a packet forwarding device sent by a cloud platform, where the allocable bandwidth is determined by the cloud platform according to first information, where the first information includes a CPU utilization of the packet forwarding device, a remaining processing capability of the cloud platform, and an upload rate of the packet forwarding device;
the bandwidth adjusting module 1002 is configured to allocate an uplink channel bandwidth of the first packet according to the allocable bandwidth and the priority of the first packet.
The embodiment of the present application is an embodiment of an apparatus corresponding to the embodiment of the method applied to the message forwarding device in fig. 6, and the contents in the embodiment of the method applied to the message forwarding device in fig. 6 are all applicable to the embodiment of the apparatus, the functions specifically implemented by the embodiment of the apparatus are the same as those in the embodiment of the method applied to the message forwarding device in fig. 6, and the beneficial effects achieved by the embodiment of the method applied to the message forwarding device in fig. 6 are also the same as those achieved by the embodiment of the method applied to the message forwarding device in fig. 6.
Based on the description of the above method for allocating an upstream channel bandwidth, an embodiment of the present application further provides an apparatus for allocating an upstream channel bandwidth, where the apparatus for allocating an upstream channel bandwidth may be applied to an apparatus for allocating an upstream channel bandwidth shown in fig. 1 or fig. 2. As shown in fig. 11, the apparatus includes a memory 1101, a processor 1102, a program 1103 stored on the memory 1101 and operable on the processor 1102, and a data bus 1104 for implementing connection communication between the processor 1102 and the memory 1101, wherein the program 1103 implements the steps of the allocation method of the upstream channel bandwidth shown in any one of fig. 3 to 7 when executed by the processor 1102.
The contents of the method embodiment shown in any of fig. 3-7 are applicable to the apparatus embodiment, the functions implemented by the apparatus embodiment are the same as the method embodiment shown in any of fig. 3-7, and the advantages achieved by the apparatus embodiment are the same as the advantages achieved by the method embodiment shown in any of fig. 3-7.
Embodiments of the present application also provide a storage medium for a computer-readable storage, where one or more programs are stored, and the one or more programs are executable by one or more processors to implement the steps of the method for allocating bandwidth of an upstream channel as shown in any of fig. 3 to 7.
It will be understood that all or some of the steps, systems of methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.
The embodiments of the present invention have been described in detail with reference to the accompanying drawings, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge of those skilled in the art without departing from the gist of the present invention.
Claims (15)
1. A method for allocating bandwidth of an uplink channel comprises the following steps:
acquiring first information, wherein the first information comprises a CPU utilization rate of message forwarding equipment, residual processing capacity of a cloud platform and an uploading rate of the message forwarding equipment;
determining the allocable bandwidth of the message forwarding equipment according to the first information;
and sending the allocable bandwidth to the message forwarding equipment so that the message forwarding equipment allocates the bandwidth of the uplink channel of the first message according to the allocable bandwidth and the priority of the first message.
2. The method according to claim 1, wherein the cloud platform maintains a device information table of the packet forwarding device;
wherein the acquiring of the first information includes:
receiving a second message sent by the message forwarding equipment, wherein the second message comprises a bandwidth allocation request;
acquiring the CPU utilization rate and the uploading rate from the second message, and updating the CPU utilization rate and the uploading rate to the equipment information table;
and acquiring the total processing capacity of the cloud platform and the total message receiving rate of the cloud platform, and determining the residual processing capacity of the cloud platform according to the total message receiving rate of the cloud platform and the total processing capacity of the cloud platform.
3. The method of claim 2, wherein the obtaining the first information further comprises:
caching the second message to a priority queue according to priority, wherein the priority queue is a high priority queue, a medium priority queue or a low priority queue;
and processing the second message cached in the priority queue by adopting a preemptive priority algorithm.
4. The method according to claim 1, wherein the determining the allocable bandwidth of the packet forwarding device according to the first information comprises:
determining a calculation method of the allocable bandwidth according to the CPU utilization rate, a preset first threshold and a preset second threshold, wherein the second threshold is larger than the first threshold;
and determining the allocable bandwidth of the message forwarding equipment according to the first information and the calculation method of the allocable bandwidth.
5. The method according to claim 4, wherein the determining the allocable bandwidth of the packet forwarding device according to the first information and the calculation method of the allocable bandwidth includes:
determining that the current CPU utilization rate is less than or equal to the first threshold value, acquiring the total processing capacity of the cloud platform, determining the theoretical value of the allocable bandwidth according to the allocable bandwidth of the message forwarding equipment at the last time, the residual processing capacity of the cloud platform at the last time and the uploading rate at the last time, and determining the allocable bandwidth of the message forwarding equipment according to the total processing capacity of the cloud platform and the theoretical value;
or, determining that the current CPU utilization rate is greater than the first threshold and less than the second threshold, determining a theoretical value of the allocable bandwidth according to the allocable bandwidth of the message forwarding device last time, the remaining processing capacity of the cloud platform last time, and the last sending rate, and performing backpressure control on the theoretical value according to the current CPU utilization rate and the first threshold to obtain the allocable bandwidth of the message forwarding device;
or determining that the current CPU utilization rate is greater than or equal to the second threshold, acquiring the total processing capacity of the cloud platform and the number of the message forwarding devices, and determining the allocable bandwidth of the message forwarding devices according to the total processing capacity of the cloud platform and the number of the message forwarding devices.
6. The method according to claim 2 or 3, wherein the device information table further includes a device number of the packet forwarding device, a packet loss rate of the packet forwarding device, a maximum value of the allocable bandwidth, a minimum value of the allocable bandwidth, an allocable bandwidth of the last packet forwarding device, and a current allocable bandwidth of the packet forwarding device.
7. A method for allocating bandwidth of an uplink channel comprises the following steps:
receiving an allocable bandwidth of a message forwarding device sent by a cloud platform, wherein the allocable bandwidth is determined by the cloud platform according to first information, and the first information comprises a CPU utilization rate of the message forwarding device, the remaining processing capacity of the cloud platform and an uploading rate of the message forwarding device;
and allocating the bandwidth of the uplink channel of the first message according to the allocable bandwidth and the priority of the first message.
8. The method according to claim 7, wherein the allocating the uplink channel bandwidth of the first packet according to the allocable bandwidth and the priority of the first packet comprises:
acquiring a plurality of message priorities of the first message;
acquiring the current message uploading rate and the packet loss number of each message priority;
and allocating an uploading channel bandwidth for the first message of each message priority by adopting a priority-based allocation mode according to the uploading rate of the current message and the packet loss number, wherein the uploading channel bandwidths are sequentially allocated according to the priority of the messages in the priority-based allocation mode from high to low.
9. The method according to claim 7, wherein the message forwarding device maintains a message information table, and the message information table includes a message priority, a current message uploading rate, a packet loss number, and the currently allocable bandwidth; the method further comprises the following steps:
and counting and updating the message information table according to a preset time interval, and sending the information of the message information table to the cloud platform.
10. A method for allocating bandwidth of an uplink channel comprises the following steps:
the method comprises the steps that a cloud platform acquires first information, wherein the first information comprises the CPU utilization rate of message forwarding equipment, the residual processing capacity of the cloud platform and the uploading rate of the message forwarding equipment;
the cloud platform determines the allocable bandwidth of the message forwarding equipment according to the first information;
the cloud platform sends the allocable bandwidth to the message forwarding equipment;
the message forwarding equipment receives the allocable bandwidth;
and the message forwarding equipment allocates the bandwidth of the uplink channel of the first message according to the allocable bandwidth and the priority of the first message.
11. An allocation apparatus of upstream channel bandwidth, comprising the following modules:
the bandwidth allocation module is used for acquiring first information and determining the allocable bandwidth of the message forwarding equipment according to the first information; the first information comprises the CPU utilization rate of the message forwarding equipment, the residual processing capacity of a cloud platform and the uploading rate of the message forwarding equipment;
and the first transceiver module is used for sending the allocable bandwidth to the message forwarding equipment so that the message forwarding equipment allocates the bandwidth of the uplink channel of the first message according to the allocable bandwidth and the priority of the first message.
12. An allocation apparatus of upstream channel bandwidth, comprising the following modules:
the second transceiving module is used for receiving an allocable bandwidth of the message forwarding device sent by a cloud platform, wherein the allocable bandwidth is determined by the cloud platform according to first information, and the first information comprises a CPU utilization rate of the message forwarding device, the residual processing capacity of the cloud platform and an uploading rate of the message forwarding device;
and the bandwidth adjusting module is used for allocating the bandwidth of the uploading channel of the first message according to the allocable bandwidth and the priority of the first message.
13. A system for allocating upstream channel bandwidth, comprising the following modules:
the bandwidth allocation module is used for acquiring first information and determining the allocable bandwidth of the message forwarding equipment according to the first information; the first information comprises the CPU utilization rate of the message forwarding equipment, the residual processing capacity of a cloud platform and the uploading rate of the message forwarding equipment;
the first transceiving module is used for sending the allocable bandwidth to the message forwarding equipment;
a second transceiver module, configured to receive the allocable bandwidth;
and the bandwidth adjusting module is used for allocating the bandwidth of the uploading channel of the first message according to the allocable bandwidth and the priority of the first message.
14. An allocation apparatus of a bandwidth of an upload channel, characterized in that said apparatus comprises a memory, a processor, a program stored on said memory and executable on said processor, and a data bus for enabling a connection communication between said processor and said memory, said program, when executed by said processor, implementing the steps of the allocation method of a bandwidth of an upload channel according to any of the claims 1 to 9.
15. A storage medium for computer readable storage, wherein the storage medium stores one or more programs which are executable by one or more processors to implement the steps of the method for allocating bandwidth of an upstream channel of any of claims 1 to 9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010609669.6A CN113949670A (en) | 2020-06-29 | 2020-06-29 | Method, device, system, equipment and storage medium for allocating bandwidth of uplink channel |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010609669.6A CN113949670A (en) | 2020-06-29 | 2020-06-29 | Method, device, system, equipment and storage medium for allocating bandwidth of uplink channel |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113949670A true CN113949670A (en) | 2022-01-18 |
Family
ID=79325775
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010609669.6A Pending CN113949670A (en) | 2020-06-29 | 2020-06-29 | Method, device, system, equipment and storage medium for allocating bandwidth of uplink channel |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113949670A (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160044611A1 (en) * | 2013-04-25 | 2016-02-11 | Huawei Technologies Co., Ltd. | Method for Contolling Uplink Transmit Power in Inter-Base Station Carrier Aggregation, Base Station, and Device |
WO2017054566A1 (en) * | 2015-09-28 | 2017-04-06 | 中兴通讯股份有限公司 | Method of preventing cpu packet congestion and device utilizing same |
CN110519798A (en) * | 2019-07-05 | 2019-11-29 | 广东电网有限责任公司 | A kind of fiber radio integration Internet resources distribution mechanism and income calculation method |
-
2020
- 2020-06-29 CN CN202010609669.6A patent/CN113949670A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160044611A1 (en) * | 2013-04-25 | 2016-02-11 | Huawei Technologies Co., Ltd. | Method for Contolling Uplink Transmit Power in Inter-Base Station Carrier Aggregation, Base Station, and Device |
WO2017054566A1 (en) * | 2015-09-28 | 2017-04-06 | 中兴通讯股份有限公司 | Method of preventing cpu packet congestion and device utilizing same |
CN110519798A (en) * | 2019-07-05 | 2019-11-29 | 广东电网有限责任公司 | A kind of fiber radio integration Internet resources distribution mechanism and income calculation method |
Non-Patent Citations (1)
Title |
---|
方义秋;郑剑;葛君伟;: "一种云环境下基于QoS约束的资源分配策略", 计算机应用与软件, no. 01, 15 January 2015 (2015-01-15) * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11785113B2 (en) | Client service transmission method and apparatus | |
US8345656B2 (en) | Recalculating airtime quota in WLAN to use up bandwidth | |
CN109922003B (en) | Data sending method, system and related components | |
JP2004266389A (en) | Method and circuit for controlling packet transfer | |
WO2012116540A1 (en) | Traffic management method and management device | |
KR20170033179A (en) | Method and apparatus for managing bandwidth of virtual networks on SDN | |
US20120221706A1 (en) | Method and arrangement for network resource management | |
CN113726690A (en) | Method and system for uploading protocol message, electronic equipment and storage medium | |
EP2854346B1 (en) | Method for adjusting bandwidth in network virtualization system | |
WO2020036079A1 (en) | Network control device, network control method, and program | |
EP1695495B1 (en) | Distributed medium acces control for broadband access systems | |
WO2022027331A1 (en) | Bandwidth management method and apparatus, computer storage medium, and chip | |
CN114902777A (en) | Scheduling in cloud radio access networks | |
CN113949670A (en) | Method, device, system, equipment and storage medium for allocating bandwidth of uplink channel | |
CN114500402B (en) | Message processing method, device and storage medium | |
EP2388978B1 (en) | Methods and devices for determining network link load | |
KR20120055947A (en) | Method and apparatus for providing Susbscriber-aware per flow | |
US20220021920A1 (en) | Communication entity and a method for transmitting a video data stream | |
CN112787919B (en) | Message transmission method and device and readable medium | |
CN104301255A (en) | Method for equitably distributing multi-user bandwidth in optical network | |
KR101566397B1 (en) | A bandwidth management device, central management device and method of bandwidth management | |
US11895039B2 (en) | Scalable data flows in a communication network | |
CN114531402B (en) | Method and system for storing standard network file | |
CN115242727B (en) | User request processing method, device, equipment and medium | |
US10091268B2 (en) | Hierarchal maximum information rate enforcement |
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 |