Optimal task allocation method and system for multiple data centers containing renewable energy sources

By establishing a geographically distributed system in the data center and introducing dynamic voltage and frequency scaling technology, the task allocation of data centers is optimized, and the problem of data center dependence on traditional energy is solved, and cost-effective and environmentally friendly task allocation is achieved, which improves the ability of Utilization of renewable energy.

CN119248470APending Publication Date: 2025-01-03GUIZHOU POWER GRID CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411137494.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-19
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

Data centers' dependence on traditional energy leads to low environmental pollution, cost-effectiveness and environmental protection, and it is difficult for existing technology to effectively utilize renewable energy for task allocation optimization.

Method used

Establish a geographic distributed data center system based on geographical location and network infrastructure, combine dynamic voltage and frequency scaling technology to create an optimal task allocation model for multi-data centers, and use optimization solvers to distribute tasks, reduce total electricity bills and increase renewable energy. Utilization.

Benefits of technology

The data center task allocation optimization is achieved considering regional electricity price differences and energy consumption mode, minimizing the total electricity bill, while improving the utilization rate of renewable energy, ensuring service quality and load balancing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119248470A_ABST
    Figure CN119248470A_ABST
Patent Text Reader

Abstract

The invention discloses an optimal task allocation method and system for multiple data centers containing renewable energy sources, and the method comprises the steps: building a system framework of a geographic distributed data center based on a geographic position and a network infrastructure; based on a system framework, a dynamic voltage and frequency scaling technology is introduced, and power supply voltage and working frequency are adjusted according to actual power consumption of a processor; establishing a multi-data center optimal task allocation model by considering renewable energy sources, dynamic voltage and a frequency scaling technology on the basis of minimizing the total electric charge of the data center as a target function and a constraint condition; and solving the optimal task allocation model of the multiple data centers by using an optimization solver, outputting the total electric charge cost of the data centers and the number of service requests of different data centers, and obtaining an optimal task allocation decision. According to the multi-data center optimal task allocation method provided by the invention, the economic efficiency and the environmental protection property of the data center can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of renewable energy consumption technology, and in particular to a multi-data center optimal task allocation method and system including renewable energy. Background Art

[0002] With the rapid development of modern society, data centers are always working around the clock, consuming a lot of electricity, which mainly comes from traditional energy sources such as coal, oil and natural gas, thus causing serious air pollution to the environment. It is estimated that a data center with 5×104 servers may use more than 100 million kWh per year, which is equivalent to the urban energy consumption of 105 households. In this context, data centers driven by renewable energy have received increasing attention in recent years due to the low cost and environmental protection characteristics of renewable energy. Summary of the invention

[0003] The purpose of this section is to summarize some aspects of embodiments of the present invention and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section and the specification abstract and the invention title of this application to avoid blurring the purpose of this section, the specification abstract and the invention title, and such simplifications or omissions cannot be used to limit the scope of the present invention.

[0004] In view of the above existing problems, the present invention is proposed.

[0005] Therefore, the present invention provides a multi-data center optimal task allocation method and system including renewable energy to solve the problems of low economic efficiency and environmental protection of data centers.

[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0007] In a first aspect, the present invention provides a method for optimal task allocation in multiple data centers including renewable energy, comprising:

[0008] Establish a system framework for geographically distributed data centers based on geographic location and network infrastructure;

[0009] Based on the system framework, dynamic voltage and frequency scaling technology is introduced to adjust the supply voltage and operating frequency according to the actual power consumption of the processor;

[0010] Based on the minimization of the total electricity cost of the data center as the objective function, considering renewable energy and dynamic voltage and frequency scaling technology, an optimal task allocation model for multiple data centers is created;

[0011] The optimization solver is used to solve the optimal task allocation model for multiple data centers, output the total electricity cost of the data center and the number of service requests in different data centers, and obtain the optimal task allocation decision.

