Bandwidth allocation method and device, equipment and storage medium

By periodically obtaining the current regional bandwidth and node water level in the content distribution network, and intelligent bandwidth allocation is performed based on the node water level, the low local rate and node overload caused by improper bandwidth allocation during peak service is solved, and the operation efficiency and service quality of the content distribution network are improved.

CN119583478APending Publication Date: 2025-03-07BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411775358.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

In the content distribution network, in order to avoid overloading of regional nodes during peak service periods, bandwidth will be allocated to nodes in other regions, resulting in low local rates. If the bandwidth is rolled back regularly to increase the local rate, nodes will be overloaded, affecting the operation of the content distribution network.

Method used

By periodically obtaining the bandwidth of the current region and the current node water level of the regional node, the bandwidth is allocated according to the node water level, and priority is allocated to the regional nodes to ensure that the node water level is within a safe range and avoiding excessive bandwidth concentration in a single node.

Benefits of technology

It effectively avoids the negative impact of local rate regular rollback on the content distribution network, avoids node overload, and improves the operating efficiency and service quality of the content distribution network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119583478A_ABST
    Figure CN119583478A_ABST
Patent Text Reader

Abstract

The invention relates to a bandwidth allocation method and device, equipment and a storage medium, and the method comprises the steps: periodically obtaining all bandwidths of a current region and a current node water level of at least one region node, the region node being a node in the current region; according to the current node water level of each regional node, allocating the bandwidth to obtain a first allocation result; when the remaining bandwidth which is not allocated does not exist, issuing the task in real time according to the first allocation result; and when the remaining bandwidth which is not allocated exists, determining a second allocation result according to the current region and the remaining bandwidth, and issuing the task in real time according to the first allocation result and the second allocation result. According to the method, the influence of regular rollback of the local rate on the content distribution network can be avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a bandwidth allocation method, apparatus, device and storage medium. Background Art

[0002] Content Delivery Network (CDN) is an intelligent virtual network built on the existing network. It mainly relies on edge servers deployed in various places. Through the load balancing, content distribution, scheduling and other functional modules of the central platform, users can obtain the required content nearby, reduce network congestion, and improve user access response speed and hit rate.

[0003] Since the content distribution network needs to use the regional nodes in the area where the netizens are located as much as possible, the local rate is used to evaluate the service quality of the content distribution network. The higher the local rate, the better the service quality of the content distribution network. The local rate is the number of contents obtained locally / the total number of content requests. However, during peak business hours, in order to avoid overloading the regional nodes in the current area, some bandwidth is often allocated to nodes in other areas for processing. When the business volume decreases, these bandwidths will still be processed by nodes in other areas, resulting in a low local rate.

[0004] In order to solve the above problems, local rates are often rolled back periodically to improve the local rates. However, regular rollbacks can cause some nodes to be overloaded, which is not conducive to the operation of the content distribution network. Therefore, a bandwidth allocation method is urgently needed. Summary of the invention

[0005] The present application provides a bandwidth allocation method, apparatus, device and storage medium, which can avoid the impact of regular local rate rollback on the content distribution network.

[0006] In a first aspect, the present application provides a bandwidth allocation method, the method comprising:

[0007] Periodically obtaining all bandwidths of the current region and a current node water level of at least one regional node, where the regional node is a node in the current region;

[0008] Allocate the bandwidth according to the current node water level of each regional node to obtain a first allocation result;

[0009] When there is no unallocated remaining bandwidth, the task is issued in real time according to the first allocation result;

[0010] When there is unallocated remaining bandwidth, a second allocation result is determined according to the current area and the remaining bandwidth, and tasks are issued in real time according to the first allocation result and the second allocation result.

[0011] Optionally, allocating the bandwidth according to the current node water level of each regional node to obtain a first allocation result includes:

[0012] For each bandwidth in turn, according to the current node water level of each regional node, detecting whether there is a reference regional node whose current node water level meets a preset condition;

[0013] When there is a reference area node whose current node water level meets the preset condition, the bandwidth is allocated according to the reference area node, and the node water level of the node allocated with the bandwidth is updated;

[0014] When there is no reference area node whose current node water level meets the preset condition, the bandwidth allocation is terminated;

[0015] A first allocation result is obtained according to the bandwidth allocation situation.

[0016] Optionally, allocating the bandwidth according to the reference area node and updating the node watermark of the node allocated to the bandwidth includes:

[0017] Among the reference area nodes, determining the reference area node with the smallest node water level as the target area node;

[0018] Allocating the bandwidth to the target area node;

[0019] According to a preset value, the node water level of the target area node is increased to update the node water level of the target area node.

[0020] Optionally, determining a second allocation result according to the current area and the remaining bandwidth includes:

[0021] Determine nodes in an area adjacent to the current area as adjacent nodes;

[0022] Allocating the remaining bandwidth according to the adjacent nodes to obtain a third allocation result;

[0023] A second allocation result is obtained according to the third allocation result.

[0024] Optionally, obtaining a second allocation result according to the third allocation result includes:

[0025] generating a plurality of reference allocation results according to the third allocation result;

[0026] Use the comprehensive scoring model to score each reference allocation result and obtain a comprehensive score corresponding to each reference allocation result;

[0027] The reference allocation result with the highest comprehensive score is determined as the second allocation result.

[0028] Optionally, the comprehensive scoring model includes a scoring module and a calculation module, and the comprehensive scoring model is used to score each reference allocation result to obtain a comprehensive score corresponding to each reference allocation result, including:

[0029] For each reference allocation result, obtain the node change situation corresponding to each bandwidth and the node attribute of each node in the reference allocation result, use the scoring module to score the node change situation corresponding to each bandwidth and the node attribute of each node to obtain multiple scores, use the calculation module to calculate the multiple scores to obtain a comprehensive score corresponding to the reference allocation result.

[0030] Optionally, allocating the remaining bandwidth according to the adjacent nodes to obtain a third allocation result includes:

