Resource scheduling method and device in cloud environment, medium and equipment

By predicting the data center load and adjusting the host queue, the problem of inapplicable static resource scheduling algorithm in the cloud computing environment is solved, and the effect of reducing data center power consumption and improving performance is achieved.

CN119847728AActive Publication Date: 2025-04-18SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411775951.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-04-18
Estimated Expiration
2044-12-05

AI Technical Summary

Technical Problem

The existing static resource scheduling algorithm is not suitable for cloud computing environments, because the application and release of virtual machines in cloud computing are highly dynamic, and the purpose of resource scheduling has shifted from reducing task running time to reducing data center power consumption.

Method used

By predicting the data center load in the next cycle, and adjusting the host queue to turn on and off according to the predicted value and power consumption management strategy, reasonably allocate virtual machine resources to reduce data center power consumption.

Benefits of technology

It effectively reduces the power consumption of data centers, improves the performance of data centers, and adapts to the dynamic and real-time needs of cloud computing environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119847728A_ABST
    Figure CN119847728A_ABST
Patent Text Reader

Abstract

The invention provides a resource scheduling method and device in a cloud environment, a medium and equipment. The method comprises the steps of predicting a data center load of a next period according to a data center load of a current period and a data center load of a previous period; according to the predicted value of the load of the data center in the next period and the management strategy, the host machine starting queue and the host machine closing queue are adjusted; when a virtual machine application request of a user is received, searching a host machine meeting resources required by the virtual machine applied by the user in the started host machine queue, and taking the searched host machine as a target host machine; and allocating the virtual machine applied by the user to the target host machine so as to create the virtual machine applied by the user on the target host machine, and adding the created virtual machine to a virtual machine queue. A suitable resource scheduling strategy is provided for the cloud computing environment, and the electricity consumption of the data center can be effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of resource scheduling, and in particular to a resource scheduling method, device, medium and equipment in a cloud environment. Background Art

[0002] With the continuous improvement of computer performance and the rapid development of Internet technology, cloud computing, a new computing method, has emerged to meet people's growing computing needs and massive data processing needs. Resource scheduling is a core issue in cloud computing. Many static resource scheduling algorithms have been proposed and applied for grid computing. However, these static resource scheduling algorithms for grid computing are not suitable for resource scheduling in cloud computing for the following three reasons:

[0003] First, resource scheduling problems in grid computing mostly only consider how to reasonably allocate a batch of grid tasks to grid resources so that current resources are optimally allocated. However, in cloud computing, virtual machines are constantly being requested and released. Therefore, static resource scheduling algorithms are not applicable to cloud computing.

[0004] Secondly, the running time of grid tasks in grid computing is determined by the static resource scheduling strategy selected by it. However, the usage time of virtual machines in cloud computing is determined by users, and cloud computing resource scheduling strategies cannot determine the usage time of virtual machines.

[0005] Finally, the purpose of resource scheduling in grid computing is to reduce the task running time. However, the use time of virtual machines in cloud computing cannot be changed, so the main purpose of resource scheduling in cloud computing becomes how to reduce the power consumption of the data center. It can be seen that the two purposes are different.

[0006] Based on the above reasons, it can be determined that static resource scheduling algorithms cannot be used in cloud environments. Therefore, it is necessary to provide a suitable resource scheduling solution for cloud environments. Summary of the invention

[0007] In view of at least one of the above technical problems, an embodiment of the present invention provides a resource scheduling method, device, medium, and equipment in a cloud environment.

[0008] According to a first aspect, a resource scheduling method in a cloud environment provided by an embodiment of the present invention includes:

[0009] Predicting the data center load of the next cycle based on the data center load of the current cycle and the data center load of the previous cycle;

[0010] According to the predicted value of the data center load in the next cycle and the management strategy formulated with the goal of reducing the power consumption of the data center, the host machine opening queue and the host machine closing queue are adjusted; wherein the host machine opening queue includes each host machine in the data center that is in an open state, and the host machine closing queue includes each host machine in the data center that is in a closed state;

[0011] Upon receiving a user's virtual machine application request, searching the host machine in the open host machine queue for a host machine that meets the resources required for the virtual machine applied for by the user, and using the found host machine as the target host machine;

[0012] The virtual machine requested by the user is allocated to the target host machine to create the virtual machine requested by the user on the target host machine, and the created virtual machine is added to the virtual machine queue; wherein the virtual machine queue includes each virtual machine created on each host machine in the data center.

[0013] In one embodiment, the method further comprises:

[0014] If a host machine that meets the resources required by the virtual machine requested by the user cannot be found in the open host machine queue, a host machine that meets the resources required by the virtual machine requested by the user is searched in the closed host machine queue, and the found host machine is used as the target host machine;

[0015] Turning on the target host machine, and transferring the target host machine from the host-turning-off queue to the host-turning-on queue, so as to adjust the host-turning-on queue and the host-turning-off queue;

[0016] The virtual machine requested by the user is allocated to the target host machine, so as to create the virtual machine requested by the user on the target host machine, and add the created virtual machine to the virtual machine queue.

[0017] In one embodiment, the method further comprises:

[0018] Upon receiving a virtual machine release request from a user, destroying the virtual machine that the user needs to release on the corresponding host machine, and deleting the virtual machine that the user needs to release from the virtual machine queue;

[0019] The host machine where the virtual machine that the user needs to release is located is shut down, and the host machine where the virtual machine that the user needs to release is located is transferred from the host machine startup queue to the host machine shutdown queue to adjust the host machine startup queue and the host machine shutdown queue.