[0012] As a preferred solution of the optimal task allocation method for multiple data centers containing renewable energy according to the present invention, wherein:

[0013] The dynamic voltage and frequency scaling technology includes controlling power consumption by adjusting the supply voltage and the operating frequency, wherein the power consumption model is expressed as:

[0014] P=Bv 2 f+P static

[0015] Among them, P is the processor power consumption, f is the operating frequency, v is the supply voltage, B is the correlation coefficient of different processors, P static is the static power consumption.

[0016] Assume that the relationship between the supply voltage v and the operating frequency f is v∝f β , β is 1, and the simplified power consumption model is expressed as:

[0017] P=Bf α+1 +P static

[0018] Among them, α=2β.

[0019] As a preferred solution of the optimal task allocation method for multiple data centers containing renewable energy according to the present invention, wherein:

[0020] The objective function of minimizing the total electricity cost of the data center is expressed as:

[0021]

[0022] In the formula, S n and Pr n represents the server number and electricity price of data center n, The power purchased from the public grid for the servers.

[0023] As a preferred solution of the optimal task allocation method for multiple data centers containing renewable energy according to the present invention, wherein:

[0024] The multi-data center optimal task allocation model includes power consumption limitation constraints, power supply and demand balance constraints, workload balance constraints and QoS delay constraints;

[0025] The power consumption limit constraint is expressed as:

[0026]

[0027] in, represents the power consumption of server s in data center n, is the probability that server s in data center n is busy, is the state variable of server s in data center n.

[0028] As a preferred solution of the optimal task allocation method for multiple data centers containing renewable energy according to the present invention, wherein:

[0029] The power supply and demand balance constraint is expressed as:

[0030]

[0031] Among them, R n represents the renewable energy of data center n.

[0032] As a preferred solution of the optimal task allocation method for multiple data centers containing renewable energy according to the present invention, wherein:

[0033] The workload balancing constraint is expressed as:

[0034]

[0035] in, represents all requests executed by data center n, Represents all requirements collected by the front-end portal.

[0036] As a preferred solution of the optimal task allocation method for multiple data centers containing renewable energy according to the present invention, wherein:

[0037] The QoS delay constraint is expressed as:

[0038]

[0039] in, represents the average arrival rate, represents the average service time, represents the average waiting time, represents the state variable of server s, r represents the task processing rate, represents the working frequency of server s, k represents a constant, and T represents the maximum delay.

[0040] In a second aspect, the present invention provides a multi-data center optimal task allocation system including renewable energy, comprising:

[0041] Establish a framework module for establishing a system framework of geographically distributed data centers based on geographical locations and network infrastructure;

[0042] An adjustment module is used to introduce dynamic voltage and frequency scaling technology based on the system framework to adjust the supply voltage and operating frequency according to the actual power consumption of the processor;

[0043] Establish a model module to create an optimal task allocation model for multiple data centers based on minimizing the total electricity cost of the data center as the objective function, considering renewable energy and dynamic voltage and frequency scaling technology;

[0044] The solution module is used to solve the optimal task allocation model of multiple data centers using an optimization solver, output the total electricity cost of the data center and the number of service requests of different data centers, and obtain the optimal task allocation decision.

[0045] In a third aspect, the present invention provides a computing device, comprising:

[0046] Memory, used to store programs;

[0047] A processor is used to execute the computer executable instructions, which, when executed by the processor, implement the steps of the method for optimal task allocation of multiple data centers containing renewable energy.

[0048] In a fourth aspect, the present invention provides a computer-readable storage medium, comprising: when the program is executed by a processor, the steps of implementing the method for optimal task allocation of multiple data centers containing renewable energy are implemented.

[0049] Beneficial effects of the invention: The invention establishes a geographically distributed data center system framework that takes into account regional electricity price differences, and combines dynamic voltage and frequency scaling (DVFS) technology to optimize the task allocation of the data center to minimize the total electricity cost while improving the utilization of renewable energy. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. Among them:

[0051] Figure 1 A basic flow chart of a method for optimal task allocation in multiple data centers including renewable energy provided by an embodiment of the present invention;

[0052] Figure 2 A schematic diagram of geographically distributed data centers for an optimal task allocation method for multiple data centers including renewable energy sources provided by one embodiment of the present invention;

[0053] Figure 3 An electricity cost graph for different renewable energy sources and electricity prices for an optimal task allocation method for multiple data centers including renewable energy provided by one embodiment of the present invention;

[0054] Figure 4 A graph of the number of activated servers and the number of processed requests for an optimal task allocation method for multiple data centers including renewable energy provided by one embodiment of the present invention;

[0055] Figure 5 A server operation frequency diagram of different user requests for an optimal task allocation method for multiple data centers including renewable energy is provided in accordance with an embodiment of the present invention. DETAILED DESCRIPTION

[0056] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.

[0057] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0058] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.

[0059] The present invention is described in detail with reference to schematic diagrams. When describing the embodiments of the present invention, for the sake of convenience, the cross-sectional diagrams showing the device structure will not be partially enlarged according to the general scale, and the schematic diagrams are only examples, which should not limit the scope of protection of the present invention. In addition, in actual production, the three-dimensional dimensions of length, width and depth should be included.

[0060] At the same time, in the description of the present invention, it should be noted that the directions or positional relationships indicated by the terms "upper, lower, inner and outer" are based on the directions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as limiting the present invention. In addition, the terms "first, second or third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0061] In the present invention, unless otherwise clearly specified and limited, the terms "install, connect, connect" should be understood in a broad sense, for example: it can be a fixed connection, a detachable connection or an integral connection; it can also be a mechanical connection, an electrical connection or a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0062] Example 1

[0063] Referring to the figure, an embodiment of the present invention provides a multi-data center optimal task allocation method including renewable energy sources, such as Figure 1 As shown, the following steps are included:

[0064] S1: Establish a system framework for geographically distributed data centers based on geographic location and network infrastructure;

[0065] In the embodiments of the present application, Figure 2 As shown, a data center system framework with n data centers and m front-end portals is established. Each front-end portal is responsible for collecting surrounding user requests and delivering them to the appropriate data center.

[0066] It should be noted that this framework not only takes into account the physical location and network connectivity of the data center, but also combines insights into the electricity market, especially regional differences in electricity prices, providing a basis for subsequent resource optimization and cost control.

[0067] S2: Based on the system framework, dynamic voltage and frequency scaling technology is introduced to adjust the supply voltage and operating frequency according to the actual power consumption of the processor;

[0068] It should be noted that in order to achieve efficient operation of data centers in different regional power markets, it is necessary not only to consider the regional differences in electricity prices, but also to deeply understand the energy consumption patterns within the data center. Given that there is a positive correlation between supply voltage, frequency and power consumption, that is, the higher the supply voltage, the higher the operating frequency will usually be, which will lead to increased power consumption, so the present invention introduces dynamic voltage and frequency scaling technology (DVFS).

[0069] It should be noted that through DVFS technology, data centers can dynamically adjust the supply voltage and operating frequency according to the actual power consumption of the chip monitored in real time to ensure that computing needs are met while avoiding unnecessary energy waste. The core of this technology is that it allows data centers to reduce voltage and frequency during low-load periods to reduce power consumption, and increase voltage and frequency in a timely manner during high-load periods to ensure performance requirements.

[0070] In the embodiments of the present application, the higher the supply voltage usually means the higher the frequency and the greater the power consumption. The DVFS technology is used to dynamically adjust the operating frequency of the microprocessor by adjusting the supply voltage. The data center adopts the DVFS technology to set a reasonable operating voltage and frequency according to the actual power consumption of the chip at that time to ensure that the load power consumption is sufficient but does not exceed the power supply.