[0031] For each remaining bandwidth in turn, the current node water level of each adjacent node is obtained, and according to the current node water level of each adjacent node, it is detected whether there is a reference adjacent node whose current node water level meets a preset condition;

[0032] When there is a reference adjacent node whose current node water level meets a preset condition, the remaining bandwidth is allocated according to the reference adjacent node, and the node water level of the adjacent node allocated with the bandwidth is updated;

[0033] When there is no reference adjacent node whose water level of the current node meets the preset condition, other nodes in other areas are obtained, and the remaining bandwidth is allocated according to the other nodes until the remaining bandwidth is allocated;

[0034] A third allocation result is obtained according to the allocation status of the remaining bandwidth.

[0035] In a second aspect, the present application provides a bandwidth allocation device, the device comprising:

[0036] An acquisition unit, used for periodically acquiring all bandwidths of a current area and a current node water level of at least one regional node, where the regional node is a node in the current area;

[0037] An allocating unit, configured to allocate the bandwidth according to the current node water level of each regional node to obtain a first allocation result;

[0038] A first issuing unit, configured to issue the task in real time according to the first allocation result when there is no remaining unallocated bandwidth;

[0039] The second issuing unit is used to determine a second allocation result according to the current area and the remaining bandwidth when there is unallocated remaining bandwidth, and to issue the task in real time according to the first allocation result and the second allocation result.

[0040] Optionally, an allocation unit for:

[0041] For each bandwidth in turn, according to the current node water level of each regional node, detecting whether there is a reference regional node whose current node water level meets a preset condition;

[0042] When there is a reference area node whose current node water level meets the preset condition, the bandwidth is allocated according to the reference area node, and the node water level of the node allocated with the bandwidth is updated;

[0043] When there is no reference area node whose current node water level meets the preset condition, the bandwidth allocation is terminated;

[0044] A first allocation result is obtained according to the bandwidth allocation situation.

[0045] Optionally, an allocation unit for:

[0046] Among the reference area nodes, determining the reference area node with the smallest node water level as the target area node;

[0047] Allocating the bandwidth to the target area node;

[0048] According to a preset value, the node water level of the target area node is increased to update the node water level of the target area node.

[0049] Optionally, the second sending unit is used to:

[0050] Determine nodes in an area adjacent to the current area as adjacent nodes;

[0051] Allocating the remaining bandwidth according to the adjacent nodes to obtain a third allocation result;

[0052] A second allocation result is obtained according to the third allocation result.

[0053] Optionally, the second sending unit is used to:

[0054] generating a plurality of reference allocation results according to the third allocation result;

[0055] Use the comprehensive scoring model to score each reference allocation result and obtain a comprehensive score corresponding to each reference allocation result;

[0056] The reference allocation result with the highest comprehensive score is determined as the second allocation result.

[0057] Optionally, the comprehensive scoring model includes a scoring module and a calculation module, and the second issuing unit is used to:

[0058] For each reference allocation result, obtain the node change situation corresponding to each bandwidth and the node attribute of each node in the reference allocation result, use the scoring module to score the node change situation corresponding to each bandwidth and the node attribute of each node to obtain multiple scores, use the calculation module to calculate the multiple scores to obtain a comprehensive score corresponding to the reference allocation result.

[0059] Optionally, the second sending unit is used to:

[0060] For each remaining bandwidth in turn, the current node water level of each adjacent node is obtained, and according to the current node water level of each adjacent node, it is detected whether there is a reference adjacent node whose current node water level meets a preset condition;

[0061] When there is a reference adjacent node whose current node water level meets a preset condition, the remaining bandwidth is allocated according to the reference adjacent node, and the node water level of the adjacent node allocated with the bandwidth is updated;

[0062] When there is no reference adjacent node whose water level of the current node meets the preset condition, other nodes in other areas are obtained, and the remaining bandwidth is allocated according to the other nodes until the remaining bandwidth is allocated;

[0063] A third allocation result is obtained according to the allocation status of the remaining bandwidth.

[0064] In a third aspect, the present application provides a bandwidth allocation device, comprising: at least one communication interface; at least one bus connected to the at least one communication interface; at least one processor connected to the at least one bus; at least one memory connected to the at least one bus, wherein the processor is configured to:

[0065] Periodically obtaining all bandwidths of the current region and a current node water level of at least one regional node, where the regional node is a node in the current region;

[0066] Allocate the bandwidth according to the current node water level of each regional node to obtain a first allocation result;

[0067] When there is no unallocated remaining bandwidth, the task is issued in real time according to the first allocation result;

[0068] When there is unallocated remaining bandwidth, a second allocation result is determined according to the current area and the remaining bandwidth, and tasks are issued in real time according to the first allocation result and the second allocation result.

[0069] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the above-mentioned bandwidth allocation method when executed by a processor.

[0070] The above technical solution provided by the embodiment of the present application has the following advantages over the prior art: the embodiment of the present application periodically obtains all bandwidths in the current area and the current node water level of at least one regional node, and the regional node is a node in the current area. According to the current node water level of each regional node, the bandwidth is allocated to obtain a first allocation result. When there is no unallocated remaining bandwidth, the task is issued in real time according to the first allocation result. When there is unallocated remaining bandwidth, the second allocation result is determined according to the current area and the remaining bandwidth, and the task is issued in real time according to the first allocation result and the second allocation result. Since the embodiment of the present application periodically allocates bandwidth and preferentially allocates bandwidth to regional nodes, the present application can avoid the problem in the prior art that after allocating bandwidth to nodes other than regional nodes, the bandwidth is always allocated to the node, thereby avoiding rolling back the local rate, thereby avoiding the impact of regular rollback on the content distribution network. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0072] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0073] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0074] Figure 1 A schematic diagram of a flow chart of a bandwidth allocation method provided in an embodiment of the present application;

