CDN tenant bandwidth allocation method, device, equipment, medium and product

By obtaining and optimizing tenant bandwidth information in the CDN cluster, the problem of limited bandwidth resources in the CDN system is solved, reasonable bandwidth allocation and service quality guarantee are achieved, and user experience is improved.

CN119276720BActive Publication Date: 2025-05-06BEIJING VOLCANO ENGINE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411793340.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-05-06
Estimated Expiration
2044-12-06

AI Technical Summary

Technical Problem

The bandwidth resources in the CDN system are limited. How to reasonably allocate the bandwidth resources of tenants to avoid overload or waste has become an important challenge for CDN service providers.

Method used

By obtaining the bandwidth upper limit information of tenants and servers in the CDN cluster, the bandwidth usage of tenants is monitored in real time, and based on the real-time bandwidth, bandwidth upper limit information and service quality changes, the scheduling bandwidth is optimized and redirected information is generated to realize real-time bandwidth scheduling.

Benefits of technology

It realizes reasonable scheduling of CDN tenants' bandwidth, avoids server overload or waste of bandwidth resources, ensures the overall service quality of the CDN cluster, reduces network bandwidth resource costs, and improves the user experience of CDN tenants.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119276720B_ABST
    Figure CN119276720B_ABST
Patent Text Reader

Abstract

The present disclosure relates to the field of computer technology, and discloses a bandwidth allocation method, device, equipment, medium and product for CDN tenants. Among them, the method includes: obtaining bandwidth upper limit information of tenants and servers in a CDN cluster, the servers in the CDN cluster include a first server corresponding to the CDN tenant and a second server for traffic scheduling; obtaining the real-time bandwidth of the CDN tenant on the corresponding first server; optimizing the scheduling bandwidth of the CDN tenant based on the real-time bandwidth, bandwidth upper limit information and the service quality change of the CDN tenant's bandwidth from the first server to the second server, and obtaining the target scheduling bandwidth of the CDN tenant from the first server to the second server; generating redirection information based on the target scheduling bandwidth of the CDN tenant; and scheduling the real-time bandwidth of the CDN tenant based on the redirection information. By implementing this technical solution, the reasonable allocation of CDN tenant bandwidth resources is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a method, device, equipment, medium and product for allocating bandwidth to CDN tenants. Background Art

[0002] With the growth of Internet content, Content Delivery Network (CDN) has been widely used as a key technology to improve content transmission efficiency and user experience. However, since the bandwidth resources in the CDN system are limited, for CDN service providers that provide commercial services to multiple tenants, how to reasonably allocate tenants' bandwidth resources to avoid overload or waste is an urgent problem to be solved. Summary of the invention

[0003] In view of this, the present disclosure provides a method, apparatus, device, medium and product for allocating bandwidth to CDN tenants to solve the problem of bandwidth allocation to CDN tenants.

[0004] In a first aspect, the present disclosure provides a bandwidth allocation method for a CDN tenant, comprising: obtaining bandwidth upper limit information of tenants and servers in a CDN cluster, wherein the servers in the CDN cluster include a first server corresponding to the CDN tenant and a second server for traffic scheduling; obtaining the real-time bandwidth of the CDN tenant on the corresponding first server; optimizing the scheduling bandwidth of the CDN tenant based on the real-time bandwidth, the bandwidth upper limit information, and a change in the service quality of the CDN tenant's bandwidth when it is scheduled from the first server to the second server, and obtaining a target scheduling bandwidth for the CDN tenant to be scheduled from the first server to the second server; generating redirection information based on the target scheduling bandwidth of the CDN tenant; and scheduling the real-time bandwidth of the CDN tenant based on the redirection information.

[0005] In a second aspect, the present disclosure provides a bandwidth allocation device for a CDN tenant, comprising: a bandwidth upper limit acquisition module, used to obtain bandwidth upper limit information of tenants and servers in a CDN cluster, wherein the servers in the CDN cluster include a first server corresponding to the CDN tenant and a second server for traffic scheduling; a real-time bandwidth acquisition module, used to obtain the real-time bandwidth of the CDN tenant on the corresponding first server; a bandwidth optimization module, used to optimize the scheduling bandwidth of the CDN tenant based on the real-time bandwidth, the bandwidth upper limit information and the service quality change of the CDN tenant's bandwidth scheduled from the first server to the second server, and obtain the target scheduling bandwidth of the CDN tenant scheduled from the first server to the second server; a redirection module, used to generate redirection information based on the target scheduling bandwidth of the CDN tenant; and a bandwidth scheduling module, used to schedule the real-time bandwidth of the CDN tenant based on the redirection information.

[0006] In a third aspect, the present disclosure provides an electronic device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the bandwidth allocation method for CDN tenants of the above-mentioned first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0007] In a fourth aspect, the present disclosure provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the bandwidth allocation method for CDN tenants of the first aspect or any corresponding embodiment thereof.

[0008] In a fifth aspect, the present disclosure provides a computer program product, including computer instructions, where the computer instructions are used to enable a computer to execute the bandwidth allocation method for CDN tenants of the above-mentioned first aspect or any corresponding embodiment thereof.

[0009] The bandwidth allocation method, device, equipment, medium and product for CDN tenants provided by the present disclosure, combined with the real-time bandwidth of CDN tenants in the CDN cluster, the bandwidth upper limit information of tenants and servers, and the service quality changes caused by cross-server scheduling, determine the scheduling bandwidth generated by CDN tenants for optimization, so as to determine the target scheduling bandwidth actually required by CDN tenants, and generate redirection information according to the target scheduling bandwidth to realize real-time bandwidth scheduling. In this way, the bandwidth of CDN tenants can be reasonably scheduled, and reasonable bandwidth resources can be allocated to CDN tenants, avoiding server overload or waste of bandwidth resources, thereby avoiding the problem of service quality degradation caused by unreasonable bandwidth resource allocation, ensuring the overall service quality of the CDN cluster, reducing the cost of network bandwidth resources, and improving the user experience of CDN tenants. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0011] Figure 1 is a flow chart of a bandwidth allocation method for another CDN tenant according to an embodiment of the present disclosure;

[0012] Figure 2 is a flow chart of a method for allocating bandwidth to CDN tenants according to an embodiment of the present disclosure;

[0013] Figure 3 is a flow chart of a bandwidth allocation method for another CDN tenant according to an embodiment of the present disclosure;

[0014] Figure 4 is a schematic diagram of a directed acyclic graph according to an embodiment of the present disclosure;

[0015] Figure 5 is a flow chart of another bandwidth allocation method for CDN tenants according to an embodiment of the present disclosure;

[0016] Figure 6 is a structural block diagram of a bandwidth allocation device for CDN tenants according to an embodiment of the present disclosure;

[0017] Figure 7 It is a schematic diagram of the hardware structure of the electronic device according to the embodiment of the present disclosure. DETAILED DESCRIPTION

[0018] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.

