A bandwidth allocation method and system for reducing network costs
By constructing a bandwidth allocation topology model and optimizing the maximum flow algorithm, combined with the 95 charging mode, the problem of high bandwidth allocation cost in edge computing is solved, and low-cost bandwidth allocation under the 95 charging mode is achieved to meet user needs and reduce operating costs. .
Patent Information
- Application Number
- CN202210929703.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-03
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2042-08-03
AI Technical Summary
In edge computing scenarios, existing bandwidth allocation solutions fail to effectively reduce the operating costs of service providers. Especially under the 95 billing model, how to reasonably schedule bandwidth requirements to reduce the cost of using edge servers is a challenge.
By building a network bandwidth allocation topology model, using the maximum flow algorithm to optimize bandwidth allocation, combining the characteristics of the 95 billing model, optimizing the bandwidth allocation strategy, concentrating traffic to servers with large bandwidth requirements, using free traffic, setting weights and capacities to achieve bandwidth requirements reasonable scheduling.
While meeting user latency and bandwidth requirements, it significantly reduces the server's operating costs under the 95 fee model, improves resource utilization efficiency, and reduces unnecessary payments.
Smart Images

Figure CN115242650B
Abstract
Description
Technical Field
[0001] The present invention relates to network bandwidth allocation technology, and in particular to a bandwidth allocation method and system for reducing network cost based on maximum network flow. Background Art
[0002] Nowadays, a large amount of data is transmitted over the Internet every day. For example, Alibaba Cloud and Tencent Cloud, large data centers that host cloud computing services, need to provide services to users and synchronize data across geographical regions. On the other hand, the rise of various live broadcast platforms also requires service providers to transmit multimedia information across geographical regions.
[0003] Therefore, a huge amount of data is transmitted through the Internet to serve every end user, which brings huge costs to service providers. At the same time, more and more devices are connected to the Internet, and data traffic is growing exponentially. Service providers need to purchase a large number of servers to meet the increasing bandwidth demand. At the same time, many current network services, such as live streaming, have a strong demand for real-time performance. Traditional cloud computing methods are difficult to meet the huge bandwidth demand and strong real-time demand.
[0004] To this end, edge computing deploys a large number of decentralized servers at the edge close to users to meet users' bandwidth and real-time needs. However, in order to provide such services, a large number of edge servers need to be purchased to provide bandwidth processing capabilities. Therefore, how to reduce service costs through bandwidth demand scheduling has always been a problem that service providers are very concerned about but has not been well solved.
[0005] On the other hand, the charging method for bandwidth resources used by data transmission services is different from other fields. Other fields often charge according to the total amount of resources used, but for large-scale network services, the 95 billing method is more widely used. For example, the 95 billing is divided into monthly 95 billing and daily 95 billing. The monthly 95 billing literally means charging for 95% of the bandwidth, and the highest 5% is not charged. For example, take 30 days as an example. Sampling is done for 5 minutes, 12 points per hour, 288 points per 24 hours, and 8640 points per month. These 8640 points are arranged in descending order, and the first 5% is removed, that is, the 432 points with the highest bandwidth are removed. The 433rd point is the 95 billing bandwidth value for this month. The daily 95 billing is calculated based on the 95 value of bandwidth per day, and then averaged according to the number of natural days in the month. At present, the 95 billing model is a more popular bandwidth charging method and is widely used by many service providers.
[0006] The purpose of the present invention is to find out how to make the edge server bandwidth usage cost lower under the 95 billing mode based on such billing scheme through reasonable bandwidth demand scheduling while meeting user needs. Summary of the invention
[0007] To this end, the main purpose of the present invention is to provide a bandwidth allocation method and system for reducing network costs, so as to seek to lower the edge server bandwidth usage cost under a similar 95 billing mode by reasonable bandwidth demand scheduling while meeting user needs.
[0008] In order to achieve the above object, according to one aspect of the present invention, a bandwidth allocation method for reducing network costs is provided, the steps of which include:
[0009] Step S100 is to meet the bandwidth requirement unloading conditions for the user node N j With edge server node M i Build directed edges between For each N j Establish a directed edge with virtual node S For each M i Establish a directed edge with virtual node E Assign weights and flows to all directed edges to form the network bandwidth allocation topology model G at the current moment;
[0010] Step S200 calculates the number of M i The total bandwidth is sorted and weighted according to the ranking. Calculate all possible flows through M at all times i The maximum total bandwidth for each M i Select a time period with the largest total bandwidth And set M i In When the first mark is made;
[0011] Step S300: The capacity is set to the current time N j The bandwidth requirement of M i When the first mark is not marked, The weight is set to To update model G;
[0012] Step S400 calculates the residual value according to the capacity and flow of the directed edge in the updated model G, and searches for the connected path; then updates the attributes of the directed edge of the model G again according to the residual value, and searches for the connected path until there is no connected path in the model G, and then N j With all M i Between The flow value and Subtract the flow value from the j To M i Scheduling results for offloading bandwidth requirements.
[0013] In a possible preferred implementation, in step S100, the step of determining the bandwidth demand unloading condition includes: setting the delay threshold to R, the edge server node M i With user node N j The service delay between if Indicates that the bandwidth requirement offloading conditions are met. If The bandwidth demand offloading condition is not met.
[0014] In a possible preferred implementation, the directed edge is constructed in step S100. The steps include: j As the starting point, the edge server node M i As the end point, at N j and M i Construct a directed edge with infinite capacity, 0 flow, and 0 weight between
[0015] In a possible preferred implementation, the directed edge is constructed in step S100. The steps include: i As the starting point, user node N j As the end point, at M i and N j Construct directed edges with 0 capacity, 0 flow, and 0 weight between them
[0016] In a possible preferred implementation, the directed edge is constructed in step S100. The steps include: taking the virtual node S as the starting point, the user node N at the current moment j are regarded as the end points, at S and N j Construct directed edges with capacity 0, flow 0, and weight 0 in sequence
[0017] In a possible preferred implementation, the directed edge is constructed in step S100. The steps include: setting the edge server node M at the current moment i are regarded as the starting point and virtual node E as the end point. i and E are connected to build edge server nodes M with a capacity of i The bandwidth limit, flow rate and weight of the directed edge are 0.
[0018] In a possible preferred implementation, the step of calculating the residual value according to the capacity and flow of the directed edge in the updated model G and searching for the connected path in step S400 includes:
[0019] S410 takes S as the starting point and E as the end point in model G, and The result of subtracting the flow value from the capacity value is taken as the residual value. If the residual value is greater than 0, the edge is considered connected, otherwise it is considered disconnected.
[0020] In a possible preferred implementation, the step of updating the attributes of the directed edges of the model G again according to the residual value and searching for a connected path until no connected path exists in the model G in step S400 includes:
[0021] S420 uses the Bellman-Ford algorithm to search for a connected path with the minimum cost from the starting point to the end point, and records the residual value of the edge with the minimum residual value on the path as resi_min;
[0022] S430 adds resi_min to the flow values of all edges in the path searched in step S420 and the capacity values of their reverse edges, respectively, to update the attributes of the directed edges of model G;
[0023] S440 Repeat steps S410 to S440 until resi_min is less than 0, and it is considered that there is no connected path in the model G.
[0024] In a possible preferred embodiment, the step S200 For each M i The 5% of the moments with the largest total bandwidth are selected.
[0025] In order to achieve the above object, according to another aspect of the present invention, a bandwidth allocation system for reducing network costs is provided, which includes:
[0026] A storage unit, used to store a program for implementing any of the above-mentioned steps of the bandwidth allocation method for reducing network costs, so that the processing unit, the transceiver unit, and the scheduling unit can call, read and execute it in a timely manner;
[0027] The transceiver unit is used to receive the user node N j Bandwidth requests from edge server nodes M i Bandwidth quota information and N j To M i The service delay information is sent to the processing unit;
[0028] The processing unit is used to construct the network bandwidth allocation topology model G at the current moment, including: determining the user node N j With edge server node Mi When the bandwidth requirement unloading condition is met, j With M i Build directed edges between Create a virtual node S, and connect S to each N at the current moment j Create directed edges Create a virtual node E, between E and each M at the current moment i Create directed edges Assign weights and flows to all directed edges.
[0029] The processing unit further calculates the possible flow through all M at all times i The total bandwidth is sorted to give weight according to the ranking Calculate all possible flows through M at all times i The maximum total bandwidth for each M i Select the 5% time periods with the largest total bandwidth And set M i In When =1; set the directed edges in model G The capacity is set to the current time N j Bandwidth requirements Determine when M i of When it is 1, The weight is set to 0, otherwise it is set to weight To update model G;
[0030] The processing unit further calculates the residual value according to the capacity and flow of the directed edge in the updated model G, and searches for the connected path; then updates the attributes of the directed edge of the model G again according to the residual value, and searches for the connected path until there is no connected path in the model G. j With all M i Between The flow value and Subtract the flow value of N j To M i Unload the scheduling result of bandwidth demand and send it to the scheduling unit;
[0031] The scheduling unit is N according to the scheduling result j To the corresponding M i Offload the corresponding bandwidth requirements.
[0032] The bandwidth allocation method and system for reducing network costs provided by the present invention are different from the existing bandwidth allocation schemes, which generally only consider the service guarantee for the client side, but do not consider the complex relationship between customer demand and service cost in the edge computing scenario, thus causing the problem of uncontrollable service cost. The present invention can effectively reduce the operating cost of the server under a similar 95 charging model while meeting the user's latency and bandwidth requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The drawings constituting a part of this application are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0034] Figure 1 It is a schematic diagram of the user node offloading bandwidth requirements to the edge server in the traditional technology;
[0035] Figure 2 This is a schematic diagram of the charging situation when users unload bandwidth to edge servers under the existing 95 charging model;
[0036] Figure 3 It is a structural schematic diagram of a network bandwidth allocation topology model G in the bandwidth allocation method for reducing network costs of the present invention;
[0037] Figure 4 A schematic diagram of the steps of the bandwidth allocation method for reducing network costs of the present invention;
[0038] Figure 5 It is a schematic diagram of cost comparison between the bandwidth allocation method for reducing network cost of the present invention and the basic maximum algorithm under the 95 charging mode;
[0039] Figure 6 This is a schematic diagram of the structure of the bandwidth allocation system for reducing network costs of the present invention. DETAILED DESCRIPTION
[0040] In order to enable those skilled in the art to better understand the technical solution of the present invention, the specific technical solution of the present invention will be clearly and completely described in conjunction with the embodiments below to help those skilled in the art further understand the present invention. Obviously, the embodiments described in this case are only embodiments of a part of the present invention, not all of the embodiments. It should be pointed out that for those of ordinary skill in the art, the embodiments in this application and the features in the embodiments can be combined with each other without departing from the concept of the present invention and without conflicting with each other. Based on the embodiments in the present invention, all other embodiments obtained without creative work by those of ordinary skill in the art should belong to the disclosure and protection scope of the present invention.
[0041] In addition, the terms "first", "second", "S1", "S2", etc. in the specification, claims and drawings of the present invention are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those described herein. At the same time, the terms "including" and "having" and any variations thereof in the present invention are intended to cover non-exclusive inclusions. Unless otherwise clearly specified and limited, the terms "set", "layout", "install", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be an indirect connection through an intermediate medium, or it can be a connection between the two elements. For those of ordinary skill in the art, the specific meanings of the above terms in this case can be understood based on the specific circumstances and in combination with the prior art.
[0042] The bandwidth allocation schemes currently available in the prior art generally only consider service guarantees on the client side, but do not consider the complex relationship between customer demand and service costs in edge computing scenarios, and therefore cannot effectively save costs.
[0043] For example: Figure 1 As shown in the figure, assume that at a certain moment, there are three users with bandwidth demands, and the bandwidth demands are 40, 20, and 20 respectively. There are three edge servers that can receive the bandwidth demands of the users, and the upper limits of the bandwidths received by the edge servers are 40, 20, and 20 respectively. At the same time, at this moment, due to the different delays between different edges and users, user 1 can offload the bandwidth demand to edge server 1, edge server 2, and edge server 3. User 2 and user 3 can only offload the bandwidth demand of the users to edge server 1.
[0044] At this time, if we use the conventional greedy idea to solve the problem, when facing the bandwidth demand of user 1, the naive approach should be to unload the traffic to edge server 1 with the largest capacity. However, it can be found that after unloading the bandwidth demand of user 1 to edge server 1, the bandwidth demands of user 2 and user 3 cannot be met because edge server 1 has reached its receiving limit. In this case, only when user 1 divides his bandwidth demand equally to edge server 2 and edge server 3 can the solution meet the bandwidth demands of all users. This solution is also the only legal unloading solution in this case. It can be seen that actually searching for this solution itself is not a simple task.
[0045] That is to say, when faced with massive user demands and servers, it is difficult to find only one legal solution, even without considering optimizing server costs under 95 billing.
[0046] On the other hand, in order to define how user bandwidth demand scheduling can save the total cost of edge servers. For example: Figure 2 As shown in the figure, assume that user 1 has a bandwidth demand of 80 at a certain moment, and user 1 can offload the bandwidth demand to all three edge nodes, and the acceptable bandwidth upper limit of the edge nodes is much greater than 80. And at this moment, each edge node has processed some bandwidth demands, and the resulting bandwidth time series is also marked on the graph. When the total number of moments is 100, the sixth highest bandwidth value is the user's payment value.
[0047] From the figure, we can see that edge 1 and edge 3 have already paid 40 respectively, while edge 2 has not paid yet. At this time, if we choose to evenly offload the user's bandwidth demands to edge 1 and edge 3, the total cost of the user will not increase, and the total cost will be 40. If the user offloads all 80 bandwidth demands to edge 2, the bandwidth demand ranked 6th in the bandwidth time series of edge server 2 is 40, so the edge server needs to pay an additional server fee of 40. In general, in this case, evenly distributing bandwidth demands to edge 1 and edge 3 will save 40 server costs compared to distributing all bandwidth demands to edge 2. In the current situation, the former scheduling scheme is better than the latter.
[0048] In fact, for the sake of clarity, this example is only a relatively simple case among many complex situations. There are more complex situations that require more complex scheduling strategies. However, the present invention wants to make it clear that there are always some scheduling solutions that can save server costs, although it is quite difficult to find them.
[0049] Therefore, in order to solve the above two problems, the bandwidth allocation method for reducing network costs provided by the present invention firstly proposes a reasonable modeling mechanism to ensure that the legal solution can be searched within an acceptable time, and secondly, reasonable bandwidth demand scheduling is performed on the basis of the legal solution to reduce server costs.
[0050] Specifically, if Figures 3 to 5 As shown, the steps of the bandwidth allocation method for reducing network costs provided by the present invention include:
[0051] Step S100
[0052] Unload user nodes N that meet bandwidth requirements j With edge server node M i Build directed edges between For each N j Establish a directed edge with virtual node S For each M i Establish a directed edge with virtual node E Assign weights and flows to all directed edges to form the network bandwidth allocation topology model G at the current moment;
[0053] Specifically, in the application scenario of this example, it is assumed that there are multiple different users dispersed geographically, and these users will have different bandwidth requirements at different times. At this time, there is an edge server cluster to provide bandwidth for users. However, due to the geographical dispersion of users and the distributed deployment of server clusters, each user has different latency for different servers in the server cluster. When the latency is too high, it can be determined that the server cannot provide bandwidth for the user, thereby ensuring the real-time needs of the user.
[0054] In addition, since the performance of each server is different, the total bandwidth that can be provided to each server is also different. For this reason, in this example, both the user and the edge server are modeled as a node. The user set is express, N j represents the jth user, and the subscript N represents the user set The total number of users in . The set of edge servers uses express, M i represents the i-th edge server, and the subscript M represents the edge server set The total number of edge servers in the i The bandwidth limit is C i .
[0055] At the same time, a virtual starting point is established to connect to all user nodes, and a virtual end point is established to connect to all edge server nodes. When 95 bandwidth billing is settled on a natural day or natural month, assuming that a natural day or natural month has a total of T moments, at each moment t, user N j The bandwidth requirement is The bandwidth demand of each user may change over time. The user needs to offload all of his / her bandwidth demand to the edge server at every moment and ensure that the total bandwidth of the edge server does not exceed its bandwidth limit.
[0056] At the same time, if the delay between the user node and the edge server node is low, bandwidth allocation can occur, otherwise, bandwidth allocation cannot occur. Indicates edge server M i With user N j The service delay between When the delay is greater than the delay threshold R, the service delay is too high and will affect the user experience. Set the user N j You cannot offload your bandwidth requirements to edge servers M i . Its expression is:
[0057]
[0058] In the formula, when When , it means edge server M i and user N j Unloading can occur between When , it means edge server M i and user N j Uninstallation cannot occur in between.
[0059] like Figure 3 As shown, in the example, it is assumed that there are three users and three edge servers. User 1 can dispatch traffic to edge server 2 and edge server 3, and user 2 and user 3 can only offload traffic to edge server 1.
[0060] When the edge server M i and user N j Unloading can occur between When the edge server M i and user N j As the starting point and the end point respectively, when the starting point and the end point are determined, a directed edge can be uniquely determined between the two. j As the starting point, the edge server M i As the end point, user N j and edge server M i Construct a directed edge with infinite capacity, 0 flow, and 0 weight between Directed Edge The capacity of It means that there is a directed edge The traffic volume is It means that there is a directed edge The weight used express.
[0061] At the same time, the edge server M i As the starting point start, user N j As the end point, at the edge server M i and user N j Construct directed edges with 0 capacity, 0 flow, and 0 weight between them Directed Edge The capacity of It means that there is a directed edge The traffic volume is It means that there is a directed edge The weight used It means that there is a directed edge and directed edges They are opposite sides of each other.
[0062] Add a virtual node S and regard the virtual node S as the starting point, t now Each user at the time is regarded as the end point, and the virtual node S and each user N j Construct directed edges with capacity 0, flow 0, and weight 0 in sequence
[0063] Specifically, for user N j , regard the virtual node S as the starting point start, and user N j As the end point, between virtual node S and user N j Construct directed edges with 0 capacity, 0 flow, and 0 weight between them Directed Edge Capacity Directed Edge Traffic Directed Edge Weight
[0064] Add virtual node E and change t now Each edge server at the time is regarded as the starting point and the virtual node E is regarded as the end point. i A directed edge with a capacity of the bandwidth upper limit of the edge server, a flow of 0, and a weight of 0 is constructed between the virtual node E and the edge server. Then form t now Topological network diagram at the moment
[0065] Specifically, for the edge server M i , the edge server M i As the starting point start, the virtual node E is regarded as the end point end, and the edge server M i The capacity between virtual node E is C i , directed edges with 0 flow and 0 weight Directed Edge Capacity Directed Edge Traffic Directed Edge Weight
[0066] After the above steps are completed, the following Figure 3 The network bandwidth allocation topology model G at the current moment is shown.
[0067] After completing the modeling as described above, the inventors found that by borrowing the idea of the traditional maximum flow algorithm, it is convenient to find a set of legal solutions. For example, imagine that a water pipe with sufficiently high water pressure is connected to the starting point of the above topology graph, and the water flow will be excluded from the end point. In this case, the water flow will flow freely in the above topology graph, and due to capacity limitations, the flow rate of the water at the end point will be a constant.
[0068] The water flow is regarded as the bandwidth demand, and the path that the water flows from the starting point to the end point is regarded as the bandwidth demand scheduling plan. Since the capacity from the starting point to the user is limited to the bandwidth demand of the user, the flow from the starting point to the user will not exceed the user's demand. At the same time, under normal circumstances, the server has sufficient bandwidth resources and will not fail to meet the user's requirements no matter how it is scheduled. Therefore, the capacity of the connection from the starting point to the user will definitely be filled by the traffic, which is exactly equal to the bandwidth required by the user. This ensures that the bandwidth demands of all users will be met and that too much bandwidth will not be allocated to them.
[0069] At the same time, the traffic flowing in the connection from the server to the end point represents the total bandwidth received by the server at a certain moment. Since the capacity of the connection from the server to the end point is set to the upper limit of the server's bandwidth, the traffic size will not exceed the upper limit of the server's bandwidth. This measure ensures that no server will be overloaded. Similarly, the traffic in the connection from the intermediate user to the server is the bandwidth allocation plan we get. Since we only establish connections between servers and users that meet the delay constraints, this ensures that no unloading that violates the delay constraints will occur.
[0070] Therefore, the connection capacity between the server and the user is set to be infinite, ensuring that traffic scheduling is absolutely free under legal conditions. If there is a legal solution, it will definitely be searched by this solution.
[0071] However, the above search method can only guarantee a legal allocation plan, without considering the 95 billing feature, and there is no guarantee for bandwidth cost. The following will introduce how to set server weights based on the simple algorithm and make full use of the 95 billing feature to reduce bandwidth costs.
[0072] First, we found that if the bandwidth demand is too dynamic in the servers that are scheduled at different times, it is easy to increase costs. You can imagine a worst-case scenario. In a hundred moments, the bandwidth demand is too dispersed, and all servers are used for six moments. In this way, we have to pay for all servers, even though these servers are only running 6% of the time. The above situation causes serious waste of resources, which we want to avoid as much as possible.
[0073] Therefore, this case hopes to propose to concentrate the traffic to as few edge servers as possible to prevent the need to pay for too many servers due to traffic dispersion. However, there is still a problem at this time, which is to choose which servers to be aggregated. If the bandwidth demand that the selected server can receive is very small, and the users connected to the server have almost no bandwidth demand, then the bandwidth may continue to be dispersed to the remaining servers uncontrollably.
[0074] Therefore, the total amount of bandwidth that may flow through the server at all times can be counted to guide bandwidth requests to servers with a large total amount of bandwidth that may flow through. The inventor believes that servers with a large total amount of bandwidth that may flow through have greater potential for aggregating traffic and can absorb more traffic.
[0075] Therefore, the specific approach of this case is as follows. Assume that the probability of users allocating bandwidth to each edge server is the same. Therefore, if user a is connected to server b, and the user's bandwidth demand at this time is d, then we believe that the bandwidth demand that user a may allocate to server b at this time is d divided by the number of edge servers that user a is connected to. Then we sort the servers according to the possible total bandwidth, and assign weights to each server according to the total bandwidth, so that the bandwidth demand can be allocated to the server with the most possible receiving bandwidth value as much as possible, so as to achieve the purpose of concentrating the bandwidth demand on a small number of servers as much as possible.
[0076] The specific approach is as follows: for all edge servers M i , we calculate the total bandwidth Fa that may flow through the edge server at all times i , the calculation formula is as follows:
[0077]
[0078] We sort all edge servers by total bandwidth, with the smallest bandwidth as the weight. Assign N, the weight with the largest bandwidth Assign it to 1, and so on.
[0079] Secondly, we found that under the 95% billing condition, the first 5% of traffic is not charged. We can call it the first 5% free traffic, and we call the moment when the first 5% free traffic is generated the free moment. If we can come up with an idea to make the first 5% bandwidth of each server large enough, we can meet more user bandwidth demands for free, because the user's bandwidth demand is constant, which invisibly reduces the part that needs to be paid.
[0080] Therefore, we will not charge for the 5% high bandwidth time in the 95 billing plan. Figure 4As shown, a mechanism is proposed to reasonably utilize the first 5% free traffic of all servers, so that the free flow of traffic is as much as possible, thereby reducing server costs.
[0081] First, we consider a simplified case where the bandwidth caps of the servers are the same and the latency constraints are satisfied between all servers and all users, so offloading can occur and the bandwidth demands of users do not fluctuate greatly over time.
[0082] In this case, the solution in this example can make full use of free traffic by simply staggering the free time in time and space. However, in reality, the bandwidth limits of heterogeneous servers vary greatly, and the server and user often have too high a delay to be unloaded, and the user's bandwidth requirements will also fluctuate greatly.
[0083] If the free time of the server is set at a time when there is little bandwidth demand, it will not only be difficult to gather enough traffic to make it free traffic at that time, but there will also be no free traffic available when the bandwidth demand is high, which will cause a resource mismatch. Therefore, in this example, the bandwidth value that all servers may receive at each time will be calculated, and the free time will be determined based on the size of the bandwidth value. In this way, when the bandwidth demand is high, there will be more servers in the free time to make full use of the free traffic to digest the large bandwidth demand, and at the same time, it will avoid the resource mismatch of the free time appearing at the time when the demand is small.
[0084] Specifically, in this example, the maximum bandwidth demand value that the edge server may receive at each moment is calculated, and the maximum 5% moments are selected after sorting, and the weight of the edge server at these 5% moments is set to 0, guiding the bandwidth demand to flow through the server with a small weight as much as possible at these moments. In this way, each server will use the 5% free moments as much as possible to reach the bandwidth peak, saving server costs. The specific steps are as follows.
[0085] Step S200
[0086] Calculate all possible flows through all M at all times i The total bandwidth is sorted and weighted according to the ranking. Calculate all possible flows through M at all times i The maximum total bandwidth for each M i Select a time period with the largest total bandwidth And set M i In When the first mark is made.
[0087] Specifically, for all edge servers M iIn this example, the maximum total bandwidth that may flow through the edge server at each moment can be calculated using the following formula:
[0088]
[0089] Afterwards, for each edge server M i , 1≤i≤M select T×5% of the total possible bandwidth allocation The maximum time, assuming that the set of T×5% of the times with the largest bandwidth demand is For a specific edge server at these times, you can set Otherwise, set in Is a variable flag indicating whether this algorithm selects server M i Impact traffic peak, occupy 95% of the first 5% of the free quota. The formula is as follows:
[0090]
[0091] Step S300
[0092] Afterwards, the directed edges in model G are The capacity is set to the current time N j The bandwidth requirement of M i When the first mark is not marked, The weight is set to To update model G.
[0093] Specifically, the topology network diagram Directed edges in The capacity is set to the current user N j Bandwidth requirements In addition, if If is 1, Not set to 0, otherwise set to weight factor Update the model G in this way. The formula is as follows:
[0094]
[0095]
[0096] Step S400
[0097] After the topological network is updated, the residual value is calculated according to the capacity and flow of the directed edges in the updated model G, and the connected path is searched; then the attributes of the directed edges of the model G are updated again according to the residual value, and the connected path is searched until there is no connected path in the model G. j With all M i Between The flow value and Subtract the flow value from the j To M i Scheduling results for offloading bandwidth requirements.
[0098] Specifically, after the topological network is updated, the residual value can be calculated using the capacity and flow of the directed edges in the updated model G, and the Bellman-Ford algorithm can be used to search the topological network graph. The connected path in the network is updated again according to the residual value. The properties of the directed edges and search for connected paths until the topological network graph There is no connected path in .
[0099] The specific steps include:
[0100] Step S410 takes S as the starting point and E as the end point in the model G. Any edge in Let the residual value of this edge be If the residual value is greater than 0, the edge is considered connected, otherwise it is considered disconnected.
[0101] Step S420 uses the Bellman-Ford algorithm to search for a connected path with the minimum cost from the starting point to the end point, and records the residual value of the edge with the minimum residual value on the path as resi_min.
[0102] Step S430 adds resi_min to the flow of all edges in the path searched in step S420, and adds resi_min to the cap of the reverse edges of all edges in the path searched in step S420.
[0103] In step S440 , it is determined whether resi_min is greater than 0, and steps S410 to S440 are repeatedly executed until resi_min is less than 0, and it is considered that there is no connected path in the model G.
[0104] At this time, user N j With all edge servers M i Connections between Flow value Subtract the flow value of the opposite edge For user N j To edge server M i The bandwidth required for offloading. That is, user N j Will The bandwidth requirements of the size are offloaded to the edge server M i For user N j By connecting to all edge servers and calculating the above values, we can get user N jBy performing the above operations on all users, a complete bandwidth scheduling plan at a certain moment can be obtained.
[0105] Finally, it is determined whether the bandwidth requirements at all times have been processed. If not, the above steps are repeated. If yes, the steps are terminated to complete the bandwidth scheduling.
[0106] In order to demonstrate the superiority of this example algorithm, Figure 5 As shown, two solutions are compared. One is to use only the search method for legal solutions proposed in this patent, namely the basic maximum flow algorithm, and the other is to add reasonable bandwidth demand scheduling, namely the method in this case. At the same time, by adjusting the delay threshold K, the different real-time requirements of the task are simulated to show that this algorithm has lower server costs than the native maximum flow algorithm when the user node and the edge server node are connected differently.
[0107] like Figure 5 As shown, the basic maximum flow algorithm indicated in the figure is a solution that only searches for legal solutions. It can be seen that after the patent solution adds reasonable bandwidth demands, the final scheduling result can significantly reduce the server bandwidth cost.
[0108] like Figure 6 As shown, another aspect of the present invention further provides a bandwidth allocation system for reducing network costs, which includes:
[0109] A storage unit, used to store a program for implementing any of the above-mentioned steps of the bandwidth allocation method for reducing network costs, so that the processing unit, the transceiver unit, and the scheduling unit can call, read and execute it in a timely manner;
[0110] The transceiver unit is used to receive the user node N j Bandwidth requests from edge server nodes M i Bandwidth quota information and N j To M i The service delay information is sent to the processing unit;
[0111] The processing unit is used to construct the network bandwidth allocation topology model G at the current moment, including: determining the user node N j With edge server node M i When the bandwidth requirement unloading condition is met, j With M i Build directed edges between Create a virtual node S, and connect S to each N at the current moment j Create directed edges Create a virtual node E, and connect E to each M at the current moment i Create directed edges Assign weights and flows to all directed edges.
[0112] The processing unit further calculates the possible flow through all M at all times i The total bandwidth is sorted to give weight according to the ranking Calculate all possible flows through M at all times i The maximum total bandwidth for each M i Select the 5% time periods with the largest total bandwidth And set M i In When =1; set the directed edges in model G The capacity is set to the current time N j Bandwidth requirements Determine when M i of When it is 1, The weight is set to 0, otherwise it is set to weight To update model G;
[0113] The processing unit further calculates the residual value according to the capacity and flow of the directed edge in the updated model G, and searches for the connected path; then updates the attributes of the directed edge of the model G again according to the residual value, and searches for the connected path until there is no connected path in the model G. j With all M i Between The flow value and Subtract the flow value of N j To M i Unload the scheduling result of bandwidth demand and send it to the scheduling unit;
[0114] The scheduling unit is N according to the scheduling result j To the corresponding M i Offload the corresponding bandwidth requirements.
[0115] In summary, the bandwidth allocation method and system for reducing network costs provided by the present invention are different from the existing bandwidth allocation schemes, which generally only consider the service guarantee for the client side, but do not consider the complex relationship between customer demand and service cost in the edge computing scenario, thus causing the problem of uncontrollable service cost. The present invention can effectively reduce the operating cost of the server under a similar 95 charging model while meeting the user's latency and bandwidth requirements.
[0116] The preferred embodiments of the present invention disclosed above are only used to help explain the present invention. The preferred embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can understand and use the present invention well. The present invention is only limited by the claims and their full scope and equivalents. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
[0117] Those skilled in the art can understand that, in addition to implementing the system, device and its various modules provided by the present invention in a purely computer-readable program code, it is entirely possible to implement the same program in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers and embedded microcontrollers by logically programming the method steps. Therefore, the system, device and its various modules provided by the present invention can be considered as a hardware component, and the modules included therein for implementing various programs can also be regarded as structures within the hardware component; the modules for implementing various functions can also be regarded as both software programs for implementing the method and structures within the hardware component.
[0118] In addition, all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including a number of instructions to enable a single-chip microcomputer, a chip or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0119] In addition, various implementation modes of the embodiments of the present invention may be arbitrarily combined, and as long as they do not violate the concept of the embodiments of the present invention, they should also be regarded as the contents disclosed by the embodiments of the present invention.
Claims
1. A bandwidth allocation method for reducing network costs, characterized in that the steps include: Step S100 is to meet the bandwidth requirement unloading conditions of the user node With edge server nodes Build directed edges between , ; For each Establish a directed edge with virtual node S For each Establish a directed edge with virtual node E ; Assign weights and flows to all directed edges to form the network bandwidth allocation topology model at the current moment ; Step S200 Calculate all possible currents flowing through all The total bandwidth is sorted and weighted according to the ranking. , calculate all the possible flows at all times The maximum total bandwidth for each Select a time period with the largest total bandwidth , and set In When the first mark is made; Step S300: The capacity is set to the current moment The bandwidth requirement is determined when When the first mark is not marked, The weight is set to , to update model G; Step S400 calculates the residual value according to the capacity and flow of the directed edge in the updated model G, and searches for the connected path; then updates the attributes of the directed edge of the model G again according to the residual value, and searches for the connected path until there is no connected path in the model G. With all Between The flow value and Subtract the flow value of Towards Scheduling results for offloading bandwidth requirements.
2. The bandwidth allocation method for reducing network costs according to claim 1, characterized in that: In step S100, the step of determining the bandwidth demand unloading condition includes: setting the delay threshold to R, the edge server node With user node The service delay between ,if Indicates that the bandwidth requirement offloading conditions are met. If The bandwidth demand offloading condition is not met.
3. The bandwidth allocation method for reducing network costs according to claim 1, characterized in that: In step S100, the directed edge is constructed The steps include: As the starting point, the edge server node As the end point, and Construct a directed edge with infinite capacity, 0 flow, and 0 weight between .
4. The bandwidth allocation method for reducing network costs according to claim 1, characterized in that: In step S100, the directed edge is constructed The steps include: As the starting point, the user node As the end point, and Construct directed edges with 0 capacity, 0 flow, and 0 weight between them .
5. The bandwidth allocation method for reducing network costs according to claim 1, characterized in that: In step S100, a directed edge is constructed. The steps include: taking the virtual node S as the starting point, the user node at the current moment are regarded as the end points, at S and Construct directed edges with capacity 0, flow 0, and weight 0 in sequence .
6. The bandwidth allocation method for reducing network costs according to claim 1, characterized in that: In step S100, a directed edge is constructed. The steps include: setting the edge server node at the current moment are regarded as the starting point and the virtual node E is regarded as the end point. and E are connected to build edge server nodes The bandwidth limit, flow rate and weight of the directed edge are 0. .
7. The bandwidth allocation method for reducing network costs according to claim 1, characterized in that: The step of calculating the residual value according to the capacity and flow of the directed edge in the updated model G and searching for the connected path in step S400 includes: S410 takes S as the starting point and E as the end point in model G, and The result of subtracting the flow value from the capacity value is taken as the residual value. If the residual value is greater than 0, the edge is considered connected, otherwise it is considered disconnected.
8. The bandwidth allocation method for reducing network costs according to claim 7, characterized in that: In step S400, the step of updating the attributes of the directed edges of the model G again according to the residual value and searching for a connected path until no connected path exists in the model G includes: S420 uses the Bellman-Ford algorithm to search for a connected path with the minimum cost from the starting point to the end point, and records the residual value of the edge with the smallest residual value on the path as ; S430 adds the flow values of all edges in the path searched in step S420 and the capacity values of their reverse edges to , to update the attributes of the directed edges of model G; S440 repeats steps S410 to S440 until If it is less than 0, it is considered that there is no connected path in model G.
9. The bandwidth allocation method for reducing network costs according to claim 1, characterized in that: The step S200 For each The 5% moments with the largest total bandwidth are selected.
10. A bandwidth allocation system for reducing network costs, characterized in that include: A storage unit, used to store a program for implementing the steps of the bandwidth allocation method for reducing network costs as described in any one of claims 1 to 8, so that the processing unit, the transceiver unit, and the scheduling unit can call, read and execute it in a timely manner; The transceiver unit is used to receive user nodes Bandwidth requests from edge server nodes Bandwidth quota information and arrive The service delay information is sent to the processing unit; The processing unit is used to construct the network bandwidth allocation topology model at the current moment The steps include: determining the user node With edge server nodes When the bandwidth requirement unloading condition is met, and Build directed edges between , ; Establish a virtual node S, between S and each Create directed edges ; Establish a virtual node E, between E and each Create directed edges ; Assign weights and flows to all directed edges; The processing unit further calculates all possible flows through all The total bandwidth is sorted and weighted according to the ranking. , calculate all the possible flows at all times The maximum total bandwidth for each Select the 5% time periods with the largest total bandwidth , and set In When =1; the directed edges in model G The capacity is set to the current moment Bandwidth requirements , judge when of When it is 1, The weight is set to 0, otherwise it is set to weight , to update model G; The processing unit further calculates the residual value according to the capacity and flow of the directed edge in the updated model G, and searches for the connected path; then updates the attributes of the directed edge of the model G again according to the residual value, and searches for the connected path until there is no connected path in the model G. With all Between The flow value and Subtract the flow value of Towards Unload the scheduling result of bandwidth demand and send it to the scheduling unit; The scheduling unit is based on the scheduling results. To correspond Offload the corresponding bandwidth requirements.