[0071] In the embodiment of the present application, power consumption is controlled by adjusting the supply voltage and the operating frequency, wherein the power consumption model is expressed as:

[0072] P=Bv 2 f+P static

[0073] Among them, P is the processor power consumption, f is the operating frequency, v is the supply voltage, B is the correlation coefficient of different processors, P static is the static power consumption.

[0074] It should be noted that the analysis model shows that voltage and frequency have a significant impact on power consumption, and DVFS technology takes advantage of this to control power consumption and achieve efficient energy utilization by adjusting v and f while ensuring the quality of task completion.

[0075] In the embodiment of the present application, when it is recognized that there is a relationship between voltage and frequency v∝f β , and β is always set to 1, the power consumption model is simplified to:

[0076] P=Bf α+1 +P static .

[0077] Among them, α = 2β. This simplification not only makes the model more intuitive, but also emphasizes the nonlinear effect of operating frequency on power consumption, providing a solid theoretical basis for the implementation of DVFS technology.

[0078] It should be noted that by introducing DVFS technology in step S2 and deeply understanding the mathematical relationship between voltage, frequency and power consumption, it is possible to achieve dynamic management and optimization of energy in the data center under different load conditions. This is not only an effective supplement to the geographically distributed data center system framework in step S1, but also an important means to achieve the objective function of the multi-data center optimal task allocation model in step S3 - minimizing the total electricity cost.

[0079] S3: Based on the minimization of the total electricity cost of the data center as the objective function and constraints, considering renewable energy and dynamic voltage and frequency scaling technology, a multi-data center optimal task allocation model is created;

[0080] In the embodiment of the present application, the objective function is to minimize the total electricity cost of the data center, including that each server in the data center n has the same electricity price Prn , the total electricity cost EC can be obtained by adding the traditional electricity costs derived from all servers in the geographically distributed data centers, and the objective function is expressed as:

[0081]

[0082] In the formula, S n and Pr n represents the server number and electricity price of data center n, The power purchased from the public grid for the servers.

[0083] In the embodiment of the present application, the constraints include power consumption limit constraints, power supply and demand balance constraints, workload balance constraints, and QoS delay constraints;

[0084] The power consumption limit constraint is expressed as:

[0085]

[0086] in, represents the power consumption of server s in data center n, is the probability that server s in data center n is busy, is the state variable of server s in data center n. According to the M / G / 1 queuing theory, calculate the busy probability of server s

[0087]

[0088] in:

[0089]

[0090] in, represents the request arrival rate received by server s in data center n, represents the total number of requests distributed from m front-end portals to server s in data center n;

[0091] Assume the power requirement of server s in data center n is Equal to its power consumption

[0092]

[0093] It should be noted that by accurately calculating the power consumption The model can identify which servers are most energy-efficient and in what state, thereby optimizing overall power consumption by adjusting frequency and state variables. It can ensure that the server is not overloaded, thus ensuring that the task response time and processing time meet the service quality requirements. By minimizing power consumption, the model helps to reduce the electricity cost of the data center, which is part of the total electricity cost minimization objective function and is crucial for economic operation.

[0094] The power supply and demand balance constraint is expressed as:

[0095]

[0096] Among them, R n Represents the renewable energy of data center n. In order to meet the needs of all users, the power supply should not be less than the demand.

[0097] It should be noted that the power supply and demand balance constraint ensures that the total power demand of the data center does not exceed its power supply, including power from the grid and renewable energy. is part of the calculation of total power demand, so make sure The accuracy of the data is critical to maintaining a balance between electricity supply and demand.

[0098] In the embodiment of the present application, the workload balancing constraint is expressed as:

[0099] The total number of requests executed in all servers is equal to the number of requests arriving at all front-end portals:

[0100]

[0101] in, represents all requests executed by data center n, Represents all requirements collected by the front-end portal.