[0020] In one embodiment, the method further comprises:

[0021] Regularly calculating the average utilization rate of each host in the enabled host queue;

[0022] Determining whether the average utilization rate is less than a utilization rate threshold;

[0023] If so, the mapping relationship between each virtual machine and the host in the enabled host queue is reallocated using an ant colony algorithm for the purpose of improving the average utilization rate of each host in the enabled host queue, and virtual machine migration is performed according to the mapping relationship.

[0024] In one embodiment, predicting the data center load of the next cycle according to the data center load of the current cycle and the data center load of the previous cycle includes:

[0025] Compare the data center load of the current cycle with the data center load of the previous cycle. If the data center load of the current cycle is greater than the data center load of the previous cycle, the change trend of the data center load is an upward trend; if the data center load of the current cycle is less than the data center load of the previous cycle, the change trend of the data center load is a downward trend;

[0026] Calculating an adjustment value according to a change trend of the data center load;

[0027] If the changing trend is an upward trend, the adjustment value is added to the data center load of the current cycle to obtain the data center load of the next cycle; if the changing trend is a downward trend, the adjustment value is reduced based on the data center load of the current cycle to obtain the data center load of the next cycle.

[0028] In one embodiment, the calculating the adjustment value according to the change trend of the data center load includes:

[0029] If the change trend is an upward trend, comparing the data center load of the current cycle with the average value of the data center load of multiple historical cycles;

[0030] If the data center load in the current cycle is less than the average value of the data center load in multiple historical cycles, the adjustment value is calculated using the first calculation formula, which is:

[0031] IncVal'=IncVal+(Re_alIncVal-IncVal)·AdaptDgr

[0032] Wherein, IncVal' is the adjustment value calculated for the next cycle in the current cycle, IncVal is the adjustment value calculated for the current cycle in the previous cycle; Re_alIncVal is the actual increased load value of the data center in the current cycle, and AdaptDgr is the historical average load factor;

[0033] If the data center load of the current cycle is greater than or equal to the average value of the data center loads of multiple historical cycles, the adjustment value is calculated using the second calculation formula, where the second calculation formula is:

[0034] IncVal'

[0035] =Min(IncVal+(Re_alIncVal-IncVal)·AdaptDgr,IncVal·PastGreater)

[0036] Among them, PastGreater is the ratio of the data center load in multiple historical cycles that is greater than the data center load in the current cycle.

[0037] In one embodiment, the calculating the adjustment value according to the change trend of the data center load includes:

[0038] If the change trend is a downward trend, comparing the data center load of the current cycle with the average value of the data center load of multiple historical cycles;

[0039] If the data center load in the current cycle is greater than the average value of the data center loads in multiple historical cycles, the adjustment value is calculated using a third calculation formula, which is:

[0040] IncVal'=VT·(IncVal+(Re_alIncVal-DecVal)·AdaptDgr)

[0041] Among them, IncVal' is the adjustment value calculated for the next cycle in the current cycle, VT is the historical platform reduction value coefficient, IncVal is the adjustment value calculated for the current cycle in the previous cycle, RealIncVal is the actual load value increased by the data center in the current cycle, DecVal is the actual load value increased by the data center in the previous cycle, and AdaptDgr is the historical average load coefficient;

[0042] If the data center load of the current cycle is less than or equal to the average value of the data center loads of multiple historical cycles, the fourth calculation formula is used to calculate the adjustment value, and the fourth calculation formula is:

[0043] IncVal'=

[0044] VT·Min(IncVal+(Re_alIncVal-DecVal)·AdaptDgr, DecVal·PastLess)

[0045] Among them, PastLess is the ratio of the data center load in multiple historical cycles to the data center load in the current cycle.

[0046] According to a second aspect, a resource scheduling device in a cloud environment provided by an embodiment of the present invention includes:

[0047] A load prediction module is used to predict the data center load of the next cycle based on the data center load of the current cycle and the data center load of the previous cycle;

[0048] A first adjustment module is used to adjust the host machine opening queue and the host machine closing queue according to the predicted value of the data center load in the next cycle and the management strategy formulated with the goal of reducing the power consumption of the data center; wherein the host machine opening queue includes each host machine in the data center that is in an open state, and the host machine closing queue includes each host machine in the data center that is in a closed state;

[0049] A first search module is used to search for a host machine that meets the resources required by the virtual machine requested by the user in the open host machine queue when receiving the virtual machine application request from the user, and use the found host machine as the target host machine;

[0050] The first allocation module is used to allocate the virtual machine requested by the user to the target host machine, so as to create the virtual machine requested by the user on the target host machine and add the created virtual machine to the virtual machine queue; wherein the virtual machine queue includes each virtual machine created on each host machine in the data center.

[0051] In one embodiment, the device may further include:

[0052] A second search module is used to search for a host machine that meets the required resources of the virtual machine requested by the user in the closed host machine queue if a host machine that meets the required resources of the virtual machine requested by the user cannot be found in the open host machine queue, and use the found host machine as the target host machine;

[0053] A second adjustment module is used to turn on the target host machine and transfer the target host machine from the host shutdown queue to the host startup queue to adjust the host startup queue and the host shutdown queue;

[0054] The second allocation module is used to allocate the virtual machine requested by the user to the target host machine, so as to create the virtual machine requested by the user on the target host machine, and add the created virtual machine to the virtual machine queue.