[0075] Figure 2 A schematic diagram of a flow chart of a bandwidth allocation method provided in an embodiment of the present application;

[0076] Figure 3 A flowchart of another bandwidth allocation method provided in an embodiment of the present application;

[0077] Figure 4 A flowchart of another bandwidth allocation method provided in an embodiment of the present application;

[0078] Figure 5 A flowchart of another bandwidth allocation method provided in an embodiment of the present application;

[0079] Figure 6 A flowchart of a method for determining an allocation result provided in an embodiment of the present application;

[0080] Figure 7 A flowchart of another allocation result determination method provided in an embodiment of the present application;

[0081] Figure 8 A schematic diagram of a flow chart of a bandwidth allocation device provided in an embodiment of the present application;

[0082] Fig. 9 A schematic diagram of a bandwidth allocation device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0083] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, 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 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 making creative work are within the scope of protection of this application.

[0084] The disclosure below provides many different embodiments or examples to implement different structures of the present invention. In order to simplify the disclosure of the present invention, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present invention. In addition, the present invention can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.

[0085] Since the content distribution network needs to use the regional nodes in the area where the netizens are located as much as possible to provide services to netizens, the local rate is an important indicator reflecting the service quality of the content distribution network. However, during peak business hours, in order to avoid overloading the regional nodes in the current area, some bandwidth is often allocated to nodes in other areas for processing. When the business volume decreases, these bandwidths will still be processed by nodes in other areas, causing the local rate to remain high. In order to solve the above problems, the local rate is often rolled back regularly to reduce the local rate. However, regular rollbacks will cause some nodes to overload, which is not conducive to the operation of the content distribution network.

[0086] To solve the above problems, the present application provides a bandwidth allocation method, which can avoid the impact of regular local rate rollback on the content distribution network. Figure 1 As shown, the specific steps include:

[0087] Step 101: periodically obtain all bandwidths in the current area and the current node water level of at least one regional node.

[0088] Among them, the current area is the area that needs to be tested. Generally, the area corresponding to a province is often used as the area to be tested. The regional node is the DNS node in the current area. There is at least one regional node in the current area. Bandwidth is the network bandwidth used by netizens when surfing the Internet. The network bandwidth is usually measured in bits per second. It determines the speed and efficiency of data transmission. The node water level is the ratio of the node's bandwidth load to the bandwidth load threshold. The node's bandwidth load is the bandwidth usage borne by the node, and the bandwidth load threshold is the critical value of the bandwidth load that the node can bear. It is set by technicians based on experience. The current node water level is the node water level of the node at the current time point.

[0089] In this step, when the server needs to reallocate bandwidth in a certain area, the server can determine the area as the current area and collect data at regular intervals to obtain all bandwidths of the area at the current time point and the current node water level of each regional node at the current time point.

[0090] For example, when the bandwidth of Tianjin needs to be reallocated, the server can determine Tianjin as the current area and collect data at regular intervals to obtain all bandwidths of the area at the current time point and the current node water level of each regional node at the current time point.

[0091] It should be noted that the server described in this application is a node of a content distribution network, and the node can execute the method described in the embodiment of this application. Alternatively, the execution subject of the embodiment of this application can also be the entire content distribution network system, and the content distribution network system can execute the method described in the embodiment of this application.

[0092] In actual applications, when allocating bandwidth, not only the bandwidth in the current area is allocated, but also the bandwidth in other areas of the country is allocated, that is, the bandwidth in all areas of the country is allocated at the same time. Afterwards, when allocating bandwidth in all areas of the country, all bandwidths are obtained and grouped according to the area. For each area, it is determined as the current area, and the method described in the embodiment of the present application is performed on the bandwidth in the area.

[0093] Step 102: Allocate bandwidth according to the current node water level of each regional node to obtain a first allocation result.

[0094] The first allocation result is a specific allocation situation in which all bandwidths in the local area are allocated to regional nodes according to certain rules.

[0095] In this step, when the node water level of a certain node is too high, the operation of the node is prone to problems. Therefore, it is necessary to keep the highest node water level of each node no greater than a certain node water level threshold. In this way, the server can detect the regional nodes whose node water level is lower than the node water level threshold according to the current node water level of each regional node, and allocate bandwidth according to the detection result to obtain the first allocation result.

[0096] It should be noted that when multiple regions simultaneously execute the method of the embodiment of the present application, in order to allocate the bandwidth in each region to the regional nodes in the corresponding region as much as possible, the subsequent steps are executed after this step is executed based on all regions.

[0097] Step 103: When there is no unallocated remaining bandwidth, the task is issued in real time according to the first allocation result.

[0098] The remaining bandwidth is the unallocated bandwidth. When there is too much bandwidth, some bandwidth cannot be allocated to the regional nodes due to the limited processing capacity of the regional nodes. Therefore, in order to distinguish the allocated bandwidth, these bandwidths can be named as the remaining bandwidth.

[0099] In this step, the server can detect whether each bandwidth is allocated. If all bandwidths are allocated, it is determined that there is no unallocated remaining bandwidth. If some bandwidths are not allocated, it is determined that there is unallocated remaining bandwidth. When there is no remaining bandwidth, the server can directly allocate the bandwidth to the regional node according to the first allocation result, and then issue the task in real time according to the allocation result.

[0100] Step 104: When there is unallocated remaining bandwidth, a second allocation result is determined according to the current area and the remaining bandwidth, and tasks are issued in real time according to the first allocation result and the second allocation result.

[0101] In this step, when there is remaining bandwidth, the server can allocate the remaining bandwidth to other areas except the current area to obtain a second allocation result, and then allocate all bandwidth to regional nodes and nodes other than regional nodes according to the first allocation result and the second allocation result, and then issue tasks in real time according to the allocation result.