[0102] It should be noted that the purpose of setting workload balancing constraints is to ensure that user requests collected by all front-end portals can be evenly distributed to all data centers to avoid load imbalance.

[0103] In the embodiment of the present application, the QoS delay constraint includes:

[0104] In steady state, the expected latency for each server is is the average service time of server s in data center n and average waiting time The sum of and represent the average arrival rate and service rate respectively.

[0105]

[0106] In the formula, represents the variance of the easily accessible task sizes, Represents a known factor that indicates the expectation for the size of the task.

[0107] To ensure QoS requirements, any latency on the activated server Neither should violate the maximum delay T:

[0108]

[0109] in, represents the average service time, represents the average waiting time, represents the state variable of server s, r represents the task processing rate, represents the working frequency of server s, k represents a constant, and T represents the maximum delay.

[0110] It should be noted that the purpose of setting the QoS delay constraint is to ensure that the delay time of any activated server in responding to a user request does not exceed a preset maximum delay T, so as to maintain the service quality.

[0111] S4: Use the optimization solver to solve the optimal task allocation model for multiple data centers, output the total electricity cost of the data center and the number of service requests for different data centers, and obtain the optimal task allocation decision.

[0112] In the embodiment of the present application, the CPLEX solver in the MATLAB environment is used to solve the above objective function and constraints to obtain the total electricity cost of the data center and the number of service requests of different data centers.

[0113] This embodiment also provides a multi-data center optimal task allocation system including renewable energy, including:

[0114] Establish a framework module for establishing a system framework of geographically distributed data centers based on geographical locations and network infrastructure;

[0115] An adjustment module is used to introduce dynamic voltage and frequency scaling technology based on the system framework to adjust the supply voltage and operating frequency according to the actual power consumption of the processor;

[0116] Establish a model module to create an optimal task allocation model for multiple data centers based on minimizing the total electricity cost of the data center as the objective function, considering renewable energy and dynamic voltage and frequency scaling technology;

[0117] The solution module is used to solve the optimal task allocation model of multiple data centers using an optimization solver, output the total electricity cost of the data center and the number of service requests of different data centers, and obtain the optimal task allocation decision.

[0118] Furthermore, it also includes:

[0119] Memory, used to store programs;

[0120] A processor is used to load the program to execute the multi-data center optimal task allocation method containing renewable energy.

[0121] This embodiment also provides a computer-readable storage medium storing a program, which, when executed by a processor, implements the method for optimal task allocation for multiple data centers containing renewable energy.

