Task scheduling method, device and electronic equipment
Through a task scheduling method, combining the state information of the data center and the availability of renewable energy, selecting suitable data centers and servers to perform virtual machine scheduling tasks, solving the problems of data center energy consumption and carbon emissions, and realizing energy and carbon optimization of tasks.
Patent Information
- Application Number
- CN202411706815.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-04-08
AI Technical Summary
The existing technology is difficult to effectively utilize renewable energy to solve the problems of data center energy consumption and carbon emissions, especially in the context of internal server heterogeneity and user task diversity.
Through a task scheduling method, in response to user requests, obtain status information of multiple data centers, determine a data center to be selected with sufficient renewable energy, and select the server closest to the user and with the smallest increase in energy consumption to perform virtual machine scheduling tasks, ensuring the optimization of task energy consumption and carbon emissions.
The energy consumption and carbon emissions of virtual machine scheduling tasks are optimized, the dependence on fossil fuels is reduced, the user experience is improved, and the smooth execution of tasks and the energy use efficiency of data centers is ensured.
Smart Images

Figure CN119781897A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of cloud computing task scheduling, and in particular to a task scheduling method, device and electronic equipment. Background Art
[0002] As a new IT paradigm, cloud computing provides unlimited on-demand resources to users around the world, and more and more people choose to host applications on cloud platforms. However, due to the large number of data centers running, data centers have become one of the world's largest energy consumers. Global data centers will consume 3% of global electricity in 2023, and it is expected to reach 10% in 2030. If data centers were regarded as a country, they would become the fifth largest electricity consumer in the world today. Moreover, energy consumption leads to high carbon emissions. It is estimated that carbon emissions from data centers will reach 1.9 billion tons in 2025. Therefore, reducing energy consumption and reducing carbon emissions are important issues for the sustainable development of cloud service providers. In related technologies, although virtual machine scheduling can improve the server utilization efficiency of data centers, thereby reducing the energy consumption of data centers, if traditional energy is still used for power supply, the energy supply method based on fossil fuels will limit the reduction of carbon emissions. Therefore, cloud service providers are actively using renewable energy such as wind power, solar energy, tidal, geothermal, biomass energy, etc. to power data centers. For example, Google purchased 20 years of wind energy from an Iowa wind farm to power its data center in Oklahoma.
[0003] However, with the changes in climate and geographical location, renewable energy is intermittent and unstable. Specifically: 1. Data centers in different geographical locations will have different availability and carbon emission intensity due to climate differences; 2. In the same region, different types of renewable energy will have different availability even under the same weather conditions. Although the relevant technology proposes a method of utilizing renewable energy, it cannot avoid the intermittent and unstable problems of renewable energy.
[0004] It is also worth considering that with the process of domestic substitution of data centers, most of the servers in data centers are heterogeneous, such as Kunpeng servers based on ARM architecture and Intel servers based on X86 architecture.
[0005] Another point is that the workload in the real production environment is highly heterogeneous. The tasks submitted by users have different requirements in terms of CPU, memory, disk, etc. Ignoring the heterogeneity of tasks may lead to inaccurate estimation of task power consumption, thereby affecting the efficiency of the scheduling algorithm.
[0006] In summary, based on the increasing energy consumption and carbon emissions of data centers, especially in the context of the increasing proportion of global energy consumption, how to effectively use renewable energy to reduce the impact of data centers on the environment has become a challenge. At the same time, the heterogeneity of servers within data centers and the diversity of user tasks increase the complexity of energy consumption management and task scheduling. At present, there is a lack of a method that can comprehensively consider these factors, especially based on the complementary use of renewable energy, for energy-saving and carbon-reduction scheduling for heterogeneous data centers and workloads. Summary of the invention
[0007] In view of this, embodiments of the present application provide a task scheduling method, device, and electronic device to overcome the above problems or at least partially solve the above problems.
[0008] A first aspect of an embodiment of the present application provides a task scheduling method, which is applied to a workload cloud scheduler, and the method includes: In response to a virtual machine scheduling task requested by a user terminal, a plurality of state information corresponding to a plurality of data centers is obtained; According to the plurality of state information, a plurality of data centers to be selected are determined from the plurality of data centers, the data centers to be selected being: a plurality of data centers whose renewable energy sources meet energy requirements of the data centers; Determining whether the available computing resources of a first data center meet the computing resources required by the virtual machine scheduling task, the first data center being a candidate data center closest to the user terminal among the multiple candidate data centers; When the available computing resources of the first data center meet the computing resources required by the virtual machine scheduling task, determining the first data center as the target data center, determining the first server in the first data center as the target server, the first server being: a server with the smallest increase in energy consumption in the first data center; Determine whether the renewable energy of the target data center can meet the energy consumption required by the target server to perform the virtual machine scheduling task; When the renewable energy of the target data center can meet the energy consumption required by the target server to execute the virtual machine scheduling task, the virtual machine scheduling task is allocated to the target server.
[0009] Optionally, the state information includes at least a total output power of renewable energy of the data center and a data center operating power corresponding to energy required by the data center, and determining a plurality of candidate data centers from the plurality of data centers according to the plurality of state information includes: For each of the data centers, comparing the total output power of the renewable energy of the data center with the data center operating power corresponding to the energy required by the data center; Determine a data center whose total output power of the renewable energy is greater than the data center operating power corresponding to the energy required by the data center as a candidate data center; Among them, the data center operating power corresponding to the energy required by the data center is determined based on the power consumption of the servers, air conditioners and lighting systems in the data center; the renewable energy of the data center includes at least: the wind power that can be generated by the wind farm where the data center is located, and the solar power that can be generated by the solar farm where the data center is located.
[0010] Optionally, the method further comprises: Inputting the current operation data of the user terminal into the task request amount prediction model, and obtaining the predicted task request amount output by the task request amount prediction model; Inputting current meteorological data of the plurality of data centers into a renewable energy output power prediction model, and obtaining predicted total output power of renewable energy of the plurality of data centers output by the renewable energy output power prediction model; Inputting current operating data of the plurality of data centers into a data center operating power prediction model, and obtaining predicted data center operating powers of the plurality of data centers output by the data center operating power prediction model; When the task request amount of the virtual machine scheduling task requested by the user end is the same as the predicted task request amount, based on the predicted total output power of the renewable energy sources of the multiple data centers and the predicted data center operating power output by the data center operating power prediction model, obtaining multiple state information corresponding to the multiple data centers; Among them, the task request quantity prediction model is trained using the historical operation data and historical task request quantity of the user end as training samples; the renewable energy output power prediction model is trained using the historical meteorological data of the multiple data centers and the historical total output power of renewable energy of the multiple data centers as training samples; the data center operation power prediction model is trained using the historical operation data of the multiple data centers and the historical data center operation power of the multiple data centers as training samples.
[0011] Optionally, after determining whether the available computing resources of the first data center meet the computing resources required by the virtual machine scheduling task, the method further includes: When the available computing resources of the first data center closest to the user terminal do not meet the computing resources required by the virtual machine scheduling task, sorting the multiple data centers to be selected in descending order of the available computing resources; Determine whether the available computing resources of the second data center meet the computing resources required by the virtual machine scheduling task, the second data center being the candidate data center with the largest available computing resources among the multiple candidate data centers; When the available computing resources of the second data center meet the computing resources required by the virtual machine scheduling task, the second data center is determined to be the target data center, and the second server in the second data center is determined to be the target server, and the second server is: the server with the smallest increase in energy consumption in the second data center.
[0012] Optionally, after determining whether the renewable energy of the target data center can meet the energy consumption required by the target server to perform the virtual machine scheduling task, the method further includes: When the renewable energy of the target data center does not meet the energy consumption required by the target server to execute the virtual machine scheduling task, the target data center is removed from the multiple candidate data centers; Determine whether the available computing resources of the third data center meet the computing resources required by the virtual machine scheduling task to determine whether to use the third data center as the target data center and whether to use the third server in the third data center as the target server, the third data center being: the candidate data center closest to the user terminal among the multiple candidate data centers remaining after elimination, and the third server being: the server with the smallest increase in energy consumption in the third data center.
[0013] Optionally, the method further comprises: After receiving the virtual machine scheduling task requested by the user terminal, timing the delay time of the virtual machine scheduling task; When the delay time is greater than a preset delay time threshold, it is determined that the virtual machine scheduling task execution fails.
[0014] Optionally, the method further comprises: After allocating the virtual machine scheduling task to the target server, completing a virtual machine scheduling algorithm corresponding to the virtual machine scheduling task; After the virtual machine scheduling task is completed, multiple pieces of status information corresponding to the multiple data centers are updated.
[0015] Optionally, the method further comprises: When there is no data center to be selected among the multiple data centers, the fourth data center is determined as the target data center, and the fourth server of the fourth data center is determined as the target server, the fourth data center is: the data center closest to the user terminal among the multiple data centers, and the fourth server is: the server with the smallest increase in energy consumption in the fourth data center.
[0016] A second aspect of an embodiment of the present application provides a task scheduling device, which is applied to a workload cloud scheduler, and the device includes: An acquisition module, used to obtain multiple state information corresponding to multiple data centers in response to a virtual machine scheduling task requested by a user terminal; A candidate data center determination module is used to determine a plurality of candidate data centers from the plurality of data centers according to the plurality of status information, the candidate data centers being: a plurality of data centers whose renewable energy sources meet the energy requirements of the data centers; An available computing resource determination module, used to determine whether the available computing resources of a first data center meet the computing resources required by the virtual machine scheduling task, the first data center being the candidate data center closest to the user terminal among the multiple candidate data centers; A first server determination module is used to determine the first data center as a target data center and a first server in the first data center as a target server when the available computing resources of the first data center meet the computing resources required by the virtual machine scheduling task, wherein the first server is: a server with the smallest increase in energy consumption in the first data center; A renewable energy determination module, used to determine whether the renewable energy of the target data center can meet the energy consumption required by the target server to execute the virtual machine scheduling task; The allocation module is used to allocate the virtual machine scheduling task to the target server when the renewable energy of the target data center can meet the energy consumption required by the target server to execute the virtual machine scheduling task.
[0017] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the method described in the first aspect.
[0018] Beneficial effects of this application: The embodiments of the present application provide a method, an electronic device, a computer-readable storage medium and a product, including: in response to a virtual machine scheduling task requested by a user terminal, obtaining multiple status information corresponding to multiple data centers, determining multiple candidate data centers whose renewable energy meets the energy requirements of the data centers, when the available computing resources of the candidate data center closest to the user terminal meet the computing resources required for the virtual machine scheduling task, determining the first server with the smallest energy consumption increase in the first data center as the target server, and when the renewable energy of the first data center can meet the energy consumption required for the target server to execute the virtual machine scheduling task, allocating the virtual machine scheduling task to the target server.
[0019] Through the technical solution of the present application, first of all, the candidate data center that is self-sufficient in renewable energy is given priority, ensuring that the virtual machine scheduling task is optimized in terms of energy consumption and carbon emissions, reducing dependence on fossil fuels, and thus reducing the overall carbon footprint. Further, the first data center closest to the user end is given priority, thereby reducing the delay and energy consumption of data transmission, while improving the user experience. In addition, by selecting the first server with the smallest increase in energy consumption in the first data center to perform the virtual machine scheduling task, the task's consumption of renewable energy is further reduced to achieve the purpose of reducing energy consumption and carbon emissions for the data center. In addition, it is also ensured that the execution of the virtual machine scheduling task will not exceed the renewable energy supply capacity of the data center, thereby avoiding task failure or delay due to insufficient energy. By comprehensively considering the status information of the data center, the availability of renewable energy, and the energy consumption of the server, a more flexible and reliable scheduling strategy is provided, which can adapt to the intermittent and instability of renewable energy while ensuring the smooth execution of the task. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application.
[0021] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the description of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0022] Figure 1 It is a flowchart of a task scheduling method provided by an embodiment of the present application; Figure 2 This is an architecture diagram of a virtual machine task scheduling algorithm for energy saving and carbon reduction in a heterogeneous data center in a distributed cloud environment provided by an embodiment of the present application; Figure 3 This is an architecture diagram of a workload cloud scheduler provided by an embodiment of the present application; Figure 4 is a flowchart of a task scheduling method based on a prediction mechanism provided by an embodiment of the present application; Figure 5 is a flowchart of a task scheduling method provided by another embodiment of the present application; Figure 6 is a schematic diagram of an electronic device provided by an embodiment of the present application; Figure 7 It is a schematic diagram of a framework of a task scheduling device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0023] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application may be combined with each other.
[0024] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0025] RES:Renewable energy source, renewable energy; CSP: Cloud service Provider; MILP: Mixed-integer linear programming; QoS: Quality of Service VM: Virtual machine.
[0026] The present application relates to a virtual machine migration algorithm in the field of cloud computing task scheduling, and in particular to a cloud scheduling platform that utilizes renewable energy to reduce energy consumption and carbon emissions in data centers.
[0027] An embodiment of the present application provides a task scheduling method, which is applied to a workload cloud scheduler. Figure 1 is a flowchart of a task scheduling method provided by an embodiment of the present application, such as Figure 1 As shown, the method includes: Step S101, in response to a virtual machine scheduling task requested by a user terminal, obtaining multiple pieces of status information corresponding to multiple data centers; Step S102, determining a plurality of candidate data centers from the plurality of data centers according to the plurality of status information, the candidate data centers being: a plurality of data centers whose renewable energy sources satisfy the energy requirements of the data centers; Step S103, determining whether the available computing resources of the first data center meet the computing resources required by the virtual machine scheduling task, the first data center being the candidate data center closest to the user terminal among the multiple candidate data centers; Step S104, when the available computing resources of the first data center meet the computing resources required by the virtual machine scheduling task, determining the first data center as the target data center, determining the first server in the first data center as the target server, the first server being: the server with the smallest increase in energy consumption in the first data center; Step S105, determining whether the renewable energy of the target data center can meet the energy consumption required by the target server to execute the virtual machine scheduling task; Step S106: when the renewable energy of the target data center can meet the energy consumption required by the target server to execute the virtual machine scheduling task, the virtual machine scheduling task is allocated to the target server.
[0028] Figure 2 This is an architecture diagram of a virtual machine task scheduling algorithm for energy saving and carbon reduction in a heterogeneous data center in a distributed cloud environment provided by an embodiment of the present application, such as Figure 2 As shown in the figure, multiple cloud service providers form a federated multi-cloud environment. Figure 2 The number in is only for illustration. First, this algorithm can include 2 or more cloud service providers in actual application. Each cloud service provider is connected by multiple data centers with different geographical distributions. All data centers are interconnected through high-speed backbone networks, and each data center is powered by the local power grid. The workload cloud scheduler is used to accept virtual machine creation requests initiated by cloud users on the user side. The workload cloud scheduler generates virtual machine scheduling tasks and formulates scheduling strategies according to the scheduling algorithm to allocate virtual machines to the most suitable data center for processing. The workload cloud scheduler is based on the status information of multiple data centers with different geographical distributions (status information includes data center power consumption, green energy generation, electricity price, carbon emission intensity, etc.), combined with the virtual machine scheduling method proposed in this paper, so as to take into account that each data center is powered by a hybrid power generated by wind energy, solar energy and traditional fossil energy, and allocates virtual machine scheduling tasks to the appropriate data center for processing.
[0029] Specifically, in step S101, after receiving the virtual machine scheduling task requested by the user, the workload cloud scheduler will obtain multiple status information corresponding to multiple data centers in real time. Among them, the virtual machine scheduling task refers to the request submitted by the user or application of the user to the cloud service provider, which requires the creation and operation of a virtual machine on the cloud platform. The multiple data centers refer to the collection of data centers distributed in different geographical locations managed by the cloud service provider. Each of the multiple status information is the status information of a data center. The status information of each data center may include the data center operating power of the data center, the output power of the renewable energy where the data center is located, and the peak power and idle power of the server in the data center, the CPU, memory and storage usage, etc.
[0030] The architecture diagram of the workload cloud scheduler is as follows: Figure 3 As shown, the figure shows the energy-saving and carbon-reducing virtual machine (VM, Virtual Machine) scheduling algorithm for heterogeneous data centers in a distributed cloud environment as a middleware system deployed in an actual cloud environment. The bottom layer is the hardware device layer, which mainly includes computing servers, storage servers, management servers, network switches and other devices required by the cloud IaaS layer. Since this algorithm is oriented to heterogeneous tasks and includes multiple data centers, the server is suitable for X86 architecture and ARM architecture, and the server models include but are not limited to Intel, Kunpeng, Haiguang, Feiteng, etc. The second layer is the virtualization layer, which includes cloud operating systems, databases, containers, etc. The cloud operating system supports heterogeneous environments, including but not limited to CentOS, Ubuntu, open Euler, etc. The middleware layer is the workload scheduling middleware proposed in this application, that is, the workload cloud scheduler, including a data center energy consumption monitoring module, a renewable energy output monitoring module, a VM task resource demand monitoring module, a data center resource margin monitoring module, a VM task scheduling algorithm module, and a VM scheduling strategy execution module. The top layer is the application layer, which deploys various services that customers run on the cloud.
[0031] For example, when a user requests to run a data analysis task that requires a large amount of computing resources on the cloud platform, the workload cloud scheduler responds to this request and collects status information of the three data centers distributed in Beijing, Shanghai, and Guangzhou, including the operating power of the three data centers and the output power of renewable energy such as wind power and solar energy.
[0032] Further, in step S102, multiple data centers with sufficient renewable energy supply and capable of meeting their own energy needs are determined from multiple data centers as candidate data centers.
[0033] For example, in the data centers in Beijing and Shanghai, due to the sufficient supply of solar energy and wind energy, the electricity generated by the renewable energy of these two data centers is sufficient to meet the operation needs of the data centers. Therefore, the Beijing data center and the Shanghai data center are determined as candidate data centers.
[0034] Further, in step S103, it is determined whether the available computing resources of the first data center meet the computing resources required for the virtual machine scheduling task. The first data center is the candidate data center closest to the user terminal among multiple candidate data centers. The task is preferentially assigned to the data center with sufficient green energy and the closest distance. The data center closest to the user terminal (i.e., the request source) can reduce carbon emissions and ensure scheduling delay. Among them, the available computing resources refer to the CPU, memory, storage and other resources that are not occupied in the data center.
[0035] For example, among the data centers in Beijing and Shanghai, when the data center in Shanghai is closer to the user, it is selected as the first data center. Then, the cloud scheduler further checks the available computing resources of the Shanghai data center to see if there are enough available computing resources to meet the virtual machine scheduling task of the user.
[0036] Further, in step S104, when it is determined that the available computing resources of the first data center meet the computing resources required for the virtual machine scheduling task of the user side, the first server is determined from the first data center, and the first data center is used as the target data center, and the first server is used as the target server, wherein the first server is the server with the smallest increase in energy consumption in the first data center, and the server with the smallest increase in energy consumption is selected to perform the virtual machine scheduling task to achieve the energy saving goal.
[0037] For example, in the Shanghai data center, the cloud scheduler compares the current load and energy consumption of different servers and selects a first server with a lower current load and the highest energy efficiency as the target server.
[0038] Further, in step S105, it is determined whether the renewable energy at the location of the first data center can meet the energy consumption required by the first server to execute the virtual machine scheduling task. That is, it is checked whether the renewable energy output of the first data center is sufficient to support the energy consumption requirement of the target server (i.e., the first server) to execute the virtual machine scheduling task when the virtual machine scheduling task is assigned to the first server and the virtual machine scheduling task is executed by the first server.
[0039] For example, the cloud scheduler checks the total power output of solar and wind power in the Shanghai data center, and combined with the data center operating power of the Shanghai data center, confirms whether these renewable energy sources are sufficient to support the selected server to run the user-side virtual machine scheduling task.
[0040] Finally, in step S106, when the renewable energy of the first data center can meet the energy consumption required by the first server to execute the virtual machine scheduling task, the virtual machine scheduling task is allocated to the first server in the first data center, ie, the target server.
[0041] For example, after confirming that the renewable energy in the Shanghai data center is sufficient to support the virtual machine scheduling task, the cloud scheduler assigns the user's virtual machine scheduling task to the selected server with the lowest energy consumption in the Shanghai data center and starts executing the task, thereby ensuring energy efficiency and the utilization of renewable energy.
[0042] Through the above embodiments, firstly, the candidate data center that is self-sufficient in renewable energy is preferentially selected, which ensures that the virtual machine scheduling task is optimized in terms of energy consumption and carbon emissions, reduces dependence on fossil fuels, and thus reduces the overall carbon footprint. Further, the first data center closest to the user end is preferentially selected, thereby reducing the delay and energy consumption of data transmission, while improving the user experience. In addition, by selecting the first server with the smallest increase in energy consumption in the first data center to perform the virtual machine scheduling task, the task's consumption of renewable energy is further reduced to achieve the purpose of reducing energy consumption and carbon emissions for the data center. In addition, it is also ensured that the execution of the virtual machine scheduling task will not exceed the renewable energy supply capacity of the data center, thereby avoiding task failure or delay due to insufficient energy. By comprehensively considering the status information of the data center, the availability of renewable energy, and the energy consumption of the server, a more flexible and reliable scheduling strategy is provided, which can adapt to the intermittent and instability of renewable energy while ensuring the smooth execution of the task.
[0043] Optionally, the state information includes at least the total output power of the renewable energy of the data center and the data center operating power corresponding to the energy required by the data center, and the step S102 includes: For each of the data centers, comparing the total output power of the renewable energy of the data center with the data center operating power corresponding to the energy required by the data center; Determine a data center whose total output power of the renewable energy is greater than the data center operating power corresponding to the energy required by the data center as a candidate data center; Among them, the data center operating power corresponding to the energy required by the data center is determined based on the power consumption of the servers, air conditioners and lighting systems in the data center; the renewable energy of the data center includes at least: the wind power that can be generated by the wind farm where the data center is located, and the solar power that can be generated by the solar farm where the data center is located.
[0044] Specifically, in one embodiment, the types and sizes of renewable energy in different data centers are different, so it is necessary to determine the total output power of renewable energy in each data center (such as the sum of the output power of wind energy, solar energy, hydropower, and tidal energy) and the operating power of the data center (including servers, air conditioners, and lighting systems). For each data center, by comparing the total output power of renewable energy and the operating power of the data center, the energy self-sufficiency of each data center can be evaluated.
[0045] The main power consumption of data center operation comes from servers. In addition, the consumption of air conditioning and lighting systems also needs to be considered. The actual power consumption of servers is mainly affected by the CPU, memory and storage usage. For a single server Si The power at time t The calculation formula is Formula 1: ; in is the peak power of the server, is the server idle power, which is a fixed value. Different models of servers have different peak and idle powers. , , are the actual utilization of CPU, memory and storage at time t, collected by the server's resource monitoring device. , , They are the proportion of CPU, memory and storage in the total power consumption of the server, for example =60%, =25%, = 15%. This proportion changes with the change of server model, and this application does not limit the specific values of each proportion.
[0046] Therefore, a single data center d j The total power of multiple servers (M servers in the formula) at time t The calculation formula is Formula 2: ; Although the power consumption of a data center mainly comes from servers, the power consumption of air conditioning and lighting systems also needs to be considered. Therefore, combining the concept of PUE (Power Usage Effectiveness), a single data center d j The power calculation formula at time t is as follows: ; When the data center's power grid contains renewable energy from wind and solar power, the data center at time t d j The wind power that can be generated by the wind farm at the location is , the solar power that a solar field can generate is , then the data center d j The calculation formula for the total output power of renewable energy at time t is as follows: ; For example, assume that the total output power of wind and solar energy of Data Center A is 500 kilowatts, while the operating power of the data center is 450 kilowatts. By comparison, it can be seen that the renewable energy of Data Center A can meet its own operating needs.
[0047] Furthermore, according to the above comparison results, only when the renewable energy output power of a data center exceeds its operating power will the data center be marked as a "candidate data center", which means that the candidate data center is self-sufficient and may even be able to feed back excess energy to the power grid.
[0048] Right now When the data center d j Sufficient renewable energy for data centers d j Classified as a candidate data center, otherwise it means that the data center d j Insufficient renewable energy for data centers d j Classified as an alternative data center, the alternative data center requires brown energy as supplement.
[0049] For example, continuing to take data center A as an example, since its renewable energy output power exceeds the operating power, it is determined as a candidate data center.
[0050] Through the above embodiments, by accurately comparing the renewable energy output power and operating power of the data center, the data center with the strongest energy self-sufficiency can be identified, so that tasks can be dispatched to these data centers first, reducing dependence on external energy. In addition, by giving priority to the use of renewable energy, the data center can reduce its dependence on expensive grid electricity, especially during periods of high electricity costs, thereby reducing overall operating costs.
[0051] Optionally, the method further comprises: Inputting the current operation data of the user terminal into the task request amount prediction model, and obtaining the predicted task request amount output by the task request amount prediction model; Inputting current meteorological data of the plurality of data centers into a renewable energy output power prediction model, and obtaining predicted total output power of renewable energy of the plurality of data centers output by the renewable energy output power prediction model; Inputting current operating data of the plurality of data centers into a data center operating power prediction model, and obtaining predicted data center operating powers of the plurality of data centers output by the data center operating power prediction model; When the task request amount of the virtual machine scheduling task requested by the user end is the same as the predicted task request amount, based on the predicted total output power of the renewable energy sources of the multiple data centers and the predicted data center operating power output by the data center operating power prediction model, obtaining multiple state information corresponding to the multiple data centers; Among them, the task request quantity prediction model is trained using the historical operation data and historical task request quantity of the user end as training samples; the renewable energy output power prediction model is trained using the historical meteorological data of the multiple data centers and the historical total output power of renewable energy of the multiple data centers as training samples; the data center operation power prediction model is trained using the historical operation data of the multiple data centers and the historical data center operation power of the multiple data centers as training samples.
[0052] Specifically, in one embodiment, deep learning, LSTM and other technologies may be used to train various prediction models, and the prediction results are fed back to the workload cloud scheduler. Figure 4 This is a flowchart of a task scheduling method based on a prediction mechanism provided in one embodiment of the present application.
[0053] First, if Figure 4 As shown in the figure, the current operation data of the user end, such as CPU usage and memory usage, collected in real time, is input into a task request volume prediction model that is pre-trained based on historical operation data and historical task request volumes. After analyzing these current operation data through the task request volume prediction model, the predicted task request volume is output, which is the predicted value of the task request volume in the future period of time.
[0054] For example, when the current operating data of the user terminal at 10 am, such as the CPU usage rate, suddenly increases, the current operating data is input into the task request volume prediction model. The task request volume prediction model predicts the task volume of the virtual machine scheduling tasks that the user terminal may submit in the next hour, that is, the predicted task request volume.
[0055] Furthermore, current meteorological data of multiple data centers, i.e., real-time meteorological data such as wind speed and sunshine intensity, are input into a renewable energy output power prediction model trained based on historical meteorological data and historical renewable energy output power, and the predicted total output power of renewable energy of multiple data centers output by the renewable energy output power prediction model is obtained. The predicted total output power of renewable energy predicted by the renewable energy output power prediction model is the total output power of renewable energy of each data center in the future period.
[0056] For example, when the current meteorological data collected shows that strong winds and clear weather are about to occur in the area where data center A is located, after being input into the renewable energy output power prediction model, the renewable energy output power prediction model predicts the predicted total output power of renewable energy sources such as wind power and solar power generation power of data center A.
[0057] Furthermore, the current operating data of multiple data centers, that is, the real-time operating data of the data centers, such as server load and cooling system status, are input into the data center operating power prediction model, and the predicted data center operating power of multiple data centers output by the data center operating power prediction model is obtained, that is, the operating power of each data center in the future period of time.
[0058] For example, the current operating data indicates that the server load of data center A suddenly increases. At this time, the current operating data is input into the data center operating power prediction model. The model predicts the predicted data center operating power of the data center. The predicted data center operating power indicates that the energy consumption of data center A will increase.
[0059] Furthermore, when the task request amount actually submitted by the user end is consistent with the task request amount predicted by the prediction model, the prediction data output by these prediction models (the predicted total output power of renewable energy and the predicted operating power of the data center) will be used to obtain and update the status information of multiple data centers, so as to execute the VM scheduling strategy of steps S102 to S106 in this article, that is, based on the prediction results, the green energy availability, resource availability, and distance from the user end of the data center are evaluated, and combined with the computing resources required for the virtual machine scheduling task, the virtual machine scheduling task is preferentially assigned to the data center that is closest to the user end and has sufficient renewable energy.
[0060] Through the above-mentioned embodiments, multiple prediction models are integrated to optimize the task scheduling of the data center, improve energy efficiency and scheduling accuracy, and reduce costs and environmental impacts.
[0061] Optionally, after determining in step S103 whether the available computing resources of the first data center meet the computing resources required by the virtual machine scheduling task, the method further includes: When the available computing resources of the first data center closest to the user terminal do not meet the computing resources required by the virtual machine scheduling task, sorting the multiple data centers to be selected in descending order of the available computing resources; Determine whether the available computing resources of the second data center meet the computing resources required by the virtual machine scheduling task, the second data center being the candidate data center with the largest available computing resources among the multiple candidate data centers; When the available computing resources of the second data center meet the computing resources required by the virtual machine scheduling task, the second data center is determined to be the target data center, and the second server in the second data center is determined to be the target server, and the second server is: the server with the smallest increase in energy consumption in the second data center.
[0062] Specifically, in one embodiment, when the nearest data center cannot meet the resource requirements of the virtual machine task, all candidate data centers (i.e., those data centers that are self-sufficient in renewable energy) are sorted in descending order according to the size of the available computing resources of the candidate data centers. The purpose of this is to find the next best candidate data center, which has the most available computing resources and can meet the requirements of the virtual machine scheduling task.
[0063] For example, assuming that the available computing resources of data center A closest to the user end are insufficient, the available computing resources of all candidate data centers will be checked and sorted according to the size of the available computing resources, and data center B with the most available computing resources will be found as the next candidate data center, i.e., the second data center.
[0064] Furthermore, after finding the data center (second data center) with the most available computing resources, it will be checked whether this data center (second data center) has sufficient available computing resources to meet the computing resource requirements of the virtual machine scheduling task, that is, to determine whether the second data center has sufficient CPU, memory and storage resources to run the virtual machine scheduling task requested by the user.
[0065] Furthermore, when the second data center has sufficient available computing resources, the second data center is used as the target data center, and a server (second server) with the smallest increase in energy consumption when executing the task is further selected in the second data center as the target server. That is, when data center B (second data center) has sufficient resources to meet the computing resource requirements of the virtual machine scheduling task, each server in data center B will be further analyzed, and a server (second data center) with a lower current load and the highest energy efficiency will be selected as the target server to minimize the increase in energy consumption.
[0066] Through the above embodiment, a sorting method is adopted. When the nearest data center cannot meet the computing resource demand, the data center with the most available computing resources is determined, ensuring that the virtual machine tasks are always scheduled to the place with the most abundant resources, thereby improving the resource utilization efficiency. This method can flexibly select other data centers and enhance the robustness of the task scheduling process. Under the premise of meeting the computing resource demand, further selecting the server with the smallest increase in energy consumption to perform the task helps to reduce the overall energy consumption of the data center, thereby optimizing the resource allocation and energy consumption management of the data center.
[0067] Optionally, after determining in step S105 whether the renewable energy of the target data center can meet the energy consumption required by the target server to execute the virtual machine scheduling task, the method further includes: When the renewable energy of the target data center does not meet the energy consumption required by the target server to execute the virtual machine scheduling task, the target data center is removed from the multiple candidate data centers; Determine whether the available computing resources of the third data center meet the computing resources required by the virtual machine scheduling task to determine whether to use the third data center as the target data center and whether to use the third server in the third data center as the target server, the third data center being: the candidate data center closest to the user terminal among the multiple candidate data centers remaining after elimination, and the third server being: the server with the smallest increase in energy consumption in the third data center.
[0068] Specifically, in one embodiment, when it is found in step S105 that the renewable energy of the first data center is insufficient to support the first server to complete the virtual machine scheduling task, the first data center will be excluded from the candidate list, which means that the system will no longer consider the first data center for subsequent task scheduling.
[0069] For example, assume that data center C is the first data center, but after evaluation, its renewable energy is insufficient to support the computing resources required for virtual machine scheduling tasks. Therefore, data center C is removed from the candidate list.
[0070] Furthermore, after excluding the data center that cannot meet the energy consumption requirements, the process will start from step S103 to re-evaluate which of the remaining candidate data centers is closest to the user, and check whether the available computing resources of this data center (the third data center) meet the task requirements.
[0071] For example, data center D and data center E remain in the candidate list, and data center D is closer to the user. The system will check whether the available computing resources of data center D meet the task requirements.
[0072] Furthermore, when the third data center meets the resource requirements, the third data center will be used as the target data center, and the server with the smallest increase in energy consumption in the third data center (ie, the third server) will be further selected as the target server to optimize energy efficiency.
[0073] Through the above embodiments, data centers with insufficient renewable energy are eliminated to ensure that tasks are executed in energy-self-sufficient data centers as much as possible, thereby improving the overall energy self-sufficiency rate. In addition, this method takes into account the geographical location and energy conditions of the data center, optimizes task scheduling decisions, reduces energy waste and improves response speed. Furthermore, under the premise of meeting task requirements, the server with the smallest increase in energy consumption is selected to perform tasks, thereby improving resource utilization efficiency and optimizing the energy use and task scheduling strategy of the data center.
[0074] Optionally, the method further comprises: After receiving the virtual machine scheduling task requested by the user terminal, timing the delay time of the virtual machine scheduling task; When the delay time is greater than a preset delay time threshold, it is determined that the virtual machine scheduling task execution fails.
[0075] Specifically, in one embodiment, in order to prevent the virtual machine scheduling task from not being processed or put on hold, a timer can also be started in the workload cloud scheduler of the data center. When a virtual machine scheduling task request is received from the user, the timer starts recording the time from the issuance of the request to the actual scheduling of the task for execution, that is, the delay time of the virtual machine scheduling task.
[0076] For example, suppose that the user submits a virtual machine scheduling task at 10:00 am, and the workload cloud scheduler of the data center starts timing when receiving the request.
[0077] During this process, the timer will be continuously monitored and the recorded delay time will be compared with the preset delay time threshold. If the delay time exceeds the preset threshold, the virtual machine scheduling task will be marked as failed.
[0078] For example, assuming that the preset delay time threshold is 5 minutes, if the virtual machine scheduling task has not been successfully scheduled at 10:05 am, the system will determine that the virtual machine scheduling task has failed to execute and take corresponding measures, such as notifying the user, attempting to reschedule, or providing alternative solutions.
[0079] Through the above embodiments, the delay time of virtual machine scheduling tasks is monitored and limited to ensure that tasks can be responded and executed in a timely manner, thereby improving the response efficiency of the data center. Users can expect to obtain services within a reasonable time, and tasks that fail to respond after the time limit will be clearly marked as failed, so that users can understand the service status in time and make corresponding decisions. By setting the delay time threshold, the system can more effectively monitor and optimize resource allocation, avoid resources being occupied for a long time without executing tasks, thereby improving resource utilization, and then improving overall reliability and stability.
[0080] Optionally, the method further comprises: After allocating the virtual machine scheduling task to the target server, completing a virtual machine scheduling algorithm corresponding to the virtual machine scheduling task; After the virtual machine scheduling task is completed, multiple pieces of status information corresponding to the multiple data centers are updated.
[0081] Specifically, in one embodiment, once the virtual machine scheduling task is successfully assigned to the target server, the system will execute the virtual machine scheduling algorithm related to the virtual machine scheduling task, which may include actual virtual machine migration, resource allocation, task execution and other operations.
[0082] Furthermore, after the virtual machine scheduling task is completed, the status information of all data centers will be collected and updated, including the current load of the server, energy consumption data, output power of renewable energy, etc. This status information is crucial for future scheduling decisions.
[0083] In addition, after the virtual machine scheduling tasks of the second data center, the third data center, and the fourth data center are completed, the status information of all data centers needs to be updated.
[0084] Through the above embodiments, the virtual machine scheduling algorithm can be executed immediately after the task is assigned, and the system can quickly respond to user requests, thereby improving the overall scheduling efficiency. After the virtual machine scheduling task is completed, the state information of the data center is updated to ensure that the scheduling decision is based on the latest state information, thereby improving the accuracy and effectiveness of the decision, and thus improving the scheduling efficiency and resource management capabilities of the data center.
[0085] Optionally, the method further comprises: When there is no data center to be selected among the multiple data centers, the fourth data center is determined as the target data center, and the fourth server of the fourth data center is determined as the target server, the fourth data center is: the data center closest to the user terminal among the multiple data centers, and the fourth server is: the server with the smallest increase in energy consumption in the fourth data center.
[0086] Specifically, in one embodiment, when no data center that can be self-sufficient in renewable energy is found among all data centers (i.e., the candidate data center does not exist), the data center closest to the user, i.e., the fourth data center, will be selected as the target data center. The fourth data center selected at this time is the candidate data center, and the candidate data center is a data center that cannot be self-sufficient in renewable energy. The purpose of this is to minimize data transmission delays and improve user experience. For example, assuming that all data centers cannot meet the conditions of the candidate data center, the system will select data center D closest to the user as the fourth data center.
[0087] The server with the smallest energy consumption increase (i.e., the fourth server) will be further selected as the target server in the fourth data center to optimize energy efficiency. By analyzing the current load and energy consumption of each server in the fourth data center, a server with a lower current load and the highest energy efficiency is selected as the target server.
[0088] Through the above embodiments, even in the absence of a data center that is self-sufficient in renewable energy, it is possible to ensure that virtual machine scheduling tasks can be smoothly allocated and executed, thereby ensuring the continuity of task scheduling and selecting the data center closest to the user, thereby reducing data transmission delays, increasing user access speeds and optimizing network performance, thereby improving user experience.
[0089] The technical solution of the present application will be fully described below in combination with the above embodiments. Figure 5 is a flowchart of a task scheduling method provided by another embodiment of the present application, such as Figure 5 As shown: First, status information of multiple data centers is obtained, and based on the status information, the multiple data centers are divided into two types of data centers, namely, candidate data centers and alternative data centers, according to whether renewable energy meets the energy requirements of the data centers. The renewable energy of the candidate data centers meets the energy requirements of the data centers, while the renewable energy of the alternative data centers does not meet the energy requirements of the data centers.
[0090] Further, it is determined whether there is a candidate data center. If there is, it is first determined whether the available computing resources of the candidate data center (i.e., the first data center) closest to the user end can meet the computing resources required by the user end for the virtual machine scheduling task. If the available computing resources of the first data center can meet the computing resources required by the user end for the virtual machine scheduling task, the first data center is determined to be the target data center, and the server with the smallest energy consumption increase in the first data center (i.e., the first server) is the target server. It is also determined whether the target data center (the first data center in this case) can meet the energy consumption of the target server (the target server is the first server in this case) when executing the virtual machine scheduling task. If the renewable energy of the first data center can meet the energy consumption of the first server when executing the virtual machine scheduling task If the energy consumption when the virtual machine scheduling task is performed by the first server is not met, the virtual machine scheduling task is assigned to the first server. If the renewable energy of the first data center cannot meet the energy consumption when the first server performs the virtual machine scheduling task, the first data center is removed from the candidate data centers, and it is re-determined whether the available computing resources of the data center closest to the user end (the third data center) meet the computing resources required for the virtual machine scheduling task of the user end. This process is judged in the manner of the first data center and the first server mentioned above. If not met, the third data center is removed from the candidate data centers, and the data center closest to the user end is further judged until a data center that meets the computing resources required for the virtual machine scheduling task of the user end and the energy consumption when the server performs the virtual machine scheduling task is selected.
[0091] If the available computing resources of the first data center meet the computing resources required for the virtual machine scheduling task of the user end, the data center with the most sufficient renewable energy (i.e., the second data center) is determined as the target data center, and the server with the smallest energy consumption increase in the second data center (i.e., the second server) is determined as the target server; and it is determined whether the target data center (the second data center in this case) can meet the energy consumption of the target server (the target server is the second server in this case) when performing the virtual machine scheduling task. If the renewable energy of the second data center meets the energy consumption of the second server when performing the virtual machine scheduling task, the virtual machine scheduling task is assigned to the second server. If the renewable energy of the second data center does not meet the energy consumption of the second server when performing the virtual machine scheduling task, the second data center is removed from the candidate data centers, and it is further determined whether the data center closest to the user end and the data center with the most sufficient renewable energy meet the requirements. Until all the candidate data centers do not meet the requirements, the data center with the most renewable energy in the candidate data centers (i.e., the fourth data center) is determined as the target data center, and the virtual machine scheduling task is assigned to the server with the lowest energy consumption increase in the fourth data center (i.e., the fourth server).
[0092] Through the above embodiments, the beneficial effects of the technical solution of the present application are as follows: 1. This application introduces wind energy, solar energy, tidal energy and other energy sources as renewable energy for multiple data centers with different geographical distributions, and then expresses the heterogeneous virtual machine request job scheduling of the data center as a constrained optimization problem, and proposes a VM scheduling algorithm from the perspective of energy complementarity to achieve the purpose of reducing energy consumption and carbon emissions in the data center.
[0093] 2. This application proposes a power consumption calculation model for servers and data centers for heterogeneous tasks, namely, Formula 1 and Formula 2. This energy consumption model improves the estimation accuracy of data center energy utilization, which is conducive to improving the effectiveness of scheduling strategies for virtual machine scheduling tasks.
[0094] 3. This application proposes a multi-objective comprehensive optimization solution, which comprehensively considers reducing data center energy consumption and carbon emissions while ensuring the QoS (Quality of Service) of the user end. The scheduling delay of the virtual machine scheduling task is taken into account in the scheduling algorithm of the virtual machine task, thereby ensuring the QoS of the users on the user end.
[0095] 4. This application proposes a task scheduling method with a prediction mechanism. The workload cloud scheduler formulates a scheduling strategy in the task scheduling method based on the request amount of the virtual machine scheduling task, the energy consumption of the data center, and the predicted information of the output power of renewable energy.
[0096] 5. This application demonstrates the middleware system architecture of the proposed energy-saving and carbon-reduction scheduling method for heterogeneous data centers in a distributed cloud environment, namely, the cloud scheduler, and introduces in detail the functions of each level of the cloud scheduler, and provides an implementation architecture for the proposed task scheduling method in an actual cloud environment.
[0097] Based on the same inventive concept, another embodiment of the present application further provides an electronic device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the task scheduling method as described in any of the above embodiments.
[0098] Among them, electronic equipment refers to Figure 6 , Figure 6 is a schematic diagram of an electronic device provided by an embodiment of the present application. Figure 6 As shown, the electronic device 600 includes: a memory 610 and a processor 620. The memory 610 and the processor 620 are connected via a bus communication. A computer program is stored in the memory 610. The computer program can be run on the processor 620 to implement the steps in the task scheduling method disclosed in the above embodiment of the present application.
[0099] Based on the same inventive concept, another embodiment of the present application further provides a task scheduling device, which is applied to a workload cloud scheduler. Figure 7is a schematic diagram of a framework of a task scheduling device provided by an embodiment of the present application, such as Figure 7 As shown, the device comprises: The acquisition module 11 is used to obtain multiple state information corresponding to multiple data centers in response to the virtual machine scheduling task requested by the user end; A candidate data center determination module 12 is used to determine a plurality of candidate data centers from the plurality of data centers according to the plurality of status information, wherein the candidate data centers are: a plurality of data centers whose renewable energy sources meet the energy requirements of the data centers; An available computing resource determination module 13 is used to determine whether the available computing resources of a first data center meet the computing resources required by the virtual machine scheduling task, wherein the first data center is the candidate data center closest to the user terminal among the multiple candidate data centers; A first server determination module 14 is configured to determine, when the available computing resources of the first data center meet the computing resources required by the virtual machine scheduling task, the first data center as a target data center, and a first server in the first data center as a target server, wherein the first server is: a server in the first data center with the smallest increase in energy consumption; A renewable energy determination module 15 is used to determine whether the renewable energy of the target data center can meet the energy consumption required by the target server to execute the virtual machine scheduling task; The allocation module 16 is configured to allocate the virtual machine scheduling task to the target server when the renewable energy source of the target data center can meet the energy consumption required by the target server to execute the virtual machine scheduling task.
[0100] Optionally, the state information includes at least the total output power of the renewable energy of the data center and the data center operating power corresponding to the energy required by the data center. The to-be-selected data center determination module 12 includes: A comparison unit, configured to compare, for each of the data centers, the total output power of the renewable energy of the data center with the data center operating power corresponding to the energy required by the data center; A candidate data center determination unit, configured to determine a data center whose total output power of the renewable energy is greater than the data center operating power corresponding to the energy required by the data center as a candidate data center; Among them, the data center operating power corresponding to the energy required by the data center is determined based on the power consumption of the servers, air conditioners and lighting systems in the data center; the renewable energy of the data center includes at least: the wind power that can be generated by the wind farm where the data center is located, and the solar power that can be generated by the solar farm where the data center is located.
[0101] Optionally, the device further comprises: A predicted task request amount acquisition unit, used for inputting the current operation data of the user terminal into the task request amount prediction model, and acquiring the predicted task request amount output by the task request amount prediction model; A predicted total output power acquisition unit, used to input the current meteorological data of the multiple data centers into the renewable energy output power prediction model, and acquire the predicted total output power of renewable energy of the multiple data centers output by the renewable energy output power prediction model; A predicted data center operating power acquisition unit, used to input current operating data of the plurality of data centers into a data center operating power prediction model, and acquire predicted data center operating powers of the plurality of data centers output by the data center operating power prediction model; an output unit, configured to obtain, when the task request amount of the virtual machine scheduling task requested by the user end is the same as the predicted task request amount, a plurality of state information corresponding to the plurality of data centers based on the predicted total output power of the renewable energy sources of the plurality of data centers and the predicted data center operating power output by the data center operating power prediction model; Among them, the task request quantity prediction model is trained using the historical operation data and historical task request quantity of the user end as training samples; the renewable energy output power prediction model is trained using the historical meteorological data of the multiple data centers and the historical total output power of renewable energy of the multiple data centers as training samples; the data center operation power prediction model is trained using the historical operation data of the multiple data centers and the historical data center operation power of the multiple data centers as training samples.
[0102] Optionally, the device further comprises: A sorting unit, configured to sort the multiple data centers to be selected in descending order of the available computing resources after determining whether the available computing resources of the first data center meet the computing resources required for the virtual machine scheduling task, when the available computing resources of the first data center closest to the user terminal do not meet the computing resources required for the virtual machine scheduling task; A judging unit, configured to judge whether the available computing resources of the second data center meet the computing resources required by the virtual machine scheduling task, the second data center being the candidate data center with the largest available computing resources among the multiple candidate data centers; The second server determination unit is used to determine that the second data center is the target data center when the available computing resources of the second data center meet the computing resources required by the virtual machine scheduling task, and to determine that the second server in the second data center is the target server, and the second server is: the server with the smallest increase in energy consumption in the second data center.
[0103] Optionally, the device further comprises: a removal unit, configured to, after determining whether the renewable energy of the target data center can meet the energy consumption required by the target server to perform the virtual machine scheduling task, remove the target data center from the multiple candidate data centers when the renewable energy of the target data center does not meet the energy consumption required by the target server to perform the virtual machine scheduling task; The third data center determination unit is used to determine whether the available computing resources of the third data center meet the computing resources required by the virtual machine scheduling task, so as to determine whether to use the third data center as the target data center and whether to use the third server in the third data center as the target server. The third data center is: the candidate data center closest to the user terminal among the multiple candidate data centers remaining after elimination, and the third server is: the server with the smallest increase in energy consumption in the third data center.
[0104] Optionally, the device further comprises: A timing unit, configured to time the delay time of the virtual machine scheduling task after receiving the virtual machine scheduling task requested by the user terminal; The execution failure determination unit determines that the execution of the virtual machine scheduling task has failed when the delay time is greater than a preset delay time threshold.
[0105] Optionally, the device further comprises: A virtual machine scheduling algorithm execution unit, configured to complete a virtual machine scheduling algorithm corresponding to the virtual machine scheduling task after allocating the virtual machine scheduling task to the target server; An updating unit is used to update the multiple status information corresponding to the multiple data centers after the virtual machine scheduling task is completed.
[0106] Optionally, the device further comprises: The fourth server determination unit is used to determine the fourth data center as the target data center and determine the fourth server of the fourth data center as the target server when there is no data center to be selected among the multiple data centers. The fourth data center is: the data center closest to the user terminal among the multiple data centers, and the fourth server is: the server with the smallest increase in energy consumption in the fourth data center.
[0107] Based on the same inventive concept, another embodiment of the present application further provides a computer program product, including a computer program, which is executed by a processor to perform the task scheduling method described in any of the above embodiments.
[0108] Based on the same inventive concept, another embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored, wherein when the program is executed by a processor, the task scheduling method as described in any of the above embodiments is implemented.
[0109] As for the device, 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.
[0110] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0111] The above is a detailed introduction to a task scheduling method, device and electronic device provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A task scheduling method, characterized in that: Applied to a workload cloud scheduler, the method comprises: In response to a virtual machine scheduling task requested by a user terminal, a plurality of state information corresponding to a plurality of data centers is obtained; According to the plurality of state information, a plurality of data centers to be selected are determined from the plurality of data centers, the data centers to be selected being: a plurality of data centers whose renewable energy sources meet energy requirements of the data centers; Determining whether the available computing resources of a first data center meet the computing resources required by the virtual machine scheduling task, the first data center being a candidate data center closest to the user terminal among the multiple candidate data centers; When the available computing resources of the first data center meet the computing resources required by the virtual machine scheduling task, determining the first data center as the target data center, determining the first server in the first data center as the target server, the first server being: a server with the smallest increase in energy consumption in the first data center; Determine whether the renewable energy of the target data center can meet the energy consumption required by the target server to perform the virtual machine scheduling task; When the renewable energy of the target data center can meet the energy consumption required by the target server to execute the virtual machine scheduling task, the virtual machine scheduling task is allocated to the target server.
2. The task scheduling method according to claim 1, characterized in that: The state information includes at least the total output power of the renewable energy of the data center and the data center operating power corresponding to the energy required by the data center. The determining of multiple data centers to be selected from the multiple data centers according to the multiple state information includes: For each of the data centers, comparing the total output power of the renewable energy of the data center with the data center operating power corresponding to the energy required by the data center; Determine a data center whose total output power of the renewable energy is greater than the data center operating power corresponding to the energy required by the data center as a candidate data center; Among them, the data center operating power corresponding to the energy required by the data center is determined based on the power consumption of the servers, air conditioners and lighting systems in the data center; the renewable energy of the data center includes at least: the wind power that can be generated by the wind farm where the data center is located, and the solar power that can be generated by the solar farm where the data center is located.
3. The task scheduling method according to claim 2, characterized in that: The method further comprises: Inputting the current operation data of the user terminal into the task request amount prediction model, and obtaining the predicted task request amount output by the task request amount prediction model; Inputting current meteorological data of the plurality of data centers into a renewable energy output power prediction model, and obtaining predicted total output power of renewable energy of the plurality of data centers output by the renewable energy output power prediction model; Inputting current operating data of the plurality of data centers into a data center operating power prediction model, and obtaining predicted data center operating powers of the plurality of data centers output by the data center operating power prediction model; When the task request amount of the virtual machine scheduling task requested by the user end is the same as the predicted task request amount, based on the predicted total output power of the renewable energy sources of the multiple data centers and the predicted data center operating power output by the data center operating power prediction model, obtaining multiple state information corresponding to the multiple data centers; Among them, the task request quantity prediction model is trained using the historical operation data and historical task request quantity of the user end as training samples; the renewable energy output power prediction model is trained using the historical meteorological data of the multiple data centers and the historical total output power of renewable energy of the multiple data centers as training samples; the data center operation power prediction model is trained using the historical operation data of the multiple data centers and the historical data center operation power of the multiple data centers as training samples.
4. The task scheduling method according to claim 1, characterized in that: After determining whether the available computing resources of the first data center meet the computing resources required by the virtual machine scheduling task, the method further includes: When the available computing resources of the first data center closest to the user terminal do not meet the computing resources required by the virtual machine scheduling task, sorting the multiple data centers to be selected in descending order of the available computing resources; Determine whether the available computing resources of the second data center meet the computing resources required by the virtual machine scheduling task, the second data center being the candidate data center with the largest available computing resources among the multiple candidate data centers; When the available computing resources of the second data center meet the computing resources required by the virtual machine scheduling task, the second data center is determined to be the target data center, and the second server in the second data center is determined to be the target server, and the second server is: the server with the smallest increase in energy consumption in the second data center.
5. The task scheduling method according to claim 1, characterized in that: After determining whether the renewable energy of the target data center can meet the energy consumption required by the target server to execute the virtual machine scheduling task, the method further includes: When the renewable energy of the target data center does not meet the energy consumption required by the target server to execute the virtual machine scheduling task, the target data center is removed from the multiple candidate data centers; Determine whether the available computing resources of the third data center meet the computing resources required by the virtual machine scheduling task to determine whether to use the third data center as the target data center and whether to use the third server in the third data center as the target server, the third data center being: the candidate data center closest to the user terminal among the multiple candidate data centers remaining after elimination, and the third server being: the server with the smallest increase in energy consumption in the third data center.
6. The task scheduling method according to any one of claims 1 to 5, characterized in that: The method further comprises: After receiving the virtual machine scheduling task requested by the user terminal, timing the delay time of the virtual machine scheduling task; When the delay time is greater than a preset delay time threshold, it is determined that the virtual machine scheduling task execution fails.
7. The task scheduling method according to any one of claims 1 to 5, characterized in that: The method further comprises: After allocating the virtual machine scheduling task to the target server, completing a virtual machine scheduling algorithm corresponding to the virtual machine scheduling task; After the virtual machine scheduling task is completed, multiple pieces of status information corresponding to the multiple data centers are updated.
8. The task scheduling method according to any one of claims 1 to 5, characterized in that: The method further comprises: When there is no data center to be selected among the multiple data centers, the fourth data center is determined as the target data center, and the fourth server of the fourth data center is determined as the target server, the fourth data center is: the data center closest to the user terminal among the multiple data centers, and the fourth server is: the server with the smallest increase in energy consumption in the fourth data center.
9. A task scheduling device, characterized in that: Applied to a workload cloud scheduler, the device comprises: An acquisition module, used to obtain multiple state information corresponding to multiple data centers in response to a virtual machine scheduling task requested by a user terminal; A candidate data center determination module is used to determine a plurality of candidate data centers from the plurality of data centers according to the plurality of status information, the candidate data centers being: a plurality of data centers whose renewable energy sources meet the energy requirements of the data centers; An available computing resource determination module, used to determine whether the available computing resources of a first data center meet the computing resources required by the virtual machine scheduling task, the first data center being the candidate data center closest to the user terminal among the multiple candidate data centers; A first server determination module is used to determine the first data center as a target data center and a first server in the first data center as a target server when the available computing resources of the first data center meet the computing resources required by the virtual machine scheduling task, wherein the first server is: a server with the smallest increase in energy consumption in the first data center; A renewable energy determination module, used to determine whether the renewable energy of the target data center can meet the energy consumption required by the target server to execute the virtual machine scheduling task; The allocation module is used to allocate the virtual machine scheduling task to the target server when the renewable energy of the target data center can meet the energy consumption required by the target server to execute the virtual machine scheduling task.
10. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the task scheduling method according to any one of claims 1 to 8.