CDN resource scheduling method and device
By calculating the service level data and expected resource utilization of the CDN resource pool and adjusting the available bandwidth of the target cluster, the problem of not being able to fully utilize bandwidth and ensure service quality in the prior art is solved, and efficient bandwidth utilization and service quality assurance is achieved.
Patent Information
- Application Number
- CN202510082786.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-17
- Publication Date
- 2025-04-11
AI Technical Summary
The existing CDN resource scheduling methods cannot make full use of bandwidth and ensure the quality of users' service.
By obtaining the usage data of each target cluster in the target time period of the target resource pool, calculating the service level data of the target resource pool, determining the expected resource utilization rate for the specified time period, and adjusting the available bandwidth of each target cluster based on the expected resource utilization rate.
It realizes that while ensuring service quality, the bandwidth utilization rate of the target resource pool is optimized and CDN resources are fully utilized.
Smart Images

Figure CN119814885A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of Internet technology, and in particular, to a method, apparatus, computer device, computer-readable storage medium, and computer program product for scheduling CDN resources. Background Art
[0002] With the development of the Internet, users' demand for fast, stable and reliable network services is growing, which in turn has prompted the development of CDN technology.
[0003] The existing scheduling methods cannot fully utilize the bandwidth while ensuring the service quality of users.
[0004] It should be noted that the above content is not necessarily prior art, nor is it intended to limit the scope of patent protection of this application. Summary of the invention
[0005] The embodiments of the present application provide a method, apparatus, computer device, computer-readable storage medium, and computer program product for scheduling CDN resources to solve or alleviate one or more of the technical problems mentioned above.
[0006] One aspect of an embodiment of the present application provides a method for scheduling CDN resources, the method comprising: Obtain usage data of each target cluster in the target resource pool during the target time period; Obtaining service level data of the target resource pool according to usage data of each target cluster in a target time period; Determining an expected resource utilization rate of the target resource pool in a specified time period according to the service level data of the target resource pool; The available bandwidth of each of the target clusters is adjusted according to the expected resource utilization of the target resource pool in a specified time period.
[0007] Optionally, determining an expected resource utilization rate of the target resource pool in a specified time period according to the service level data of the target resource pool includes: Obtaining actual resource utilization of the target resource pool in a target time period; Inputting the actual resource utilization rate of the target time period and the service level data of the target resource pool into a pre-trained target model to output the expected resource utilization rate of the target resource pool in the specified time period; The target model aims to maximize resource utilization under the premise of meeting the service level, and outputs the expected resource utilization based on the actual resource utilization in the target time period and the service level data of the target resource pool.
[0008] Optionally, the target model includes a multi-arm Bandit model, and the multi-arm Bandit model is used to: Determining a penalty value according to the actual resource utilization rate of the target time period and the service level data of the target resource pool; Outputting the expected resource pool utilization corresponding to the specified time period according to the penalty value; The penalty value is used to represent the actual performance of the expected resource pool utilization corresponding to the target time period.
[0009] Optionally, the penalty value is obtained by the following operation: When the service level data of the target resource pool is not less than a preset threshold, determining the penalty value to be infinite; When the service level data of the target resource pool is less than a preset threshold, the penalty value is determined to be a difference between 1 and the actual resource utilization rate of the target time period.
[0010] Optionally, the method further comprises: Acquire service level data of each target cluster according to usage data of each target cluster in a target time period; Correspondingly, adjusting the available bandwidth of each target cluster according to the expected resource utilization of the target resource pool in the specified time period includes: adjusting the available bandwidth of each target cluster according to the expected resource utilization of the target resource pool in the specified time period and the service level data of each target cluster.
[0011] Optionally, adjusting the available bandwidth of each of the target clusters according to the expected resource utilization of the target resource pool in a specified time period and the service level data of each of the target clusters includes: Obtaining the maximum sum of available bandwidths of the plurality of target clusters; Under the premise of ensuring that the ratio of the sum of available bandwidths of the plurality of target clusters to the sum of the maximum available bandwidths is equal to the expected resource utilization rate, adjusting the available bandwidths of at least some of the plurality of target clusters; Among the multiple target clusters, the available bandwidth of the target cluster with relatively higher service level data is adjusted downward, and the available bandwidth of the target cluster with relatively lower service level data is adjusted upward.
[0012] Another aspect of an embodiment of the present application provides a scheduling device for CDN resources, the device comprising: The first acquisition module is used to acquire the usage data of each target cluster in the target resource pool during the target time period; A second acquisition module is used to acquire the service level data of the target resource pool according to the usage data of each target cluster in the target time period; A determination module, configured to determine an expected resource utilization rate of the target resource pool in a specified time period according to the service level data of the target resource pool; The adjustment module is used to adjust the available bandwidth of each of the target clusters according to the expected resource utilization of the target resource pool in a specified time period.
[0013] Another aspect of an embodiment of the present application provides a computer device, including: at least one processor; and a memory communicatively coupled to the at least one processor; Wherein: the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method as described above.
[0014] Another aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the method described above is implemented.
[0015] Another aspect of an embodiment of the present application provides a computer program product, including a computer program, which implements the method described above when executed by a processor.
[0016] The embodiments of the present application adopt the above-mentioned technical scheme, which may include the following advantages: determining the expected resource utilization rate for a specified time period based on the service level data of the target resource pool, and then adjusting the available bandwidth of each target cluster based on the expected resource utilization rate for the specified time period, thereby achieving the goal of ensuring the service quality of the target resource pool based on the service level data while optimizing the bandwidth utilization rate of the target resource pool through the expected resource utilization rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings exemplarily illustrate the embodiments and constitute a part of the specification, and together with the text description of the specification, are used to explain the exemplary implementation of the embodiments. The embodiments shown are for illustrative purposes only and do not limit the scope of the claims. In all drawings, the same reference numerals refer to similar but not necessarily identical elements.
[0018] Figure 1 The following schematically shows an operating environment diagram of a CDN resource scheduling method according to Embodiment 1 of the present application; Figure 2 The flowchart of the method for scheduling CDN resources according to the first embodiment of the present application is schematically shown; Figure 3Schematically shows the Figure 2 Flow chart of sub-steps of step S204; Figure 4 The newly added flow chart of the CDN resource scheduling method according to the first embodiment of the present application is schematically shown; Figure 5 The newly added flow chart of the CDN resource scheduling method according to the first embodiment of the present application is schematically shown; Figure 6 The newly added flow chart of the CDN resource scheduling method according to the first embodiment of the present application is schematically shown; Figure 7 Schematically shows the Figure 2 Flow chart of sub-steps of step S206; Figure 8 A block diagram schematically shows a CDN resource scheduling device according to the second embodiment of the present application; and Fig. 9 The hardware architecture diagram of the computer device according to the third embodiment of the present application is schematically shown. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application 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 application and are not intended to limit the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0020] It should be noted that the descriptions involving "first", "second", etc. in the embodiments of the present application are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0021] In the description of the present application, it should be understood that the numerical labels before the steps do not indicate the order in which the steps are executed, but are only used to facilitate the description of the present application and to distinguish each step, and therefore should not be understood as a limitation on the present application.
[0022] First, the following terms are explained: CDN (Content Delivery Network): A network layout that caches website business content in cloud servers in various locations through a distributed server layout, allowing users to access the content nearby to increase access speed.
[0023] Cheap resources: low-cost, poor-quality CDN resources.
[0024] 95 Billing: This is a billing method used for network services. After counting the traffic or bandwidth, 95% of it is used for billing. The highest 5% of traffic is not billed to eliminate unreasonable impacts on billing caused by abnormal traffic peaks.
[0025] Secondly, in order to facilitate those skilled in the art to understand the technical solutions provided in the embodiments of the present application, the relevant technologies are described below: The applicant understands that: it is possible to use a CDN resource scheduling method that prioritizes quality and covers the nearest area, that is, to allocate the user's request to the CDN server in the user's area. Or through a CDN resource scheduling method that prioritizes cost, that is, according to the bandwidth charging method of the CDN server (95 billing), while meeting the bandwidth requirements of the user, the billing bandwidth is reduced to the minimum, and the server's top bandwidth (the bandwidth used in the 5% free time in the 95 billing) is used to the maximum. However, the nearest coverage method will lead to an unbalanced server load between different regions due to the mismatch between the supply and demand of CDN resources in various regions, and it is impossible to reduce costs; the cost-priority method ignores the different maximum bandwidths that servers of different manufacturers and operators can carry, resulting in serious degradation of the service quality of users scheduled to cheap resources. Therefore, for the cheap resources of CDN, there is no scheduling method that can fully utilize the bandwidth and ensure the quality of user service.
[0026] To this end, the embodiment of the present application provides a technical solution for scheduling CDN resources. In this technical solution, the bandwidth utilization of the server can be fully optimized while ensuring the user service quality. See below for details.
[0027] Finally, for ease of understanding, an exemplary operating environment is provided below.
[0028] like Figure 1 As shown, the environment diagram includes a scheduling service platform 2, a monitoring platform 4, a resource pool 6, and a client 8, wherein: The scheduling service platform 2 can be composed of a single or multiple computing devices. The multiple computing devices may include virtualized computing instances. Virtualized computing instances may include virtual machines, such as simulations of computer systems, operating systems, servers, etc. The computing device may load a virtual machine based on a virtual image and / or other data defining specific software (e.g., operating system, dedicated application, server) for simulation. As the demand for different types of processing services changes, different virtual machines may be loaded and / or terminated on one or more computing devices. A hypervisor may be implemented to manage the use of different virtual machines on the same computing device.
[0029] The scheduling service platform 2 can provide scheduling services, such as providing scheduling strategies for the resource pool 6 .
[0030] The monitoring platform 4 can be deployed in a physical server, a virtual machine or a cloud service, or can be deployed in a container. The monitoring platform 4 can monitor and record the usage of the resource pool 6, such as monitoring and recording the logs and monitoring data of the resource pool 6.
[0031] Resource pool 6 may include multiple CDN clusters. In the same resource pool, each CDN cluster uses the same CDN manufacturer and network operator. A CDN cluster may correspond to one computer room or multiple computer rooms. Resource pool 6 may be a low-cost, low-quality CDN resource. Resource pool 6 may provide services such as downloading and distributing various types of files, such as providing clients with video and audio on demand, large file download and distribution acceleration, and other services.
[0032] The client 8 may be an electronic device running an operating system such as Windows, Android™ or iOS, such as a smart phone, a tablet device, a laptop computer, a virtual reality device, a gaming device, a set-top box, a vehicle terminal, or a smart TV. Based on the above operating system, various application programs such as video applications, website applications, etc. may be run.
[0033] It should be noted that the above devices are exemplary, and the number and type of devices are adjustable in different scenarios or according to different needs.
[0034] The following uses the scheduling service platform 2 as the execution body to introduce the technical solution of the present application through multiple embodiments. It should be noted that these embodiments can be implemented in a variety of different forms and should not be interpreted as being limited to the embodiments described here.
[0035] Embodiment 1 Figure 2 The flowchart of the CDN resource scheduling method according to the first embodiment of the present application is schematically shown.
[0036] like Figure 2As shown, the CDN resource scheduling method may include steps S200 to S206, wherein: Step S200: obtaining usage data of each target cluster in the target resource pool in a target time period.
[0037] Step S202: acquiring service level data of the target resource pool according to usage data of each target cluster in a target time period.
[0038] Step S204: determining the expected resource utilization of the target resource pool in a specified time period according to the service level data of the target resource pool.
[0039] Step S206: adjusting the available bandwidth of each of the target clusters according to the expected resource utilization of the target resource pool in a specified time period.
[0040] The CDN resource scheduling method provided in this embodiment determines the expected resource utilization rate in a specified time period according to the service level data of the target resource pool, and then adjusts the available bandwidth of each target cluster based on the expected resource utilization rate in the specified time period, thereby achieving the goal of ensuring the service quality of the target resource pool based on the service level data in low-cost and poor-quality CDN resources, while optimizing the bandwidth utilization rate of the target resource pool through the expected resource utilization rate.
[0041] The following combination Figure 2 , each step in steps S200~S206 and other optional steps are described in detail.
[0042] Step S200 , obtain the usage data of each target cluster in the target resource pool during the target time period.
[0043] The resource pool can be divided according to the combination of different CDN manufacturers and network operators. The target resource pool can be one of these combinations. The target resource pool can be a cheap resource. The usage data can be data such as freeze, latency, CPU utilization, and loading success rate. In some embodiments, the target cluster can be based on the CDN edge computer room, and the CDN edge computer room reports the log and monitoring data to the log and monitoring platform. The scheduling service platform then collects usage data such as freeze, latency, and CPU utilization from the log and monitoring platform through HTTP calls. HTTP call refers to the process of sending requests and receiving responses using the HTTP protocol (Hypertext Transfer Protocol).
[0044] Step S202 , according to the usage data of each target cluster in the target time period, the service level data of the target resource pool is obtained.
[0045] The service level data may be SLO data. SLO is a key performance indicator in a distributed system that is used to measure the reliability and performance of the system, ensure service quality and user satisfaction, promote trust between service providers and users, and provide direction for continuous improvement of the system. In specific implementation, the usage data such as jamming, latency, CPU utilization, and loading failure rate of each target cluster in the target resource pool may be aggregated through normalization to obtain SLO data in the range of 0-1. Normalization is a data preprocessing technique used to scale data so that it falls into a small specific interval. In some embodiments, service level data is also represented by other indicators.
[0046] Step S204 , determining the expected resource utilization of the target resource pool in a specified time period based on the service level data of the target resource pool.
[0047] In some embodiments, the designated time period may be a time period next to the target time period.
[0048] In some embodiments, the designated time period may be a time period in days, which is the same as the target time period in the next day.
[0049] The service level data reflects the operating status and quality of the target resource pool and can be used to determine the expected resource utilization for a specified time period. The expected resource utilization indicates the maximum bandwidth utilization that the target resource pool can achieve while meeting the service quality requirements.
[0050] In an optional embodiment, if Figure 3 As shown, step S204 may include: Step S300, obtaining the actual resource utilization rate of the target resource pool in the target time period; Step S302: input the actual resource utilization rate of the target time period and the service level data of the target resource pool into a pre-trained target model to output the expected resource utilization rate of the target resource pool in the specified time period.
[0051] The target model aims to maximize resource utilization under the premise of meeting the service level, and outputs the expected resource utilization based on the actual resource utilization in the target time period and the service level data of the target resource pool.
[0052] The actual resource utilization of the target resource pool in the target time period can be obtained from the log and monitoring platform. The service level data reflects the service status of the target resource pool in the target time period. The actual resource utilization indicates the bandwidth usage ratio of the target resource pool in the target time period. The service level data and the actual resource utilization can provide a decision-making basis for resource scheduling and allocation in the specified time period, and then output a more reasonable expected resource utilization. In some embodiments, the target model outputs the expected resource utilization, and makes a scheduling strategy based on the expected resource utilization, which can be executed in the target resource pool for half an hour (one time period). The SLO data (service level data) of the target resource pool in the target time period and the actual utilization of the target resource pool can be obtained, and the predicted resource utilization of the specified time period is output to the target model to make a scheduling strategy effective in the specified time period.
[0053] In this embodiment, the service level data and the actual resource utilization are input into the target model so as to output the expected resource utilization through the target model, thereby obtaining the maximum resource utilization under the premise of satisfying the service level.
[0054] About the target model: In an optional embodiment, the target model includes a multi-arm Bandit model, such as Figure 4 As shown, the multi-arm Bandit model can be used for: Step S400, determining a penalty value according to the actual resource utilization rate of the target time period and the service level data of the target resource pool; Step S402: outputting the expected resource pool utilization corresponding to the specified time period according to the penalty value; wherein the penalty value is used to represent the actual performance of the expected resource pool utilization corresponding to the target time period.
[0055] The multi-armed Bandit model, i.e., Multi-Armed Bandit, is used to study how to find the best option to obtain maximum benefits through multiple attempts under limited resources. In the multi-armed Bandit model, the role of the penalty value is to guide decision-making by reducing the probability of selecting options with poor performance (i.e., expected resource utilization). In some embodiments, the multi-armed Bandit model may include arm A and arm B, and the selection of arm A corresponds to the output of 40% of the expected resource utilization, and the selection of arm B corresponds to the output of 60% of the expected resource utilization. In the previous cycle (such as the target time period), arm B is selected, that is, 60% of the expected resource utilization is output, and the probability of selecting arm B is adjusted according to the penalty value obtained. For example, if arm B is selected in the previous cycle (time period), and the penalty value obtained is high, the probability of selecting arm B in the next cycle (such as the specified time period) is reduced.
[0056] In this embodiment, the expected resource utilization is output through the multi-arm Bandit model, thereby improving the accuracy and adaptability of the expected resource utilization.
[0057] About penalty value: In an optional embodiment, if Figure 5 As shown, the penalty value is obtained by the following operations: Step S500: When the service level data of the target resource pool is not less than a preset threshold, determine that the penalty value is infinite.
[0058] Step S502: when the service level data of the target resource pool is less than a preset threshold, determine the difference between the penalty value of 1 and the resource utilization rate of the target time period.
[0059] If the service level data of the target resource pool is not less than the preset threshold, it means that the service quality of the target resource pool does not meet expectations, and there may be situations such as too high failure loading rate and too many minutes of freezing. Then the penalty value is set to infinity to punish the corresponding expected utilization rate, so that the probability of being selected in the next cycle (specified time period) is reduced to 0. If the service level data of the target resource pool is less than the preset threshold, it means that the service quality of the target resource pool meets expectations, and the penalty value is determined according to the actual resource utilization rate of the target time period. The penalty value is the difference between 1 and the resource utilization rate of the target time period, indicating how much ratio can be utilized under the premise of meeting the service level. Under the premise of meeting the service level, the ratio that can be utilized is used as the penalty value to punish the expected resource utilization rate for not maximizing the utilization of resources, thereby reducing the probability of selecting the expected resource utilization rate. From the above content, it can be known that the arm corresponding to the expected resource utilization rate can be punished by the penalty value, thereby reducing the probability of outputting the expected resource utilization rate corresponding to the arm.
[0060] In this embodiment, by dynamically setting the penalty value, the expected resource utilization rate output by the multi-arm Bandit model is maximized while satisfying the service level, thereby making full use of the target resource pool.
[0061] Step S206 , adjusting the available bandwidth of each of the target clusters according to the expected resource utilization of the target resource pool in a specified time period.
[0062] On the premise of ensuring the expected resource utilization, the available bandwidth of each target cluster of the target resource pool can be adjusted and optimized so that each target cluster can achieve the maximum bandwidth utilization while meeting the service level.
[0063] The following is a specific example of adjusting and optimizing the available bandwidth of each target cluster.
[0064] In an optional embodiment, if Figure 6 As shown, the method may also include: Step S600, obtaining service level data of each target cluster according to usage data of each target cluster in a target time period; Correspondingly, step S206 may include S602: adjusting the available bandwidth of each of the target clusters according to the expected resource utilization of the target resource pool in a specified time period and the service level data of each of the target clusters.
[0065] The service level data of each target cluster reflects the service status of the corresponding target cluster in the previous cycle (such as the target time period), and then the available bandwidth of each target cluster can be adaptively adjusted according to the corresponding service status of each target cluster and the expected resource utilization of the target resource pool in the specified time period. In some embodiments, the usage data such as jamming, latency, CPU utilization, and loading failure rate of each target cluster can be aggregated through normalization processing to obtain the SLO data of each target cluster.
[0066] In this embodiment, the available bandwidth of each target cluster is adjusted based on the usage data of each target cluster in a cluster unit, thereby achieving reasonable allocation of the available bandwidth corresponding to the expected resource utilization rate to each target cluster.
[0067] In an optional embodiment, if Figure 7 As shown, step S602 may include: Step S700: Obtain the maximum sum of available bandwidths of the plurality of target clusters.
[0068] Step S702, under the premise of ensuring that the ratio of the total available bandwidth of the multiple target clusters to the total maximum available bandwidth is the expected resource utilization, adjust the available bandwidth of at least some of the multiple target clusters; wherein, among the multiple target clusters, the available bandwidth of the target cluster with relatively high service level data is lowered, and the available bandwidth of the target cluster with relatively low service level data is increased.
[0069] The sum of the maximum available bandwidths of multiple target clusters, that is, the sum of the bandwidths when the load of all machines in the target resource pool is 100%. The ratio of the sum of the available bandwidths of multiple target clusters to the sum of the maximum available bandwidths is the expected resource utilization, which can make the sum of the available bandwidths of multiple target clusters meet the available bandwidth corresponding to the expected resource utilization. If the service level data is relatively high, it means that the service quality is relatively poor. The available bandwidth of the corresponding target cluster can be appropriately reduced to improve the service quality. If the service level data is relatively low, it means that the service quality is relatively high. The available bandwidth of the corresponding target cluster can be appropriately increased to provide more services.
[0070] In this embodiment, when the total available bandwidth of each target cluster meets the available bandwidth corresponding to the expected resource utilization, the available bandwidth of each target cluster is adaptively adjusted, thereby reasonably allocating the available bandwidth corresponding to the expected resource utilization to each target cluster.
[0071] In order to make the present application easier to understand, an exemplary application is provided below.
[0072] S1: The scheduling server collects usage data of each CDN cluster from the log and monitoring platform according to a preset period.
[0073] A CDN cluster can be based on a computer room, and one CDN cluster can correspond to one computer room.
[0074] For example, usage data may include freezes, delays, and CPU utilization data for a single computer room.
[0075] In this exemplary application, the jamming, latency, and CPU utilization data of each of the computer room n1, computer room n2, and computer room n3 can be collected. Here, it is assumed that the computer room n1, computer room n2, and computer room n3 all belong to manufacturer A and operator X).
[0076] S2: Based on the resource pool dimension, the usage data of multiple computer rooms is aggregated to obtain the SLO data of each resource pool.
[0077] The resource pool can be divided according to the combination of different CDN manufacturers and operators. For example: Resource pool 1 corresponds to: manufacturer A + operator X; Resource pool 2 corresponds to: manufacturer B + operator Y.
[0078] For example, the usage data of computer rooms n1, n2, and n3 in resource pool 1 are aggregated to obtain SLO data S.
[0079] S3: According to the SLO data of each resource pool, the expected resource utilization of each resource pool is obtained.
[0080] Take resource pool 1 as an example: The SLO data S of the current cycle (target time period) is input into the multi-arm Bandit to output the expected resource utilization P of resource pool 1 in the next cycle (specified time period).
[0081] By analogy, the expected resource utilization of each resource pool can be obtained.
[0082] S4: Obtain the maximum available bandwidth and actual available bandwidth of each computer room.
[0083] Continuing with the example of computer room n1, computer room n2, and computer room n3, it is assumed that the maximum available bandwidths corresponding to computer room n1, computer room n2, and computer room n3 are respectively bw1, bw2, and bw3, and the actual available bandwidths corresponding to computer room n1, computer room n2, and computer room n3 are respectively pw1, pw2, and pw3.
[0084] S5: Aggregate the usage data of multiple computer rooms based on the computer room dimension to obtain the SLO data of each computer room.
[0085] Continuing with computer room n1, computer room n2, and computer room n3 as an example, the corresponding SLO data are S1, S2, and S3.
[0086] S6: Reduce the available bandwidth of the computer room with a larger SLO, and increase the available bandwidth of the computer room with a smaller SLO.
[0087] Continuing with computer room n1, computer room n2, and computer room n3 as an example, these three belong to the same resource pool 1, and the corresponding expected resource utilization rate is P.
[0088] Let, (new_pw1+new_pw2+new_pw3) / (bw1+bw2+bw3)=P, and adjust to obtain new_pw1, new_pw2, and new_pw3.
[0089] S7: Send the adjusted available bandwidth of each computer room to each corresponding computer room.
[0090] Continuing with computer room n1, computer room n2, and computer room n3 as an example, new_pw1 is sent to n1; new_pw2 is sent to n2; and new_pw3 is sent to n3.
[0091] In this exemplary application, it is possible to fully improve the bandwidth utilization of each computer room while ensuring the service quality.
[0092] Embodiment 2 Figure 8 The block diagram of the CDN resource scheduling device according to the second embodiment of the present application is schematically shown. The device can be divided into one or more program modules, one or more program modules are stored in a storage medium, and are executed by one or more processors to complete the embodiment of the present application. The program module referred to in the embodiment of the present application refers to a series of computer program instruction segments that can complete specific functions. The following description will specifically introduce the functions of each program module in this embodiment. Figure 8 As shown, the device 1600 may include: a first acquisition module 1610, a second acquisition module 1620, a confirmation module 1630 and an adjustment module 1640, wherein: The first acquisition module 1610 is used to acquire usage data of each target cluster in the target resource pool in a target time period; The second acquisition module 1620 is used to acquire the service level data of the target resource pool according to the usage data of each target cluster in the target time period; A determination module 1630, configured to determine an expected resource utilization rate of the target resource pool in a specified time period according to the service level data of the target resource pool; The adjustment module 1640 is configured to adjust the available bandwidth of each of the target clusters according to the expected resource utilization of the target resource pool in a specified time period.
[0093] As an optional embodiment, the second acquisition module 1620 is further configured to: Obtaining actual resource utilization of the target resource pool in a target time period; Inputting the actual resource utilization rate of the target time period and the service level data of the target resource pool into a pre-trained target model to output the expected resource utilization rate of the target resource pool in the specified time period; The target model aims to maximize resource utilization under the premise of meeting the service level, and outputs the expected resource utilization based on the actual resource utilization in the target time period and the service level data of the target resource pool.
[0094] As an optional embodiment, the target model includes a multi-arm Bandit model, and the multi-arm Bandit model is used to: Determining a penalty value according to the actual resource utilization rate of the target time period and the service level data of the target resource pool; Outputting the expected resource pool utilization corresponding to the specified time period according to the penalty value; The penalty value is used to represent the actual performance of the expected resource pool utilization corresponding to the target time period.
[0095] As an optional embodiment, the apparatus 1600 may further include a second determining module, where the second determining module is configured to: When the service level data of the target resource pool is not less than a preset threshold, determining the penalty value to be infinite; When the service level data of the target resource pool is less than a preset threshold, the penalty value is determined to be a difference between 1 and the actual resource utilization rate of the target time period.
[0096] As an optional embodiment, the adjustment module 1640 is further configured to: Acquire service level data of each target cluster according to usage data of each target cluster in a target time period; Correspondingly, adjusting the available bandwidth of each target cluster according to the expected resource utilization of the target resource pool in the specified time period includes: adjusting the available bandwidth of each target cluster according to the expected resource utilization of the target resource pool in the specified time period and the service level data of each target cluster.
[0097] As an optional embodiment, the adjustment module 1640 is further configured to: Obtaining the maximum sum of available bandwidths of the plurality of target clusters; Under the premise of ensuring that the ratio of the sum of available bandwidths of the plurality of target clusters to the sum of the maximum available bandwidths is equal to the expected resource utilization rate, adjusting the available bandwidths of at least some of the plurality of target clusters; Among the multiple target clusters, the available bandwidth of the target cluster with relatively higher service level data is adjusted downward, and the available bandwidth of the target cluster with relatively lower service level data is adjusted upward.
[0098] Embodiment 3 Fig. 9 The schematic diagram of the hardware architecture of a computer device 10000 suitable for implementing the scheduling method of CDN resources according to the third embodiment of the present application is shown schematically. In some embodiments, the computer device 10000 may be a terminal device such as a smart phone, a wearable device, a tablet computer, a personal computer, a vehicle terminal, a game console, a virtual device, a workbench, a digital assistant, a set-top box, a robot, etc. In other embodiments, the computer device 10000 may be a rack server, a blade server, a tower server, or a cabinet server (including an independent server, or a server cluster composed of multiple servers), etc. Fig. 9 As shown, the computer device 10000 includes but is not limited to: a memory 10010, a processor 10020, and a network interface 10030 that can communicate with each other through a system bus. Among them: The memory 10010 includes at least one type of computer-readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (such as SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 10010 can be an internal storage module of the computer device 10000, such as a hard disk or memory of the computer device 10000. In other embodiments, the memory 10010 can also be an external storage device of the computer device 10000, such as a plug-in hard disk equipped on the computer device 10000, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the memory 10010 can also include both the internal storage module of the computer device 10000 and its external storage device. In this embodiment, the memory 10010 is generally used to store the operating system and various application software installed in the computer device 10000, such as the program code of the CDN resource scheduling method, etc. In addition, the memory 10010 can also be used to temporarily store various data that have been output or will be output.
[0099] In some embodiments, the processor 10020 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other chips. The processor 10020 is generally used to control the overall operation of the computer device 10000, such as performing control and processing related to data interaction or communication with the computer device 10000. In this embodiment, the processor 10020 is used to run the program code stored in the memory 10010 or process data.
[0100] The network interface 10030 may include a wireless network interface or a wired network interface, and the network interface 10030 is generally used to establish a communication link between the computer device 10000 and other computer devices. For example, the network interface 10030 is used to connect the computer device 10000 to an external terminal through a network, and to establish a data transmission channel and a communication link between the computer device 10000 and the external terminal. The network may be a wireless or wired network such as an intranet, the Internet, the Global System of Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), 4G network, 5G network, Bluetooth, Wi-Fi, etc.
[0101] It should be pointed out that Fig. 9 Only a computer device having components 10010 - 10030 is shown, but it should be understood that implementation of all of the components shown is not a requirement, and more or fewer components may alternatively be implemented.
[0102] In this embodiment, the CDN resource scheduling method stored in the memory 10010 may also be divided into one or more program modules and executed by one or more processors (such as processor 10020) to complete the embodiment of the present application.
[0103] Embodiment 4 The embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, wherein when the computer program is executed by a processor, the steps of the CDN resource scheduling method in the embodiment are implemented.
[0104] In this embodiment, the computer-readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the computer-readable storage medium may be an internal storage unit of a computer device, such as a hard disk or memory of the computer device. In other embodiments, the computer-readable storage medium may also be an external storage device of a computer device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the computer device. Of course, the computer-readable storage medium may also include both the internal storage unit of the computer device and its external storage device. In this embodiment, the computer-readable storage medium is generally used to store an operating system and various application software installed on the computer device, such as the program code of the scheduling method of CDN resources in the embodiment. In addition, the computer-readable storage medium may also be used to temporarily store various types of data that have been output or are to be output.
[0105] Embodiment 5 An embodiment of the present application also provides a computer program product, including a computer program, which implements the method in the above embodiment when executed by a processor.
[0106] Obviously, those skilled in the art should understand that the modules or steps of the above-mentioned embodiments of the present application can be implemented by general-purpose computer devices, they can be concentrated on a single computer device, or distributed on a network composed of multiple computer devices, optionally, they can be implemented by executable program codes of computer devices, so that they can be stored in a storage device and executed by the computer device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. In this way, the embodiments of the present application are not limited to any specific combination of hardware and software.
[0107] It should be noted that the above are only preferred embodiments of the present application, and the patent protection scope of the present application is not limited thereto. Any equivalent structure or equivalent process transformation made using the contents of the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for scheduling CDN resources, characterized in that: The method comprises: Obtain usage data of each target cluster in the target resource pool during the target time period; Obtaining service level data of the target resource pool according to usage data of each target cluster in a target time period; Determining an expected resource utilization rate of the target resource pool in a specified time period according to the service level data of the target resource pool; The available bandwidth of each of the target clusters is adjusted according to the expected resource utilization of the target resource pool in a specified time period.
2. The method according to claim 1, characterized in that Determining, according to the service level data of the target resource pool, an expected resource utilization rate of the target resource pool in a specified time period, including: Obtaining actual resource utilization of the target resource pool in a target time period; Inputting the actual resource utilization rate of the target time period and the service level data of the target resource pool into a pre-trained target model to output the expected resource utilization rate of the target resource pool in the specified time period; The target model aims to maximize resource utilization under the premise of meeting the service level, and outputs the expected resource utilization based on the actual resource utilization in the target time period and the service level data of the target resource pool.
3. The method according to claim 2, characterized in that The target model includes a multi-arm Bandit model, and the multi-arm Bandit model is used to: Determining a penalty value according to the actual resource utilization rate of the target time period and the service level data of the target resource pool; Outputting the expected resource pool utilization corresponding to the specified time period according to the penalty value; The penalty value is used to represent the actual performance of the expected resource pool utilization corresponding to the target time period.
4. The method according to claim 2, characterized in that: The penalty value is obtained by the following operation: When the service level data of the target resource pool is not less than a preset threshold, determining the penalty value to be infinite; When the service level data of the target resource pool is less than a preset threshold, the penalty value is determined to be a difference between 1 and the actual resource utilization rate of the target time period.
5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: Acquire service level data of each target cluster according to usage data of each target cluster in a target time period; Correspondingly, adjusting the available bandwidth of each target cluster according to the expected resource utilization of the target resource pool in the specified time period includes: adjusting the available bandwidth of each target cluster according to the expected resource utilization of the target resource pool in the specified time period and the service level data of each target cluster.
6. The method according to claim 5, characterized in that According to the expected resource utilization of the target resource pool in a specified time period and the service level data of each target cluster, the available bandwidth of each target cluster is adjusted, including: Obtaining the maximum sum of available bandwidths of the plurality of target clusters; Under the premise of ensuring that the ratio of the sum of available bandwidths of the plurality of target clusters to the sum of the maximum available bandwidths is equal to the expected resource utilization rate, adjusting the available bandwidths of at least some of the plurality of target clusters; Among the multiple target clusters, the available bandwidth of the target cluster with relatively higher service level data is adjusted downward, and the available bandwidth of the target cluster with relatively lower service level data is adjusted upward.
7. A CDN resource scheduling device, characterized in that: The device comprises: The first acquisition module is used to acquire the usage data of each target cluster in the target resource pool during the target time period; A second acquisition module is used to acquire the service level data of the target resource pool according to the usage data of each target cluster in the target time period; A determination module, configured to determine an expected resource utilization rate of the target resource pool in a specified time period according to the service level data of the target resource pool; The adjustment module is used to adjust the available bandwidth of each of the target clusters according to the expected resource utilization of the target resource pool in a specified time period.
8. A computer device, characterized in that: include: at least one processor; and a memory communicatively connected to the at least one processor; wherein: The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the method according to any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to claims 1 to 6 are implemented.