Search

CN-115185649-B - Method, device, equipment and storage medium for resource scheduling

CN115185649BCN 115185649 BCN115185649 BCN 115185649BCN-115185649-B

Abstract

The application discloses a method, a device, equipment and a storage medium for resource scheduling. The method comprises the steps of obtaining a first query rate QPS of target business services to be predicted in a preset first time period, determining a second QPS of the preset prediction time period by using a preset load prediction model according to the first QPS, determining a first Pod number corresponding to the second QPS by using a preset capacity model according to the second QPS, determining the preset capacity model according to sample data training of the business services, and scheduling resources of the target business services according to the first Pod number and preset resource using conditions. According to the embodiment of the application, the resource scheduling is more reasonable and simple, the resource scheduling efficiency is improved, and the resource utilization rate of the whole service is further improved.

Inventors

  • FAN YU
  • Zou jinzhu
  • Jing Peiyang
  • Liao Mengyao
  • WANG XINYUAN
  • ZHOU XIANTONG
  • CHANG BIN
  • LIU ZHILEI
  • Zhu yinxing

Assignees

  • 中移在线服务有限公司
  • 中国移动通信集团有限公司

Dates

Publication Date
20260505
Application Date
20210402

Claims (11)

  1. 1. A method for scheduling resources, comprising: acquiring a first query rate QPS of target business service to be predicted in a preset first time period; determining a second QPS of a preset prediction time period by using a preset load prediction model according to the first QPS; According to the second QPS, a first Pod number corresponding to the second QPS is determined by utilizing a preset capacity model, wherein the preset capacity model is determined according to sample data training of business service; Scheduling the resources of the target business service according to the first Pod number and a preset resource using condition; The preset capacity model comprises a first feature recognition model and a second feature recognition model, the first feature recognition model and the second feature recognition model are weighted and calculated through weights, the first feature recognition model comprises a neural network model, the second feature recognition model comprises a linear regression model, and the determining of the first Pod number corresponding to the second QPS according to the second QPS by utilizing the preset capacity model comprises the following steps: Inputting the second QPS into a first feature recognition model of a preset capacity model to obtain first feature information of the second QPS, wherein the first feature information comprises a corresponding relation between the second QPS obtained by recognition of the first feature recognition model and CPU and memory resource usage; inputting the second QPS into a second feature recognition model of a preset capacity model to obtain second feature information of the second QPS, wherein the second feature information comprises a corresponding relation between the second QPS obtained by recognition of the second feature recognition model and CPU and memory resource usage; determining the resource usage amount corresponding to the second QPS according to the first characteristic information and the second characteristic information; and according to the resource usage amount and preset container resource quota information, calculating to obtain a first Pod number corresponding to the second QPS.
  2. 2. The method of claim 1, wherein prior to said determining a second QPS for a predicted time period from said first QPS using a preset load prediction model, said method further comprises: When the target business service is not stored in the detection storage device, acquiring a third QPS of a preset second time period of the target business service, wherein the preset second time period comprises the preset first time period; And training a load prediction model to serve as the preset load prediction model according to the third QPS and a preset load prediction algorithm.
  3. 3. The method of claim 1, wherein the preset resource usage condition includes an upper bound threshold and a lower bound threshold of a Pod number corresponding to a preset target resource usage amount, and wherein the scheduling the resource of the target business service according to the first Pod number and the preset resource usage condition includes: When the first Pod number is larger than or equal to the Pod number upper limit threshold value, expanding the capacity of the resources of the target business service; and when the first Pod number is smaller than the Pod number lower limit threshold value, reducing the capacity of the resources of the target business service.
  4. 4. The method of claim 3, wherein expanding the resources of the target business service when the first Pod number is greater than or equal to the Pod number upper threshold comprises: and when the first Pod number is larger than or equal to a preset expansion Pod number upper limit threshold, expanding the capacity of the resources of the target business service according to the preset expansion Pod number upper limit threshold.
  5. 5. The method of claim 3, wherein shrinking the resources of the target business service when the first Pod number is less than the Pod number lower threshold comprises: and when the first Pod number is smaller than a preset lower limit threshold of the volume reduction Pod number, reducing the volume of the resources of the target business service according to the preset lower limit threshold of the volume reduction Pod number.
  6. 6. The method of any of claims 1-5, wherein the scheduling resources of the target business service further comprises: acquiring preset scheduling starting time, wherein the preset scheduling starting time comprises capacity expansion starting time and capacity contraction starting time; and scheduling the resources of the target business service according to the preset scheduling start time.
  7. 7. The method of claim 6, wherein the scheduling the resources of the target business service further comprises: acquiring the dispatching priority level of the target business service; And scheduling the resources of the target business service according to the scheduling priority level.
  8. 8. The method according to claim 1, wherein the method further comprises: determining a real-time second Pod number according to the acquired real-time resource usage amount and preset container resource quota information; and scheduling the resources of the target business service according to the second Pod number and the preset resource using condition.
  9. 9. An apparatus for scheduling resources, the apparatus comprising: The acquisition module is used for acquiring a first query rate QPS of target business service to be predicted in a preset first time period; The first determining module is used for determining a second QPS of a preset prediction time period by utilizing a preset load prediction model according to the first QPS; the second determining module is used for determining a first Pod number corresponding to the second QPS by using a preset capacity model according to the second QPS, wherein the preset capacity model is determined according to sample data training of business service; The scheduling module is used for scheduling the resources of the target business service according to the first Pod number and the preset resource using condition; The preset capacity model comprises a first feature recognition model and a second feature recognition model, the first feature recognition model and the second feature recognition model are weighted and calculated through weights, the first feature recognition model comprises a neural network model, the second feature recognition model comprises a linear regression model, and the determining of the first Pod number corresponding to the second QPS according to the second QPS by utilizing the preset capacity model comprises the following steps: Inputting the second QPS into a first feature recognition model of a preset capacity model to obtain first feature information of the second QPS, wherein the first feature information comprises a corresponding relation between the second QPS obtained by recognition of the first feature recognition model and CPU and memory resource usage; inputting the second QPS into a second feature recognition model of a preset capacity model to obtain second feature information of the second QPS, wherein the second feature information comprises a corresponding relation between the second QPS obtained by recognition of the second feature recognition model and CPU and memory resource usage; determining the resource usage amount corresponding to the second QPS according to the first characteristic information and the second characteristic information; and according to the resource usage amount and preset container resource quota information, calculating to obtain a first Pod number corresponding to the second QPS.
  10. 10. An apparatus for scheduling resources, the apparatus comprising a processor and a memory storing computer program instructions; The method of resource scheduling according to any one of claims 1 to 8 when executed by said processor.
  11. 11. A computer storage medium having stored thereon computer program instructions which, when executed by a processor, implement the method of resource scheduling according to any one of claims 1 to 8.