[0019] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0020] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0021] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0022] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0023] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0024] With the explosive growth of Internet content, CDN has been widely used as a key technology to improve content transmission efficiency and user experience. However, since the bandwidth resources in the CDN system are limited, for CDN service providers that provide commercial services to multiple tenants, how to reasonably constrain the bandwidth occupied by a single / multiple tenants, and reasonably allocate bandwidth resources under high load conditions to avoid overload or resource waste has become one of the important topics of CDN optimization. At present, the bandwidth speed limit scheme adopted for CDN tenants in related technologies is mainly: when the global bandwidth is detected to be over-limited (exceeding the service capacity / contractual capacity), the server actively reduces the speed and limits the flow, or agrees with the client on the HTTP status code (such as 499) to switch the service provider, but these two schemes can be bypassed by the client by increasing the number of concurrent connections, and usually adopt the form of global unified flow limit by percentage, which makes it difficult to achieve global server load balancing.

[0025] like Figure 1 As shown, multiple CDN tenants access multiple servers in the CDN cluster, which inevitably leads to bandwidth exceeding the limit for one or several servers, and also for tenants. If the above bandwidth speed limit method is adopted, it is not only difficult to ensure the service quality of the server, but also difficult to ensure the load balance of the server, thus affecting the CDN service experience of the tenants.

[0026] In response to the deficiencies in the relevant technologies, the technical solution disclosed in the present invention optimizes the scheduling bandwidth generated by CDN tenants by counting global bandwidth, real-time server load and service quality, and uses redirection information to schedule real-time bandwidth. The bandwidth of a single / multiple tenants that exceeds the service capacity / contractual capacity is scheduled on demand to the selected CDN server node that will not affect other tenants, thereby achieving fast, accurate and intelligent CDN sub-tenant bandwidth speed limiting.

[0027] That is, multiple servers are pre-set from the CDN cluster servers for scheduling excess bandwidth. When the bandwidth of the first server corresponding to the CDN tenant exceeds the limit, the excess bandwidth is scheduled from the first server to the second server that does not affect other tenants through redirection information, so as to achieve accurate bandwidth speed limit for CDN tenants. Figure 1 As shown, if the bandwidth of tenant 1 exceeds the limit, the excess bandwidth of tenant 1 is scheduled from the first server to the second server through redirection information.

[0028] According to an embodiment of the present disclosure, an embodiment of a method for allocating bandwidth to CDN tenants is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0029] In this embodiment, a bandwidth allocation method for CDN tenants is provided, which can be used for electronic devices such as computers, servers, etc. Figure 2 is a flow chart of a bandwidth allocation method for CDN tenants according to an embodiment of the present disclosure. Figure 2 As shown, the process includes the following steps:

[0030] Step S101, obtaining bandwidth upper limit information of tenants and servers in the CDN cluster.

[0031] The servers in the CDN cluster include a first server corresponding to the CDN tenant and a second server used for traffic scheduling.

[0032] Tenants refer to clients that use CDN services in a CDN cluster. Each tenant in a CDN cluster has services for distributing content on the CDN network. Specifically, for each tenant in a CDN cluster, each tenant has corresponding specific requirements and configurations, and the CDN cluster will configure corresponding network information for each tenant, including bandwidth restrictions, cache policies, access control, content distribution areas, etc.

[0033] The servers in the CDN cluster are used to store and distribute tenants' content. The servers in the CDN cluster are usually distributed in different geographical locations to form a distributed network to achieve fast and efficient content distribution. When a tenant's user requests to access content, the main server of the CDN cluster will select the server closest to the tenant to provide services based on the tenant's geographical location and network conditions, thereby reducing data transmission delays and increasing content loading speed.

[0034] The bandwidth cap information indicates the maximum rate limit that data transmission can reach within a certain period of time. For tenants and servers in the CDN cluster, the bandwidth cap information determines how fast the tenant's content can be distributed to the client and the maximum traffic load that the server can withstand.

[0035] The first server is a server for allocating normal bandwidth to CDN tenants (i.e., neither the bandwidth of the first server nor the bandwidth of the CDN tenant is overloaded); when the bandwidth of the first server is overloaded or the bandwidth of the CDN tenant is overloaded, the bandwidth exceeding the bandwidth upper limit can be scheduled to the second server, so that the overloaded bandwidth can be scheduled through the second server.

[0036] Specifically, the CDN cluster has a corresponding CDN management system, which stores network configuration information of each tenant and server connected to the CDN cluster, including bandwidth usage, bandwidth cap settings, and overage fees, etc. Through the network configuration information stored in the CDN management system, the bandwidth cap information corresponding to each tenant and server can be obtained.

[0037] Step S102: obtaining the real-time bandwidth of the CDN tenant on the corresponding first server.

[0038] The real-time bandwidth is the bandwidth occupied by the CDN tenant on the first server monitored in real time. Specifically, the CDN tenant can occupy bandwidth resources on multiple first servers at the same time. As mentioned above, the CDN cluster has a corresponding master server and a CDN management system. The CDN management system runs on the master server, and the CDN management system monitors the bandwidth usage of CDN tenants on each server in real time. Therefore, the CDN management system can read the real-time bandwidth generated by the CDN tenant on one or more corresponding first servers. Of course, bandwidth monitoring tools can also be used to monitor the real-time bandwidth generated by CDN tenants on the corresponding first servers, which is not specifically limited here.

[0039] Step S103, based on the real-time bandwidth, bandwidth upper limit information, and the service quality change of the CDN tenant's bandwidth being scheduled from the first server to the second server, the scheduling bandwidth of the CDN tenant is optimized to obtain the target scheduling bandwidth of the CDN tenant from the first server to the second server.

[0040] The service quality change is used to characterize the service quality difference caused by scheduling from the first server to the second server. Considering the differences in geographical locations and network topologies between the first server and the second server, the service quality will change after the bandwidth is scheduled from the first server to the second server.

[0041] Specifically, changes in service quality can be characterized by indicators such as data transmission delay (for example, if the location of the second server is not ideal or the network condition is poor, CDN tenants may experience increased delays when performing data transmission), bandwidth availability (for example, after scheduling bandwidth to the second server, it is necessary to ensure that the second server has sufficient bandwidth resources to meet the demand. If the bandwidth capacity of the second server is limited, it may cause bandwidth bottlenecks, affecting data transmission speed and service quality), stability (for example, different servers have different stability and reliability. If the second server has hardware failures, network interruptions or other problems, it will affect the continuity of the service), cache hit rate (CDN usually uses cache to improve the efficiency of content delivery. If the cache configuration of the second server is different from that of the first server, or the hit rate of the content requested by the user in the cache of the second server is low, it may lead to more back-to-source requests, increasing the load on the source station), and transmission cost (for example, the data transmission costs in different regions are different. If the transmission cost of the second server is higher than that of the first server, it will lead to an increase in the data transmission cost). In some specific implementations, the service quality may be scored by comprehensively considering multiple indicators that characterize the service quality, and the service quality change may be characterized by the difference in the service quality scores between the first server and the second server. For example, the larger the difference in the service quality scores, the higher the service quality of the first server is than that of the second server.