[0102] In an embodiment of the present application, all bandwidths in the current area and the current node water level of at least one regional node are periodically obtained, and the regional node is a node in the current area. According to the current node water level of each regional node, the bandwidth is allocated to obtain a first allocation result. When there is no unallocated remaining bandwidth, the task is issued in real time according to the first allocation result. When there is unallocated remaining bandwidth, the second allocation result is determined according to the current area and the remaining bandwidth, and the task is issued in real time according to the first allocation result and the second allocation result. Since the embodiment of the present application periodically allocates bandwidth and preferentially allocates bandwidth to regional nodes, the present application can avoid the problem in the prior art that after allocating bandwidth to nodes other than regional nodes, the bandwidth is always allocated to the node, thereby avoiding rolling back the local rate, thereby avoiding the impact of periodic rollbacks on the content distribution network.

[0103] In the embodiment of the present application, the server can determine the regional node to be allocated bandwidth according to the current node water level of each regional node, and allocate the bandwidth based on the regional node to obtain a first allocation result. Therefore, the embodiment of the present application provides a bandwidth allocation method, which is a further limitation of step 102, such as Figure 2 As shown, the specific steps include:

[0104] Step 201 , for each bandwidth in turn, based on the current node water level of each regional node, it is detected whether there is a reference regional node whose current node water level meets a preset condition.

[0105] The reference area node refers to whether there is a node in the current area whose current node water level meets the preset conditions.

[0106] In this step, when allocating each bandwidth, in order to avoid node overload, the server can detect whether the current node water level of each regional node meets the preset conditions. When the current node water level of a regional node does not meet the preset conditions, it is determined that the regional node is overloaded and bandwidth cannot be allocated to the regional node. When the current node water level of a regional node meets the preset conditions, it is determined that the regional node is not overloaded and bandwidth can be allocated to the regional node.

[0107] Step 202: when there is a reference area node whose current node water level meets a preset condition, bandwidth is allocated according to the reference area node, and the node water level of the node allocated with the bandwidth is updated.

[0108] Among them, when all nodes correspond to a node water level threshold, the preset condition can be that the current node water level is less than the node water level threshold. Due to the different performance of the nodes, the corresponding node water level thresholds are different. For example, when the performance of a certain node is relatively high, the node water level threshold corresponding to the node is relatively high. When the performance of a certain node is relatively low, the node water level threshold corresponding to the node is relatively low. In summary, when each node corresponds to a node water level threshold, the preset condition is that the current node water level is less than the corresponding node water level threshold. Of course, the preset conditions described in this step can also be other conditions set by the technician according to actual needs, and this step is not limited to this.

[0109] In this step, when there is a reference area node whose current node water level meets the preset conditions, the server can select a node from the reference area nodes according to the preset rules, allocate the bandwidth to the node, and increase the node water level of the node to update the node water level of the node, so as to re-execute step 201 based on the updated node water level, i.e., the next remaining bandwidth allocation step.

[0110] Furthermore, when the node water level threshold of each node is different, its corresponding bandwidth load threshold is different, and the water level change value obtained based on the bandwidth load threshold should also be different. Therefore, when allocating bandwidth to each node, the water level change value corresponding to the node can be calculated based on the allocated bandwidth, and then the node water level of the node can be increased based on the water level change value. The specific steps for calculating the water level change value are as follows: when the server allocates bandwidth to a node, the bandwidth load threshold corresponding to the node is obtained, and the ratio between the allocated bandwidth and the bandwidth load threshold is used to determine the water level change value corresponding to the node.

[0111] In one embodiment, when the node water level of the node is increased, the water level change value corresponding to each node can be set to a preset value. Therefore, when the bandwidth is allocated to the node, the node water level of the node is increased by the preset value to update the node water level of the node based on the updated node water level.

[0112] In addition, the above-mentioned preset rule may be to randomly select a node from the reference area nodes, or to select the reference area node with the lowest water level, or may be other rules for selecting nodes, which are not limited here.

[0113] It should be noted that, in general, the node water level of a node can slightly exceed the node water level threshold corresponding to the node, but the total amount of bandwidth allocated cannot exceed the maximum amount of bandwidth corresponding to the node, where the maximum amount of bandwidth is the maximum value of the bandwidth that the node can accommodate, and this value is greater than the bandwidth threshold. When the total amount of bandwidth allocated to a node exceeds the maximum bandwidth corresponding to the node, it will not only cause the bandwidth load of the node to be overloaded, but also cause additional economic losses. Therefore, after allocating a certain bandwidth to a certain node, the application also obtains the total amount of bandwidth and the maximum amount of bandwidth of the node, and detects whether the total amount of bandwidth is greater than the maximum amount of bandwidth. When the total amount of bandwidth is greater than the maximum amount of bandwidth, the bandwidth is allocated to other reference area nodes.

[0114] Furthermore, the ratio of the maximum bandwidth to the bandwidth threshold can be determined as the maximum water level and stored. After a certain bandwidth is allocated to a certain node, the maximum water level corresponding to the node is obtained, and the updated node water level is compared with the maximum water level. When the updated node water level is greater than the corresponding maximum water level, the bandwidth is allocated to other reference area nodes.

[0115] Step 203: When there is no reference area node whose current node water level meets the preset condition, bandwidth allocation is terminated, and a first allocation result is obtained according to the bandwidth allocation situation.

[0116] In this step, when there is no reference regional node whose current node water level meets the preset condition, it means that there is no available regional node. At this time, the server ends the bandwidth allocation step and executes step 204.

[0117] Step 204: Obtain a first allocation result according to the bandwidth allocation situation.

[0118] In this step, a first allocation result is obtained according to the bandwidth allocated in the previous step.