[0122] The storage medium proposed in this embodiment and the optimal task allocation method for multiple data centers including renewable energy proposed in the above embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0123] Through the above description of the implementation methods, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ReadOnly, Memory, ROM), random access memory (RandomAccess Memory, RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform the methods of various embodiments of the present invention.

[0124] Example 2

[0125] Reference Figure 3-Figure 5 , which is an embodiment of the present invention, provides an optimal task allocation method for multiple data centers including renewable energy. In order to verify its beneficial effects, comparison results of two schemes are provided.

[0126] The data center system consisting of n front-end portals and m data centers is powered by a mixture of renewable energy and traditional energy.

[0127] exist Figure 3 In the above diagram, the trend of electricity cost follows the trend of electricity price, except for time slots 11-18 where electricity price is relatively high and renewable energy is sufficient to process user requests. Since REG tends to be high in time slots 7-21, all renewable energy is used to process user requests, such as Figure 4Then, the remaining user requests are sent to time slots with lower electricity prices, such as time slots 1-6, 7-15, and 20-24, to ensure that the tasks can be processed within the deadline. In addition, when the electricity price is high, the number of servers activated by traditional energy is smaller in time slots 16-18, and larger in the remaining time slots.

[0128] from Figure 5 It can be clearly seen that frequency tracking has similar trends to electricity cost tracking, from which we can conclude that due to the DVFS technology we use, the server does work at a high frequency when processing large user requests. Such observations further prove that our optimal task allocation strategy based on DVFS technology can reduce electricity costs in multiple electricity markets.

[0129] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. A multi-data center optimal task allocation method including renewable energy, characterized in that: include: Establish a system framework for geographically distributed data centers based on geographic location and network infrastructure; Based on the system framework, dynamic voltage and frequency scaling technology is introduced to adjust the supply voltage and operating frequency according to the actual power consumption of the processor; Based on the minimization of the total electricity cost of the data center as the objective function and constraints, the optimal task allocation model for multiple data centers is created by considering renewable energy and dynamic voltage and frequency scaling technology; The optimization solver is used to solve the optimal task allocation model for multiple data centers, output the total electricity cost of the data center and the number of service requests in different data centers, and obtain the optimal task allocation decision.

2. The optimal task allocation method for multiple data centers including renewable energy sources as claimed in claim 1, characterized in that: The dynamic voltage and frequency scaling technology includes controlling power consumption by adjusting the supply voltage and the operating frequency, wherein the power consumption model is expressed as: P=Bv 2 f+P static Among them, P is the processor power consumption, f is the operating frequency, v is the supply voltage, B is the correlation coefficient of different processors, P static is the static power consumption. Assume that the relationship between the supply voltage v and the operating frequency f is v∝f β , β is 1, and the simplified power consumption model is expressed as: P=Bf α+1 +P static Among them, α=2β.

3. The optimal task allocation method for multiple data centers including renewable energy sources according to claim 1 or 2, characterized in that: The objective function of minimizing the total electricity cost of the data center is expressed as: In the formula, S n and Pr n represents the server number and electricity price of data center n, The power purchased from the public grid for the servers.

4. The optimal task allocation method for multiple data centers including renewable energy sources as claimed in claim 3, characterized in that: The constraints include power consumption limit constraints, power supply and demand balance constraints, workload balance constraints and QoS delay constraints; The power consumption limit constraint is expressed as: in, represents the power consumption of server s in data center n, is the probability that server s in data center n is busy, is the state variable of server s in data center n.

5. The optimal task allocation method for multiple data centers including renewable energy sources as claimed in claim 4, characterized in that: The power supply and demand balance constraint is expressed as: Among them, R n represents the renewable energy of data center n.

6. The optimal task allocation method for multiple data centers including renewable energy sources as claimed in claim 5, characterized in that: The workload balancing constraint is expressed as: in, represents all requests executed by data center n, Represents all requirements collected by the front-end portal.

7. The optimal task allocation method for multiple data centers including renewable energy sources as claimed in claim 6, characterized in that: The QoS delay constraint is expressed as: in, represents the average arrival rate, represents the average service time, represents the average waiting time, represents the state variable of server s, r represents the task processing rate, represents the working frequency of server s, k represents a constant, and T represents the maximum delay.

8. A system based on the multi-data center optimal task allocation method containing renewable energy according to claim 1, characterized in that: Establish a framework module for establishing a system framework of geographically distributed data centers based on geographical locations and network infrastructure; An adjustment module is used to introduce dynamic voltage and frequency scaling technology based on the system framework to adjust the supply voltage and operating frequency according to the actual power consumption of the processor; Establish a model module to create an optimal task allocation model for multiple data centers based on minimizing the total electricity cost of the data center as the objective function, considering renewable energy and dynamic voltage and frequency scaling technology; The solution module is used to solve the optimal task allocation model of multiple data centers using an optimization solver, output the total electricity cost of the data center and the number of service requests of different data centers, and obtain the optimal task allocation decision.

9. An electronic device, characterized in that: include: Memory, used to store programs; A processor, configured to load the program to execute the steps of the method for optimal task allocation of multiple data centers containing renewable energy as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a program, characterized in that: When the program is executed by a processor, the steps of the optimal task allocation method for multiple data centers containing renewable energy are implemented as described in any one of claims 1 to 7.