Description

Method, device, equipment and storage medium for resource scheduling Technical Field The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a computer storage medium for resource scheduling. Background With development of cloud computing technology and improvement of cloud service capability, the service system is deployed on a cloud data center or a cloud platform, so that operators can be helped to better integrate and manage service resources. Typically, cloud data centers integrate different services together by means of virtualization technologies such as virtual machines and containers. Through the scheduling management of the container resources, the resource utilization rate of the cloud data center can be ensured to a certain extent. However, the resource scheduling method in the related art has some defects, such as complex task scheduling method, certain hysteresis in scheduling execution, etc., so that various business service resources cannot be effectively scheduled and managed, which has adverse effects on the overall resource utilization rate. Disclosure of Invention The embodiment of the application provides a method, a device, equipment and a computer storage medium for resource scheduling, which can enable resource scheduling to be more reasonable and simple, improve resource scheduling efficiency and further improve the resource utilization rate of the whole service. In a first aspect, an embodiment of the present application provides a method for scheduling resources, including: acquiring a first query rate QPS of target business service to be predicted in a preset first time period; determining a second QPS of a preset prediction time period by using a preset load prediction model according to the first QPS; According to the second QPS, a first Pod number corresponding to the second QPS is determined by utilizing a preset capacity model, wherein the preset capacity model is determined according to sample data training of business service; And scheduling the resources of the target business service according to the first Pod number and the preset resource using condition. Optionally, before the determining, according to the first QPS, the second QPS for the predicted period of time using a preset load prediction model, the method further includes: When the target business service is not stored in the detection storage device, acquiring a third QPS of a preset second time period of the target business service, wherein the preset second time period comprises the preset first time period; And training a load prediction model to serve as the preset load prediction model according to the third QPS and a preset load prediction algorithm. Optionally, the determining, according to the second QPS, a first Pod number corresponding to the second QPS using a preset capacity model includes: Inputting the second QPS into a first characteristic identification model of a preset capacity model to obtain first characteristic information of the second QPS; Inputting the second QPS into a second characteristic identification model of a preset capacity model to obtain second characteristic information of the second QPS; determining the resource usage amount corresponding to the second QPS according to the first characteristic information and the second characteristic information; and according to the resource usage amount and preset container resource quota information, calculating to obtain a first Pod number corresponding to the second QPS. Optionally, the first feature recognition model comprises a neural network model, and the second feature recognition model comprises a linear regression model. Optionally, the preset resource usage condition includes an upper limit threshold and a lower limit threshold of the Pod number corresponding to the preset target resource usage amount, and the scheduling the resource of the target business service according to the first Pod number and the preset resource usage condition includes: When the first Pod number is larger than or equal to the Pod number upper limit threshold value, expanding the capacity of the resources of the target business service; and when the first Pod number is smaller than the Pod number lower limit threshold value, reducing the capacity of the resources of the target business service. Optionally, when the first Pod number is greater than or equal to the Pod number upper threshold, the expanding the capacity of the resource of the target business service includes: and when the first Pod number is larger than or equal to a preset expansion Pod number upper limit threshold, expanding the capacity of the resources of the target business service according to the preset expansion Pod number upper limit threshold. Optionally, when the first Pod number is smaller than the Pod number lower threshold, the method further includes: and when the first Pod number is smaller than a