Cost-optimal CDN traffic scheduling method and device based on linear programming
Through the CDN traffic scheduling method based on linear programming, combined with binary decomposition technology and DNS system optimization, the 95 billing model and DNS hijacking problem was solved, the optimal cost and efficient resource utilization were achieved, and the flexibility and user experience of the CDN system were improved. .
Patent Information
- Application Number
- CN202411058772.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-02
- Publication Date
- 2024-11-26
AI Technical Summary
When facing the 95 billing model and DNS hijacking problems, existing CDN traffic scheduling methods are difficult to achieve optimal cost and efficient resource utilization, resulting in poor peak cost control and reduced user experience.
Using a linear planning method, an objective function that considers server cluster information, regional hijacking information and traffic upper limit is constructed. The nonlinear constraints are transformed through binary decomposition technology to optimize the DNS system to achieve the balance and flexibility of traffic scheduling.
It significantly reduces the computing time and cost of CDN traffic scheduling, improves the accuracy and flexibility of scheduling, solves the problem of regional DNS hijacking, and enhances the system's adaptability and user experience to special network environments.
Smart Images

Figure CN119030926A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of computer networks and relates to a cost-optimal CDN traffic scheduling method and device based on linear programming. Background Art
[0002] Currently, the 95% billing model is widely used in ISP networks. It requires the reasonable allocation of external data transmission traffic on multiple links to reduce costs. However, according to Goldenberg's research, even when the global traffic is known, solving the 95% billing problem in ISP networks is still an NP-hard problem. Therefore, a variety of algorithms such as GIA, NetStitcher, Jetway, and EcoFlow have emerged, trying to reduce link costs or optimize data transmission through various strategies. These methods not only consider economic factors, but also involve physical bottlenecks and technical limitations.
[0003] The main advantage of the 95 billing model is that it can effectively control the cost of peak traffic and optimize the overall utilization of network resources by incentivizing users to transmit data during off-peak hours. However, the main disadvantage of this model is its dependence on high-volume users, which may lead to unfair burdens on small-scale users while ignoring quality assurance.
[0004] Current research has not yet completely solved the problem of on-demand traffic division in actual CDN systems, such as the impact of the randomness of the DNS system on traffic management. In this regard, some studies such as Entact technology attempt to optimize bandwidth costs while ensuring service quality, but the applicability of this strategy in the 95 billing model remains to be tested.
[0005] The current CDN traffic scheduling problem faces several core technical challenges, including traffic scheduling limitations and DNS hijacking issues in specific regions. These issues make it impossible to efficiently and flexibly schedule traffic, which in turn affects the cost efficiency and user experience of the CDN system. Summary of the invention
[0006] In view of the above technical problems, the present invention provides a cost-optimal CDN traffic scheduling method and device based on linear programming. The method provided by the present invention takes into account factors such as traffic scheduling, regional hijacking, server traffic limit and high running state, solves the CDN traffic allocation problem, and reduces the traffic cost of the CDN system by reasonably adjusting the DNS system.
[0007] The present invention is achieved through the following technical solutions:
[0008] A cost-optimal CDN traffic scheduling method based on linear programming, the method comprising:
[0009] S1: CDN builds a linear objective function based on server cluster information, server information in the server cluster, and regional hijacking information;
[0010] S2: CDN obtains the traffic request of each Cover at the current time;
[0011] S3: CDN solves the linear objective function in step S1 according to the traffic request of each Cover obtained in step S2, and obtains the number of IP addresses of a server used by each Cover;
[0012] S4: According to the number of IPs of a server used by each Cover obtained in step S3, the CDN obtains an IP set of a specified size from the available IPs of the server used by the Cover; and sends the IP set to the DNS system, thereby obtaining the optimal traffic scheduling of the CDN at the current moment.
[0013] Further, in step S1:
[0014] The server cluster information includes the location of the server cluster, the planned traffic of the cluster each month, and the bandwidth upper limit of the requests processed by the server cluster;
[0015] The server information includes the upper limit of the bandwidth that the server can handle, the IP addresses available to the server, the set of servers outside the region where Cover is located for Cover to use, and the set of servers within the region where Cover is located for Cover to use;
[0016] The regional hijacking information is whether there is a hijacking restriction on the DNS system in the Cover area.
[0017] By including server cluster information such as the location of the server cluster, planned traffic for each month, bandwidth limit for processing requests, as well as server information such as server bandwidth limit, available IP, server collections inside and outside the Cover area, and considering whether there are hijacking restrictions on the DNS system in the Cover area, CDN traffic scheduling can fully consider the network environment and resource conditions, thereby achieving optimal cost control and efficient use of resources.
[0018] Furthermore, in step S1: in the process of constructing the linear objective function, the equilibrium constraint is set:
[0019]
[0020] Among them, q n,m,b is the variable q n,m The five Boolean variables generated by decomposition, where b∈[0,4]; q n,m Indicates the traffic size requested by Cover n to server m; zn,m,b is the variable z n,m The five Boolean variables generated by decomposition, where b∈[0,4]; z m,n Indicates the number of IP addresses of server m used by Cover n; MAX is a very large number; N indicates the total number of Covers, and M indicates the total number of servers in the CDN server cluster; when z n,m,b = 0, q n,m,b Also 0, indicating that there is no traffic request at the current position; when z n,m,b ≠0, q n,m,b If it is not 0, it means that there is a flow request in the current position, so as to ensure the correspondence between the flow request and the number of flow divisions;
[0021] Traffic requests per IP and traffic granularity w of Cover n n Equality, that is, there is a constraint:
[0022]
[0023] Among them, w n Indicates the traffic granularity of Cover n traffic division; when z n,m,b ≠0, q n,m,b =w n , ensuring that the traffic size offloaded by Covern to each IP is equal and equal to the traffic granularity of Covern;
[0024] Using g m Indicates the number of IP addresses that can be mounted on server m, subject to the following constraints:
[0025]
[0026] By setting balance constraints in the process of constructing the linear objective function, the corresponding relationship between traffic requests and the number of traffic divisions is guaranteed, and the traffic request of each IP is equal to the traffic granularity of the Cover. At the same time, the constraint representing the number of IPs that can be mounted on the server is adopted to make the traffic scheduling more balanced and reasonable, optimize the resource utilization of the CDN system, and improve the scheduling efficiency and service quality of the system.
[0027] Furthermore, in step S1: in the process of constructing the linear objective function, the hijacking constraint is set:
[0028]
[0029] in, Indicates whether there is a hijacking constraint in the area where Cover n is located. If there is a hijacking constraint in the area where Cover n is located, Set the variable y n∈{0, 1} to indicate that Cover n selects the IP in the region where Cover n is located; if y n =1, Covern selects the IP in the region where Covern is located. If y n =0, select IP in other regions other than Cover n; Represents the set of servers in the region where Cover n is located for use by Cover n. Represents a collection of servers outside the region where Cover n is located for Cover n to use; when y n = 1, formula (7) realizes that the traffic requested to servers outside the region where Cover n is located is 0; if y n =0, formula (6) realizes that the traffic requested to the server in the area where Cover n is located is 0;
[0030] The traffic granularity w of Cover in the hijacking area n , and make the following constraints:
[0031]
[0032] In order to ensure that all Cover traffic requests are met, the number of Cover partitions is fixed and the following constraints are imposed:
[0033]
[0034] in, represents the traffic request of Cover n at time i; |S n |Indicates the number of server sets available for Cover n.
[0035] Furthermore, in step S1: in the process of constructing the linear objective function, the flow upper limit constraint is set:
[0036] Constraining the traffic load of each server not to exceed the bandwidth limit, and the traffic load of each server cluster not to exceed the running high line, we get:
[0037]
[0038]
[0039] Among them, E o Indicates the server set contained in the server cluster o; D m Indicates the upper limit of the bandwidth that server m can handle; Indicates the upper bandwidth limit of requests processed by server cluster o.
[0040] Furthermore, in step S1: in the process of constructing the linear objective function, the running height state constraint is set:
[0041]
[0042] in, is the planned traffic line of server cluster o every month; MAX is a very large number, MIN is a very small number; k o ∈{0, 1} represents the high running state of server cluster o, when k o When k = 1, it means that the load flow of server node o exceeds the planned line; when k = 0, it means that the load flow of node o does not exceed the planned line.
[0043] By setting a traffic limit constraint in the process of constructing a linear objective function, we ensure that the traffic load of each server does not exceed its bandwidth limit, and the traffic load of each server cluster does not exceed its overall bandwidth limit, so that CDN traffic scheduling can reasonably allocate network resources, prevent overload of a single server or server cluster, and improve the stability and reliability of the system.
[0044] Furthermore, the linear objective function constructed in step S1 is:
[0045]
[0046] Furthermore, in step S2, Cover n will issue a traffic request at each time point Generate a traffic sequence V from traffic requests within a certain time interval n ;
[0047]
[0048] Among them, V n is the traffic sequence of Cover n in a billing period I; I represents the time interval; n represents Cover, represents the traffic request of cover n at time i; i represents a certain time in time interval I. By generating the traffic sequence V n , so that traffic requests at each time point can be effectively integrated and processed, thereby achieving accurate traffic scheduling, optimizing bandwidth utilization, and improving the overall performance and service quality of the CDN system.
[0049] A device for cost-optimal CDN traffic scheduling based on linear programming, the device comprising: a CDN scheduling system, for:
[0050] Construct a linear objective function based on the server cluster information, server information in the server cluster, and regional hijacking information;
[0051] Get the traffic request of each user device at the current time;
[0052] Solve the linear objective function according to the traffic request of each user device, and obtain the number of IP addresses of a server used by each user device;
[0053] Obtain an IP set of a specified size from the available IPs of the server;
[0054] Sending the IP set to the DNS system;
[0055] The DNS system is used to receive the IP set provided by the CDN scheduling system, update the DNS record, and respond to the user's domain name resolution request.
[0056] A computer device comprises at least one processor and a computer-readable medium storing a computer program, wherein the computer program implements the method described when read and executed by the processor.
[0057] A computer-readable medium stores a computer program, and when the computer program is read and executed by a processor, the method described is implemented.
[0058] Beneficial technical effects of the present invention:
[0059] (1) The CDN traffic scheduling method provided by the present invention takes into account the balance of traffic scheduling; the complex nonlinear constraints are linearly transformed through binary decomposition technology, which speeds up the solution time, reduces the calculation time of traffic scheduling, and optimizes the balance of traffic scheduling, so that the traffic can be scheduled according to the same amount, thereby improving the authenticity and accuracy of scheduling.
[0060] (2) The CDN traffic scheduling method provided by the present invention solves the problem of regional hijacking. In response to the problem of regional hijacking, the present invention proposes a regional selection algorithm to ensure that traffic can be freely scheduled within or outside the area affected by DNS hijacking, thereby avoiding the degradation of service quality caused by hijacking.
[0061] (3) The CDN traffic scheduling method provided by the present invention takes into account the traffic upper limit of the server through traffic upper limit constraints and running height constraints: strict linear constraints are used to ensure that the traffic load of each server cluster does not exceed its upper limit, so that the server cluster can perform its performance stably.
[0062] (4) Compared with the prior art, the CDN traffic scheduling method provided by the present invention can significantly improve the flexibility and efficiency of CDN traffic scheduling and reduce the additional costs caused by inaccurate or delayed traffic scheduling; at the same time, by solving the problem of regional DNS hijacking, the system's adaptability to special network environments is enhanced, thereby improving the user's service quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 This is a diagram of the CDN network model architecture. DETAILED DESCRIPTION
[0064] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0065] On the contrary, the present invention covers any substitution, modification, equivalent method and scheme made on the essence and scope of the present invention as defined by the claims. Further, in order to make the public have a better understanding of the present invention, some specific details are described in detail in the detailed description of the present invention below. Those skilled in the art can fully understand the present invention without the description of these details.
[0066] At present, most website systems use the Browser-Server architecture, such as Figure 1 As shown in the figure, in order to access the target website, the user needs to enter the domain name of the target website in the browser, and then the browser will send a domain name resolution request to the local DNS server. If the local DNS server has cached the domain name, it will immediately return the corresponding IP address. If not, then recursively request the domain name resolution from the entire DNS system. According to the IP address provided by the DNS system, the browser can obtain the requested content from the server and display it to the user. Since a large number of users accessing the central server will lead to a decline in service quality, Internet companies will hand over resources to CDN companies. After introducing the CDN system, the domain name resolution result of the DNS system points to the corresponding CDN server. If the CDN server has cached the corresponding content, it will be returned directly to the user. Otherwise, it is necessary to request the content from the superior server until the source server that stores the content is traced back. Since the CDN system is closer to the user's location, it can provide more stable services.
[0067] Cover is an object of CDN network service. Each Cover contains a series of specific types of services, such as video content, image content, etc. from different Internet companies. The DNS service can randomly assign content requests for the same domain name to multiple IP addresses. An edge node can have multiple IP addresses, and any IP address can route content requests to the node. In the DNS service configuration, an IP table can be configured for the resolution of a domain name. The IP routing table can contain the IP addresses of multiple CDN servers or multiple IP addresses of a server. By changing the IP table for the resolution of some domain names in the DNS server configuration, the proportion of requests for each DNS server to resolve amateur domain names to a certain server can be changed, thereby changing the proportion of global traffic carried by this node.
[0068] The present invention provides a CDN traffic scheduling method with optimal cost based on linear programming. Each Cover obtained uses an IP set of a certain server, and the IP set is sent to a DNS system. The DNS system further configures an IP table as the IP set corresponding to the Cover, routes the Cover to find the most suitable IP, and obtains the optimal traffic scheduling of the CDN at the current moment.
[0069] The CDN network consists of O server clusters. Each server cluster corresponds to a computer room in reality and is located in a specified area. The bandwidth limit (running high line) of the requests processed by server cluster o is The planned flow line for each month is We hope that the request traffic of the server cluster will not exceed the planned limit. The monthly traffic limit is The traffic bottom line is the minimum traffic billed by the ISP. If the current monthly traffic usage of the server cluster is lower than the traffic bottom line, it will be charged according to the traffic bottom line. Each server cluster consists of different numbers of servers, and the upper limit of the bandwidth that each server m can handle is D m , you can mount g m The server provides content services with an IP address. In actual scenarios, the servers are stored in a designated computer room, so each server generally belongs to only one server cluster.
[0070] Cover is the object of CDN network service. Each Cover contains a series of specific services, such as video content and image content from different Internet companies. Due to the difference between the type of Cover and the content stored on the server, for the sake of data security, the servers that Cover can access are also restricted. It cannot access more servers than those storing other data. In actual applications, Cover n will issue a traffic request at each time point. It can obtain service content by specifying the IP address. Represents the traffic sequence of node k in a billing cycle, including I time intervals.
[0071] The macro traffic scheduling in the CDN system is the sum of the micro-management scheduling for each independent user request. The most common implementation method is to use the existing DNS domain name resolution service for traffic scheduling. The DNS service can randomly assign content requests for the same domain name to multiple IP addresses. An edge node can have multiple IP addresses, and any IP address can route content requests to the node. In the DNS service configuration, an IP table can be configured for the resolution of a certain domain name. The IP routing table can contain the IP addresses of multiple CDN servers or multiple IP addresses of a server. By changing the IP table of some domain name resolution in the DNS server configuration, the proportion of requests for each DNS server to resolve amateur domain names to a certain server can be changed, thereby changing the proportion of global traffic carried by this node.
[0072] Considering the 95% billing model most commonly used in the industry as the traffic cost of the CDN system, the cost of each CDN server cluster is determined by the traffic at a specified quantile in the billing cycle. With a 5-minute time interval, the traffic of a billing cycle is divided into a traffic sequence. The traffic sequence is sorted in ascending order according to the traffic size. The billing bandwidth is the traffic sequence at the quantile. The flow rate of a time interval. Where I represents the total length of the flow sequence, and q represents the charging quantile (in the present invention, q=0.95).
[0073] In addition to costs, CDN companies earn revenue from Cover traffic requests, and billing is still based on per-point billing. CDN companies will sum up all Cover traffic requests at the current moment as the traffic request at the current time point, and finally get a traffic sequence at a certain time interval. Customers are charged based on the per-point traffic of this traffic sequence. Similarly, let is the traffic sequence of Cover n. It is sorted in ascending order according to the traffic size, and the billing bandwidth is also The flow rate at a time interval.
[0074] The present invention provides a cost-optimal CDN traffic scheduling method based on linear programming, the method comprising:
[0075] S1: CDN builds a linear objective function based on server cluster information, server information in the server cluster, and regional hijacking information;
[0076] S2: CDN obtains the traffic request of each Cover at the current time;
[0077] S3: CDN solves the linear objective function in step S1 according to the traffic request of each Cover obtained in step S2, and solves the number of IP addresses of a server (in the server cluster) used by each Cover;
[0078] Specifically, two intermediate variables are used in the solution process: whether to choose a server within or outside the province when hijacking occurs in the Cover area, and the size of the traffic requested by each Cover to a certain server. In this step, the solution process can call the solver for solution, which is a conventional technology.
[0079] S4: According to the number of IPs of a certain server used by each Cover obtained in step S3, the CDN obtains an IP set of a specified size from the available IPs of the server used by the Cover; and sends the IP set to the DNS system. The DNS system configures the local IP table according to the IP set corresponding to the Cover returned by the CDN, routes the Cover to find a suitable server, and then obtains the optimal traffic scheduling of the CDN at the current moment.
[0080] Specifically, the number of IPs in the IP set of the specified size obtained by the CDN is equal to the number of IPs of a server used by each Cover obtained by solving S3;
[0081] The DNS system is configured to configure the IP table according to the IP set returned by the CDN, route the Cover to find the appropriate server, and then obtain the optimal traffic scheduling of the CDN at the current moment. After the CDN sends the number of server IPs used by each Cover to the DNS system, the DNS system will automatically route the Cover's traffic request to the server with the corresponding IP. This process is completed by the DNS service provider (such as China Telecom and China Unicom) and is a conventional technology.
[0082] The server cluster information includes the location of the server cluster, the planned traffic of the cluster each month, and the bandwidth upper limit of the requests processed by the server cluster; wherein the location of the server cluster is the province where the cluster is located;
[0083] The server information includes the upper limit of the bandwidth that the server can handle, the IP addresses available to the server, the set of servers outside the region where Cover is located for Cover to use, and the set of servers within the region where Cover is located for Cover to use;
[0084] The regional hijacking information is whether there are hijacking restrictions on the DNS system in the Cover area.
[0085] Therefore, in step S1: in the process of constructing the linear objective function, the equilibrium constraint is set:
[0086] Considering the quality constraints in actual scenarios, some covers have stricter service quality requirements. They need to satisfy the local users of the nodes in the current area as much as possible to improve the user experience. Different types of covers have different quality level requirements. For covers with low real-time requirements, they can request node traffic in nearby areas. o Indicates the region where node o is located, using rg t Indicates the area where the Cover is located, using represents the quality level constraint between two regions, and sets the function f(·) to map the quality level between two regions. Node o can serve Cover t if and only if
[0087] In industrial scenarios, there is no direct mapping relationship between Cover and server. Each server is bound to a different number of IP addresses. The mapping relationship between domain name and IP can only be changed by configuring the IP table in the DNS system. Therefore, each Cover can only select a different number of IP request traffic. m,n Indicates the number of IP addresses of server m used by Cover n, with w n Indicates the traffic granularity of Cover n traffic division, q n,m represents the traffic size that Cover n requests from server m. Then there is obviously a constraint, Where M is the number of servers in the CDN system, and i is the current time point. The constraint of multiplying two variables is nonlinear, which greatly increases the complexity of problem solving and requires the use of more complex solving techniques. In industrial scenarios, the number of covers N and the number of servers M are very large, and the solution time requirements are more stringent. Nonlinear solving techniques cannot meet application requirements.
[0088] To this end, the present invention uses binary decomposition technology to transform the constraint into a linear constraint.
[0089] Generally speaking, the number of IP addresses corresponding to each domain name will not exceed 16. n,m Decomposed into five Boolean variables z n,m,b , where b∈[0,4]. If z n,m,b 1, indicating that Covern selected 2 b The number of requests from the IP address of server m is represented by a five-bit binary number. The number of IP addresses of server m selected by Cover n is represented by five variables z. n,m,b Represents z n,m From low to high. Similarly, the variable q n,m Decomposed into five Boolean variables q n,m,b, indicating that Cover n requested q from server m n,m,b ×2 b By using binary decomposition techniques and introducing intermediate variables q n,m,b , realizing the linear representation of the constraint; first constrain the variable z n,m,b and q n,m,b The relationship is as follows
[0090]
[0091] Among them, q n,m,b is the variable q n,m The five Boolean variables generated by decomposition, where b∈[0,4]; q n,m Indicates the traffic size requested by Cover n (i.e. Cover numbered n) to server m (i.e. server numbered m); n,m,b is the variable z n,m The five Boolean variables generated by decomposition, where b∈[0,4]; z m,n Indicates the number of IP addresses of server m used by Cover n; MAX is a very large number; specifically, MAX is greater than all values under the actual conditions of the corresponding scenario; MAX can be set to MAX(V)+10, where V is the traffic sequence; N represents the total number of Covers, and M represents the total number of servers in the CDN server cluster; when z n,m,b = 0, q n,m,b Also 0, indicating that there is no traffic request at the current position; when z n,m,b ≠0, q n,m,b It is also not 0, indicating that there is a traffic request in the current position, so as to ensure the correspondence between the traffic request and the number of traffic divisions; in the above constraints, the binary decomposition technology is used to discretize the continuous variables z and q, and z is split into 5 z_b to represent the five binary bits of z (the same applies to q). In this way, the nonlinear constraint is converted into a linear constraint.
[0092] Due to the characteristic of DNS system to randomly return IP addresses according to domain names, Cover's traffic requests have granularity problems, that is, the traffic requests of all IPs are equal, and this traffic value is called the traffic granularity of Covern. n This indicates that the traffic request of each IP is equal to the traffic granularity w of Cover n. n Equality, that is, there is a constraint:
[0093]
[0094] Among them, w n Indicates the traffic granularity of Cover n traffic division; when z n,m,b ≠0, qn,m,b =w n , ensuring that the traffic size offloaded by Covern to each IP is equal and equal to the traffic granularity of Covern;
[0095] The balance constraint comes from the operating limitations of the DNS system. Assume that a Cover's traffic request is number 10 and 5 IPs are attached to it. DNS will evenly distribute the traffic request to these 5 IPs, so the traffic load of each IP is 2; the amount of traffic that Cover unloads to each IP is equal.
[0096] In actual scenarios, the number of IP addresses that can be mounted on a server is not unlimited. Cover cannot use the same server's IP address excessively. m Indicates the number of IP addresses that can be mounted on server m, subject to the following constraints:
[0097]
[0098] Using binary decomposition technology, z is decomposed into 5 bits, and the lowest bit is represented by b=0, so the number of traffic shares allocated to the current server is 2 0 *z_{n,m,0}, followed by 2 1 , 2 2 ..., in this way, the amount of traffic that Cover n offloads to server m can be indirectly expressed, realizing the transformation of nonlinear constraints into linear constraints.
[0099] Regarding the hijacking problem, the DNS system in some specific regions has a hijacking function, that is, Cover cannot use both the IP in the region and the IP outside the region at the same time, and can only use one of them; in step S1: in the process of constructing the linear objective function, set the hijacking constraint:
[0100]
[0101] in, Indicates whether there is a hijacking constraint in the area where Cover n is located. If there is a hijacking constraint in the area where Cover n is located, Set the variable y n ∈{0, 1} to indicate that Cover n selects the IP in the region where Cover n is located; if y n =1, Covern selects the IP in the region where Covern is located. If y n =0, select IP in other regions other than Cover n; Represents the set of servers in the region where Cover n is located for use by Cover n. Represents a collection of servers outside the region where Cover n is located for Cover n to use; when y n = 1, formula (7) realizes that the traffic requested to servers outside the region where Cover n is located is 0; if y n =0, formula (6) realizes that the traffic requested to the server in the area where Cover n is located is 0; thus, the services in the hijacked area cannot request traffic from both within the province and outside the province at the same time;
[0102] Each Cover has a request traffic size. If the server cannot meet all the traffic requests of the Cover, users will not be able to obtain Internet resources in a timely manner, which will greatly reduce the service quality of the CDN system. Therefore, the traffic requests of each Cover must be fully allocated. Obviously, the smaller the granularity of the traffic request, the easier it is to allocate. In order to reduce the granularity of the traffic, the traffic granularity is set to the ratio of the Cover's request traffic to the number of servers that can be unloaded. At the same time, it is also considered that the corresponding hijacked areas have servers that can only be used within or outside the area, so the granularity will be increased;
[0103] In this embodiment, the flow granularity w of Cover in the hijacking area is n , and make the following constraints:
[0104]
[0105] In order to ensure that all Cover traffic requests are met, the number of Cover partitions is fixed and the following constraints are imposed:
[0106]
[0107] in, represents the traffic request of Cover n at time i; |S n |Indicates the number of server sets available for Cover n.
[0108] In the CDN system, the server cluster and the server have bandwidth limits. If the traffic request exceeds the maximum load of the server, the server can only meet the traffic requests of a part of the Cover. Since the traffic requests of other Covers cannot be met, the speed at which users obtain Internet resources will be reduced, and the overall service quality will be reduced. In step S1: In the process of constructing the linear objective function, set the traffic limit constraint:
[0109] Constraining the traffic load of each server not to exceed the bandwidth limit, and the traffic load of each server cluster not to exceed the running high line, we get:
[0110]
[0111] Among them, E o Indicates the server set contained in the server cluster o; D m Indicates the upper limit of the bandwidth that server m can handle; Indicates the upper bandwidth limit of requests processed by server cluster o.
[0112] At any moment, the best state of traffic load of all server clusters is that they should not exceed their planned line to ensure that the cost is within the budget. However, in the case of peak traffic, the server cluster will inevitably be in a high-running state. Therefore, it is hoped that the number of high-running server clusters is as small as possible to reduce the global traffic cost. In step S1: in the process of constructing the linear objective function, set the high-running state constraint:
[0113]
[0114] in, is the planned traffic line of server cluster o every month; MAX is a very large number, MIN is a very small number; the MIN value range is [1e-7, [1e-8]], and the specific value can be 0.000000001; k o ∈{0, 1} represents the high running state of server cluster o, when k o When k = 1, it means that the load flow of server node o exceeds the planned line; when k = 0, it means that the load flow of node o does not exceed the planned line.
[0115] Integrating formulas (1)-(13), the linear objective function constructed in step S1 is:
[0116]
[0117] In step S2, Cover n will issue a traffic request at each time point Generate a traffic sequence V from traffic requests within a certain time interval n ;
[0118]
[0119] Among them, V n is the traffic sequence of node k in a billing period I; I represents the time interval; n represents the node in the CDN, represents the traffic request of cover n at time i; i represents a certain time in the time interval I.
[0120] A computer device comprises at least one processor and a computer-readable medium storing a computer program, wherein when the computer program is read and executed by the processor, the method according to any one of claims 1 to 7 is implemented.
[0121] A computer-readable medium stores a computer program, wherein the computer program, when read and executed by a processor, implements the method according to any one of claims 1 to 7.
[0122] The present invention provides a cost-optimal CDN traffic scheduling method based on linear programming. This scheme is used at every moment to reduce the monthly fee as much as possible, which belongs to a greedy strategy. The method combines linear programming and greedy strategies, and shows superiority over traditional methods in traffic scheduling. Compared with the prior art, the method provided by the present invention can significantly improve the flexibility and efficiency of CDN traffic scheduling, and reduce the additional costs caused by inaccurate or delayed traffic scheduling. At the same time, by solving the problem of regional DNS hijacking, the system's adaptability to special network environments is enhanced, and the user's service quality is improved. In addition, refined traffic scheduling also helps to allocate network resources more reasonably, reduce resource waste, and thus improve the overall network operation efficiency.
[0123] In another embodiment of the present invention, a device for cost-optimal CDN traffic scheduling based on linear programming is provided, the device comprising: a CDN scheduling system, configured to:
[0124] Construct a linear objective function based on the server cluster information, server information in the server cluster, and regional hijacking information;
[0125] Get the traffic request of each user device at the current time;
[0126] Solve the linear objective function according to the traffic request of each user device, and obtain the number of IP addresses of a server used by each user device;
[0127] Obtain an IP set of a specified size from the available IPs of the server;
[0128] Sending the IP set to the DNS system;
[0129] The DNS system is used to receive the IP set provided by the CDN scheduling system, update the DNS record, and respond to the user's domain name resolution request.
[0130] In this embodiment, the CDN scheduling system adopts a centralized architecture, and the core components are deployed in one or more data centers to ensure high reliability and high bandwidth requirements. The CDN scheduling system builds a linear objective function based on the server cluster information, the server information in the server cluster, and the regional hijacking information, obtains the flow request of each Cover at the current time, solves the linear objective function according to the obtained flow request of each Cover, obtains the number of IPs used by each Cover, and obtains an IP set of a specified size from the available IPs of the server used by the Cover, and sends the IP set to the DNS system.
[0131] The DNS system receives the IP set sent by the CDN scheduler, updates the DNS record, responds to the domain name resolution request of the user device, and returns the optimal IP address at the current moment based on the updated DNS record. The server cluster is responsible for processing and responding to the resource access request of the user device.
[0132] By adopting a centralized architecture, the embodiments of the present invention can centrally process all traffic scheduling tasks in a high-performance data center, achieve efficient resource utilization and scheduling optimization, ensure high reliability and low latency of the system, and are suitable for large service providers that need to process a large number of concurrent requests. For example, a large video streaming service provider has set up several large data centers around the world, and through centralized management and processing of all traffic scheduling tasks, it ensures a smooth video playback experience for users around the world, significantly improving user experience and service quality.
[0133] In another embodiment of the present invention, the various components of the CDN scheduling system are distributed in multiple geographical locations to cover global services in a wide range of regions. CDN schedulers are distributed in data centers in different regions, and each region independently executes the construction of linear objective functions, obtains traffic requests, solves objective functions, and obtains and allocates IP sets. The DNS system is distributed in different regions, receives IP sets sent by CDN schedulers in the region, updates DNS records, and responds to domain name resolution requests from user devices, returning the optimal IP address at the current moment based on the updated DNS records. Server clusters are distributed in different regions to process and respond to resource access requests from user devices in the region.
[0134] By adopting a distributed architecture, the embodiments of the present invention can provide low-latency localized services, improve user experience, and have high fault tolerance and scalability to adapt to network conditions in different regions. For example, a global e-commerce platform sets up regional data centers in different continents, and independently processes user requests in the region through the scheduling system in the region, thereby improving the shopping experience of global users and significantly improving the reliability and service quality of the system.
[0135] In other embodiments of the present invention, edge computing architecture, cloud native architecture or hybrid architecture can also be used for deployment. In the edge computing architecture, some functions of the CDN scheduling system are delegated to the network edge nodes to reduce latency and increase processing speed; in the cloud native architecture, the elasticity of the cloud computing platform is used to achieve dynamic deployment and resource optimization; in the hybrid architecture, the advantages of centralized and distributed architectures are combined to provide a flexible and adaptable deployment solution. These architectures can effectively implement the method steps (S1-S4) of this patent to ensure the optimal cost and performance of CDN traffic scheduling.
[0136] It should be noted that considering the flexibility of the architecture design, the CDN scheduling system is not explicitly shown in the CDN network model architecture diagram. In different scenarios, the CDN scheduling system can be deployed and configured according to actual needs to ensure optimal resource utilization and service quality.
[0137] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A cost-optimal CDN traffic scheduling method based on linear programming, characterized in that: The method comprises: S1: CDN builds a linear objective function based on server cluster information, server information in the server cluster, and regional hijacking information; S2: CDN obtains the traffic request of each Cover at the current time; S3: CDN solves the linear objective function in step S1 according to the traffic request of each Cover obtained in step S2, and obtains the number of IP addresses of a server used by each Cover; S4: According to the number of IPs of a server used by each Cover obtained in step S3, the CDN obtains an IP set of a specified size from the available IPs of the server used by the Cover; and sends the IP set to the DNS system, thereby obtaining the optimal traffic scheduling of the CDN at the current moment.
2. According to claim 1, a cost-optimal CDN traffic scheduling method based on linear programming is characterized in that: In step S1: The server cluster information includes the location of the server cluster, the planned traffic of the cluster each month, and the bandwidth upper limit of the requests processed by the server cluster; The server information includes the upper limit of the bandwidth that the server can handle, the IP addresses available to the server, the set of servers outside the region where Cover is located for Cover to use, and the set of servers within the region where Cover is located for Cover to use; The regional hijacking information is whether there is a hijacking restriction on the DNS system in the Cover area.
3. According to claim 1, a cost-optimal CDN traffic scheduling method based on linear programming is characterized in that: In step S1: in the process of constructing the linear objective function, set the equilibrium constraint: Among them, q n,m,b is the variable q n,m The five Boolean variables generated by decomposition, where b∈[0,4]; q n,m Indicates the traffic size requested by Cover n to server m; z n,m,b is the variable z n,m The five Boolean variables generated by decomposition, where b∈[0,4]; z m,n Indicates the number of IP addresses of server m used by Cover n; MAX is a very large number; N indicates the total number of Covers, and M indicates the total number of servers in the CDN server cluster; when z n,m,b = 0, q n,m,b Also 0, indicating that there is no traffic request at the current position; when z n,m,b ≠0, q n,m,b If it is not 0, it means that there is a flow request in the current position, so as to ensure the correspondence between the flow request and the number of flow divisions; Traffic requests per IP and traffic granularity w of Cover n n Equality, that is, there is a constraint: Among them, w n Indicates the traffic granularity of Cover n traffic division; when z n,m,b ≠0, q n,m,b =w n , ensuring that the traffic size offloaded by Cover n to each IP is equal and equal to the traffic granularity of Cover n; Using g m Indicates the number of IP addresses that can be mounted on server m, subject to the following constraints:
4. According to claim 2, a cost-optimal CDN traffic scheduling method based on linear programming is characterized in that: In step S1: in the process of constructing the linear objective function, set the hijacking constraint: in, Indicates whether there is a hijacking constraint in the area where Cover n is located. If there is a hijacking constraint in the area where Cover n is located, Set the variable y n ∈{0,1} to indicate that Cover n selects the IP in the region where Cover n is located; if y n =1, Covern selects the IP in the region where Covern is located. If y n =0, select IP in other regions other than Cover n; Represents the set of servers in the region where Cover n is located for use by Cover n. Represents a collection of servers outside the region where Cover n is located for Covern to use; when y n = 1, formula (7) realizes that the traffic requested to servers outside the region where Cover n is located is 0; if y n =0, formula (6) realizes that the traffic requested to the server in the area where Cover n is located is 0; The traffic granularity w of Cover in the hijacking area n , and make the following constraints: In order to ensure that all Cover traffic requests are met, the number of Cover partitions is fixed and the following constraints are imposed: in, represents the traffic request of Cover n at time i; |S n |Indicates the number of server sets available for Cover n.
5. According to claim 2, a cost-optimal CDN traffic scheduling method based on linear programming is characterized in that: In step S1: in the process of constructing the linear objective function, set the flow upper limit constraint: Constraining the traffic load of each server not to exceed the bandwidth limit, and the traffic load of each server cluster not to exceed the running high line, we get: Among them, E o Indicates the server set contained in the server cluster o; D m Indicates the upper limit of the bandwidth that server m can handle; Indicates the upper bandwidth limit of requests processed by server cluster o.
6. According to claim 2, a cost-optimal CDN traffic scheduling method based on linear programming is characterized in that: In step S1: in the process of constructing the linear objective function, set the running height state constraint: in, is the planned traffic line of server cluster o every month; MAX is a very large number, MIN is a very small value; it indicates the high running state of server cluster o. o When k = 1, it means that the load flow of server node o exceeds the planned line; when k = 0, it means that the load flow of node o does not exceed the planned line.
7. A cost-optimal CDN traffic scheduling method based on linear programming according to any one of claims 3 to 6, characterized in that: The linear objective function constructed in step S1 is:
8. According to claim 4, a cost-optimal CDN traffic scheduling method based on linear programming is characterized in that: In step S2, Cover n will issue a traffic request at each time point Generate a traffic sequence V from traffic requests within a certain time interval n ; Among them, V n is the traffic sequence of Cover n in a billing period I; I represents the time interval; n represents Cover, represents the traffic request of cover n at time i; i represents a certain time in the time interval I.
9. A device for cost-optimal CDN traffic scheduling based on linear programming, characterized in that: The device includes: CDN scheduling system is used for: Construct a linear objective function based on the server cluster information, server information in the server cluster, and regional hijacking information; Get the traffic request of each user device at the current time; Solve the linear objective function according to the traffic request of each user device, and obtain the number of IP addresses of a server used by each user device; Obtain an IP set of a specified size from the available IPs of the server; Sending the IP set to the DNS system; The DNS system is used to receive the IP set provided by the CDN scheduling system, update the DNS record, and respond to the user's domain name resolution request.
10. A computer device, characterized in that: The method comprises at least one processor and a computer-readable medium storing a computer program, wherein when the computer program is read and executed by the processor, the method according to any one of claims 1 to 8 is implemented.
11. A computer readable medium, characterized in that The computer-readable medium stores a computer program, and when the computer program is read and executed by a processor, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Cited By
Flow scheduling method and device based on distributed network, medium and product
CN119299388A
Multistage CDN flow scheduling method based on linear constraint
CN121984919A