[0042] The target scheduling bandwidth is the scheduling bandwidth provided to CDN tenants after optimization. In order to ensure the service quality of CDN tenants, it is necessary to optimize the scheduling bandwidth of CDN tenants in combination with the changes in service quality to optimize the bandwidth resources of CDN tenants. Specifically, the excess bandwidth of CDN tenants is determined according to the real-time bandwidth and bandwidth upper limit information of CDN tenants. In order to minimize the service quality gap caused by cross-server bandwidth scheduling, the service quality changes between the first server and the second server are combined to optimize the excess bandwidth generated by CDN tenants, while ensuring that the server overload problem in the CDN cluster is as small as possible. The target scheduling bandwidth scheduled from the first server to the second server is determined, so that the bandwidth requirements of CDN tenants can be guaranteed after bandwidth scheduling, and the service quality of CDN tenants can be met.

[0043] Step S104: Generate redirection information based on the target scheduling bandwidth of the CDN tenant.

[0044] The redirection information indicates redirecting the CDN tenant's request to the selected second server, that is, redirecting the CDN tenant's request from the first server to the second server through the redirection information. Specifically, the redirection information includes the IP address or domain name, port number, protocol, etc. of the second server, which is not specifically limited here.

[0045] After determining the target scheduling bandwidth of the CDN tenant, the current bandwidth usage and available bandwidth of each second server in the CDN cluster are analyzed, and a server that can meet the bandwidth requirements is selected from multiple second servers in the CDN cluster to ensure that the selected second server can provide a good service quality. Then, according to the selected second server and the target scheduling bandwidth, the corresponding redirection information is generated to redirect the user's request to the selected second server.

[0046] Step S105: Schedule the real-time bandwidth of the CDN tenant based on the redirection information.

[0047] The generated redirection information is updated to the configuration information of the CDN cluster, and the redirection information is used as the bandwidth scheduling execution strategy. When bandwidth scheduling needs to be performed, the main server of the CDN cluster can perform on-demand routing and on-demand distribution of CDN tenants' requests according to the redirection information, so as to quickly and accurately limit the bandwidth for CDN sub-tenants on the basis of ensuring the service quality of CDN tenants, and realize real-time bandwidth scheduling.

[0048] The bandwidth allocation method for CDN tenants provided in this embodiment combines the real-time bandwidth of CDN tenants in the CDN cluster, the bandwidth upper limit information of tenants and servers, and the service quality changes caused by cross-server scheduling to determine the scheduling bandwidth generated by CDN tenants for optimization, so as to determine the target scheduling bandwidth actually required by CDN tenants, and generate redirection information according to the target scheduling bandwidth to achieve real-time bandwidth scheduling. In this way, the bandwidth of CDN tenants can be reasonably scheduled, and reasonable bandwidth resources can be allocated to CDN tenants, avoiding server overload or waste of bandwidth resources, thereby avoiding the problem of service quality degradation caused by unreasonable bandwidth resource allocation, ensuring the overall service quality of the CDN cluster, reducing the cost of network bandwidth resources, and improving the user experience of CDN tenants.

[0049] In this embodiment, a bandwidth allocation method for CDN tenants is provided, which can be used for electronic devices such as computers, servers, etc. Figure 3 is a flow chart of a bandwidth allocation method for CDN tenants according to an embodiment of the present disclosure. Figure 3 As shown, the process includes the following steps:

[0050] Step S201, obtain bandwidth upper limit information of tenants and servers in the CDN cluster, where the servers in the CDN cluster include a first server corresponding to the CDN tenant and a second server for traffic scheduling. Figure 2 Step S101 of the illustrated embodiment will not be described in detail here.

[0051] Step S202: Obtain the real-time bandwidth of the CDN tenant on the corresponding first server. Figure 2 Step S102 of the illustrated embodiment will not be described in detail here.

[0052] Step S203, based on the real-time bandwidth, bandwidth upper limit information, and the service quality change of the CDN tenant's bandwidth being scheduled from the first server to the second server, the scheduling bandwidth of the CDN tenant is optimized to obtain the target scheduling bandwidth of the CDN tenant being scheduled from the first server to the second server.

[0053] Specifically, the above step S203 includes:

[0054] Step S2031, determining a directed acyclic graph corresponding to the bandwidth scheduling of the CDN cluster.

[0055] The nodes of the directed acyclic graph are used to represent bandwidth scheduling nodes of the CDN, and the edges of the directed acyclic graph are used to represent bandwidth scheduling weights. The bandwidth scheduling weights are determined based on bandwidth upper limit information and a change in service quality from the first server to the second server.

[0056] The directed acyclic graph is used to reflect the bandwidth optimization allocation of the CDN cluster in bandwidth scheduling to improve the network performance and service quality of the CDN. Specifically, the tenants, first servers, second servers, and bandwidth resource monitoring units contained in the CDN cluster are used as nodes of the directed acyclic graph. The flow of bandwidth scheduling is characterized by directed edges between the nodes, that is, the directed edge from one node to another node represents the bandwidth scheduling from one node to another node. At the same time, the dependency between the nodes is determined according to the architecture and scheduling strategy of the CDN cluster. For example, if a server needs to obtain data or resources from other servers, there will be a directed edge from the server that provides the data to the server that receives the data. When constructing a directed acyclic graph, the available bandwidth and bandwidth demand of each node should be considered, and the bandwidth scheduling weight is represented by the weight of the edge to determine the structure of the directed acyclic graph according to the bandwidth scheduling weight.

[0057] In some optional implementations, the determining of the change in the quality of service from the first server to the second server includes:

[0058] Step a1, obtaining the server quantity of the second servers, and determining the service quality difference between the first server and each second server.

[0059] Step a2: determining a mean value of service quality variation based on each service quality difference and the number of servers.

[0060] Step a3: determine the service quality change amount by taking the service quality change mean.

[0061] The server quantity of the second server is the server quantity pre-set in the CDN cluster for traffic scheduling, and the poor service quality indicates the service quality gap caused by scheduling the first server to the second server. The service quality of the first server and the second server can be obtained by searching the CDN management system.

[0062] The service quality differences are accumulated to obtain the accumulated value of the service quality differences; then the average of the service quality differences can be calculated by combining the accumulated value with the number of servers of the second server, which is the mean of the service quality change, and the mean of the service quality change is used as the service quality change amount.

[0063] Specifically, the service quality change is determined as follows:

[0064]

[0065] in, From the first server jThe average value of the service quality difference of the associated second server is used to adjust the excess bandwidth with less impact on the quality as much as possible; T represents the server number of the second server; From the first server j Transfer to the second server t The quality of service is poor.

[0066] In the above implementation, by taking the mean value of service quality change as the service quality change amount, it can be ensured that the service quality change amount can be relatively accurate and objective, which to a certain extent ensures the accuracy of bandwidth scheduling and avoids cross-server scheduling that causes service quality degradation.

[0067] Step S2032: Based on the real-time bandwidth and the directed acyclic graph, the scheduling bandwidth of the CDN tenant is optimized to obtain a target scheduling bandwidth for the CDN tenant to schedule from the first server to the second server.