[0055] In one embodiment, the device may further include:

[0056] A virtual machine release module, configured to, upon receiving a virtual machine release request from a user, destroy the virtual machine that the user needs to release on the corresponding host machine and delete the virtual machine that the user needs to release from the virtual machine queue;

[0057] The third adjustment module is used to shut down the host machine where the virtual machine that the user needs to release is located, and transfer the host machine where the virtual machine that the user needs to release is located from the host machine startup queue to the host machine shutdown queue, so as to adjust the host machine startup queue and the host machine shutdown queue.

[0058] In one embodiment, the device may further include:

[0059] A power adjustment module is used to periodically calculate the average utilization of each host machine in the host machine queue; determine whether the average utilization is less than the utilization threshold; if so, use an ant colony algorithm to reallocate the mapping relationship between each virtual machine and the host machine in the host machine queue for the purpose of improving the average utilization of each host machine in the host machine queue, and perform virtual machine migration according to the mapping relationship.

[0060] In one embodiment, the load prediction module includes:

[0061] A trend determination unit, used to compare the data center load of the current cycle with the data center load of the previous cycle. If the data center load of the current cycle is greater than the data center load of the previous cycle, the change trend of the data center load is an upward trend; if the data center load of the current cycle is less than the data center load of the previous cycle, the change trend of the data center load is a downward trend;

[0062] A first calculation unit, configured to calculate an adjustment value according to a change trend of the data center load;

[0063] The second calculation unit is used to increase the adjustment value based on the data center load of the current cycle to obtain the data center load of the next cycle if the change trend is an upward trend; if the change trend is a downward trend, reduce the adjustment value based on the data center load of the current cycle to obtain the data center load of the next cycle.

[0064] In one embodiment, the first computing unit is specifically configured to perform the following steps:

[0065] If the change trend is an upward trend, comparing the data center load of the current cycle with the average value of the data center load of multiple historical cycles;

[0066] If the data center load in the current cycle is less than the average value of the data center load in multiple historical cycles, the adjustment value is calculated using the first calculation formula, which is:

[0067] IncVal'=IncVal+(Re_alIncVal-IncVal)·AdaptDgr

[0068] Wherein, IncVal' is the adjustment value calculated for the next cycle in the current cycle, IncVal is the adjustment value calculated for the current cycle in the previous cycle; Re_alIncVal is the actual increased load value of the data center in the current cycle, and AdaptDgr is the historical average load factor;

[0069] If the data center load of the current cycle is greater than or equal to the average value of the data center loads of multiple historical cycles, the adjustment value is calculated using the second calculation formula, where the second calculation formula is:

[0070] IncVal'

[0071] =Min(IncVal+(Re_alIncVal-IncVal)·AdaptDgr,IncVal·PastGreater)

[0072] Among them, PastGreater is the ratio of the data center load in multiple historical cycles that is greater than the data center load in the current cycle.

[0073] In one embodiment, the first computing unit is specifically configured to perform the following steps:

[0074] If the change trend is a downward trend, comparing the data center load of the current cycle with the average value of the data center load of multiple historical cycles;

[0075] If the data center load in the current cycle is greater than the average value of the data center loads in multiple historical cycles, the adjustment value is calculated using a third calculation formula, which is:

[0076] IncVal'=VT·(IncVal+(Re_alIncVal-DecVal)·AdaptDgr)

[0077] Among them, IncVal' is the adjustment value calculated for the next cycle in the current cycle, VT is the historical platform reduction value coefficient, IncVal is the adjustment value calculated for the current cycle in the previous cycle, RealIncVal is the actual load value increased by the data center in the current cycle, DecVal is the actual load value increased by the data center in the previous cycle, and AdaptDgr is the historical average load coefficient;

[0078] If the data center load of the current cycle is less than or equal to the average value of the data center loads of multiple historical cycles, the fourth calculation formula is used to calculate the adjustment value, and the fourth calculation formula is:

[0079] IncVal'=

[0080] VT·Min(IncVal+(Re_alIncVal-DecVal)·AdaptDgr, DecVal·PastLess)

[0081] Among them, PastLess is the ratio of the data center load in multiple historical cycles to the data center load in the current cycle.

[0082] According to a third aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, enables the computer to execute the method provided in the first aspect.

[0083] According to a fourth aspect, an embodiment of the present invention provides a computing device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method provided in the first aspect is implemented.

[0084] The resource scheduling method, device, medium, and equipment in the cloud environment provided by the embodiment of the present invention first predict the data center load of the next cycle, and then adjust the host queue and the host queue according to the predicted value of the data center load of the next cycle and the management strategy formulated with the goal of reducing the power consumption of the data center, so as to reduce the power consumption of the data center. When receiving the user's virtual machine application request, the host queue that meets the required resources of the virtual machine applied by the user is searched in the host queue, and the found host is used as the target host, and then the virtual machine applied by the user is allocated to the target host, and the virtual machine applied by the user is created on the target host, and the created virtual machine is added to the virtual machine queue. It can be seen that predicting the data center load of the next cycle, adjusting the host queue and the host queue according to the prediction result and the management strategy can reduce the power consumption of the data center, and can also reasonably switch the host and reserve resources to avoid frequent switching of the host, so as to achieve the purpose of resource reservation. The embodiment of the present invention provides a suitable resource scheduling strategy for the cloud computing environment, which can effectively reduce the power consumption of the data center and improve the performance of the data center. BRIEF DESCRIPTION OF THE DRAWINGS

