Method, device, system, equipment and storage medium for allocating bandwidth of uplink channel
Dynamically adjusting the upload channel bandwidth through the cloud platform solves the network bottleneck problem caused by insufficient upload channel bandwidth and ensures that high-priority packets pass through. It is suitable for situations where multiple packet forwarding devices share the upload channel.
Patent Information
- Application Number
- CN202010609669.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-29
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2040-06-29
AI Technical Summary
In network communication, the bandwidth of the upcoming channel is limited, resulting in insufficient bandwidth due to the large amount of upcoming messages, which affects the system processing speed and becomes a bottleneck in network communication. Especially when multiple message forwarding devices share the upcoming channel, the resources Inadequate or high priority messages are discarded.
Obtain information such as the CPU utilization of the packet forwarding device, the remaining processing capacity of the cloud platform, and the upload rate through the cloud platform, and dynamically adjust the bandwidth of the upload channel to ensure that the uploaded packets with high priority are passed first.
In the realization of the CPU processing capacity of the message forwarding device, the dynamic distribution is reasonable to avoid the high use of the CPU, ensuring that the packets with high priority are preferred, suitable for single or multiple message forwarding equipment to share the passage passage passage. The situation.
Smart Images

Figure CN113949670B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of communication bandwidth allocation, and in particular to a method, device, system, equipment and storage medium for allocating bandwidth of an uplink channel. Background Art
[0002] With the development of network communication, the processing performance of message forwarding devices such as routers has become an important parameter for measuring message forwarding devices. Among them, the uplink message has a great impact on the CPU performance of the message forwarding device. The uplink message mainly includes protocol messages, fault management messages, etc. Among the uplink messages, fault management messages and the like are key messages that must be processed. It is necessary to ensure that the key messages cannot be discarded, otherwise it may cause serious consequences such as network paralysis. When the uplink message is sent through the uplink channel (the channel for communication between the message forwarding device and the server or other monitoring equipment), it needs to occupy a certain channel bandwidth, but the bandwidth of the uplink channel is limited. Often, the bandwidth is insufficient due to the excessive amount of uplink messages, which affects the processing speed of the system and becomes a bottleneck of network communication.
[0003] To this end, the message forwarding device can allocate a certain bandwidth for messages of different priorities to ensure that the messages with high priority can pass through the upstream channel without being discarded. This method is applicable to the situation where the upstream channel is occupied by only one message forwarding device, but the upstream channel is often shared by more than two message forwarding devices. At this time, if this method is still used to allocate bandwidth, it may lead to insufficient resource utilization or high-priority messages being discarded, causing abnormalities in the message forwarding device, because each message forwarding device allocates bandwidth independently. Summary of the invention
[0004] The main purpose of the embodiments of the present application is to propose a method, device, system, equipment and storage medium for allocating the bandwidth of an upstream channel, aiming to dynamically adjust the bandwidth of the upstream channel through the cooperation of a cloud platform, so as to allocate reasonable bandwidth within the processing capacity of the CPU of the message forwarding device, and ensure that high-priority upstream messages pass first.
[0005] To achieve the above object, an embodiment of the present application provides a method for allocating bandwidth of an uplink channel, the method being used in a cloud platform, and the method comprising:
[0006] Acquire first information, where the first information includes a CPU utilization rate of a message forwarding device, a remaining processing capacity of a cloud platform, and an upload rate of the message forwarding device;
[0007] Determine the allocatable bandwidth of the message forwarding device according to the first information;
[0008] The allocatable bandwidth is sent to the message forwarding device, so that the message forwarding device allocates the uplink channel bandwidth of the first message according to the allocatable bandwidth and the priority of the first message.
[0009] The embodiment of the present application further provides a method for allocating bandwidth of an uplink channel, the method being used in a message forwarding device, the method comprising:
[0010] Receive an allocatable bandwidth of a message forwarding device sent by a cloud platform, where the allocatable bandwidth is determined by the cloud platform according to first information, wherein the first information includes a CPU utilization rate of the message forwarding device, a remaining processing capacity of the cloud platform, and an upload rate of the message forwarding device;
[0011] The bandwidth of the sending channel of the first message is allocated according to the allocatable bandwidth and the priority of the first message.
[0012] The embodiment of the present application also provides a method for allocating bandwidth of an uplink channel, which is used in a system composed of a cloud platform and a message forwarding device, and the method includes:
[0013] The cloud platform obtains first information, where the first information includes a CPU utilization rate of a message forwarding device, a remaining processing capacity of the cloud platform, and an upload rate of the message forwarding device;
[0014] The cloud platform determines the allocatable bandwidth of the message forwarding device according to the first information;
[0015] The cloud platform sends the allocatable bandwidth to the message forwarding device;
[0016] The message forwarding device receives the allocatable bandwidth;
[0017] The message forwarding device allocates a bandwidth of a sending channel of the first message according to the allocatable bandwidth and a priority of the first message.
[0018] The embodiment of the present application also provides a device for allocating bandwidth of an uplink channel, the device is used in a cloud platform, and the device includes the following modules:
[0019] A bandwidth allocation module, used to obtain first information and determine the allocatable bandwidth of the message forwarding device according to the first information; wherein the first information includes 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;
[0020] The first transceiver module is used to send the allocatable bandwidth to the message forwarding device, so that the message forwarding device allocates the uplink channel bandwidth of the first message according to the allocatable bandwidth and the priority of the first message.
[0021] The embodiment of the present application also provides a device for allocating bandwidth of an uplink channel, the device being used in a message forwarding device, and the device comprising the following modules:
[0022] A second transceiver module is used to receive the allocatable bandwidth of the message forwarding device sent by the cloud platform, where the allocatable bandwidth is determined by the cloud platform according to the first information, wherein the first information includes 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;
[0023] The bandwidth adjustment module is used to allocate the bandwidth of the sending channel of the first message according to the allocatable bandwidth and the priority of the first message.
[0024] The embodiment of the present application also provides a system for allocating bandwidth of an uplink channel, the system comprising the following modules:
[0025] A bandwidth allocation module, used to obtain first information and determine the allocatable bandwidth of the message forwarding device according to the first information; wherein the first information includes 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;
[0026] A first transceiver module, configured to send the allocatable bandwidth to the message forwarding device;
[0027] A second transceiver module, configured to receive the allocatable bandwidth;
[0028] The bandwidth adjustment module is used to allocate the bandwidth of the sending channel of the first message according to the allocatable bandwidth and the priority of the first message.
[0029] An embodiment of the present application also provides a device for allocating bandwidth of an uplink channel, the device comprising a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory, wherein when the program is executed by the processor, the steps of the method for allocating bandwidth of an uplink channel as described above are realized.
[0030] An embodiment of the present application also provides a storage medium for computer-readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the method for allocating bandwidth of an uplink channel as described above.
[0031] The embodiment of the present application provides a method, device, system, equipment and storage medium for allocating bandwidth of an uplink channel, based on 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 uplink rate of the message forwarding device, and then the uplink channel bandwidth is allocated by the message forwarding device in combination with the allocable bandwidth and the priority of the first message, which is the uplink message. In this way, the unified control function of the cloud platform can be used to dynamically allocate available bandwidth as allocable bandwidth to one or more message forwarding devices in the uplink channel according to various factors of the first information, so as to avoid excessive CPU utilization and ensure that the allocable bandwidth of the message forwarding device is within the processing capacity of the CPU of the message forwarding device, which is not only applicable to the situation where the uplink channel is occupied by only one message forwarding device, but also applicable to the situation where the uplink channel is shared by more than two message forwarding devices; in addition, the message forwarding device allocates the uplink channel bandwidth according to the allocable bandwidth and the priority of the first message, so as to ensure that the uplink message with high priority passes first. It can be seen that this technical solution realizes the function of dynamically adjusting the bandwidth of the sending channel of the sent messages, and can allocate reasonable bandwidth within the processing capacity of the CPU of the message forwarding device to ensure that the sent messages with high priority pass first. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in describing the embodiments will be described below.
[0033] Figure 1 It is a network architecture diagram of a distribution system for uplink channel bandwidth according to an embodiment of the present application;
[0034] Figure 2 It is a schematic diagram of the specific structure of the cloud platform and the message forwarding device in the embodiment of the present application;
[0035] Figure 3 This is a flow chart of the method for allocating bandwidth of an uplink channel according to an embodiment of the present application when it is applied to a cloud platform;
[0036] Figure 4 This is a flow chart of a cloud platform acquiring first information in an embodiment of a method for allocating bandwidth of an uplink channel of the present application;
[0037] Figure 5 It is a flow chart of a cloud platform determining the allocatable bandwidth of a message forwarding device according to first information in an embodiment of a method for allocating bandwidth of an uplink channel of the present application;
[0038] Figure 6 It is a flow chart of the method for allocating bandwidth of an uplink channel according to an embodiment of the present application when it is applied to a message forwarding device;
[0039] Figure 7It is a flow chart of allocating the bandwidth of the uplink channel of the first message according to the allocable bandwidth and the priority of the first message by the message forwarding device in the embodiment of the method for allocating the bandwidth of the uplink channel of the present application;
[0040] Figure 8 It is a flow chart of the method for allocating bandwidth of an uplink channel according to an embodiment of the present application when it is applied to a system;
[0041] Fig. 9 It is a structural diagram of the device for allocating bandwidth of an uplink channel according to an embodiment of the present application when it is applied to a cloud platform;
[0042] Fig.10 It is a structural diagram of the device for allocating bandwidth of an uplink channel according to an embodiment of the present application when it is applied to a message forwarding device;
[0043] Fig.11 It is a structural diagram of a device for allocating bandwidth of an upstream channel according to an embodiment of the present application. DETAILED DESCRIPTION
[0044] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0045] The terms "first", "second", "third" and "fourth" etc. in the specification and claims of the present application and the drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0046] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0047] The embodiment of the present application provides a method, device, system, equipment and storage medium for allocating bandwidth of an uplink channel, based on the cloud platform according to the first information such as the CPU utilization rate of the message forwarding device, the remaining processing capacity of the cloud platform and the uplink rate of the message forwarding device, and then the uplink channel bandwidth is allocated by the message forwarding device in combination with the allocable bandwidth and the priority of the first message, which is the uplink message. In this way, the unified control function of the cloud platform can be used to dynamically allocate available bandwidth as allocable bandwidth to one or more message forwarding devices in the uplink channel according to various factors of the first information, so as to avoid excessive CPU utilization and ensure that the allocable bandwidth of the message forwarding device is within the processing capacity of the CPU of the message forwarding device, which is not only applicable to the situation where the uplink channel is occupied by only one message forwarding device, but also applicable to the situation where the uplink channel is shared by more than two message forwarding devices; in addition, the message forwarding device allocates the uplink channel bandwidth according to the allocable bandwidth and the priority of the first message, so as to ensure that the uplink message with high priority passes first. It can be seen that the technical solution of the embodiment of the present application realizes the function of dynamically adjusting the bandwidth of the upstream channel of the uploaded message, and can allocate reasonable bandwidth within the processing capacity of the CPU of the message forwarding device to ensure that the uploaded messages with high priority pass first.
[0048] Based on the above description, the present application embodiment provides a system for allocating bandwidth of an uplink channel. Figure 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 via wired or wireless communication, which is not limited in this application.
[0049] Among them, the cloud platform 200 is mainly responsible for controller resource management, maintaining network resources, and forming a cloud center management and control platform. The cloud platform adopts a centralized management and control method, and monitors the message forwarding device 100 in real time and intelligently adjusts the message forwarding device 100 according to the resource usage status of each message forwarding device 100. The cloud platform 200 can be an independent physical server, or a cloud server cluster or a distributed cloud system composed of multiple physical servers.
[0050] In an optional implementation, the cloud platform 200 can 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. Figure 2 shown.
[0051] Specifically, the first transceiver module 201 is used to receive messages sent by the message forwarding device 100, and send messages sent by the cloud platform 200 to each message forwarding device (such as messages containing bandwidth that can be allocated to each message forwarding device 100, etc.) to the corresponding message forwarding device.
[0052] The queue processing module 202 is used to cache the messages sent by different message forwarding devices 100 through the priority queue after receiving the sent messages sent by each message forwarding device 100, and use the preemptive priority algorithm to process the cached messages in the queues of different priorities. The queue processing module 202 divides the queues into high priority queues, medium priority queues and low priority queues. For example, the messages cached in the high priority queue (i.e., high priority messages) can be but not limited to fault management messages, mutual notification messages between the cloud platform 200 and the message forwarding device 100, etc.; the messages cached in the medium priority queue (i.e., medium priority messages) can be but not limited to the response of the cloud platform 200 to the command issued by the message forwarding device 100 and some keep-alive messages of the access user, etc.; the messages cached in the low priority queue (i.e., low priority messages) are the remaining messages except high priority messages and medium priority messages.
[0053] The queue processing module 202 may process the messages cached in each priority queue according to the following preemptive priority algorithm:
[0054] 1) Prioritize the processing of messages in the high-priority queue cache, then the messages in the medium-priority queue cache, and finally the messages in the low-priority queue cache. In other words, as long as there are messages in the high-priority queue, they will be processed first. After the high-priority queue messages are processed, the messages in the medium and low-priority queues will be processed.
[0055] 2) During the processing of low-priority messages or medium-priority messages, if a high-priority message arrives, the current processing process is interrupted and the high-priority message is processed first. After the processing is completed, the medium-priority message or low-priority message processing is continued.
[0056] 3) Among the messages in the queue buffer of the same priority, the messages transmitted by different message forwarding devices 100 are processed by using a polling scheduling method based on time slices to process the queue buffer messages sent by each message forwarding device 100.
[0057] Optionally, the above processing of the message includes, but is not limited to, sending the message to other servers or devices (such as a monitoring server, a remote monitoring terminal, a control center, etc.).
[0058] The message forwarding device maintenance module 203 is used to maintain the device information table of the message forwarding device 100, so that the cloud platform can monitor the status of each message forwarding device 100. The device information table is shown in Table 1 below.
[0059] Table 1 Equipment information table
[0060]
[0061] The parameters in Table 1 are described as follows:
[0062] (1) Device number: the ID of the packet forwarding device recorded by the cloud platform. The number can be 1, 2, ... n, where n is an integer;
[0063] (2) Last allocated bandwidth (i.e., the last allocatable bandwidth of the message forwarding device): The bandwidth UR(n, T-1) that the cloud platform last allocated to the message forwarding device, where T-1 represents the last time period and T represents the current time period;
[0064] (3) Current sending rate: the current message sending rate CRin(n,T) of the message forwarding device;
[0065] (4) CPU utilization: the current CPU utilization of the packet forwarding device CPU (n, T);
[0066] (5) Packet loss rate: the current packet loss ratio URdrop(n,T) of the message forwarding device;
[0067] (6) Minimum value: The minimum value of the bandwidth that can be allocated to the packet forwarding device (i.e., the allocable bandwidth) is Rmin(n) = CRcar(T) / N, where CRcar(T) represents the total processing capacity of the current cloud platform (based on the performance of the cloud platform and the networking parameter settings), and N is the number of packet forwarding devices managed by the cloud platform;
[0068] (7) Maximum value: the maximum value of the bandwidth that can be allocated to the packet forwarding device (i.e., the allocable bandwidth) Rmax(n) = CRcar(T);
[0069] (8) The bandwidth allocated this time (i.e., the allocatable bandwidth of the current message forwarding device) UR(n, T).
[0070] Optionally, the message forwarding device 100 will count the current upload rate, CPU utilization, packet loss rate and other data in Table 1 once at a fixed time (the time can be set by default or changed), and report the statistical data in the form of a message to the message forwarding device maintenance module 203 of the cloud platform to update the information in the above Table 1.
[0071] The bandwidth allocation module 203 is used to obtain information such as CPU utilization, upload rate, and remaining processing capacity of the cloud platform as the first information, and then calculate the bandwidth (i.e., the allocable bandwidth) allocated to the current message forwarding device 100 using the allocable bandwidth calculation algorithm based on the first information. Specifically, the first information can be obtained by: (1) directly reading from the device information table (i.e., Table 1) of the message forwarding device maintenance module 203 after the message forwarding device 100 establishes a connection with the cloud platform 200; (2) obtaining from the second message sent by the message forwarding device 100, the second message contains a bandwidth allocation request and information such as the current CPU utilization, the current upload rate, etc. At this time, after receiving the second message, the cloud platform can obtain the current CPU utilization and the current upload rate from the second message according to the bandwidth allocation request. At the same time, the cloud platform will 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.
[0072] In an optional implementation, the bandwidth allocation module 203 of the cloud platform can calculate the bandwidth (i.e., the allocable bandwidth) allocated to the current message forwarding device 100 according to the first information in the device information table (i.e., Table 1), and the specific implementation steps are as follows:
[0073] Step 1: Determine a calculation method for allocable bandwidth according to the current CPU utilization, the first threshold, and the second threshold.
[0074] Among them, the first threshold and the second threshold are both preset thresholds, which can be set in advance, and the second threshold is greater than the first threshold. The first threshold can be a baseline CPU utilization rate, which can be a relatively small value (such as 20%, etc.). If the current CPU utilization rate CPU (n, T) is less than the first threshold, it indicates that the CPU utilization rate of the current message forwarding device is not high. At this time, the allocable bandwidth is the bandwidth calculated by the cloud platform (that is, the theoretical value of the allocable bandwidth). The first threshold can be a relatively large value (such as 80%, etc.). If the current CPU utilization rate CPU (n, T) is greater than the second threshold, it indicates that the CPU utilization rate of the message forwarding device is high at this time. In order to avoid exceeding the processing capacity of the message forwarding device, the allocable bandwidth at this time can be set to the minimum value in Table 1.
[0075] Step 2: Calculate the allocatable bandwidth of the message forwarding device according to the calculation method of the allocatable bandwidth obtained in step 1 and the first information in Table 1.
[0076] Specifically, assuming that the initial value of the allocatable bandwidth UR(n, T) of the message forwarding device is URint(n, T) = CRcar(T) / N, and according to the relationship between the allocatable bandwidths of two adjacent times, we have: UR(n, T) = UR(n, T-1) + URmodi(n, T-1), where URmodi(n, T-1) is the bandwidth adjustment value. Considering the influence of the remaining capacity of the cloud platform last time and the proportion of the last uploading message rate, the bandwidth adjustment value can be calculated by the following formula:
[0077]
[0078] Among them, the remaining processing capacity of the cloud platform last time CRremain(T-1) = 2*CRcar-CRinsum(T-1), and the introduction of the coefficient 2 in 2*Crcar is to prevent the cloud platform from discarding more messages due to less allocable bandwidth when multiple message forwarding devices are running at full load (such as sending messages at full load). CRinsum(T-1) is the total message receiving rate of the cloud platform last time.
[0079] In addition, considering the total processing capacity constraint of the cloud platform (that is, 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) can be obtained as follows:
[0080]
[0081] Among them, MIN is the minimum value function.
[0082] Will The theoretical value UR is called the allocatable bandwidth UR(n, T). theory (n, T), that is:
[0083] According to the description of step 1 and formula (1), the allocatable bandwidth of the packet forwarding device can be calculated as follows:
[0084] (1) If the current CPU utilization CPU(n,T) ≥ the second threshold, the allocatable bandwidth UR(n,T) of the packet forwarding device can be set to the minimum value Rmin(n)=CRcar(T) / N in Table 1, which is conducive to reducing the CPU utilization;
[0085] (2) The current CPU utilization CPU(n,T) ≤ the first threshold. The theoretical value of the allocable bandwidth UR(n,T) is UR theory (n, T) will be less than CRcar(T), then the expression of the allocatable bandwidth UR(n, T) of the packet forwarding device can be obtained by formula (1):
[0086]
[0087] (3) The first threshold is less than the current CPU utilization CPU(n,T) and the second threshold. The CPU utilization is moderate. In order to ensure that the number of packets sent by the packet forwarding device does not exceed the bandwidth of the upstream channel and to avoid unnecessary packet loss caused by congestion, the theoretical value of the allocatable bandwidth UR can be calculated. theory (n, T) performs back pressure control to prevent the uplink bandwidth of a message forwarding device from exceeding the bandwidth of the uplink channel. At this time, the allocatable bandwidth UR (n, T) of the message forwarding device is expressed as:
[0088]
[0089] in, is the first threshold (ie, the benchmark CPU utilization).
[0090] The message forwarding device 100 is mainly responsible for its own status control and receiving information reported by the bottom layer (i.e. sending messages). In addition, the message forwarding device 100 is also responsible for receiving messages sent by the cloud platform 200 to each message forwarding device (such as messages containing bandwidth that can be allocated to each message forwarding device 100, etc.) and reporting its own messages that need to be reported regularly (such as the CPU utilization of the message forwarding device 100, the current sending rate, etc.). The message forwarding device 100 can be a router, a switch, a computer terminal, or an access server of the bottom server networking architecture (such as an X86 server, etc.), etc., and has message forwarding capabilities.
[0091] In an optional implementation manner, the message forwarding device 100 can be further divided into an uploading message receiving module 101, a transceiver device management unit 102 and a second transceiver module 103. Figure 2 shown.
[0092] Specifically, the sent message receiving module 101 is used to receive and distinguish the message priority of the sent message, such as 0, 1, 2...pri, etc., where pri is the lowest message priority (such as level 6, etc.).
[0093] The message forwarding device management unit 102 is used to maintain the message information table of the message forwarding device 100 itself, and to allocate the bandwidth of the sending channel of the sent messages of each priority level according to the allocatable bandwidth issued by the cloud platform. Figure 2 As shown, the message forwarding device management unit 102 can be divided into a management module 1021 and a bandwidth adjustment module 1022 .
[0094] The management module 1021 is used to maintain the message information table of the message forwarding device 100 itself, count the current sending rate, comprehensive packet loss number and other data in the message information table at fixed time intervals (the time can be set by default and changed), and report the statistical data to the cloud platform 200 in the form of a message through the second transceiver module 103. The message information table includes parameters such as message priority, current message sending rate, comprehensive packet loss number and currently allocated bandwidth, as shown in Table 2 below.
[0095] Table 2 Message information table
[0096]
[0097] The parameters in Table 2 are described as follows:
[0098] (1) Message priority (can be set or adjusted according to actual needs): 0 is the highest, 1 is the second highest, and so on. For example, 7 priorities can be set: 0, 1, 2...6;
[0099] (2) Current message sending rate: The sending rate Ri of the message with the current message priority i, i = 0, 1, 2, ...
[0100] (3) Comprehensive packet loss number Err[0]: the sum of the packet loss numbers of packets of each packet priority level;
[0101] (4) Bandwidth allocated this time: the bandwidth of the uplink channel allocated to the messages of each message priority level;
[0102] The total bandwidth BW allocated this time is equal to the allocatable bandwidth UR(n, T) issued by the cloud platform, that is: BW=UR(n, T).
[0103] In Table 2, if the message priority is set to three levels 0, 1 and 2, the fault management message, the protocol message communicated between the cloud platform 200 and the message forwarding device 100 are assigned the highest priority 0; the protocol message and keep-alive message sent by the user access are assigned the second priority 1; the update message of the user access information is assigned the lowest priority 2.
[0104] The bandwidth adjustment module 1022 is used to allocate or adjust the bandwidth of the sending channel of each message priority according to the allocable bandwidth issued by the cloud platform and the demand of each priority. The bandwidth adjustment module 1022 can allocate bandwidth to each priority based on the priority allocation method according to the current upload rate and the number of packet losses. The priority-based allocation method follows the principle that 0 priority (highest priority) messages are satisfied first, and 1 priority (second highest priority) messages are satisfied on the premise that 0 priority messages are satisfied, and 2 priority (third highest priority) messages are satisfied on the premise that 1 priority messages are satisfied, and so on, until the allocable bandwidth is allocated or the sending channel bandwidth has been allocated for each message priority. Messages of the same priority can be allocated using a polling mechanism.
[0105] The second transceiver module 103 is used to report the second message containing the bandwidth allocation request or the current upload rate, comprehensive packet loss number and other data counted by the message forwarding device 100 to the cloud platform 200, and receive the allocatable bandwidth and other information issued by the cloud platform 200.
[0106] Taking the access server of the computer terminal networking architecture as an example, the system of this embodiment is applied to allocate bandwidth for uplink messages of the access server, which specifically includes the following steps 1 to 4:
[0107] Step 1: The cloud platform communicates with the access server.
[0108] In one embodiment, the cloud platform may establish a connection with a preset access server and assign a unique identifier to each access server, and the access servers may be centrally managed through the cloud platform.
[0109] After the cloud platform establishes a connection with the access server, the cloud platform may assign a unique identifier to each access server to distinguish each access server. In one embodiment, the identifier may be, for example, a series of digital codes generated according to the number of access servers.
[0110] Step 2: The cloud platform processes the message sent by the access server.
[0111] In one embodiment, the cloud platform can divide the common queue cache into different queues, namely, high priority queue, medium priority queue, and low priority queue, and then use the aforementioned preemptive priority algorithm to process the messages in the queue, namely, first process the high priority queue message, then process the medium priority queue, and finally process the low priority queue. The same priority is processed in a round-robin manner.
[0112] Step 3: The cloud platform calculates the bandwidth of the packets sent by the access server.
[0113] Specifically, the cloud platform can calculate the allocatable bandwidth of the access server according to the first information such as the CPU utilization of the access server, the remaining processing capacity of the cloud platform and the upload rate of the access server according to the aforementioned allocatable bandwidth calculation algorithm, and send the allocatable bandwidth of the access server to the corresponding access server.
[0114] Step 4: The access server adjusts the message bandwidth according to the allocatable bandwidth and the priority of the received message.
[0115] After the cloud platform sends the allocatable bandwidth to the access server, the access server can adjust the bandwidth according to the requirements of each message priority. In one embodiment, the access server can allocate the uplink channel bandwidth to the messages of each message priority according to the current uplink rate and the number of packet losses. The above-mentioned priority-based allocation method can be used when allocating or adjusting the uplink channel bandwidth.
[0116] Based on the description of the above-mentioned system embodiment for allocating bandwidth of an uplink channel, the embodiment of the present invention provides a method for allocating bandwidth of an uplink channel, which can be applied to Figure 1 or Figure 2 In the allocation system of the uplink channel bandwidth shown in FIG. Figure 1 or Figure 2 The cloud platform 200 shown is executed. Figure 3 The method for allocating bandwidth of the uplink channel includes the following steps S301-S303:
[0117] S301. Obtain first information, where the first information includes a CPU utilization rate of a message forwarding device, a remaining processing capacity of a cloud platform, and an upload rate of the message forwarding device.
[0118] Specifically, the CPU utilization of the message forwarding device and the upload rate of the message forwarding device in the first information can be read from the device information table in Table 1, or can be parsed from the second message received in real time by the cloud platform. The remaining processing capacity of the cloud platform is related to the total processing capacity of the cloud platform and the current total received message rate of the cloud platform (that is, the sum of the incoming message rates). Optionally, the cloud platform can set the total processing capacity CRcar of the cloud platform based on performance and networking parameters. As mentioned above, after receiving the uploaded messages sent by each message forwarding device, the cloud platform caches the messages sent by different message forwarding devices through the priority queue. Accordingly, the current total received message rate of the cloud platform can be the sum of the receiving rates of messages of each priority level of the cloud platform, that is:
[0119] CRinsum(T)=CRinsum(high,T)+CRinsum(medium,T)+CRinsum(low,T)
[0120] Among them, CRinsum(T) is the total received message rate in the current time period T;
[0121] CRinsum(high,T): the receiving rate of high-priority messages from the cloud platform in the current time period T;
[0122] CRinsum(medium,T): the receiving rate of medium-priority messages in the cloud platform during the current time period T;
[0123] CRinsum(low,T): The receiving rate of low-priority messages from the cloud platform in the current time period T.
[0124] Therefore, the remaining processing capacity of the cloud platform in the current time period T is CRremain(T)=CRcar-CRinsum(T).
[0125] like Figure 4 As shown, in one embodiment, step S301 can be subdivided into the following steps S3011-S3013:
[0126] S3011. Receive a second message sent by a message forwarding device, where the second message includes a bandwidth allocation request.
[0127] The bandwidth allocation request is used by the message forwarding device to request the cloud platform for allocable bandwidth, so that the message forwarding device can subsequently allocate bandwidth of the uplink channel for the first message to be sent. Optionally, the second message can also include data such as the current uplink rate and the comprehensive packet loss count counted by the message forwarding device, so that the cloud platform can monitor and maintain the status of the message forwarding device.
[0128] S3012, obtaining the current CPU utilization rate of the message forwarding device and the current upload rate of the message forwarding device from the second message, and updating the current CPU utilization rate and the current upload rate to the device information table;
[0129] Specifically, the current CPU utilization and the current sending rate of the message forwarding device can be obtained by parsing the second message and updated to the device information table in Table 1.
[0130] S3013. Obtain the total processing capacity of the cloud platform and the total received message rate of the cloud platform, and then determine the remaining processing capacity of the cloud platform based on the total received message rate and the total processing capacity.
[0131] As mentioned above, the total processing capacity of the cloud platform can be set according to the performance and networking parameters, and the total receiving message rate of the cloud platform can be the sum of the receiving rates of messages of various priorities of the cloud platform. The remaining processing capacity of the cloud platform can be obtained by subtracting the total receiving message rate of the cloud platform from the total processing capacity of the cloud platform.
[0132] like Figure 4 As shown, in one embodiment, step S301 may further include the following steps S3014-S3015:
[0133] S3014. Cache the second message into a priority queue according to the priority, where the priority queue is a high priority queue, a medium priority queue, or a low priority queue.
[0134] Specifically, the cloud platform can divide the queues into queues of different priorities, namely, a high priority queue, a medium priority queue and a low priority queue. When receiving the second message from different message forwarding devices, it can be cached in the corresponding queue according to the priority, waiting for the cloud platform to perform subsequent processing.
[0135] S3015. Use a preemptive priority algorithm to process the second message cached in the priority queue.
[0136] Specifically, the cloud platform may use the following preemptive priority algorithm to process the second message cached by the priority queue:
[0137] 1) Prioritize the processing of messages in the high-priority queue cache, then the messages in the medium-priority queue cache, and finally the messages in the low-priority queue cache. In other words, as long as there are messages in the high-priority queue, they will be processed first. After the high-priority queue messages are processed, the messages in the medium and low-priority queues will be processed.
[0138] 2) During the processing of low-priority messages or medium-priority messages, if a high-priority message arrives, the current processing process is interrupted and the high-priority message is processed first. After the processing is completed, the medium-priority message or low-priority message processing is continued.
[0139] 3) Among the messages in the queue buffer of the same priority, the messages transmitted by different message forwarding devices 100 are processed by using a polling scheduling method based on time slices to process the queue buffer messages sent by each message forwarding device 100.
[0140] The cloud platform of the embodiment of the present application first caches the received messages in queues of different priorities, and then uses a preemptive priority algorithm to process the cached messages in the queues, so that high-priority messages are processed first, thereby allowing key businesses to provide services uninterruptedly.
[0141] S302: Determine the allocatable bandwidth of the message forwarding device according to the first information.
[0142] In one embodiment, if Figure 5 As shown, step S302 can be subdivided into steps S3021-S3022:
[0143] S3021, determining a calculation method for allocable bandwidth according to a current CPU utilization rate of the message forwarding device, a preset first threshold, and a preset second threshold;
[0144] S3022: Determine the allocatable bandwidth of the message forwarding device according to the first information and a method for calculating the allocatable bandwidth.
[0145] Specifically, the first threshold and the second threshold are both preset thresholds, which can be set in advance, and the second threshold is greater than the first threshold. The first threshold can be a baseline CPU utilization, which can be a relatively small value (such as 20%, etc.). If the current CPU utilization CPU (n, T) is less than the first threshold, it indicates that the CPU utilization of the current message forwarding device is not high. At this time, the allocable bandwidth is the bandwidth calculated by the cloud platform (that is, the theoretical value of the allocable bandwidth). The first threshold can be a relatively large value (such as 80%, etc.). 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. In order to avoid exceeding the processing capacity of the message forwarding device, the allocable bandwidth at this time can be set to the minimum value in Table 1.
[0146] Assume that the initial value of the allocatable bandwidth UR(n, T) of the message forwarding device is URint(n, T) = CRcar(T) / N, and according to the relationship between the allocatable bandwidths of two adjacent times, we have: UR(n, T) = UR(n, T-1) + URmodi(n, T-1), where URmodi(n, T-1) is the bandwidth adjustment value. Considering the influence of the last remaining capacity of the cloud platform and the last proportion of the sent message rate, the bandwidth adjustment value can be calculated by the following formula:
[0147]
[0148] Among them, the remaining processing capacity of the cloud platform last time CRremain(T-1) = 2*CRcar-CRinsum(T-1), and the introduction of the coefficient 2 in 2*Crcar is to prevent the cloud platform from discarding more messages due to less allocable bandwidth when multiple message forwarding devices are running at full load (such as sending messages at full load). CRinsum(T-1) is the total message receiving rate of the cloud platform last time.
[0149] In addition, considering the total processing capacity constraint of the cloud platform (ie, 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) shown in formula (1) can be obtained.
[0150] Will The theoretical value UR is called the allocatable bandwidth UR(n, T). theory (n, T), that is:
[0151] Therefore, the allocatable bandwidth of the packet forwarding device can be calculated as follows:
[0152] (1) If the current CPU utilization CPU(n,T) ≥ the second threshold, the allocatable bandwidth UR(n,T) of the packet forwarding device can be set to the minimum value Rmin(n)=CRcar(T) / N in Table 1, which is conducive to reducing the CPU utilization;
[0153] (2) The current CPU utilization CPU(n,T) ≤ the first threshold. The theoretical value of the allocable bandwidth UR(n,T) is UR theory (n, T) will be less than CRcar(T), then the expression of the allocatable bandwidth UR(n, T) of the packet forwarding device can be obtained by formula (1):
[0154]
[0155] (3) The first threshold is less than the current CPU utilization CPU(n,T) and the second threshold. The CPU utilization is moderate. In order to ensure that the number of packets sent by the packet forwarding device does not exceed the bandwidth of the upstream channel and to avoid unnecessary packet loss caused by congestion, the theoretical value of the allocatable bandwidth UR can be calculated. theory (n, T) performs back pressure control (i.e., reduces the allocatable bandwidth of the message forwarding device) to prevent the uplink bandwidth of a message forwarding device from exceeding the bandwidth of the uplink channel. At this time, the allocatable bandwidth UR (n, T) of the message forwarding device is expressed as:
[0156]
[0157] in, is the first threshold (i.e., the benchmark CPU utilization). Back pressure control coefficient By taking the square root back pressure control method, the (decline) change of the allocatable bandwidth of the message forwarding device can be made smoother, thereby improving the stability of the system.
[0158] S303: Send the allocatable bandwidth to the message forwarding device, so that the message forwarding device allocates the uplink channel bandwidth of the first message according to the allocatable bandwidth and the priority of the first message.
[0159] Specifically, the number of message forwarding devices controlled by the cloud platform can be one or more, and this application does not make specific restrictions on this. It is understandable that when there are multiple message forwarding devices, after the cloud platform calculates the allocatable bandwidth of each message forwarding device, it will send the calculated allocatable bandwidth to the corresponding message forwarding device respectively, so as to uniformly allocate bandwidth to each message forwarding device in the uplink channel.
[0160] The first message is a message sent from the message forwarding device to the server or other monitoring device, which can be a fault management message, a keep-alive message for the access user, etc. Similar to the second message, the first message also has a priority, such as 0 (highest priority), 1, 2...pri (lowest priority). Therefore, when allocating bandwidth for the upstream channel, the message forwarding device can adjust the bandwidth priority of the upstream channel according to the needs of each priority, give priority to the message with 0 priority (highest priority), and satisfy the message with 1 priority (second highest priority) on the premise of satisfying the message with 0 priority, and satisfy the message with 2 priority (third highest priority) on the premise of satisfying the message with 1 priority, and so on, until the allocable bandwidth is allocated or the upstream channel bandwidth has been allocated for each message priority. Messages of the same priority can be allocated using a polling mechanism.
[0161] In summary, the cloud platform of the embodiment of the present application determines the allocatable bandwidth of the message forwarding device 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 uploading rate of the message forwarding device, and then allocates the bandwidth of the uploading channel through the message forwarding device in combination with the allocatable bandwidth and the priority of the first message, which is the uploading message. In this way, the unified control function of the cloud platform can be used to dynamically allocate available bandwidth as allocatable bandwidth to one or more message forwarding devices in the uploading channel according to various factors of the first information, so as to avoid excessive CPU utilization and ensure that the allocatable bandwidth of the message forwarding device is within the processing capacity of the CPU of the message forwarding device, which is not only applicable to the situation where the uploading channel is occupied by only one message forwarding device, but also applicable to the situation where the uploading channel is shared by more than two message forwarding devices; in addition, the message forwarding device allocates the bandwidth of the uploading channel according to the allocatable bandwidth and the priority of the first message, so as to ensure that the uploading message with high priority passes first. It can be seen that this technical solution realizes the function of dynamically adjusting the bandwidth of the sending channel of the sent messages, and can allocate reasonable bandwidth within the processing capacity of the CPU of the message forwarding device to ensure that the sent messages with high priority pass first.
[0162] Based on the description of the above-mentioned system embodiment for allocating bandwidth of an uplink channel, the embodiment of the present invention provides a method for allocating bandwidth of an uplink channel, which can be applied to Figure 1 or Figure 2 In the allocation system of the uplink channel bandwidth shown in FIG. Figure 1 or Figure 2 The packet forwarding device 100 shown in FIG. Figure 6 The method for allocating bandwidth of the uplink channel includes the following steps S602-S603:
[0163] S602. Receive the allocatable bandwidth of the message forwarding device sent by the cloud platform, wherein the allocatable bandwidth is determined by the cloud platform according to the bandwidth allocation request and first information, and the first information includes 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.
[0164] Specifically, the allocatable bandwidth of the message forwarding device can be used by the cloud platform Figure 3-Figure 5 After the cloud platform calculates the allocatable bandwidth of the message forwarding device, it will send the calculated allocatable bandwidth to the corresponding message forwarding device.
[0165] As described above, after the message forwarding device 100 establishes a connection with the cloud platform 200, the cloud platform can directly read the first information from the device information table (i.e., Table 1) of the message forwarding device maintenance module 203, or obtain the first information from the second message containing the bandwidth allocation request sent by the message forwarding device 100. Optionally, if the cloud platform obtains the first information from the second message containing the bandwidth allocation request sent by the message forwarding device 100, the method for allocating the bandwidth of the sent channel will also include the following steps S601 before step S602, such as Figure 6 As shown:
[0166] S601. Send a bandwidth allocation request to the cloud platform.
[0167] Different from the prior art in which the message forwarding device itself allocates bandwidth for the uplink channel, considering that the uplink channel will be shared by more than two message forwarding devices, the message forwarding device of the embodiment of the present application will first send a bandwidth allocation request to the cloud platform when allocating bandwidth for the uplink channel, so as to request the cloud platform to allocate bandwidth to each message forwarding device as the allocable bandwidth. Optionally, the bandwidth allocation request is sent to the cloud platform in the form of a second message. The second message may also include data such as the current uplink rate and the comprehensive packet loss count counted by the message forwarding device, so that the cloud platform can monitor and maintain the status of the message forwarding device through the device information table in Table 1.
[0168] S603: Allocate a bandwidth of a sending channel of the first message according to the allocable bandwidth and the priority of the first message.
[0169] like Figure 7 As shown, step S603 can be further divided into the following steps:
[0170] S6031. Obtaining priorities of each message of the first message;
[0171] Specifically, the first message is a message sent from the message forwarding device to the server or other monitoring device, which may be a fault management message, a keep-alive message of the access user, etc. Similar to the second message, the first message also has a priority, such as 0 (highest priority), 1, 2...pri (lowest priority). Taking the message priority of 0, 1 and 2 as an example, the message of 0 priority (i.e., the highest priority) may be, but not limited to, a fault management message, a mutual notification message between the cloud platform and the message forwarding device, etc.; the message of 1 priority (i.e., the second highest priority) may be, but not limited to, the response of the cloud platform to the command issued by the message forwarding device and some keep-alive messages of the access user, etc.; the message of 2 priority (i.e., the lowest priority message) is the rest of the messages except the 0 priority message and the 1 priority message. Optionally, after receiving the uploading message (i.e., the first message) through the uploading message receiving module 101, the message forwarding device may distinguish the message priority of the uploading message and update the message priority to the message information table of Table 2.
[0172] S6032. Obtain the current message sending rate and number of packet losses of each message priority;
[0173] Specifically, after obtaining the message priority, the corresponding current message sending rate and number of packet losses can be found from Table 2 by looking up the table.
[0174] S6033. According to the current message sending rate and the number of packet losses, use a priority-based allocation method to allocate a sending channel bandwidth for the first message of each message priority, wherein the priority-based allocation method allocates the sending channel bandwidth in descending order of message priority.
[0175] Here, the current message uploading rate can determine the rate at which the first message sent by the message device is transmitted in the uploading channel. In some embodiments, to meet the message uploading demand, the uploading channel bandwidth allocated by the message forwarding device to the first message can be greater than or equal to the current message uploading rate.
[0176] The number of packet losses (packet loss rate) in the current cycle can reflect the probability of packet loss that may occur in the process of the message device sending the first message. The greater the number of packet losses in the current cycle, the higher the possibility of packet loss. Those skilled in the art can understand that when the message forwarding device allocates the uplink channel bandwidth for the first message, it can allocate more uplink channel bandwidth for the message with a higher number of packet losses to prevent the phenomenon of packet loss of the uplink message due to insufficient uplink channel bandwidth.
[0177] In some embodiments, in order to ensure uninterrupted service of key services, and to ensure that high-priority messages are sent up first (i.e., sent through the sending channel first), the message forwarding device can use a priority-based allocation method to allocate or adjust the sending channel bandwidth for the first message of each message priority. Specifically, based on the priority allocation method, the sending channel bandwidth can be allocated in order from high to low according to the message priority, and the bandwidth requirements of high-priority messages can be met first. After the bandwidth requirements of high-priority messages are met, the bandwidth requirements of low-priority messages can be met, until the allocable bandwidth is allocated or the sending channel bandwidth has been allocated for each message priority, and the messages of the same priority can be allocated using a polling mechanism. Taking the messages of the three priorities 0, 1 and 2 as examples, when allocating the sending channel bandwidth, the priority-based allocation method gives priority to the messages of 0 priority (highest priority), and satisfies the messages of 1 priority (second highest priority) on the premise of satisfying the messages of 0 priority, and satisfies the messages of 2 priority (third highest priority) on the premise of satisfying the messages of 1 priority.
[0178] After the message forwarding device allocates the bandwidth of the uplink channel for the first message, the first message can be uploaded to the cloud platform through the uplink channel, and then the cloud platform sends the first message to the server or other devices (such as remote monitoring terminals, remote servers, control centers, etc.). The first message can also be sent to the server or other devices (such as remote monitoring terminals, remote servers, control centers, etc.) through the uplink channel without passing through the cloud platform.
[0179] In summary, the message forwarding device of the embodiment of the present application sends a bandwidth allocation request to the cloud platform, and then 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 uploading rate of the message forwarding device, and finally allocates the uploading channel bandwidth in combination with the allocable bandwidth and the priority of the first message, which is the uploading message. In this way, the unified control function of the cloud platform can be used to dynamically allocate available bandwidth as allocable bandwidth to one or more message forwarding devices in the uploading channel according to various factors of the first information, so as to avoid excessive CPU utilization and ensure that the allocable bandwidth of the message forwarding device is within the processing capacity of the CPU of the message forwarding device, which is not only applicable to the situation where the uploading channel is occupied by only one message forwarding device, but also applicable to the situation where the uploading channel is shared by more than two message forwarding devices; in addition, the message forwarding device allocates the uploading channel bandwidth according to the allocable bandwidth and the priority of the first message, so as to ensure that the uploading message with high priority passes first. It can be seen that this technical solution realizes the function of dynamically adjusting the bandwidth of the sending channel of the sent messages, and can allocate reasonable bandwidth within the processing capacity of the CPU of the message forwarding device to ensure that the sent messages with high priority pass first.
[0180] Based on the description of the above-mentioned system embodiment for allocating bandwidth of an uplink channel, the embodiment of the present invention provides a method for allocating bandwidth of an uplink channel, which can be applied to Figure 1 or Figure 2 In the allocation system of the uplink channel bandwidth shown in FIG. Figure 1 or Figure 2 The packet forwarding device 100 and the cloud platform 200 shown in FIG. Figure 8 The method for allocating bandwidth of the uplink channel includes the following steps S802-S805:
[0181] S802. The cloud platform obtains first information, where the first information includes a CPU utilization rate of the message forwarding device, a remaining processing capacity of the cloud platform, and an upload rate of the message forwarding device.
[0182] As described above, after the message forwarding device 100 establishes a connection with the cloud platform 200, the cloud platform can directly read the first information from the device information table (i.e., Table 1) of the message forwarding device maintenance module 203, or obtain the first information from the second message containing the bandwidth allocation request sent by the message forwarding device 100. Optionally, if the cloud platform obtains the first information from the second message containing the bandwidth allocation request sent by the message forwarding device 100, the method for allocating the bandwidth of the sent channel will also include the following steps S801 before step S802, such as Figure 8 As shown:
[0183] S801. The message forwarding device sends a bandwidth allocation request to the cloud platform.
[0184] Different from the prior art in which the message forwarding device itself allocates bandwidth for the uplink channel, considering that the uplink channel may be shared by more than two message forwarding devices, the message forwarding device of the embodiment of the present application will first send a bandwidth allocation request to the cloud platform when allocating bandwidth for the uplink channel, so as to request the cloud platform to allocate bandwidth to each message forwarding device as the allocable bandwidth. Optionally, the bandwidth allocation request is sent to the cloud platform in the form of a second message. The second message may also include data such as the current uplink rate and the comprehensive packet loss count counted by the message forwarding device, so that the cloud platform can monitor and maintain the status of the message forwarding device through the device information table in Table 1.
[0185] S803: The cloud platform determines the allocatable bandwidth of the message forwarding device according to the first information.
[0186] Specifically, the cloud platform can adopt Figure 3-Figure 5 The method of the embodiment shown in any figure calculates the allocatable bandwidth of the message forwarding device.
[0187] S804: The cloud platform sends the allocatable bandwidth to the message forwarding device.
[0188] Specifically, after the cloud platform calculates the allocatable bandwidth of the message forwarding device, it sends the calculated allocatable bandwidth to the corresponding message forwarding device, so that the message forwarding device can subsequently allocate bandwidth for each sent message.
[0189] S805: The message forwarding device allocates a bandwidth of a sending channel of the first message according to the allocatable bandwidth and the priority of the first message.
[0190] Specifically, the message forwarding device can use Figure 6 or Figure 7 The method of the illustrated embodiment allocates bandwidth of the uplink channel for the first message.
[0191] After the message forwarding device allocates the bandwidth of the uplink channel for the first message, the first message can be uploaded to the cloud platform through the uplink channel, and then the cloud platform sends the first message to the server or other devices (such as remote monitoring terminals, remote servers, control centers, etc.). The first message can also be sent to the server or other devices (such as remote monitoring terminals, remote servers, control centers, etc.) through the uplink channel without passing through the cloud platform.
[0192] In summary, the message forwarding device of the embodiment of the present application sends a bandwidth allocation request to the cloud platform, and the cloud platform determines the allocatable bandwidth based on the first information such as the CPU utilization of the message forwarding device, the remaining processing capacity of the cloud platform, and the uploading rate of the message forwarding device, and returns it to the message forwarding device. Finally, the message forwarding device allocates the bandwidth of the uploading channel in combination with the allocatable bandwidth and the priority of the first message, which is the uploading message. In this way, the unified control function of the cloud platform can be used to dynamically allocate available bandwidth as allocatable bandwidth to one or more message forwarding devices in the uploading channel according to various factors of the first information, so as to avoid excessive CPU utilization and ensure that the allocatable bandwidth of the message forwarding device is within the processing capacity of the CPU of the message forwarding device. This is not only applicable to the situation where the uploading channel is occupied by only one message forwarding device, but also applicable to the situation where the uploading channel is shared by more than two message forwarding devices; in addition, the message forwarding device allocates the bandwidth of the uploading channel based on the allocatable bandwidth and the priority of the first message, so as to ensure that the uploading message with high priority passes first. It can be seen that this technical solution realizes the function of dynamically adjusting the bandwidth of the sending channel of the sent messages, and can allocate reasonable bandwidth within the processing capacity of the CPU of the message forwarding device to ensure that the sent messages with high priority pass first.
[0193] Based on the description of the above-mentioned method for allocating bandwidth of an uplink channel, the present application also provides a device for allocating bandwidth of an uplink channel. The device for allocating bandwidth of an uplink channel can be applied to Figure 1 or Figure 2In the above-mentioned uplink channel bandwidth allocation system, the uplink channel bandwidth allocation device can be operated at Figure 1 or Figure 2 The cloud platform 200 shown. Fig. 9 As shown, the device for allocating bandwidth of the uplink channel includes the following modules:
[0194] The bandwidth allocation module 901 is used to obtain first information and determine the allocatable bandwidth of the message forwarding device according to the first information; wherein the first information includes the CPU utilization of the message forwarding device, the remaining processing capacity of the cloud platform, and the uploading rate of the message forwarding device;
[0195] The first transceiver module 902 is used to send the allocatable bandwidth to the message forwarding device, so that the message forwarding device allocates the uplink channel bandwidth of the first message according to the allocatable bandwidth and the priority of the first message.
[0196] The embodiment of the present application is Figure 3 The method embodiments applied to the cloud platform correspond to the device embodiments one by one, Figure 3 The contents of the method embodiment applied to the cloud platform are all applicable to the present device embodiment, and the functions specifically implemented by the present device embodiment are the same as those in the present device embodiment. Figure 3 The method embodiment applied to the cloud platform is the same, and the beneficial effects achieved are the same as Figure 3 The beneficial effects achieved by the method embodiments applied to the cloud platform are also the same.
[0197] Based on the description of the above-mentioned method for allocating bandwidth of an uplink channel, the present application also provides a device for allocating bandwidth of an uplink channel. The device for allocating bandwidth of an uplink channel can be applied to Figure 1 or Figure 2 In the above-mentioned uplink channel bandwidth allocation system, the uplink channel bandwidth allocation device can be operated at Figure 1 or Figure 2 The packet forwarding device 100 shown in FIG. Fig.10 As shown, the device for allocating bandwidth of the uplink channel includes the following modules:
[0198] The second transceiver module 1001 is used to receive the allocatable bandwidth of the message forwarding device sent by the cloud platform, where the allocatable bandwidth is determined by the cloud platform according to the first information, wherein the first information includes 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;
[0199] The bandwidth adjustment module 1002 is used to allocate the bandwidth of the uplink channel of the first message according to the allocatable bandwidth and the priority of the first message.
[0200] The embodiment of the present application is Figure 6The method embodiments applied to the message forwarding device correspond to the device embodiments one by one, Figure 6 The contents of the method embodiment applied to the message forwarding device are all applicable to the embodiment of the present device, and the functions specifically implemented by the embodiment of the present device are the same as those of the present invention. Figure 6 The method embodiment applied to the message forwarding device is the same as that of the embodiment of the present invention, and the beneficial effects achieved are the same as those of the embodiment of the present invention. Figure 6 The beneficial effects achieved by the method embodiment applied to the message forwarding device are also the same.
[0201] Based on the description of the above-mentioned method for allocating bandwidth of an uplink channel, the present application also provides a device for allocating bandwidth of an uplink channel. The device for allocating bandwidth of an uplink channel can be applied to Figure 1 or Figure 2 In the distribution system of the uplink channel bandwidth shown in FIG. Fig.11 As shown, the device includes a memory 1101, a processor 1102, a program 1103 stored in the memory 1101 and executable on the processor 1102, and a data bus 1104 for realizing connection and communication between the processor 1102 and the memory 1101. When the program 1103 is executed by the processor 1102, the following is realized: Figure 3-7 The steps of the method for allocating bandwidth of an uplink channel shown in any figure.
[0202] Figure 3-7 The contents of the method embodiment shown in any figure are applicable to the embodiment of the present device, and the functions specifically implemented by the embodiment of the present device are the same as those in the embodiment of the present device. Figure 3-7 The method embodiments shown in any of the figures are the same and the beneficial effects achieved are the same as those Figure 3-7 The beneficial effects achieved by the method embodiments shown in any of the figures are also the same.
[0203] The embodiment of the present application also provides a storage medium for computer-readable storage, the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the following. Figure 3-7 The steps of the method for allocating bandwidth of an uplink channel shown in any figure.
[0204] It is understood that all or some steps and systems in the disclosed method above can be implemented as software, firmware, hardware and appropriate combinations thereof. Some physical components or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, and the computer-readable medium can include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium). As known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassette, magnetic tape, disk storage or other magnetic storage device, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that 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 may include any information delivery media.
[0205] The embodiments of the present invention are described in detail above 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 scope of ordinary technicians in the technical field without departing from the purpose of the present invention.
Claims
1. A method for allocating bandwidth of an uplink channel, comprising: Acquire first information, where the first information includes a CPU utilization rate of a message forwarding device, a remaining processing capacity of a cloud platform, and an upload rate of the message forwarding device; Comparing the CPU utilization of the message forwarding device with a preset first threshold and a preset second threshold to obtain a comparison result, wherein the second threshold is greater than the first threshold; Determine the allocatable bandwidth of the message forwarding device according to the comparison result, the last remaining processing capacity of the cloud platform, the last uploading rate of the message forwarding device, and the last uploading rate of each message forwarding device of the cloud platform; The allocatable bandwidth is sent to the message forwarding device, so that the message forwarding device allocates the uplink channel bandwidth of the first message according to the allocatable bandwidth and the priority of the first message.
2. The method for allocating bandwidth of an uplink channel according to claim 1, characterized in that: The cloud platform maintains a device information table of the message forwarding device; The obtaining of the first information includes: receiving a second message sent by the message forwarding device, wherein the second message includes a bandwidth allocation request; Acquire the CPU utilization and the upload rate from the second message, and update the CPU utilization and the upload rate to the device information table; The total processing capacity of the cloud platform and the total received message rate of the cloud platform are obtained, and then the remaining processing capacity of the cloud platform is determined according to the total received message rate of the cloud platform and the total processing capacity of the cloud platform.
3. The method for allocating bandwidth of an uplink channel according to claim 2, characterized in that: The obtaining of the first information further includes: 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; A preemptive priority algorithm is used to process the second message cached in the priority queue.
4. The method for allocating bandwidth of an uplink channel according to claim 1, characterized in that: The allocatable bandwidth of the message forwarding device is determined by the following steps: Determine that the current CPU utilization is less than or equal to the first threshold, obtain the total processing capacity of the cloud platform, determine the theoretical value of the allocatable bandwidth according to the last allocatable bandwidth of the message forwarding device, the last remaining processing capacity of the cloud platform, and the last upload rate, and then determine the allocatable bandwidth of the message forwarding device according to the total processing capacity of the cloud platform and the theoretical value; Alternatively, it is determined that the current CPU utilization is greater than the first threshold and less than the second threshold, and a theoretical value of the allocatable bandwidth is determined according to the last allocatable bandwidth of the message forwarding device, the last remaining processing capacity of the cloud platform, and the last upload rate, and then back pressure control is performed on the theoretical value according to the current CPU utilization and the first threshold to obtain the allocatable bandwidth of the message forwarding device; Alternatively, determine that the current CPU utilization is greater than or equal to the second threshold, obtain the total processing capacity of the cloud platform and the number of the message forwarding devices, and determine the allocatable bandwidth of the message forwarding device based on the total processing capacity of the cloud platform and the number of the message forwarding devices.
5. The method for allocating bandwidth of an uplink channel according to claim 2 or 3, characterized in that: The device information table also includes the device number of the message forwarding device, the packet loss rate of the message forwarding device, the maximum value of the allocatable bandwidth, the minimum value of the allocatable bandwidth, the last allocatable bandwidth of the message forwarding device and the current allocatable bandwidth of the message forwarding device.
6. A method for allocating bandwidth of an uplink channel, comprising: Receive the allocatable bandwidth of the message forwarding device sent by the cloud platform; Allocate a bandwidth of a sending channel of the first message according to the allocable bandwidth and a priority of the first message; The first information includes 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; the allocatable bandwidth is determined by the following steps: Comparing the CPU utilization of the message forwarding device with a preset first threshold and a preset second threshold to obtain a comparison result, wherein the second threshold is greater than the first threshold; The allocatable bandwidth of the message forwarding device is determined according to the comparison result, the last remaining processing capacity of the cloud platform, the last upload rate of the message forwarding device, and the last upload rate of each message forwarding device of the cloud platform.
7. The method for allocating bandwidth of an uplink channel according to claim 6, characterized in that: The allocating the uplink channel bandwidth of the first message according to the allocable bandwidth and the priority of the first message includes: Obtaining multiple message priorities of the first message; Obtain the current message sending rate and number of packet losses for each of the message priorities; According to the current message upload rate and the number of packet losses, a priority-based allocation method is used to allocate an upload channel bandwidth to the first message of each message priority, and the priority-based allocation method allocates the upload channel bandwidth in descending order of the message priority.
8. The method for allocating bandwidth of an uplink channel according to claim 6, characterized in that: The message forwarding device maintains a message information table, wherein the message information table includes message priority, current message sending rate, number of packet losses and current allocatable bandwidth; the method further comprises: The message information table is counted and updated at preset time intervals, and the information in the message information table is sent to the cloud platform.
9. A method for allocating bandwidth of an uplink channel, comprising: The cloud platform obtains first information, where the first information includes a CPU utilization rate of a message forwarding device, a remaining processing capacity of the cloud platform, and an upload rate of the message forwarding device; The cloud platform determines the allocatable bandwidth of the message forwarding device according to the first information; The cloud platform sends the allocatable bandwidth to the message forwarding device; The message forwarding device receives the allocatable bandwidth; The message forwarding device allocates a bandwidth of a sending channel of the first message according to the allocatable bandwidth and a priority of the first message; The determining, according to the first information, the allocatable bandwidth of the message forwarding device includes: Comparing the CPU utilization of the message forwarding device with a preset first threshold and a preset second threshold to obtain a comparison result, wherein the second threshold is greater than the first threshold; The allocatable bandwidth of the message forwarding device is determined according to the comparison result, the last remaining processing capacity of the cloud platform, the last upload rate of the message forwarding device, and the last upload rate of each message forwarding device of the cloud platform.
10. A device for allocating bandwidth of an uplink channel, comprising the following modules: The bandwidth allocation module is used to obtain first information and determine the allocatable bandwidth of the message forwarding device according to the first information; wherein, The first information includes the CPU utilization of the message forwarding device, the remaining processing capacity of the cloud platform, and the sending rate of the message forwarding device; A first transceiver module, configured to send the allocatable bandwidth to the message forwarding device, so that the message forwarding device allocates a bandwidth of a sending channel of the first message according to the allocatable bandwidth and a priority of the first message; The determining, according to the first information, the allocatable bandwidth of the message forwarding device includes: Comparing the CPU utilization of the message forwarding device with a preset first threshold and a preset second threshold to obtain a comparison result, wherein the second threshold is greater than the first threshold; The allocatable bandwidth of the message forwarding device is determined according to the comparison result, the last remaining processing capacity of the cloud platform, the last upload rate of the message forwarding device, and the last upload rate of each message forwarding device of the cloud platform.
11. A device for allocating bandwidth of an uplink channel, comprising the following modules: The second transceiver module is used to receive the allocatable bandwidth of the message forwarding device sent by the cloud platform; A bandwidth adjustment module, configured to allocate a bandwidth of a sending channel of the first message according to the allocatable bandwidth and a priority of the first message; in, The first information includes the CPU utilization of the message forwarding device, the remaining processing capacity of the cloud platform, and the uploading rate of the message forwarding device; the allocatable bandwidth is determined by the following steps: Comparing the CPU utilization of the message forwarding device with a preset first threshold and a preset second threshold to obtain a comparison result, wherein the second threshold is greater than the first threshold; The allocatable bandwidth of the message forwarding device is determined according to the comparison result, the last remaining processing capacity of the cloud platform, the last upload rate of the message forwarding device, and the last upload rate of each message forwarding device of the cloud platform.
12. A system for allocating bandwidth of an uplink channel, comprising the following modules: The bandwidth allocation module is used to obtain first information and determine the allocatable bandwidth of the message forwarding device according to the first information; wherein, The first information includes the CPU utilization of the message forwarding device, the remaining processing capacity of the cloud platform, and the sending rate of the message forwarding device; A first transceiver module, configured to send the allocatable bandwidth to the message forwarding device; A second transceiver module, configured to receive the allocatable bandwidth; A bandwidth adjustment module, configured to allocate a bandwidth of a sending channel of the first message according to the allocatable bandwidth and a priority of the first message; The determining, according to the first information, the allocatable bandwidth of the message forwarding device includes: Comparing the CPU utilization of the message forwarding device with a preset first threshold and a preset second threshold to obtain a comparison result, wherein the second threshold is greater than the first threshold; The allocatable bandwidth of the message forwarding device is determined according to the comparison result, the last remaining processing capacity of the cloud platform, the last upload rate of the message forwarding device, and the last upload rate of each message forwarding device of the cloud platform.
13. A device for allocating bandwidth of an uplink channel, characterized in that: The device includes a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory. When the program is executed by the processor, the steps of the method for allocating bandwidth of an uplink channel as described in any one of claims 1 to 8 are realized.
14. A storage medium for computer-readable storage, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the method for allocating bandwidth of an uplink channel according to any one of claims 1 to 8.
Citation Information
Patent Citations
Optical fiber wireless convergence network resource allocation mechanism and income calculation method
CN110519798A
Method for Contolling Uplink Transmit Power in Inter-Base Station Carrier Aggregation, Base Station, and Device
US20160044611A1