[0119] For example, when the preset value is a fixed value of 10%, it is assumed that there are 5 bandwidths, namely bandwidth 1, bandwidth 2, bandwidth 3, bandwidth 4 and bandwidth 5. There are 2 regional nodes, namely regional node A and regional node B, whose corresponding current node water levels are 60% and 70% respectively, and the node water level threshold corresponding to the two nodes is 80%. The process described in the embodiment of the present application is performed for each bandwidth in turn, specifically, for bandwidth 1, since both regional node A and regional node B are less than 80%, and the current node water level of regional node A is the lowest, bandwidth 1 can be allocated to regional node A, and the current node water level of regional node A is updated to 70%. For bandwidth 2, since both regional node A and regional node B are less than 80%, and regional node A and regional node B are equal, bandwidth 1 can be allocated to regional node A or regional node B. Assuming that bandwidth 1 is allocated to regional node A, the current node water level of regional node A is updated to 80%. For bandwidth 3, since regional node B is less than 80% and the current node water level of regional node B is the lowest, bandwidth 3 can be allocated to regional node B, and the current node water level of regional node B is updated to 80%. For bandwidth 4 and bandwidth 5, since the current node water levels of regional node A and regional node B are both equal to 80%, these two bandwidths cannot be allocated further, and the first allocation result is obtained based on the previous allocation.

[0120] In the embodiment of the present application, in order to allocate bandwidth according to the reference area node and update the node water level of the node allocated with the bandwidth, the embodiment of the present application provides a bandwidth allocation method, which is a further limitation of step 202, such as Figure 3 As shown, specifically including:

[0121] Step 301 : among the reference area nodes, determine the reference area node with the smallest node water level as the target area node.

[0122] In this step, the server obtains the current node water level of each reference area node, and then determines the reference area node with the minimum node water level among the reference area nodes according to the current node water level of each reference area node, and determines it as the target area node.

[0123] Step 302: Allocate bandwidth to target area nodes.

[0124] In this step, the server allocates bandwidth to the target area node so that the target area node provides services to the netizens corresponding to the bandwidth.

[0125] Step 303: increasing the node water level of the target area node according to a preset value to update the node water level of the target area node.

[0126] In this step, the server may add the current node water level of the target area node and a preset value to obtain a sum, and use the sum as the node water level of the target area node, thereby updating the node water level of the target area node.

[0127] In the embodiment of the present application, the server may also determine the second allocation result according to the current area and the remaining bandwidth. Therefore, the embodiment of the present application provides a bandwidth allocation method, which is a further limitation of step 104, such as Figure 4 As shown, specifically including:

[0128] Step 401: determine nodes in an area adjacent to the current area as adjacent nodes.

[0129] In this step, when the regional node cannot handle all the bandwidth, the server can also allocate the remaining bandwidth to a node other than the regional node so that the node can handle the remaining bandwidth. In order to provide services to netizens with remaining bandwidth as quickly as possible, this step can allocate the remaining bandwidth to nodes in the area adjacent to the current area. This step can determine the area adjacent to the current area based on the current area and the map, and obtain the nodes in the area, and determine these nodes as adjacent nodes.

[0130] It should be noted that when there are multiple regions adjacent to the current region, only nodes in one region may be obtained and determined as adjacent nodes. For example, if the current region is Hebei, and the regions adjacent to Hebei are Tianjin and Henan, only nodes in Tianjin may be obtained and determined as adjacent nodes.

[0131] Step 402: Allocate the remaining bandwidth according to the adjacent nodes to obtain a third allocation result.

[0132] In this step, the server may also allocate the remaining bandwidth to the adjacent nodes to obtain a third allocation result.

[0133] Step 403: Obtain a second allocation result according to the third allocation result.

[0134] In this step, the server may directly determine the third allocation result as the second allocation result, or may obtain the second allocation result based on the third allocation result.

[0135] In the embodiment of the present application, the server may also allocate the remaining bandwidth according to the adjacent nodes to obtain a third allocation result. Therefore, the embodiment of the present application provides a bandwidth allocation method, which is a further limitation of step 402, such as Figure 5 As shown, specifically including:

[0136] Step 501 , for each remaining bandwidth, obtain the current node water level of each adjacent node in turn, and detect whether there is a reference adjacent node whose current node water level meets a preset condition according to the current node water level of each adjacent node.

[0137] In this step, for each remaining bandwidth in turn, the server obtains the current node water level of each adjacent node in the adjacent area, and based on the current node water level of each adjacent node, detects whether there is a reference adjacent node whose current node water level meets the preset conditions among these adjacent nodes.

[0138] This step is similar to step 201 and will not be described in detail here.

[0139] Step 502: When there is a reference adjacent node whose current node water level meets a preset condition, the remaining bandwidth is allocated according to the reference adjacent node, and the node water level of the adjacent node allocated with the bandwidth is updated.

[0140] This step is similar to step 202 and will not be described in detail here.

[0141] Step 503: when there is no reference adjacent node whose water level of the current node meets the preset condition, other nodes in other areas are obtained, and the remaining bandwidth is allocated according to the other nodes until the remaining bandwidth is allocated.

[0142] In this step, when there is no reference adjacent node, the server can obtain the current node water level of other nodes in the other area, and detect whether there is a reference other node whose current node water level meets the preset conditions among these other nodes according to the current node water level of each other node. After that, the server can allocate the unallocated remaining bandwidth to any reference other node, or allocate the unallocated remaining bandwidth to the reference other node with the lowest node water level until all the unallocated remaining bandwidth is allocated.

[0143] The method of allocating the remaining bandwidth in this step is Figure 2 The methods described are similar and will not be repeated here.

[0144] Step 504: Obtain a third allocation result according to the allocation status of the remaining bandwidth.

[0145] In this step, a third allocation result is obtained according to the allocation status of the remaining bandwidth.

[0146] Prioritized, other regions are other adjacent regions adjacent to the current region.

[0147] In the embodiment of the present application, the server can obtain the second allocation result according to the third allocation result. Therefore, the embodiment of the present application provides a method for determining an allocation result, which is a further limitation of step 403, such as Figure 6 As shown, specifically including:

[0148] Step 601: Generate multiple reference allocation results according to the third allocation result.