[0085] Figure 1 A schematic diagram of a process of a resource scheduling method in a cloud environment according to an embodiment of the present invention;

[0086] Figure 2 The structure block diagram of a resource scheduling device in a cloud environment according to an embodiment of the present invention. DETAILED DESCRIPTION

[0087] In a first aspect, an embodiment of the present invention provides a resource scheduling method in a cloud environment, see Figure 1 The method comprises the following steps S110 to S140:

[0088] S110, predicting the data center load of the next cycle according to the data center load of the current cycle and the data center load of the previous cycle;

[0089] The above-mentioned period can be understood as a time, that is, it can be considered that the data center load at the next moment is predicted based on the data center load at the current moment and the data center load at the previous moment.

[0090] S120, adjusting the host machine start queue and the host machine shutdown queue according to the predicted value of the data center load in the next cycle and the management strategy formulated with the goal of reducing the power consumption of the data center; wherein the host machine start queue includes each host machine in the data center that is in the start state, and the host machine shutdown queue includes each host machine in the data center that is in the shutdown state;

[0091] Among them, the management strategy is formulated with the goal of reducing the power consumption of the data center.

[0092] Among them, two queues need to be maintained: the host opening queue and the host closing queue. The host opening queue stores the identification information of each host in the opened state, and the host closing queue stores the identification information of each host in the closed state.

[0093] It can be seen that the basis for powering on and off the host machine is the predicted value of the data center load in the next cycle and the management strategy.

[0094] It can be seen that in S120, the two queues are adjusted according to the predicted value of the data center load in the next cycle and the management strategy, and the power consumption of the data center can be reduced after the adjustment.

[0095] S130, upon receiving a user's virtual machine application request, searching the host machine queue for a host machine that meets the resources required by the user's virtual machine application, and using the found host machine as a target host machine;

[0096] S140. Allocate the virtual machine requested by the user to the target host machine to create the virtual machine requested by the user on the target host machine, and add the created virtual machine to a virtual machine queue; wherein the virtual machine queue includes each virtual machine created on each host machine in the data center.

[0097] It is necessary to maintain a virtual machine queue, which is used to record the identification information of each created virtual machine.

[0098] That is, when a user makes a request for a virtual machine, the host machine that can meet the resources required by the virtual machine requested by the user is first searched in the open host machine queue. If it can be found, the found host machine is used as the target host machine. Then the virtual machine requested by the user is allocated to the target host machine, so that the virtual machine requested by the user is created on the target host machine, and the created virtual machine is added to the virtual machine queue.

[0099] It can be seen that predicting the data center load of the next cycle and adjusting the host queue opening and closing according to the prediction results and management strategy can reduce the power consumption of the data center, and can also reasonably turn on and off the host and reserve resources to avoid frequent turning on and off of the host, so as to achieve the purpose of resource reservation. The embodiment of the present invention provides a suitable resource scheduling strategy for the cloud computing environment, which can effectively reduce the power consumption of the data center and improve the performance of the data center.

[0100] In one embodiment, the method may further include the following steps S150 to S170:

[0101] S150, if a host machine that meets the resources required by the virtual machine requested by the user cannot be found in the enabled host machine queue, a host machine that meets the resources required by the virtual machine requested by the user is searched in the disabled host machine queue, and the found host machine is used as the target host machine;

[0102] S160, turning on the target host machine, and transferring the target host machine from the host turning off queue to the host turning on queue, so as to adjust the host turning on queue and the host turning off queue;

[0103] S170: Allocate the virtual machine requested by the user to the target host machine, create the virtual machine requested by the user on the target host machine, and add the created virtual machine to the virtual machine queue.

[0104] That is to say, if a host machine that meets the resources required by the virtual machine requested by the user cannot be found in the open host queue, the closed host queue will be searched, and the found host machine will be used as the target host machine. Since the target host machine is in a closed state, it is necessary to turn on the target host machine, and then delete the identification information of the target host machine in the closed host queue, and add the identification information of the target host machine in the open host queue. That is, the identification information of the target host machine is transferred from the closed host queue to the open host queue to adjust the two queues. Then, the virtual machine requested by the user is assigned to the target host, so that the virtual machine requested by the user is created on the target host, and the created virtual machine is added to the virtual machine queue to update the virtual machine queue.

[0105] In one embodiment, the method may further include the following steps S180-S190:

[0106] S180. Upon receiving a virtual machine release request from a user, destroying the virtual machine that the user needs to release on the corresponding host machine, and deleting the virtual machine that the user needs to release from the virtual machine queue;

[0107] S190, shut down the host machine where the virtual machine that the user needs to release is located, and transfer the host machine where the virtual machine that the user needs to release is located from the host machine startup queue to the host machine shutdown queue, so as to adjust the host machine startup queue and the host machine shutdown queue.

[0108] That is to say, when a user applies to release a virtual machine, the virtual machine is destroyed on the host machine where the virtual machine is located, and the identification information of the virtual machine is deleted from the virtual machine queue. Then, the host machine where the virtual machine is located is shut down, and the identification information of the host machine is deleted from the host machine startup queue and added to the host machine shutdown queue. In other words, the host machine is transferred from the host machine startup queue to the host machine shutdown queue, so as to adjust the two queues.

[0109] In one embodiment, the method may further include S200-S220:

[0110] S200, regularly calculating the average utilization rate of each host in the enabled host queue;