[0068] Combined with the real-time bandwidth of CDN tenants and the constructed directed acyclic graph, when bandwidth exceeds the limit, the scheduling bandwidth generated by CDN tenants is optimized through the directed acyclic graph to adjust the scheduling bandwidth required by CDN tenants to the appropriate second server. The second server provides the CDN tenants with the target scheduling bandwidth they need, ensuring that the total bandwidth of the CDN tenants on the first server of the CDN cluster after scheduling is within the agreed service capacity, and that the server overload problem in the CDN cluster is as small as possible, and the service quality gap caused by cross-server bandwidth scheduling is as small as possible.

[0069] That is, based on real-time bandwidth and directed acyclic graph, optimizing the scheduling bandwidth of CDN tenants needs to meet the constraint conditions: the total bandwidth of all servers (except the second server) of the scheduled CDN tenant in the CDN cluster is within the agreed service capacity, that is:

[0070]

[0071] Wherein, M indicates that there are M first servers in the CDN cluster; Indicates the CDN tenant i ( i= 1,2...N) agreed bandwidth limit, Indicates CDN tenant i On the first server j ( j= 1,2...M) real-time bandwidth.

[0072] At the same time, the goal to be achieved is to minimize the CDN server overload problem, that is:

[0073]

[0074] Wherein, M indicates that there are M first servers in the CDN cluster; Indicates j The upper limit of bandwidth that the first server can provide, Indicates the first server j Real-time bandwidth (including ).

[0075] At the same time, the goal that needs to be achieved is to minimize the service quality gap caused by cross-server bandwidth scheduling, that is:

[0076]

[0077] in, From the first server p To the second server q Scheduled CDN tenants i bandwidth; From the first server p Transfer to the second server q The quality of service is poor.

[0078] In some optional implementations, the bandwidth scheduling nodes of the above-mentioned directed acyclic graph include a global bandwidth monitoring node, a tenant bandwidth monitoring node, a tenant current limiting aggregation node, a tenant total current limiting scheduling node, a first server, a second server and a bandwidth aggregation node; the tenant bandwidth monitoring node is connected to the first server and the tenant current limiting aggregation node through edges respectively; the tenant current limiting aggregation node is connected to the tenant total current limiting scheduling node through edges; the tenant total current limiting scheduling node is connected to the first server and the second server through edges respectively; the first server accesses the bandwidth aggregation node through two edges, and the second server accesses the bandwidth aggregation node through two edges.

[0079] like Figure 4 As shown, a directed acyclic graph is constructed by taking 2 CDN tenants, 3 first servers, and 2 second servers as an example. Among them, the global bandwidth monitoring node is used to represent the global bandwidth monitoring of the CDN cluster, that is, the bandwidth scheduling source node of the CDN tenant.

[0080] The tenant bandwidth monitoring node is used to detect the real-time bandwidth generated by the tenant on the first server. The tenant bandwidth monitoring node includes the identification information of the CDN tenant (such as Figure 4 Tenant 1, Tenant 2 shown), identification information of the first server corresponding to the CDN tenant (such as Figure 4 The first server 11, the first server 12, the first server 13) and a traffic unit for monitoring real-time bandwidth are shown.

[0081] The tenant current limiting aggregation node is used to aggregate the bandwidth of the same tenant. The number of tenant current limiting aggregation nodes is the same as the number of tenants. Figure 4 As shown, the real-time bandwidth generated by tenant 1 is aggregated to the tenant 1 current limiting aggregation node, and the real-time bandwidth generated by tenant 2 is aggregated to the tenant 2 current limiting aggregation node.

[0082] The tenant total current limiting scheduling node is used to call out the tenant bandwidth, that is, the tenant bandwidth is called out to the corresponding first server or second server through the tenant total current limiting scheduling node. The number of tenant total current limiting scheduling nodes is the same as that of tenant current limiting aggregation nodes, such as Figure 4 As shown, the current limiting aggregation node of tenant 1 aggregates the total bandwidth generated by it to the total current limiting scheduling node of tenant 1, and the current limiting aggregation node of tenant 2 aggregates the total bandwidth generated by it to the total current limiting scheduling node of tenant 2. The bandwidth aggregation node is used to aggregate the bandwidth generated by the first server and the second server after scheduling to ensure that the global bandwidth does not exceed the limit.

[0083] Specifically, the tenant bandwidth monitoring node is connected to the first server and the tenant current limiting aggregation node through directed edges, forming a bandwidth flow structure from the tenant bandwidth monitoring node to the first server, and a bandwidth flow structure from the tenant bandwidth monitoring node to the tenant current limiting aggregation node. The tenant current limiting aggregation node is connected to the tenant total current limiting scheduling node through edges, forming a bandwidth flow structure from the tenant bandwidth monitoring node to the tenant total current limiting scheduling node; at the same time, the tenant total current limiting scheduling node is connected to the first server and the second server through edges, forming a bandwidth flow structure from the tenant total current limiting scheduling node to the first server, and a bandwidth flow structure from the tenant total current limiting scheduling node to the second server, thereby calling out the bandwidth to the first server or the second server through a directed edge.

[0084] Then, the first server accesses the bandwidth aggregation node through two edges respectively, and the second server accesses the bandwidth aggregation node through two edges respectively. Thus, bandwidth overload and bandwidth non-overload can be distinguished through the two edges.

[0085] Specifically, the bandwidth scheduling weight for each directed edge of the directed acyclic graph can be < > in the form of.

[0086] Among them, the bandwidth scheduling weight of the directed edge from the global bandwidth monitoring node to the tenant bandwidth monitoring node can be expressed as < >.

[0087] The bandwidth scheduling weight of the directed edge from the tenant bandwidth monitoring node to its corresponding first server can be expressed as < >.

[0088] The bandwidth scheduling weight of the directed edge from the tenant bandwidth monitoring node to the tenant current limiting aggregation node can be expressed as < >.

[0089] The bandwidth scheduling weight of the directed edge from the tenant current limiting aggregation node to the tenant total current limiting scheduling node can be expressed as < >, where Indicates CDN tenant i The total bandwidth exceeds the bandwidth cap, if:

[0090]

[0091] in, Indicates the cost of transferring to the second server. The value is set to a negative constant, indicating that the excess bandwidth should be transferred to the second server as much as possible.

[0092] The bandwidth scheduling weight of the directed edge from the tenant total current limiting scheduling node to the second server can be expressed as < >.

[0093] The first server and the second server each have two edges to the bandwidth aggregation node, one of which is an overloaded edge and the other is a non-overloaded edge. Specifically, the two edges of the first server accessing the bandwidth aggregation node include a first overloaded edge and a first non-overloaded edge; the two edges of the second server accessing the bandwidth aggregation node include a second overloaded edge and a second non-overloaded edge; the bandwidth scheduling weight of the first overloaded edge is greater than the bandwidth scheduling weight of the second overloaded edge.

[0094] The bandwidth scheduling weight for the first non-overloaded edge / second non-overloaded edge can be set to < >, indicating that the value is The following bandwidths can be allocated to the first server / second server without any charge, where 0 indicates the allocation fee.