[0149] In this step, the server may rearrange and combine the corresponding relationship between the bandwidth and the node in the third allocation result to obtain each arrangement and combination, and use each arrangement and combination as a reference allocation result.

[0150] For example, assume that there are three bandwidths, namely bandwidth 1, bandwidth 2, and bandwidth 3. There are two neighboring nodes, namely neighboring node A and neighboring node B. The second allocation result is that neighboring node A is allocated bandwidth 1 and bandwidth 2, and neighboring node B is allocated bandwidth 3. The reference allocation result is that neighboring node A is allocated bandwidth 1 and bandwidth 3, neighboring node B is allocated bandwidth 2, neighboring node A is allocated bandwidth 3 and bandwidth 2, and neighboring node B is allocated bandwidth 1, etc.

[0151] It should be noted that, for each node, the water level of the node after the bandwidth is allocated should be less than the maximum water level corresponding to the node, or the total bandwidth of the node after the bandwidth is allocated should be less than the corresponding maximum bandwidth. However, in the reference allocation result obtained based on the above method, there may be nodes whose node water level after the bandwidth is allocated is greater than the maximum water level, or nodes whose total bandwidth after the bandwidth is allocated is less than the corresponding maximum bandwidth. For reference allocation results with such nodes, they can generally be discarded. Of course, the result may not be discarded, because the comprehensive score corresponding to the result is generally very low, so it is possible to avoid using such a result as the final result.

[0152] Step 602: Use the comprehensive scoring model to score each reference allocation result to obtain a comprehensive score corresponding to each reference allocation result.

[0153] Among them, generally speaking, the higher the comprehensive score of a reference allocation result, the better the allocation effect of the reference allocation result, and the more it can meet the user's needs in many aspects. When the lower the comprehensive score of a reference allocation result, the worse the allocation effect of the reference allocation result, and the less it can meet the user's needs.

[0154] In this step, the comprehensive scoring model includes a scoring module and a calculation module, wherein the scoring module is used to score the node where each bandwidth in the reference allocation result is located, and the calculation module is used to calculate the comprehensive score corresponding to the reference allocation result. The specific steps of scoring using the comprehensive scoring model are: for each reference allocation result, obtain the node change corresponding to each bandwidth in the reference allocation result and the node attributes of each node, use the scoring module to score the node change corresponding to each bandwidth and the node attributes of each node to obtain multiple scores, and use the calculation module to calculate the multiple scores to obtain the comprehensive score corresponding to the reference allocation result.

[0155] Among them, node attributes include CPU status, node status, node IP weight change, node device utilization, etc., among which the node IP weight is converted according to the node bandwidth load. The calculation module can add multiple scores to obtain a comprehensive score, or calculate the average of these scores and determine it as a comprehensive score. The node change corresponding to the bandwidth refers to the node change before and after the bandwidth is allocated. For example, a certain bandwidth is on a node in Henan before allocation, and on a node in Tianjin after allocation.

[0156] The above is essentially to evaluate each allocation result in multiple aspects to obtain the optimal allocation result that can take all aspects into consideration. For example, when the node of a certain bandwidth does not change before and after the allocation, the higher the score corresponding to the bandwidth, and when the node of a certain bandwidth changes before and after the allocation, the lower the score corresponding to the bandwidth. For example, when the node of a certain bandwidth does not change before and after the allocation, the score corresponding to the bandwidth is 100, and when the node of a certain bandwidth changes before and after the allocation, the score corresponding to the bandwidth is 0. Afterwards, the scores corresponding to each bandwidth in the reference result are added together to obtain the score of the reference result in terms of node changes.

[0157] For example, when scoring the reference result according to the node status, it is necessary to calculate the node status score of each node in the allocation result, and then determine the score corresponding to the allocation result according to the scores of these nodes. For example, the scores of these nodes are added together to determine the score corresponding to the allocation result.

[0158] Specifically, when calculating the score of a node in a node situation, the situation can be divided into multiple specific situations, and then the node can be scored in these specific situations. After that, these scores are added to obtain the total score corresponding to the node in the node situation, or these scores are multiplied by the corresponding weights, and the results are added to obtain the total score corresponding to the node in the node situation. The specific scoring rules for these specific situations are: the node water level of the node is inversely proportional to the score of the node in terms of the node water level, that is, the lower the node water level of a node, the higher the score of the node in terms of the node water level. The maximum bandwidth of the node is proportional to the score of the node in terms of the maximum bandwidth, that is, the larger the maximum bandwidth of the node, the higher the score of the node in terms of the maximum bandwidth. The total amount of bandwidth allocated by the node is inversely proportional to the score of the node in terms of the total bandwidth, that is, the larger the total amount of bandwidth allocated by the node, the lower the score of the node in terms of the total bandwidth. The difference between the maximum bandwidth of the node and the total amount of bandwidth allocated is proportional to the score of the node in this aspect, that is, the larger the difference between the maximum bandwidth of the node and the total amount of bandwidth allocated, the larger the score of the node in this aspect.

[0159] Since the total amount of bandwidth allocated to the node is greater than the maximum bandwidth, some adverse effects may be caused. Therefore, in order to avoid such effects, when the difference between the maximum bandwidth and the total amount of bandwidth allocated of a node is 0 or a negative number, the score corresponding to the difference of the node can be set to a very small value to reduce the score of the corresponding reference result and avoid determining the reference result as the final result. For example, when the difference between the maximum bandwidth and the total amount of bandwidth allocated is 0 or a negative number, the score corresponding to the node in this aspect can be set to -10000, and when the difference between the maximum bandwidth and the total amount of bandwidth allocated is a positive number, the difference can be determined as its corresponding score.

[0160] For example, when the reference result is scored according to the CPU situation, for each node in the reference result, the better the CPU performance of the node, the higher the score corresponding to the node. The score corresponding to each node in the reference result is calculated by this method, and then the score corresponding to the CPU situation of the reference result is calculated based on the score corresponding to each node.