[0111] S210, determining whether the average utilization rate is less than a utilization rate threshold;

[0112] S220: If yes, then use the ant colony algorithm to reallocate the mapping relationship between each virtual machine and the host in the host queue for the purpose of improving the average utilization rate of each host in the host queue, and perform virtual machine migration according to the mapping relationship.

[0113] That is to say, the average utilization of each host in the host queue is calculated regularly to obtain the average utilization. It is determined whether the average utilization is less than the utilization threshold. If it is less than the utilization threshold, it means that the utilization of the host queue is low and needs to be improved. When it is necessary to improve the utilization, the ant colony algorithm is used to reallocate the mapping relationship between each virtual machine and the host in the host queue, that is, to reschedule and allocate. Finally, virtual machine migration is performed according to the mapping relationship.

[0114] The optimization goal of the ant colony algorithm during rescheduling and allocation is to improve the average utilization rate of each host in the open host queue.

[0115] In actual scenarios, in order to improve the average utilization rate, virtual machines can be concentrated on some hosts in the host queue as much as possible, and some hosts can be vacated. These vacated hosts can be further determined whether to be shut down according to the management policy.

[0116] In one embodiment, the step of predicting the data center load of the next cycle according to the data center load of the current cycle and the data center load of the previous cycle in S110 may include S111 to S113:

[0117] S111, comparing the data center load of the current cycle with the data center load of the previous cycle, if the data center load of the current cycle is greater than the data center load of the previous cycle, then the change trend of the data center load is an upward trend; if the data center load of the current cycle is less than the data center load of the previous cycle, then the change trend of the data center load is a downward trend;

[0118] S112, calculating an adjustment value according to a change trend of the data center load;

[0119] S113. If the changing trend is an upward trend, then the adjustment value is added to the data center load of the current cycle to obtain the data center load of the next cycle; if the changing trend is a downward trend, then the adjustment value is reduced based on the data center load of the current cycle to obtain the data center load of the next cycle.

[0120] That is to say, the change trend of the data center load is first determined based on the data center load of the current cycle and the data center load of the previous cycle. Then, the adjustment value is calculated based on the change trend. Then, the adjustment value is increased or decreased based on the data center load of the current cycle, that is, an upward adjustment or a downward adjustment is made to obtain the data center load of the next cycle, thereby completing the prediction of the data center load of the next cycle.

[0121] In one embodiment, the calculation of the adjustment value according to the change trend of the data center load in S112 may include a1 to a3:

[0122] a1. If the change trend is an upward trend, compare the data center load of the current cycle with the average value of the data center load of multiple historical cycles;

[0123] a2. If the data center load in the current cycle is less than the average value of the data center load in multiple historical cycles, the adjustment value is calculated using the first calculation formula, where the first calculation formula is:

[0124] IncVal'=IncVal+(Re_alIncVal-IncVal)·AdaptDgr

[0125] Among them, IncVal' is the adjustment value calculated for the next cycle in the current cycle, IncVal is the adjustment value calculated for the current cycle in the previous cycle; Re_alIncVal is the actual load value increased by the data center in the current cycle, and AdaptDgr is the historical average load coefficient; a3. If the data center load in the current cycle is greater than or equal to the average value of the data center load in multiple historical cycles, the second calculation formula is used to calculate the adjustment value, and the second calculation formula is:

[0126] IncVal'

[0127] =Min(IncVal+(Re_alIncVal-IncVal)·AdaptDgr,IncVal·PastGreater)

[0128] Among them, PastGreater is the ratio of the data center load in multiple historical cycles that is greater than the data center load in the current cycle.

[0129] It can be seen that when the change trend is an upward trend, it is also divided into two cases: (1) the data center load of the current cycle is less than the average value of the data center load of multiple historical cycles; (2) the data center load of the current cycle is greater than or equal to the average value of the data center load of multiple historical cycles. In different cases, different calculation formulas are used to calculate the adjustment value. In this case, the adjustment value is an upward adjustment value, that is, an increase value.

[0130] In one embodiment, the calculation of the adjustment value according to the change trend of the data center load in S112 may include b1 to b3:

[0131] b1. If the change trend is a downward trend, compare the data center load of the current cycle with the average value of the data center load of multiple historical cycles;

[0132] b2. If the data center load in the current cycle is greater than the average value of the data center load in multiple historical cycles, the adjustment value is calculated using a third calculation formula, which is:

[0133] IncVal'=VT·(IncVal+(Re_alIncVal-DecVal)·AdaptDgr)

[0134] Among them, IncVal' is the adjustment value calculated for the next cycle in the current cycle, VT is the historical platform reduction value coefficient, IncVal is the adjustment value calculated for the current cycle in the previous cycle, RealIncVal is the actual load value increased by the data center in the current cycle, DecVal is the actual load value increased by the data center in the previous cycle, and AdaptDgr is the historical average load coefficient;

[0135] b3. If the data center load of the current cycle is less than or equal to the average value of the data center load of multiple historical cycles, the fourth calculation formula is used to calculate the adjustment value, and the fourth calculation formula is:

[0136] IncVal'=

[0137] VT·Min(IncVal+(Re_alIncVal-DecVal)·AdaptDgr, DecVal·PastLess)

[0138] Among them, PastLess is the ratio of the data center load in multiple historical cycles to the data center load in the current cycle.