[0095] The bandwidth scheduling weight for the overloaded edge can be set to < >, where The bandwidth exceeds the upper limit of the bandwidth carried by the server. For the first server, It can be set to a larger normal number, which means that when the first server is overloaded, it will incur huge costs for the second server. It can be set to a smaller positive number, indicating that the overload allocation fee of the second server is smaller, thereby expelling the excess traffic to the second server.

[0096] It should be noted that when the excess bandwidth is expelled to the second server, it is necessary to combine Load balancing is performed among multiple second servers to avoid overload control of normal servers being affected by expelling all of them to the same second server.

[0097] In some optional implementations, the above step S2032 includes:

[0098] Step b1, based on the real-time bandwidth, determine the current total bandwidth of the CDN tenant.

[0099] Step b2: Determine whether the bandwidth exceeds the limit based on the current total bandwidth and the bandwidth upper limit information.

[0100] Step b3: When it is determined that the bandwidth is exceeded, the bandwidth to be scheduled is determined.

[0101] Step b4: optimizing the bandwidth to be scheduled of the CDN tenant according to the directed acyclic graph, and determining the target scheduling bandwidth of the CDN tenant to be scheduled from the first server to the second server.

[0102] Step b5: when there is no bandwidth overlimit, the real-time bandwidth generated by the CDN tenant is scheduled to the first server according to the directed acyclic graph.

[0103] The current total bandwidth represents the sum of the real-time bandwidth generated by CDN tenants on each server, that is, The difference between the current total bandwidth and the bandwidth upper limit of the CDN tenant is calculated to determine whether the current total bandwidth is greater than the bandwidth upper limit. When the total bandwidth is greater than the bandwidth upper limit, it indicates that the bandwidth is exceeded and the excess bandwidth needs to be scheduled.

[0104] Specifically, when there is bandwidth overlimit, the bandwidth exceeding the bandwidth upper limit is calculated based on the total bandwidth and the bandwidth upper limit, and the bandwidth exceeding the bandwidth upper limit is used as the bandwidth to be scheduled. The bandwidth to be scheduled is optimized according to the constructed directed acyclic graph to determine the target scheduling bandwidth from the first server to the second server based on the bandwidth to be scheduled. If it is only necessary to schedule the bandwidth to be scheduled from the first server to the second server, it can be determined that the target scheduling bandwidth is the bandwidth to be scheduled; if it is necessary to schedule the bandwidth to be scheduled to different second servers, the bandwidth to be scheduled can be divided according to the available bandwidth of each second server to obtain the target scheduling bandwidth scheduled from the first server to the second server.

[0105] When there is no bandwidth overlimit, the real-time bandwidth generated by the CDN tenant can be directly dispatched to the corresponding first server according to the constructed directed acyclic graph.

[0106] In the above implementation, when there is no bandwidth overlimit, the real-time bandwidth generated by the CDN tenant is scheduled to the first server according to the directed acyclic graph to ensure the service provision capability of the server to the tenant. When it is determined that there is bandwidth overlimit, the bandwidth to be scheduled of the CDN tenant is optimized according to the directed acyclic graph to determine the target scheduling bandwidth of the CDN tenant from the first server to the second server, thereby scheduling bandwidth resources according to the tenants, and realizing active intelligent scheduling of overlimit bandwidth.

[0107] In some optional implementations, the above step b4 includes:

[0108] Step b41, determining the bandwidth optimization path of the CDN tenant according to the edges of the directed acyclic graph.

[0109] Step b42: Optimize the bandwidth to be scheduled according to the bandwidth optimization path, and determine the target scheduling bandwidth for the CDN tenant to schedule from the first server to the second server.

[0110] The bandwidth optimization path is used to characterize the single-source shortest path of the CDN tenant from the source node of the directed acyclic graph to the bandwidth aggregation node. On the bandwidth optimization path, the bandwidth resource allocation of the CDN tenant is optimal and the cost is minimal. Specifically, after the directed acyclic graph is constructed, the bandwidth allocation problem of the CDN tenant is converted into a minimum cost maximum flow problem, and the maximum flow is the global total bandwidth to be allocated. Combined with the minimum cost maximum flow path-finding method, the optimal bandwidth optimization path is found in the directed acyclic graph, and all the nodes passed by the CDN tenant are determined, so that the bandwidth to be scheduled of the CDN tenant can be optimized according to the bandwidth optimization path, and the target scheduling bandwidth of the CDN tenant from the first server to the second server is determined.

[0111] In the above implementation, the bandwidth optimization path of the CDN tenant is determined by the edge of the directed acyclic graph, so that the bandwidth to be scheduled is optimized according to the bandwidth optimization path, thereby realizing intelligent allocation of bandwidth resources of the tenants from the global CDN cluster.

[0112] In some optional implementations, the above step b41 includes:

[0113] Step b411, based on the edges of the directed acyclic graph, generate multiple bandwidth scheduling paths for CDN tenants.

[0114] Step b412: determining the path weight value of each bandwidth scheduling path based on the bandwidth scheduling weight corresponding to the edge of the directed acyclic graph.

[0115] Step b413: determine a bandwidth optimization path from multiple bandwidth scheduling paths according to the path weight value.

[0116] The bandwidth scheduling path is a scheduling path formed from the source node to the bandwidth aggregation node. According to each directed edge in the directed acyclic graph, multiple bandwidth scheduling paths for each CDN tenant can be obtained. The path weight value is the accumulation of the bandwidth scheduling weights of each directed edge that the bandwidth scheduling path passes through, and the bandwidth scheduling weight represents the traffic of each edge and the bandwidth allocation cost. Therefore, the path weight value can be used to characterize that each bandwidth scheduling path has the minimum cost and maximum flow. Then, by comparing the path weight values ​​of each bandwidth scheduling path, the bandwidth optimization path can be determined from multiple bandwidth scheduling paths.

[0117] Specifically, when determining the bandwidth optimization path according to the directed acyclic graph, find an augmenting path from the source node to the bandwidth aggregation node each time, and ensure that this augmenting path has the lowest unit item transportation cost among all the augmenting paths currently. This augmenting path is the bandwidth scheduling path.

[0118] For a network with a certain capacity, since its maximum flow is finite and certain, there must be a moment when it is impossible to find an augmenting path in the current residual network. At this time, the total flow obtained is equal to the maximum flow. Since the unit cost of each augmentation is the smallest, the total cost must also be the least.

[0119] In some specific implementations, the problem of finding an augmenting path can be converted into a single-source shortest path problem, and there are edges with negative bandwidth scheduling weights, so the queue-optimized Bellman-Ford algorithm (SPFA) can be used to find the single-source shortest path. Specifically, select any node in the directed acyclic graph u (For example, tenant bandwidth monitoring node), record s arrive u The minimum cost is d(u) , the maximum capacity of the minimum cost path is f(s,u) , enumerate each edge ( u,v ), the cost of this edge is w ( u,v ),if d(v) > d(u) + w ( u,v ), then update d(v) = d(u) + w ( u,v )and f(s,v) =min( f(s,u) , f ( u,v )) and search in sequence until a s arrive t Minimum cost d(t) Paths and their maximum capacity f(s,t) , the path is an augmenting path, and the cost can be used d(t)* f(s,t) Expand the flow f(s,t) , and update the flow of the forward arc and the reverse arc of this augmented path at the same time. Repeat the above steps until no new augmented path can be found, which means that the single-source shortest path has been found, that is, the optimal bandwidth scheduling path.