[0161] Of course, based on a similar method, the score of the reference result in each aspect is calculated, and then the score of the reference result in each aspect is added to obtain the score corresponding to the reference result. For example, the score of the reference result in each aspect is added to obtain the score corresponding to the reference result.

[0162] Step 603: determine the reference allocation result with the highest comprehensive score as the third allocation result.

[0163] In this step, the server may determine the reference allocation result with the highest comprehensive score according to the comprehensive score corresponding to each reference allocation result, determine the reference allocation result with the highest comprehensive score as the optimal allocation result, and determine it as the third allocation result.

[0164] Based on the above, the present application embodiment provides a bandwidth allocation method. Figure 7 As shown, the specific steps include:

[0165] Step 701: Periodically obtain all bandwidths in the current area and the current node water level of at least one regional node.

[0166] Step 702: whether there is unallocated bandwidth in the current area, if yes, proceed to step 703, if not, end the allocation process.

[0167] In this step, if there is unallocated bandwidth in the current area, the bandwidth continues to be allocated. If there is no unallocated bandwidth in the current area, it means that there is no need to allocate bandwidth, and the allocation process ends.

[0168] Step 703 , detecting whether there is a regional node whose current node water level meets a preset condition, if yes, proceeding to step 704 , if not, proceeding to step 705 .

[0169] In this step, if there is a regional node whose current node water level meets the preset conditions in the current area, a bandwidth is allocated to the regional node. If there is no regional node whose current node water level meets the preset conditions in the current area, bandwidth is allocated based on nodes in other areas.

[0170] It should be noted that, when there is no regional node in the current area whose current node water level meets the preset condition, the first allocation result described in the above embodiment is obtained.

[0171] Step 704 , allocate a bandwidth to the regional node, update its current node water level, and continue to execute step 702 .

[0172] Step 705, obtaining nodes in other areas whose current node water levels meet preset conditions.

[0173] In this step, nodes whose water levels of the current nodes meet the preset conditions are preferentially determined in the adjacent areas of the current area. When there are no such nodes in the adjacent areas, nodes whose water levels of the current nodes meet the preset conditions are determined from the areas not adjacent to the current area.

[0174] Step 706 , allocate a bandwidth to the node, update its current node water level, and continue to execute step 702 .

[0175] It should be noted that when all bandwidths are allocated based on other areas, the third allocation result described in the above embodiment is obtained, and the specific allocation process will not be described in detail.

[0176] like Figure 8 As shown, an embodiment of the present application provides a bandwidth allocation device, which corresponds to the method embodiment and specifically includes:

[0177] An acquisition unit 801 is used to periodically acquire all bandwidths of a current region and a current node water level of at least one regional node, where the regional node is a node in the current region;

[0178] An allocating unit 802, configured to allocate the bandwidth according to the current node water level of each regional node to obtain a first allocation result;

[0179] A first issuing unit 803 is configured to issue the task in real time according to the first allocation result when there is no remaining unallocated bandwidth;

[0180] The second issuing unit 804 is configured to determine a second allocation result according to the current area and the remaining bandwidth when there is unallocated remaining bandwidth, and to issue the task in real time according to the first allocation result and the second allocation result.

[0181] Optionally, the allocating unit 802 is configured to:

[0182] For each bandwidth in turn, according to the current node water level of each regional node, detecting whether there is a reference regional node whose current node water level meets a preset condition;

[0183] When there is a reference area node whose current node water level meets the preset condition, the bandwidth is allocated according to the reference area node, and the node water level of the node allocated with the bandwidth is updated;

[0184] When there is no reference area node whose current node water level meets the preset condition, the bandwidth allocation is terminated;

[0185] A first allocation result is obtained according to the bandwidth allocation situation.

[0186] Optionally, the allocating unit 802 is configured to:

[0187] Among the reference area nodes, determining the reference area node with the smallest node water level as the target area node;

[0188] Allocating the bandwidth to the target area node;

[0189] According to a preset value, the node water level of the target area node is increased to update the node water level of the target area node.

[0190] Optionally, the second sending unit 804 is configured to:

[0191] Determine nodes in an area adjacent to the current area as adjacent nodes;

[0192] Allocating the remaining bandwidth according to the adjacent nodes to obtain a third allocation result;

[0193] A second allocation result is obtained according to the third allocation result.

[0194] Optionally, the second sending unit 804 is configured to:

[0195] generating a plurality of reference allocation results according to the third allocation result;

[0196] Use the comprehensive scoring model to score each reference allocation result and obtain a comprehensive score corresponding to each reference allocation result;

[0197] The reference allocation result with the highest comprehensive score is determined as the second allocation result.

[0198] Optionally, the comprehensive scoring model includes a scoring module and a calculation module, and the second issuing unit 804 is used to:

[0199] For each reference allocation result, obtain the node change situation corresponding to each bandwidth and the node attribute of each node in the reference allocation result, use the scoring module to score the node change situation corresponding to each bandwidth and the node attribute of each node to obtain multiple scores, use the calculation module to calculate the multiple scores to obtain a comprehensive score corresponding to the reference allocation result.

[0200] Optionally, the second sending unit 804 is configured to:

[0201] For each remaining bandwidth in turn, the current node water level of each adjacent node is obtained, and according to the current node water level of each adjacent node, it is detected whether there is a reference adjacent node whose current node water level meets a preset condition;

[0202] When there is a reference adjacent node whose current node water level meets a preset condition, the remaining bandwidth is allocated according to the reference adjacent node, and the node water level of the adjacent node allocated with the bandwidth is updated;

[0203] When there is no reference adjacent node whose water level of the current node meets the preset condition, other nodes in other areas are obtained, and the remaining bandwidth is allocated according to the other nodes until the remaining bandwidth is allocated;

[0204] A third allocation result is obtained according to the allocation status of the remaining bandwidth.