[0139] It can be seen that when the change trend is a downward trend, it is also divided into two cases: (1) the data center load of the current cycle is greater than the average value of the data center load of multiple historical cycles; (2) the data center load of the current cycle is less than or equal to the average value of the data center load of multiple historical cycles. In different cases, different calculation formulas are used to calculate the adjustment value. In this case, the adjustment value is a downward adjustment value, that is, a reduction value.

[0140] There are two main points involved in the embodiments of the present invention:

[0141] (1) Predict the data center load of the next cycle, and adjust the host queue opening and closing based on the prediction results and management strategy, so as to reasonably turn on and off the host and reserve resources. The benefits of this are: predicting the data center load of the next cycle, avoiding frequent host opening and closing, and achieving the purpose of resource reservation.

[0142] (2) In order to adapt to the dynamic and real-time nature of cloud computing, the ant colony algorithm is run. When the average utilization rate of the open host queue in the data center is low, the improved ant colony algorithm is used to concentrate virtual machines on certain hosts to improve the average utilization rate. It can be seen that virtual machine migration is only performed when necessary, which can avoid the problem of additional power consumption in the data center caused by frequent virtual machine migration.

[0143] It can be seen that in the method provided in the embodiment of the present invention, the power consumption of the data center is reduced by combining the prediction algorithm with the cloud computing resource scheduling strategy of the ant colony algorithm.

[0144] In the cloud computing environment, resource scheduling is the core issue in cloud computing. The quality of resource scheduling strategies in cloud computing directly affects the performance and power consumption of the entire data center. This paper conducts an in-depth study on the resource scheduling problem under cloud computing and proposes a cloud computing resource scheduling strategy that combines prediction algorithm and ant colony algorithm, which can effectively reduce the power consumption of the data center and improve the performance of the data center.

[0145] In a second aspect, an embodiment of the present invention provides a resource scheduling device in a cloud environment, see Figure 2 , the device 100 comprises:

[0146] The load prediction module 110 is used to predict the data center load of the next cycle based on the data center load of the current cycle and the data center load of the previous cycle;

[0147] The first adjustment module 120 is used to adjust the host machine start queue and the host machine shutdown queue according to the predicted value of the data center load in the next cycle and the management strategy formulated with the goal of reducing the power consumption of the data center; wherein the host machine start queue includes each host machine in the data center that is in the start state, and the host machine shutdown queue includes each host machine in the data center that is in the shutdown state;

[0148] The first search module 130 is used to search for a host machine that meets the resources required by the virtual machine requested by the user in the host machine queue when receiving the virtual machine application request from the user, and use the found host machine as the target host machine;

[0149] The first allocation module 140 is used to allocate the virtual machine requested by the user to the target host machine, so as to create the virtual machine requested by the user on the target host machine and add the created virtual machine to the virtual machine queue; wherein the virtual machine queue includes each virtual machine created on each host machine in the data center.

[0150] In one embodiment, the device may further include:

[0151] A second search module is used to search for a host machine that meets the required resources of the virtual machine requested by the user in the closed host machine queue if a host machine that meets the required resources of the virtual machine requested by the user cannot be found in the open host machine queue, and use the found host machine as the target host machine;

[0152] A second adjustment module is used to turn on the target host machine and transfer the target host machine from the host shutdown queue to the host startup queue to adjust the host startup queue and the host shutdown queue;

[0153] The second allocation module is used to allocate the virtual machine requested by the user to the target host machine, so as to create the virtual machine requested by the user on the target host machine, and add the created virtual machine to the virtual machine queue.

[0154] In one embodiment, the device may further include:

[0155] A virtual machine release module, configured to, upon receiving a virtual machine release request from a user, destroy the virtual machine that the user needs to release on the corresponding host machine and delete the virtual machine that the user needs to release from the virtual machine queue;

[0156] The third adjustment module is used to shut down the host machine where the virtual machine that the user needs to release is located, and transfer the host machine where the virtual machine that the user needs to release is located from the host machine startup queue to the host machine shutdown queue, so as to adjust the host machine startup queue and the host machine shutdown queue.

[0157] In one embodiment, the device may further include:

[0158] A power adjustment module is used to periodically calculate the average utilization of each host machine in the host machine queue; determine whether the average utilization is less than the utilization threshold; if so, use an ant colony algorithm to reallocate the mapping relationship between each virtual machine and the host machine in the host machine queue for the purpose of improving the average utilization of each host machine in the host machine queue, and perform virtual machine migration according to the mapping relationship.

[0159] In one embodiment, the load prediction module includes:

[0160] A trend determination unit, used to compare the data center load of the current cycle with the data center load of the previous cycle. If the data center load of the current cycle is greater than the data center load of the previous cycle, the change trend of the data center load is an upward trend; if the data center load of the current cycle is less than the data center load of the previous cycle, the change trend of the data center load is a downward trend;

[0161] A first calculation unit, configured to calculate an adjustment value according to a change trend of the data center load;

[0162] The second calculation unit is used to increase the adjustment value based on the data center load of the current cycle to obtain the data center load of the next cycle if the change trend is an upward trend; if the change trend is a downward trend, reduce the adjustment value based on the data center load of the current cycle to obtain the data center load of the next cycle.

[0163] In one embodiment, the first computing unit is specifically configured to perform the following steps:

[0164] If the change trend is an upward trend, comparing the data center load of the current cycle with the average value of the data center load of multiple historical cycles;

[0165] If the data center load in the current cycle is less than the average value of the data center load in multiple historical cycles, the adjustment value is calculated using the first calculation formula, which is:

[0166] IncVal'=IncVal+(Re_alIncVal-IncVal)·AdaptDgr

[0167] Wherein, IncVal' is the adjustment value calculated for the next cycle in the current cycle, IncVal is the adjustment value calculated for the current cycle in the previous cycle; Re_alIncVal is the actual increased load value of the data center in the current cycle, and AdaptDgr is the historical average load factor;

[0168] If the data center load of the current cycle is greater than or equal to the average value of the data center loads of multiple historical cycles, the adjustment value is calculated using the second calculation formula, where the second calculation formula is:

[0169] IncVal'

[0170] =Min(IncVal+(Re_alIncVal-IncVal)·AdaptDgr,IncVal·PastGreater)

[0171] Among them, PastGreater is the ratio of the data center load in multiple historical cycles that is greater than the data center load in the current cycle.

[0172] In one embodiment, the first computing unit is specifically configured to perform the following steps:

[0173] If the change trend is a downward trend, comparing the data center load of the current cycle with the average value of the data center load of multiple historical cycles;

[0174] If the data center load in the current cycle is greater than the average value of the data center loads in multiple historical cycles, the adjustment value is calculated using a third calculation formula, which is:

[0175] IncVal'=VT·(IncVal+(Re_alIncVal-DecVal)·AdaptDgr)

[0176] Among them, IncVal' is the adjustment value calculated for the next cycle in the current cycle, VT is the historical platform reduction value coefficient, IncVal is the adjustment value calculated for the current cycle in the previous cycle, RealIncVal is the actual load value increased by the data center in the current cycle, DecVal is the actual load value increased by the data center in the previous cycle, and AdaptDgr is the historical average load coefficient;

[0177] If the data center load of the current cycle is less than or equal to the average value of the data center loads of multiple historical cycles, the fourth calculation formula is used to calculate the adjustment value, and the fourth calculation formula is:

[0178] IncVal'=

[0179] VT·Min(IncVal+(Re_alIncVal-DecVal)·AdaptDgr, DecVal·PastLess)

[0180] Among them, PastLess is the ratio of the data center load in multiple historical cycles to the data center load in the current cycle.

[0181] It is understandable that the explanation, specific implementation, beneficial effects, examples, etc. of the relevant contents in the device provided in the embodiment of the present invention can be found in the corresponding parts of the method provided in the first aspect, and will not be repeated here.

[0182] In a third aspect, an embodiment of the present invention provides a computer-readable medium, on which computer instructions are stored. When the computer instructions are executed by a processor, the processor executes the method provided in the first aspect.

[0183] Specifically, a system or device equipped with a storage medium can be provided, on which software program code that implements the functions of any of the above-mentioned embodiments is stored, and a computer (or CPU or MPU) of the system or device can be enabled to read and execute the program code stored in the storage medium.

[0184] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.

[0185] The storage medium embodiments for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer by a communication network.

[0186] In addition, it should be clear that the functions of any of the above embodiments can be implemented not only by executing the program code read by the computer, but also by enabling an operating system operating on the computer to complete part or all of the actual operations based on instructions from the program code.

[0187] In addition, it can be understood that the program code read from the storage medium is written to a memory provided in an expansion board inserted into the computer or to a memory provided in an expansion module connected to the computer, and then based on the instructions of the program code, a CPU installed on the expansion board or expansion module is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above-mentioned embodiments.

[0188] It is understandable that the explanation, specific implementation methods, beneficial effects, examples, etc. of the relevant contents in the computer-readable medium provided in the embodiment of the present invention can be found in the corresponding parts of the method provided in the first aspect, and will not be repeated here.

[0189] In a fourth aspect, an embodiment of the present specification provides a computing device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, it implements the method in any embodiment of the specification.

[0190] It is understandable that the explanation, specific implementation, beneficial effects, examples, etc. of the relevant contents in the computing device provided in the embodiment of the present invention can be found in the corresponding parts of the method provided in the first aspect, and will not be repeated here.

[0191] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0192] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the present invention can be implemented by hardware, software, widgets, or any combination thereof. When implemented by software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium.

[0193] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solution of the present invention should be included in the scope of protection of the present invention.

Claims

1. A resource scheduling method in a cloud environment, characterized in that: include: Predicting the data center load of the next cycle based on the data center load of the current cycle and the data center load of the previous cycle; According to the predicted value of the data center load in the next cycle and the management strategy formulated with the goal of reducing the power consumption of the data center, the host machine opening queue and the host machine closing queue are adjusted; wherein the host machine opening queue includes each host machine in the data center that is in an open state, and the host machine closing queue includes each host machine in the data center that is in a closed state; Upon receiving a user's virtual machine application request, searching the host machine in the open host machine queue for a host machine that meets the resources required for the virtual machine applied for by the user, and using the found host machine as the target host machine; The virtual machine requested by the user is allocated to the target host machine to create the virtual machine requested by the user on the target host machine, and the created virtual machine is added to the virtual machine queue; wherein the virtual machine queue includes each virtual machine created on each host machine in the data center.

2. The method according to claim 1, characterized in that Also includes: If a host machine that meets the resources required by the virtual machine requested by the user cannot be found in the open host machine queue, a host machine that meets the resources required by the virtual machine requested by the user is searched in the closed host machine queue, and the found host machine is used as the target host machine; Turning on the target host machine, and transferring the target host machine from the host-turning-off queue to the host-turning-on queue, so as to adjust the host-turning-on queue and the host-turning-off queue; The virtual machine requested by the user is allocated to the target host machine, so as to create the virtual machine requested by the user on the target host machine, and add the created virtual machine to the virtual machine queue.