[0120] In the above implementation, a bandwidth optimization path is determined from multiple bandwidth scheduling paths through the bandwidth scheduling weights corresponding to the edges of the directed acyclic graph, so as to achieve optimal scheduling of the target scheduling bandwidth while taking into account both bandwidth resources and bandwidth costs, thereby ensuring the overall service capability of the CDN cluster.

[0121] Step S204: Generate redirection information based on the target scheduling bandwidth of the CDN tenant. Figure 2 Step S104 of the illustrated embodiment will not be described in detail here.

[0122] Step S205: Schedule the real-time bandwidth of the CDN tenant based on the redirection information. Figure 2 Step S105 of the illustrated embodiment will not be described in detail here.

[0123] The bandwidth allocation method for CDN tenants provided in this embodiment optimizes the scheduling bandwidth of CDN tenants according to the real-time bandwidth and the directed acyclic graph by constructing a directed acyclic graph corresponding to the bandwidth scheduling of the CDN cluster, so as to determine the target scheduling bandwidth of CDN tenants, and can accurately and efficiently schedule the excess bandwidth to the selected server that does not affect other tenants, so as to avoid affecting the service quality of the server due to bandwidth resource preemption. At the same time, when performing bandwidth scheduling, priority will be given to scheduling servers that exceed the service capacity, and priority will be given to scheduling servers with less quality loss, so as to take into account both load balancing and the ability to avoid serious degradation of service quality.

[0124] In this embodiment, a bandwidth allocation method for CDN tenants is provided, which can be used for electronic devices such as computers, servers, etc. Figure 5 is a flow chart of a bandwidth allocation method for CDN tenants according to an embodiment of the present disclosure. Figure 5 As shown, the process includes the following steps:

[0125] Step S301, obtain bandwidth upper limit information of tenants and servers in the CDN cluster, where the servers in the CDN cluster include a first server corresponding to the CDN tenant and a second server for traffic scheduling. Figure 3 Step S201 of the illustrated embodiment will not be described in detail here.

[0126] Step S302: Obtain the real-time bandwidth of the CDN tenant on the corresponding first server. Figure 3 Step S202 of the illustrated embodiment will not be described in detail here.

[0127] Step S303: Based on the real-time bandwidth, bandwidth upper limit information, and the service quality change of the CDN tenant's bandwidth from the first server to the second server, the CDN tenant's scheduling bandwidth is optimized to obtain the target scheduling bandwidth of the CDN tenant from the first server to the second server. Figure 3 Step S203 of the illustrated embodiment will not be described in detail here.

[0128] Step S304: Generate redirection information based on the target scheduling bandwidth of the CDN tenant.

[0129] Specifically, the above step S304 includes:

[0130] Step S3041, obtaining a first domain name corresponding to the first server and a second domain name corresponding to the second server.

[0131] The domain name corresponding to the server is the name used to identify and access the server, which is usually composed of a series of characters, such as example.com. The domain name is resolved into the corresponding IP address through the DNS system so that CDN tenants can find and connect to the corresponding server on the CDN network.

[0132] Specifically, the first domain name is a name used to identify and access the first server in the CDN cluster, and the second domain name is a name used to identify and access the second server in the CDN cluster. The first domain name is stored in the configuration file of the first server, and the second domain name is stored in the configuration file of the second server. The main server of the CDN cluster can read the configuration files of the first server and the second server, and can obtain the corresponding first domain name by reading the configuration file of the first server, and can obtain the corresponding second domain name by reading the configuration file of the second server.

[0133] Step S3042: Determine the bandwidth jump ratio between the first server and the second server based on the target scheduling bandwidth.

[0134] The bandwidth jump ratio is the ratio of the target scheduling bandwidth called out by the first server to the available bandwidth of the second server. Specifically, the target scheduling bandwidth corresponding to the CDN tenant can be determined by combining the real-time bandwidth and bandwidth upper limit information, and the available bandwidth of the second server can be determined by combining the bandwidth usage of the second server. Then, the bandwidth jump ratio can be calculated based on the target scheduling bandwidth and the available bandwidth of the second server.

[0135] Step S3043: Generate redirection information based on the CDN tenant, the first domain name, the bandwidth jump ratio and the second domain name.

[0136] The CDN tenant, the first domain name, the bandwidth jump ratio and the second domain name are assembled according to the pre-set rules to generate the corresponding bandwidth allocation strategy. In a specific implementation, the target scheduling bandwidth can be assembled in the manner of CDN tenant-first domain name-bandwidth jump ratio-second server domain name maintained by the first server to obtain the corresponding bandwidth allocation strategy, and the redirection status code is dynamically returned according to the bandwidth allocation strategy through services such as Nginx, and redirection information is generated according to the redirection status code. Finally, the global bandwidth intelligent speed limit of the tenant is realized through the redirection information.

[0137] Step S305: Schedule the real-time bandwidth of the CDN tenant based on the redirection information. Figure 3 Step S205 of the illustrated embodiment will not be described in detail here.

[0138] The bandwidth allocation method for CDN tenants provided in this embodiment determines the bandwidth jump ratio through the target scheduling bandwidth, and constructs redirection information in combination with the obtained first domain name, second domain name and CDN tenant to redirect the CDN tenant's request to the second server, thereby achieving the expulsion of the CDN tenant's excess bandwidth to the second server, taking into account the server's service provision capability for other tenants, and achieving accurate scheduling of the excess bandwidth in combination with the redirection information and the second server.

[0139] In this embodiment, a bandwidth allocation device for CDN tenants is also provided, which is used to implement the above embodiments and preferred implementations, and will not be repeated here. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0140] This embodiment provides a bandwidth allocation device for CDN tenants, such as Figure 6 As shown, including:

[0141] The bandwidth upper limit acquisition module 501 is used to obtain bandwidth upper limit information of tenants and servers in the CDN cluster. The servers in the CDN cluster include a first server corresponding to the CDN tenant and a second server used for traffic scheduling.

[0142] The real-time bandwidth acquisition module 502 is used to acquire the real-time bandwidth of the CDN tenant on the corresponding first server.

[0143] The bandwidth optimization module 503 is used to optimize the scheduling bandwidth of the CDN tenant based on the real-time bandwidth, the bandwidth upper limit information and the service quality change of the CDN tenant's bandwidth from the first server to the second server, and obtain the target scheduling bandwidth of the CDN tenant from the first server to the second server.

[0144] The redirection module 504 is configured to generate redirection information based on the target scheduling bandwidth of the CDN tenant.

[0145] The bandwidth scheduling module 505 is used to schedule the real-time bandwidth of the CDN tenant based on the redirection information.

[0146] In some optional implementations, the bandwidth optimization module 503 includes:

[0147] A directed acyclic graph determination unit is used to determine a directed acyclic graph corresponding to the bandwidth scheduling of the CDN cluster. The nodes of the directed acyclic graph are used to represent the bandwidth scheduling nodes of the CDN, and the edges of the directed acyclic graph are used to represent the bandwidth scheduling weights, which are determined based on the bandwidth upper limit information and the change in the service quality from the first server to the second server.

[0148] The target scheduling bandwidth determination unit is used to optimize the scheduling bandwidth of the CDN tenant based on the real-time bandwidth and the directed acyclic graph to obtain the target scheduling bandwidth of the CDN tenant from the first server to the second server.

[0149] In some optional implementations, the directed acyclic graph determining unit includes:

[0150] The service quality change amount determining subunit is used to determine the service quality change amount scheduled from the first server to the second server.

[0151] Specifically, the service quality change determination subunit is used to obtain the server number of the second server, determine the service quality difference between the first server and each second server; determine the service quality change mean based on each service quality difference and the server number; and determine the service quality change amount based on the service quality change mean.

[0152] In some optional implementations, the bandwidth scheduling node of the directed acyclic graph includes a global bandwidth monitoring node, a tenant bandwidth monitoring node, a tenant current limiting aggregation node, a tenant total current limiting scheduling node, a first server, a second server and a bandwidth aggregation node; the tenant bandwidth monitoring node is connected to the first server and the tenant current limiting aggregation node through edges respectively; the tenant current limiting aggregation node is connected to the tenant total current limiting scheduling node through edges; the tenant total current limiting scheduling node is connected to the first server and the second server through edges respectively; the first server accesses the bandwidth aggregation node through two edges, and the second server accesses the bandwidth aggregation node through two edges.

[0153] In some optional implementations, the target scheduling bandwidth determination unit includes:

[0154] The total bandwidth determination subunit is used to determine the current total bandwidth of the CDN tenant based on the real-time bandwidth.

[0155] The over-limit determination subunit is used to determine whether there is a bandwidth over-limit based on the current total bandwidth and bandwidth upper limit information.

[0156] The to-be-scheduled determination subunit is used to determine the to-be-scheduled bandwidth when it is determined that the bandwidth exceeds the limit.

[0157] The target scheduling bandwidth determination subunit is used to optimize the bandwidth to be scheduled of the CDN tenant according to the directed acyclic graph, and determine the target scheduling bandwidth of the CDN tenant scheduled from the first server to the second server.

[0158] In some optional implementations, the target scheduling bandwidth determination unit further includes:

[0159] The real-time scheduling subunit is used to schedule the real-time bandwidth generated by the CDN tenant to the first server according to the directed acyclic graph when there is no bandwidth overlimit.

[0160] In some optional implementations, the target scheduling bandwidth determination subunit is specifically used to determine the bandwidth optimization path of the CDN tenant according to the edges of the directed acyclic graph; optimize the bandwidth to be scheduled according to the bandwidth optimization path, and determine the target scheduling bandwidth of the CDN tenant for scheduling from the first server to the second server.

[0161] In some optional implementations, the target scheduling bandwidth determination subunit is further used to generate multiple bandwidth scheduling paths for CDN tenants based on the edges of the directed acyclic graph; determine the path weight value of each bandwidth scheduling path based on the bandwidth scheduling weights corresponding to the edges of the directed acyclic graph; and determine a bandwidth optimization path from the multiple bandwidth scheduling paths according to the path weight values.

[0162] In some optional implementations, the redirection module 504 includes:

[0163] The domain name acquisition unit is used to acquire a first domain name corresponding to the first server and a second domain name corresponding to the second server.

[0164] The bandwidth jump ratio determining unit is used to determine the bandwidth jump ratio between the first server and the second server based on the target scheduling bandwidth.

[0165] The redirection generation unit is used to generate redirection information based on the CDN tenant, the first domain name, the bandwidth jump ratio and the second domain name.

[0166] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0167] The bandwidth allocation device for CDN tenants in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0168] The bandwidth allocation device for CDN tenants provided in this embodiment combines the real-time bandwidth of CDN tenants in the CDN cluster, the bandwidth upper limit information of tenants and servers, and the service quality changes caused by cross-server scheduling to determine the scheduling bandwidth generated by CDN tenants for optimization, so as to determine the target scheduling bandwidth actually required by CDN tenants, and generate redirection information according to the target scheduling bandwidth to realize real-time bandwidth scheduling. In this way, the bandwidth of CDN tenants can be reasonably scheduled, and reasonable bandwidth resources can be allocated to CDN tenants, avoiding server overload or waste of bandwidth resources, thereby avoiding the problem of service quality degradation caused by unreasonable bandwidth resource allocation, ensuring the overall service quality of the CDN cluster, reducing the cost of network bandwidth resources, and improving the user experience of CDN tenants.

[0169] The present disclosure also provides an electronic device having the above Figure 6 Bandwidth allocation device for CDN tenants is shown.

[0170] See also Figure 7 , Figure 7 is a schematic diagram of the structure of an electronic device provided by an optional embodiment of the present disclosure, such as Figure 7 As shown, the electronic device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 7 A processor 10 is taken as an example.

[0171] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0172] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0173] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0174] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0175] The electronic device further comprises a communication interface 30 for the electronic device to communicate with other devices or a communication network.

[0176] The embodiments of the present disclosure also provide a computer-readable storage medium. The above-mentioned method according to the embodiments of the present disclosure can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium and downloaded through a network, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0177] A part of the present disclosure may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present disclosure through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes, but is not limited to, source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.

[0178] Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A bandwidth allocation method for CDN tenants, characterized in that: The method comprises: Obtain bandwidth upper limit information of tenants and servers in a CDN cluster, where the servers in the CDN cluster include a first server corresponding to the CDN tenant and a second server for traffic scheduling; Obtaining the real-time bandwidth of the CDN tenant on the corresponding first server; Based on the real-time bandwidth, the bandwidth upper limit information, and the change in the service quality of the CDN tenant's bandwidth from the first server to the second server, the scheduling bandwidth of the CDN tenant is optimized to obtain the target scheduling bandwidth of the CDN tenant from the first server to the second server, including: determining a directed acyclic graph corresponding to the bandwidth scheduling of the CDN cluster, the nodes of the directed acyclic graph are used to represent the bandwidth scheduling nodes of the CDN, the edges of the directed acyclic graph are used to represent the bandwidth scheduling weight, and the bandwidth scheduling weight is determined based on the bandwidth upper limit information and the change in the service quality from the first server to the second server; based on the real-time bandwidth and the directed acyclic graph, the scheduling bandwidth of the CDN tenant is optimized to obtain the target scheduling bandwidth of the CDN tenant from the first server to the second server; generating redirection information based on the target scheduling bandwidth of the CDN tenant; Scheduling the real-time bandwidth of the CDN tenant based on the redirection information; Among them, the bandwidth scheduling nodes of the directed acyclic graph include a global bandwidth monitoring node, a tenant bandwidth monitoring node, a tenant current limiting aggregation node, a tenant total current limiting scheduling node, a first server, a second server and a bandwidth aggregation node; the tenant bandwidth monitoring node is connected to the first server and the tenant current limiting aggregation node through edges respectively; the tenant current limiting aggregation node is connected to the tenant total current limiting scheduling node through edges; the tenant total current limiting scheduling node is connected to the first server and the second server through edges respectively; the first server accesses the bandwidth aggregation node through two edges, and the second server accesses the bandwidth aggregation node through two edges; the two edges of the first server accessing the bandwidth aggregation node include a first overloaded edge and a first non-overloaded edge; the two edges of the second server accessing the bandwidth aggregation node include a second overloaded edge and a second non-overloaded edge; the bandwidth scheduling weight of the first overloaded edge is greater than the bandwidth scheduling weight of the second overloaded edge; The optimizing the scheduling bandwidth of the CDN tenant based on the real-time bandwidth and the directed acyclic graph to obtain the target scheduling bandwidth of the CDN tenant for scheduling from the first server to the second server includes: determining the current total bandwidth of the CDN tenant based on the real-time bandwidth; determining whether there is a bandwidth overlimit based on the current total bandwidth and the bandwidth upper limit information; determining a bandwidth to be scheduled when it is determined that there is a bandwidth overlimit; optimizing the bandwidth to be scheduled of the CDN tenant according to the directed acyclic graph to determine the target scheduling bandwidth of the CDN tenant for scheduling from the first server to the second server.