[0205] like Fig. 9 As shown, the embodiment of the present application provides a bandwidth allocation device, including a processor 901, a communication interface 902, a memory 903 and a communication bus 904, wherein the processor 901, the communication interface 902, and the memory 903 communicate with each other through the communication bus 904.

[0206] Memory 903, used for storing computer programs;

[0207] In one embodiment of the present application, the processor 901 is configured to implement the bandwidth allocation method provided by any one of the aforementioned method embodiments when executing the program stored in the memory 903, including:

[0208] Periodically obtaining all bandwidths of the current region and a current node water level of at least one regional node, where the regional node is a node in the current region;

[0209] Allocate the bandwidth according to the current node water level of each regional node to obtain a first allocation result;

[0210] When there is no unallocated remaining bandwidth, the task is issued in real time according to the first allocation result;

[0211] When there is unallocated remaining bandwidth, a second allocation result is determined according to the current area and the remaining bandwidth, and tasks are issued in real time according to the first allocation result and the second allocation result.

[0212] An embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the bandwidth allocation method provided in any of the aforementioned method embodiments are implemented.

[0213] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0214] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0215] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.

[0216] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A bandwidth allocation method, characterized in that: The method comprises: Periodically obtaining all bandwidths of the current region and a current node water level of at least one regional node, where the regional node is a node in the current region; Allocate the bandwidth according to the current node water level of each regional node to obtain a first allocation result; When there is no unallocated remaining bandwidth, the task is issued in real time according to the first allocation result; When there is unallocated remaining bandwidth, a second allocation result is determined according to the current area and the remaining bandwidth, and tasks are issued in real time according to the first allocation result and the second allocation result.

2. The method according to claim 1, characterized in that: The allocating the bandwidth according to the current node water level of each regional node to obtain a first allocation result includes: For each bandwidth, according to the current node water level of each regional node, detecting whether there is a reference regional node whose current node water level meets a preset condition; When there is a reference area node whose current node water level meets the preset condition, the bandwidth is allocated according to the reference area node, and the node water level of the node allocated with the bandwidth is updated; When there is no reference area node whose current node water level meets the preset condition, the bandwidth allocation is terminated; A first allocation result is obtained according to the bandwidth allocation situation.

3. The method according to claim 2, characterized in that: The allocating the bandwidth according to the reference area node and updating the node water level of the node allocated to the bandwidth includes: Among the reference area nodes, determining the reference area node with the smallest node water level as the target area node; Allocating the bandwidth to the target area node; According to a preset value, the node water level of the target area node is increased to update the node water level of the target area node.

4. The method according to claim 1, characterized in that: The determining a second allocation result according to the current area and the remaining bandwidth includes: Determine nodes in an area adjacent to the current area as adjacent nodes; Allocating the remaining bandwidth according to the adjacent nodes to obtain a third allocation result; A second allocation result is obtained according to the third allocation result.

5. The method according to claim 4, characterized in that: The step of obtaining a second allocation result according to the third allocation result includes: generating a plurality of reference allocation results according to the third allocation result; Use the comprehensive scoring model to score each reference allocation result and obtain a comprehensive score corresponding to each reference allocation result; The reference allocation result with the highest comprehensive score is determined as the second allocation result.

6. The method according to claim 5, characterized in that: The comprehensive scoring model includes a scoring module and a calculation module. The comprehensive scoring model is used to score each reference allocation result to obtain a comprehensive score corresponding to each reference allocation result, including: For each reference allocation result, obtain the node change situation corresponding to each bandwidth and the node attributes of each node in the reference allocation result, use the scoring module to score the node change situation corresponding to each bandwidth and the node attributes of each node to obtain multiple scores, use the calculation module to calculate the scores of multiple nodes to obtain a comprehensive score corresponding to the reference allocation result.

7. The method according to claim 4, characterized in that: The allocating the remaining bandwidth according to the adjacent nodes to obtain a third allocation result includes: For each remaining bandwidth, the current node water level of each adjacent node is obtained, and according to the current node water level of each adjacent node, it is detected whether there is a reference adjacent node whose current node water level meets a preset condition; When there is a reference adjacent node whose current node water level meets a preset condition, the remaining bandwidth is allocated according to the reference adjacent node, and the node water level of the adjacent node allocated with the bandwidth is updated; When there is no reference adjacent node whose water level of the current node meets the preset condition, other nodes in other areas are obtained, and the remaining bandwidth is allocated according to the other nodes until the remaining bandwidth is allocated; A third allocation result is obtained according to the allocation status of the remaining bandwidth.

8. A bandwidth allocation device, characterized in that: The device comprises: An acquisition unit, configured to acquire all bandwidths of a current region and a current node water level of at least one regional node, wherein the regional node is a node within the current region; An allocating unit, configured to allocate the bandwidth according to the current node water level of each regional node to obtain a first allocation result; A first issuing unit, configured to issue the task in real time according to the first allocation result when there is no remaining unallocated bandwidth; The second issuing unit is used to determine a second allocation result according to the current area and the remaining bandwidth when there is unallocated remaining bandwidth, and to issue the task in real time according to the first allocation result and the second allocation result.

9. A bandwidth allocation device, characterized in that: include: at least one communication interface; at least one bus connected to the at least one communication interface; at least one processor connected to the at least one bus; at least one memory connected to the at least one bus, wherein the processor is configured to: Periodically obtaining all bandwidths of the current region and a current node water level of at least one regional node, where the regional node is a node in the current region; Allocate the bandwidth according to the current node water level of each regional node to obtain a first allocation result; When there is no unallocated remaining bandwidth, the task is issued in real time according to the first allocation result; When there is unallocated remaining bandwidth, a second allocation result is determined according to the current area and the remaining bandwidth, and tasks are issued in real time according to the first allocation result and the second allocation result.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the bandwidth allocation method according to any one of claims 1 to 7 is implemented.