3. The method according to claim 1, characterized in that Also includes: Upon receiving a virtual machine release request from a user, destroying the virtual machine that the user needs to release on the corresponding host machine, and deleting the virtual machine that the user needs to release from the virtual machine queue; The host machine where the virtual machine that the user needs to release is located is shut down, and the host machine where the virtual machine that the user needs to release is located is transferred from the host machine startup queue to the host machine shutdown queue to adjust the host machine startup queue and the host machine shutdown queue.

4. The method according to claim 1, characterized in that Also includes: Regularly calculating the average utilization rate of each host in the enabled host queue; Determining whether the average utilization rate is less than a utilization rate threshold; If so, the mapping relationship between each virtual machine and the host in the enabled host queue is reallocated using an ant colony algorithm for the purpose of improving the average utilization rate of each host in the enabled host queue, and virtual machine migration is performed according to the mapping relationship.

5. The method according to claim 1, characterized in that The step of predicting the data center load of the next cycle according to the data center load of the current cycle and the data center load of the previous cycle includes: Compare the data center load of the current cycle with the data center load of the previous cycle. If the data center load of the current cycle is greater than the data center load of the previous cycle, the change trend of the data center load is an upward trend; if the data center load of the current cycle is less than the data center load of the previous cycle, the change trend of the data center load is a downward trend; Calculating an adjustment value according to a change trend of the data center load; If the changing trend is an upward trend, the adjustment value is added to the data center load of the current cycle to obtain the data center load of the next cycle; if the changing trend is a downward trend, the adjustment value is reduced based on the data center load of the current cycle to obtain the data center load of the next cycle.

6. The method according to claim 5, characterized in that The calculating the adjustment value according to the change trend of the data center load includes: If the change trend is an upward trend, comparing the data center load of the current cycle with the average value of the data center load of multiple historical cycles; If the data center load in the current cycle is less than the average value of the data center load in multiple historical cycles, the adjustment value is calculated using the first calculation formula, which is: IncVal'=IncVal+(Re_alIncVal-IncVal)·AdaptDgr Wherein, IncVal' is the adjustment value calculated for the next cycle in the current cycle, IncVal is the adjustment value calculated for the current cycle in the previous cycle; Re_alIncVal is the actual increased load value of the data center in the current cycle, and AdaptDgr is the historical average load factor; If the data center load of the current cycle is greater than or equal to the average value of the data center loads of multiple historical cycles, the adjustment value is calculated using the second calculation formula, where the second calculation formula is: IncVal'=Min(IncVal+(Re_alIncVal-IncVal)·AdaptDgr,IncVal·PastGreater) Among them, PastGreater is the ratio of the data center load in multiple historical cycles that is greater than the data center load in the current cycle.

7. The method according to claim 5, characterized in that The calculating the adjustment value according to the change trend of the data center load includes: If the change trend is a downward trend, comparing the data center load of the current cycle with the average value of the data center load of multiple historical cycles; If the data center load in the current cycle is greater than the average value of the data center loads in multiple historical cycles, the adjustment value is calculated using a third calculation formula, which is: IncVal'=VT·(IncVal+(Re_alIncVal-DecVal)·AdaptDgr) Among them, IncVal' is the adjustment value calculated for the next cycle in the current cycle, VT is the historical platform reduction value coefficient, IncVal is the adjustment value calculated for the current cycle in the previous cycle, RealIncVal is the actual load value increased by the data center in the current cycle, DecVal is the actual load value increased by the data center in the previous cycle, and AdaptDgr is the historical average load coefficient; If the data center load of the current cycle is less than or equal to the average value of the data center loads of multiple historical cycles, the fourth calculation formula is used to calculate the adjustment value, and the fourth calculation formula is: IncVal'= VT·Min(IncVal+(Re_alIncVal-DecVal)·AdaptDgr, DecVal·PastLess) Among them, PastLess is the ratio of the data center load in multiple historical cycles to the data center load in the current cycle.

8. A resource scheduling device in a cloud environment, characterized in that: include: A load prediction module is used to predict the data center load of the next cycle based on the data center load of the current cycle and the data center load of the previous cycle; A first adjustment module is used to adjust the host machine opening queue and the host machine closing queue according to the predicted value of the data center load in the next cycle and the management strategy formulated with the goal of reducing the power consumption of the data center; wherein the host machine opening queue includes each host machine in the data center that is in an open state, and the host machine closing queue includes each host machine in the data center that is in a closed state; A first search module is used to search for a host machine that meets the resources required by the virtual machine requested by the user in the open host machine queue when receiving the virtual machine application request from the user, and use the found host machine as the target host machine; The first allocation module is used to allocate the virtual machine requested by the user to the target host machine, so as to create the virtual machine requested by the user on the target host machine and add the created virtual machine to the virtual machine queue; wherein the virtual machine queue includes each virtual machine created on each host machine in the data center.

9. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed in a computer, the computer is caused to execute the method according to any one of claims 1 to 7.

10. A computing device, characterized in that The method comprises a memory and a processor, wherein the memory stores executable codes, and when the processor executes the executable codes, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Resource scheduling method based on virtual machine

    CN107168805A

  • Method for optimizing energy efficiency of cloud infrastructure

    CN118394452A

  • Prediction device, prediction method, and program

    JP2012108717A