2. The method according to claim 1, characterized in that The optimizing the bandwidth to be scheduled of the CDN tenant according to the directed acyclic graph to determine a target scheduling bandwidth for the CDN tenant to schedule from the first server to the second server includes: Determining a bandwidth optimization path for the CDN tenant according to the edges of the directed acyclic graph; The bandwidth to be scheduled is optimized according to the bandwidth optimization path, and a target scheduling bandwidth for the CDN tenant to schedule from the first server to the second server is determined.

3. The method according to claim 2, characterized in that The determining the bandwidth optimization path of the CDN tenant according to the edge of the directed acyclic graph includes: Based on the edges of the directed acyclic graph, generating multiple bandwidth scheduling paths of the CDN tenant; Determining a path weight value of each bandwidth scheduling path based on the bandwidth scheduling weights corresponding to the edges of the directed acyclic graph; The bandwidth optimization path is determined from the plurality of bandwidth scheduling paths according to the path weight value.

4. The method according to claim 1, characterized in that: Also includes: When the bandwidth is not exceeded, the real-time bandwidth generated by the CDN tenant is scheduled to the first server according to the directed acyclic graph.

5. The method according to claim 1, characterized in that Determining a change in the quality of service scheduled from the first server to the second server includes: Acquire the server quantity of the second servers, and determine the service quality difference between the first server and each of the second servers; Determine a mean value of service quality change based on each of the service quality differences and the number of servers; The service quality change amount is determined by taking the service quality change mean.

6. The method according to claim 1, characterized in that The generating redirection information based on the target scheduling bandwidth of the CDN tenant includes: Obtain a first domain name corresponding to the first server and a second domain name corresponding to the second server; Determining a bandwidth jump ratio between the first server and the second server based on the target scheduling bandwidth; The redirection information is generated based on the CDN tenant, the first domain name, the bandwidth jump ratio and the second domain name.

7. A bandwidth allocation device for CDN tenants, characterized in that: The device is used to execute the bandwidth allocation method for CDN tenants according to claim 1, comprising: A bandwidth upper limit acquisition module, used to obtain bandwidth upper limit information of tenants and servers in a CDN cluster, wherein the servers in the CDN cluster include a first server corresponding to the CDN tenant and a second server for traffic scheduling; A real-time bandwidth acquisition module, used to acquire the real-time bandwidth of the CDN tenant on the corresponding first server; The bandwidth optimization module is used to optimize the scheduling bandwidth of the CDN tenant based on the real-time bandwidth, the bandwidth upper limit information and the service quality change of the bandwidth of the CDN tenant from the first server to the second server, and obtain the target scheduling bandwidth of the CDN tenant from the first server to the second server; wherein the bandwidth scheduling nodes of the directed acyclic graph include a global bandwidth monitoring node, a tenant bandwidth monitoring node, a tenant current limiting aggregation node, a tenant total current limiting scheduling node, a first server, a second server and a bandwidth aggregation node; the tenant bandwidth monitoring node is respectively connected to the first server, the tenant through edges The current limiting aggregation node is connected; the tenant current limiting aggregation node is connected to the tenant total current limiting scheduling node through an edge; the tenant total current limiting scheduling node is connected to the first server and the second server through edges respectively; the first server accesses the bandwidth aggregation node through two edges, and the second server accesses the bandwidth aggregation node through two edges; the two edges of the first server accessing the bandwidth aggregation node include a first overloaded edge and a first non-overloaded edge; the two edges of the second server accessing the bandwidth aggregation node include a second overloaded edge and a second non-overloaded edge; the bandwidth scheduling weight of the first overloaded edge is greater than the bandwidth scheduling weight of the second overloaded edge; A redirection module, configured to generate redirection information based on a target scheduling bandwidth of the CDN tenant; A bandwidth scheduling module, used to schedule the real-time bandwidth of the CDN tenant based on the redirection information; The bandwidth optimization module includes: a directed acyclic graph determination unit, used to determine a directed acyclic graph corresponding to the bandwidth scheduling of the CDN cluster, the nodes of the directed acyclic graph are used to represent the bandwidth scheduling nodes of the CDN, the edges of the directed acyclic graph are used to represent the bandwidth scheduling weight, and the bandwidth scheduling weight is determined based on the bandwidth upper limit information and the service quality change amount from the first server to the second server; a target scheduling bandwidth determination unit, used to optimize the scheduling bandwidth of the CDN tenant based on the real-time bandwidth and the directed acyclic graph, and obtain the target scheduling bandwidth of the CDN tenant from the first server to the second server; Among them, the target scheduling bandwidth determination unit includes: a total bandwidth determination subunit, used to determine the current total bandwidth of the CDN tenant based on the real-time bandwidth; an over-limit determination subunit, used to determine whether there is a bandwidth over-limit based on the current total bandwidth and the bandwidth upper limit information; a to-be-scheduled determination subunit, used to determine the to-be-scheduled bandwidth when it is determined that the bandwidth is over-limited; and a target scheduling bandwidth determination subunit, used to optimize the to-be-scheduled bandwidth of the CDN tenant according to the directed acyclic graph, and determine the target scheduling bandwidth of the CDN tenant for scheduling from the first server to the second server.

8. An electronic device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the bandwidth allocation method for CDN tenants according to any one of claims 1 to 6 by executing the computer instructions.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the bandwidth allocation method for CDN tenants according to any one of claims 1 to 6.

10. A computer program product, characterized in that The method comprises computer instructions, wherein the computer instructions are used to enable a computer to execute the bandwidth allocation method for CDN tenants according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method and device for data processing

    CN103596066A

  • CDN resource scheduling method and device, electronic equipment and storage medium

    CN116233027A