Uninterruptible power supply scheduling method, system, device and medium based on double-layer optimization

By optimizing the charging and discharging strategy of the uninterruptible power supply using a two-layer optimization method, the problem of insufficient utilization of the power supply was solved, and stable operation and economic benefits were achieved in the power grid peak shaving service.

CN121192844BActive Publication Date: 2026-05-22SHANGHAI TECH UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI TECH UNIV
Filing Date
2025-09-15
Publication Date
2026-05-22

Smart Images

  • Figure CN121192844B_ABST
    Figure CN121192844B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of energy storage, and particularly relates to an uninterrupted power supply scheduling method based on double-layer optimization, which comprises the following steps: constructing a first target function of the uninterrupted power supply according to the electricity price of each period of the day, and determining the charging time or discharging time of the uninterrupted power supply in each period by using the target function, so as to call the uninterrupted power supply to actively participate in power grid regulation. The voltage fluctuation of the uninterrupted power supply in each period is predicted, and a second target function is constructed based on the prediction result to optimize the input power of each charging and the output power of each discharging. The application determines the charging and discharging planning of the whole day in advance through day-ahead, calls the uninterrupted power supply to actively participate in power grid regulation, thereby creating economic benefits, and dynamically adjusts the charging and discharging power of the uninterrupted power supply in the day to ensure the stability and reliability of the operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of energy storage technology, specifically relating to a method, system, device, and medium for uninterruptible power supply scheduling based on two-layer optimization. Background Technology

[0002] With the rapid development of the digital economy, data centers are expanding rapidly, leading to an explosive growth in demand for uninterruptible power supplies (UPS), the core power source. However, while large data centers typically have UPS capacities ranging from hundreds to thousands of kilowatt-hours, these are primarily used to handle power outages or voltage fluctuations, remaining in "floating standby" mode for over 90% of the time. This not only results in idle hardware investments but also increases maintenance costs, creating "resource redundancy points" within the data center.

[0003] Meanwhile, with the accelerated market-oriented reforms of the power system and the construction of demand-side response mechanisms, the economic value of flexible resource dispatch is becoming increasingly prominent. As a form of distributed energy storage, uninterruptible power sources (UPS) can not only effectively improve equipment utilization but also generate additional economic benefits if they can participate in power system dispatch. Therefore, it is urgent to design a reasonable dispatch scheme to enable UPS to participate in the operation of the electricity market. Summary of the Invention

[0004] In view of the current problem of insufficient utilization of uninterruptible power supplies (UPS), this invention proposes a scheduling strategy for UPS charging and discharging. Through two-level optimization, the scheduling plan for the whole day is determined before the day, the UPS is called to actively participate in the grid peak shaving service, and the input / output power of UPS charging / discharging is dynamically adjusted within the day to ensure its stable and reliable operation.

[0005] To achieve the above and other related objectives, this invention provides a two-layer optimization-based uninterruptible power supply (UPS) scheduling method, comprising: obtaining the electricity price for each time period of the day and constructing a first objective function for the UPS based on it; using the first objective function to determine the charging or discharging time of the UPS for each time period of the day, so as to call the UPS to actively participate in grid regulation; predicting the voltage fluctuation of the UPS for each time period of the day and constructing a second objective function for the UPS based on it; and using the second objective function to optimize the input power of the UPS during each charging and the output power during each discharging.

[0006] According to a specific embodiment of the present invention, the formula for the first objective function is as follows:

[0007] J1=∑(λ t ·P grid (t)-C bat (t)),

[0008] Where, λ tP represents the electricity price of an uninterruptible power supply in the t-th time period. grid (t) represents the interaction power between the uninterruptible power supply and the grid in time period t, C bat (t) represents the degradation cost of the energy storage component in the uninterruptible power supply during the t-th time period.

[0009] According to a specific embodiment of the present invention, the step of using the first objective function to determine the charging or discharging time of the uninterruptible power supply (UPS) in each time period of the day, so as to call the UPS to actively participate in grid regulation, includes: numbering each time period of the day in chronological order; presetting the UPS to discharge at rated output power and charge at rated input power, and maximizing the first objective function to determine the charging or discharging of the UPS in each time period of the day, and the corresponding charging or discharging time.

[0010] According to a specific embodiment of the present invention, the step of predicting the voltage fluctuation of an uninterruptible power supply at different times of the day includes: obtaining the voltage fluctuation at different times within a preset number of days, and establishing the state space equation of a model predictive control algorithm based on the voltage fluctuation, so as to predict the voltage fluctuation at different times of the day through the state space equation.

[0011] According to a specific embodiment of the present invention, the formula for the second objective function is as follows:

[0012]

[0013] Among them, P ref (k) represents the reference value of the input / output power of the uninterruptible power supply in the k-th time period, P actual (k) represents the optimized input / output power of the uninterruptible power supply in the k-th time period, α represents the preset weighting coefficient, and C reliability,k This indicates the voltage fluctuation of the uninterruptible power supply during the k-th time period when it is charging or discharging.

[0014] According to a specific embodiment of the present invention, the step of optimizing the input power of the uninterruptible power supply during each charging and the output power during each discharging using the second objective function includes: for each time period, removing the time periods where the charging time or discharging time is 0; based on the removed time periods, minimizing the second objective function to determine the input power of the uninterruptible power supply during each charging and the output power during each discharging.

[0015] According to a specific embodiment of the present invention, it further includes: calling an uninterruptible power supply to charge or discharge at each time period according to the corresponding input / output power, and maintaining the corresponding charging or discharging time.

[0016] An uninterruptible power supply (UPS) scheduling system based on two-layer optimization includes: a first function construction module for obtaining the electricity price for each time period of the day and constructing a first objective function for the UPS based on it; a charging / discharging time calculation module for using the first objective function to determine the charging or discharging time of the UPS for each time period of the day, so as to call the UPS to actively participate in grid regulation; a second function construction module for predicting the voltage fluctuation of the UPS for each time period of the day and constructing a second objective function for the UPS based on it; and a charging / discharging power calculation module for using the second objective function to optimize the input power of the UPS during each charging and the output power during each discharging.

[0017] An electronic device includes a processor coupled to a memory storing program instructions that, when executed by the processor, implement the method described above.

[0018] A computer-readable storage medium includes a program that, when run on a computer, causes the computer to perform the method described above.

[0019] This invention provides a two-layer optimization-based uninterruptible power supply (UPS) scheduling method. By pre-determining the scheduling plan for the entire day, the UPS is actively mobilized to participate in the grid peak shaving service, generating economic benefits. Furthermore, by dynamically adjusting the input / output power of the UPS during the day, its stable and reliable operation is ensured. Attached Figure Description

[0020] Figure 1 This is a flowchart illustrating a specific implementation of the uninterruptible power supply scheduling method based on two-layer optimization provided by the present invention.

[0021] Figure 2 This is a schematic diagram of a specific implementation of an uninterruptible power supply scheduling system based on two-layer optimization provided by the present invention.

[0022] Figure 3 This is a structural block diagram of a specific embodiment of an electronic device provided by the present invention. Detailed Implementation

[0023] The embodiments of the present invention will be described below with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention and not for limiting the scope of protection of the present invention.

[0024] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Therefore, the drawings only show the components related to the present invention and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.

[0025] In the following description, numerous details are explored to provide a more thorough explanation of embodiments of the invention. However, it will be apparent to those skilled in the art that embodiments of the invention may be practiced without these specific details. In other embodiments, publicly known structures and devices are shown in block diagram form rather than in detail to avoid obscuring embodiments of the invention.

[0026] First, it's important to clarify that an uninterruptible power supply (UPS) is a power device capable of providing a continuous, stable, and uninterrupted power supply. It can continue to power the load after a mains power outage, relying on its energy storage components, such as batteries. Specifically, in practical applications, when the mains power is normal, the mains power directly supplies power to the load through a bypass channel, while simultaneously charging the energy storage components in the UPS. When the mains power fails, the UPS switches to a discharging state, and its energy storage components then supply power to the load.

[0027] Furthermore, an uninterruptible power supply (UPS) can be viewed as a small energy storage system, which can be composed of one or more energy storage components. There are no excessive restrictions on the energy storage components in an UPS. For example, an UPS can be composed of independent electrical energy storage components, independent hydrogen energy storage components, or a mixture of electrical and hydrogen energy storage components, or even a mixture of multiple different electrical energy storage components, etc. Modifications and refinements made by those skilled in the art to the embodiments of the present invention without departing from the spirit of the present invention still fall within the scope of the invention application patent of the present invention.

[0028] Therefore, uninterruptible power supplies (UPS) are widely used in various technical fields. It's understandable that data centers store massive amounts of critical data and run numerous servers and other core equipment, requiring extremely high power stability. UPS can instantly switch power during mains power failures, providing continuous and stable power to data centers, ensuring uninterrupted data processing and business operations, and preventing data loss and system damage caused by sudden power outages due to mains power interruptions.

[0029] Based on the above, in practical applications, uninterruptible power supplies (UPS) can effectively ensure the stable and continuous operation of data centers. However, it's understandable that the conventional power source for data centers is still the mains power, i.e., the power grid. UPS only supports the data center when the grid power supply is abnormal, ensuring uninterrupted power supply. Correspondingly, to improve the utilization rate of UPS, it can be actively dispatched to participate in grid peak-shaving services based on electricity price fluctuations, thereby generating economic benefits.

[0030] It is also understood that this embodiment specifically uses the application of uninterruptible power supplies (UPS) in a data center scenario as an example, but this is not intended to limit other application scenarios of UPS. For example, UPS can also be used as an energy storage system in electrified transportation or as an energy storage system in renewable energy systems, and so on. The scheduling method provided in this embodiment is also compatible with other application scenarios, allowing UPS to actively participate in grid regulation to create economic benefits. This is not a limitation. Modifications and refinements made by those skilled in the art to the embodiments of this invention without departing from the spirit of this invention still fall within the scope of the invention application.

[0031] Example 1

[0032] Please see Figure 1 The illustrated uninterruptible power supply (UPS) scheduling method, based on two-layer optimization, is applied to the charging and discharging scheduling of UPS configured in data centers. Specifically, it includes:

[0033] Step S100: Obtain the electricity price for each time period of the day, and construct the first objective function of the uninterruptible power supply based on it.

[0034] It is understandable that the electricity price for different time periods of the day can be obtained through different methods. For example, if the power supply bureau directly publishes the electricity price information for different time periods, it can be obtained directly, and the following first objective function can be constructed:

[0035] J1=∑(λ t ·P grid (t)-C bat (t)),

[0036] Where, λ t P represents the electricity price of an uninterruptible power supply in the t-th time period. grid (t) represents the interaction power between the uninterruptible power supply and the grid in time period t, C bat (t) represents the degradation cost of the energy storage component in the uninterruptible power supply during the t-th time period.

[0037] If the power supply bureau does not directly provide a reference standard for electricity prices, this embodiment also provides a method to predict electricity price fluctuations. This method obtains the electricity prices for each time period of the day. In order to effectively predict future electricity price fluctuations, it is necessary to refer to certain historical samples and use the sliding window technique to transform the time series problem into a supervised learning problem. That is, the target value (electricity price) for the next time period is predicted using sample data from the past N time periods.

[0038] Specifically, it is necessary to first obtain the electricity prices and the characteristic quantities affecting the electricity prices for the previous N time periods as sample data. In this embodiment, since it is necessary to obtain the electricity price fluctuations for each time period of the day, the electricity prices and the characteristic quantities affecting the electricity prices of the previous day can be used for sufficient analysis to predict the electricity price fluctuations for the whole day. Of course, the sample data is not limited to the relevant data of the past 24 hours. For example, it can also be the electricity prices and the characteristic quantities affecting the electricity prices of the previous two days (the past 48 hours), or the electricity prices and the characteristic quantities affecting the electricity prices of the first half of the day (the past 12 hours). The specific data can be freely adjusted according to the actual situation.

[0039] It is also understood that there is no limitation on the units (time periods) mentioned above. They can refer to an hour or a period of time. No limitation is imposed on this. Modifications and refinements made by those skilled in the art to the embodiments of the present invention without departing from the spirit of the present invention still fall within the scope of the invention application patent of the present invention.

[0040] To facilitate the explanation of the scheme, the following text will use one hour as an example for a time period. That is, the electricity price and the characteristic quantity affecting the electricity price for N time periods will be replaced with the electricity price and the characteristic quantity affecting the electricity price for N hours. The sample data of the previous day, that is, the electricity price and the characteristic quantity affecting the electricity price for the previous 24 hours, will be used to predict the electricity price for each time period of the day, that is, the electricity price for each hour of the day.

[0041] In addition, there are many factors that affect electricity prices, such as grid load (kW or MW), weather (sunny, cloudy, rainy, etc.), ambient temperature (°C), wind speed (m / s), humidity (%), peak / valley periods, weekdays / holidays, etc. We do not impose too many restrictions on these factors, but only conduct a comprehensive analysis based on them and historical electricity prices to effectively predict future electricity price fluctuations.

[0042] Furthermore, after obtaining the electricity prices and influencing features for the previous N time periods, the data needs to be preprocessed. Specifically, the above obtains the electricity prices and influencing features for the previous 24 hours, theoretically resulting in 24 sets of data. If any set of data is missing or incomplete (e.g., missing electricity prices for a particular hour, or incomplete feature collection for a particular hour), imputation can be used to fill in the missing data. Alternatively, the incomplete set of data can be removed, and the electricity price for the next hour can be predicted using only the complete sets of electricity prices and influencing features. Then, the filled / removed sample data can be normalized or standardized to make their numerical magnitudes similar or consistent.

[0043] Meanwhile, time-related features that affect electricity prices, such as peak / valley load periods, can be converted into hot coding or sine / cosine periodic features.

[0044] It is also understood that the data preprocessing operations include, but are not limited to, those described above. Specific data processing operations can be added according to actual needs. Modifications and refinements made by those skilled in the art to the embodiments of the present invention without departing from the spirit of the present invention still fall within the scope of the invention application patent of the present invention.

[0045] Finally, a corresponding training sample set is constructed based on the sample data obtained above using the sliding window method. This set is then used to train a random forest model, thus obtaining the electricity price for the 25th hour, which is the electricity price for the first hour of the day. This can be understood as follows: after predicting the electricity price for the first hour of the day, a new training sample set can be constructed based on it, along with the electricity prices and features of the previous 23 hours. This new set is then re-input into the random forest model to predict the electricity price for the 26th hour, which is the electricity price for the second hour of the day. This process continues until the electricity price for the 24 hours of the day is predicted, thus obtaining the electricity price for each hour of the day.

[0046] Therefore, by referring to the predicted hourly electricity prices for the day, uninterruptible power supplies (UPS) can be actively involved in grid regulation, generating economic benefits by charging during low-price periods and discharging during high-price periods. To maximize the economic benefits of the UPS, and considering the lifespan and degradation costs of its energy storage components, the following first objective function is constructed:

[0047] J=∑(λ i ·P out,t Δt i -λ j ·P in,t Δt j )-C bat ·E throughputAnd i = 1, 2, 3, ..., m, j = 1, 2, 3, ..., n,

[0048] Where, λ i λ represents the electricity price when the uninterruptible power supply discharges in the i-th hour. j P represents the electricity price when the uninterruptible power supply is charging in the j-th hour. out,t P represents the rated output power of the uninterruptible power supply during discharge. in,t This represents the rated input power of the uninterruptible power supply during charging. Δt i Δt represents the discharge time of the uninterruptible power supply in the i-th hour. j This represents the charging time of the uninterruptible power supply in hour j. (C) bat E represents the cost of energy storage components. throughput This indicates the power level of the energy storage component's cycle.

[0049] Furthermore, the first objective function mentioned above is also subject to the following constraints:

[0050] The state of charge (SOC) of energy storage components needs to be maintained within a limited range to avoid overcharging or over-discharging, which could lead to excessive aging of the components.

[0051] SOC min ≤SOC t ≤SOC max Among them, SOC min This represents the lower limit of SOC. max This indicates the upper limit of SOC, and 20%–80% is generally used as an example control range.

[0052] To ensure the proper operation of energy storage components, a certain energy constraint is set on the daily discharge of the uninterruptible power supply to mitigate the price difference between peak and off-peak electricity prices, namely:

[0053] Among them, E min This represents the minimum daily discharge of an uninterruptible power supply.

[0054] Meanwhile, since the primary function of an uninterruptible power supply (UPS) is as a backup power source for data centers, it is essential to actively participate in grid regulation, ensuring it does not impact the data center, to improve UPS utilization and thereby generate economic benefits. Therefore, a power balance must be maintained between the total input / output power of the UPS, the grid output power, and the load input power.

[0055] Step S200: Use the first objective function to determine the charging or discharging time of the uninterruptible power supply (UPS) at different times of the day, so as to call the UPS to actively participate in grid regulation.

[0056] Based on the above, each hour of the day is first numbered in chronological order, and the uninterruptible power supply is set to discharge at rated output power and charge at rated input power. By maximizing the first objective function to maximize the economic benefits brought by the grid peak-shaving service, it can be determined whether the uninterruptible power supply discharges energy or charges and stores energy in each hour of the day, as well as the corresponding charging or discharging time.

[0057] Step S300: Predict the voltage fluctuation of the uninterruptible power supply at different times of the day, and construct the second objective function of the uninterruptible power supply based on it.

[0058] It is understandable that the above content assumes the uninterruptible power supply (UPS) is charging at its rated input power or discharging at its rated output power. However, to further ensure stable operation of the UPS, the actual input / output power is optimized based on historical voltage fluctuations. In practical applications, the voltage fluctuations of the UPS may be affected by grid fluctuations or the power demands of the load. These factors are not considered; the input / output power is optimized solely based on the voltage fluctuations of the UPS as a reference.

[0059] Since the charging / discharging modes of the uninterruptible power supply (UPS) for each hour have been determined, as well as the corresponding charging or discharging times, the input power of the UPS during charging or the output power during discharging can be optimized based on the voltage fluctuations over an hour.

[0060] To address this, it is first necessary to predict the voltage fluctuations within each hour of the day. This can be achieved using historical sample data. In this embodiment, the voltage fluctuations of the uninterruptible power supply (UPS) within a preset number of days can be obtained, and the state-space equations of the model predictive control algorithm can be established based on these fluctuations to predict the voltage fluctuations within each hour of the day.

[0061] Secondly, based on the voltage fluctuations at different hours, the following second objective function was constructed:

[0062]

[0063] Among them, P ref (k) represents the reference value of the uninterruptible power supply input / output power in the kth hour, P actual (k) represents the optimized input / output power of the uninterruptible power supply in the k-th hour, α represents the preset weighting coefficient, and C reliability,kThis indicates the voltage fluctuation of the uninterruptible power supply (UPS) during charging or discharging in the k-th hour. It is understood that the reference value for the UPS input / output power can be the rated input / output power or other preset values, and different reference values ​​can be defined for different hours; there are no restrictions on this.

[0064] Step S400: Optimize the input power of the uninterruptible power supply during each charge and the output power during each discharge using the second objective function.

[0065] Based on the above, the charging or discharging time of the uninterruptible power supply (UPS) for each hour is obtained. When the charging / discharging time ratio is 0, it indicates that the UPS does not need to participate in grid regulation for charging and discharging within that hour. Therefore, the summation formula in the second objective function only applies to the hours where the charging / discharging time ratio is not 0, and does not include the case where the charging / discharging time ratio is 0. By minimizing the second objective function, the optimized input power of the UPS for charging and the optimized output power for discharging can be determined for different hours.

[0066] Finally, the uninterruptible power supply can be called to charge or discharge at different times according to the corresponding input / output power, and the corresponding charging or discharging time can be maintained.

[0067] It should be noted that the steps of the various methods described above are only for clarity. In practice, they can be combined into one step or some steps can be split into multiple steps. As long as they contain the same logical relationship, they are all within the scope of protection of this patent. Adding insignificant modifications or introducing insignificant designs to the algorithm or process, but without changing the core design of the algorithm and process, are also within the scope of protection of this patent.

[0068] Example 2

[0069] Please see Figure 2 As shown, this embodiment also provides an uninterruptible power supply (UPS) scheduling system based on two-layer optimization, including:

[0070] The first function construction module 10 is used to obtain the electricity price for each time period of the day and construct the first objective function of the uninterruptible power supply based on it.

[0071] The charging / discharging time calculation module 20 is used to determine the charging or discharging time of the uninterruptible power supply in each time period of the day using the first objective function, so as to call the uninterruptible power supply to actively participate in grid regulation.

[0072] The second function construction module 30 is used to predict the voltage fluctuation of the uninterruptible power supply at different times of the day, and to construct the second objective function of the uninterruptible power supply based on it.

[0073] The charging / discharging power calculation module 40 is used to optimize the input power of the uninterruptible power supply during each charging and the output power during each discharging using the second objective function.

[0074] It should be noted that the uninterruptible power supply (UPS) scheduling system based on two-layer optimization provided in the above embodiments and the UPS scheduling method based on two-layer optimization provided in Embodiment 1 belong to the same concept. The specific methods of operation of each module and unit have been described in detail in the method embodiments and will not be repeated here. In practical applications, the UPS scheduling method based on two-layer optimization provided in Embodiment 1 can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. This is not a limitation here.

[0075] Example 3

[0076] Please see Figure 3 As shown, embodiments of this application also provide an electronic device, including a memory 2, a processor 1, and a program stored in the memory and executable on the processor, wherein the processor executes the steps of any of the methods described above.

[0077] The memory includes at least one type of readable storage medium, such as flash memory, portable hard drive, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory can be an internal storage unit of an electronic device, such as a portable hard drive. In other embodiments, the memory can be an external storage device of the electronic device, such as a plug-in portable hard drive, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc. Furthermore, the memory can include both internal and external storage units of the electronic device. The memory can be used not only to store application software and various types of data installed on the electronic device, but also to temporarily store data that has been output or will be output.

[0078] In some embodiments, the processor may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits packaged with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor is the control unit of the electronic device, connecting various components of the entire electronic device through various interfaces and lines. It executes programs or modules stored in the memory and calls data stored in the memory to perform various functions and process data of the electronic device. The processor executes the operating system and various installed application programs of the electronic device. The processor executes the application programs to implement the steps in the above method embodiments.

[0079] For example, the program may be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules may be a series of program instruction segments capable of performing a specific function, which describe the execution process of the program in the electronic device.

[0080] The integrated unit implemented as a software functional module described above can be stored in a computer-readable storage medium. This software functional module, stored in a storage medium, includes several instructions to cause a computer device (which may be a personal computer, computer equipment, or network device, etc.) or processor to execute some of the functions of the various embodiments of the present invention.

[0081] In summary, this invention provides an uninterruptible power supply (UPS) scheduling method based on two-layer optimization. By pre-determining the scheduling plan for the entire day, the UPS is actively mobilized to participate in the grid peak shaving service, generating economic benefits. Furthermore, by dynamically adjusting the input / output power of the UPS charging / discharging during the day, its stable and reliable operation is ensured.

[0082] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in the present invention should still be covered by the claims of the present invention.

Claims

1. A method for scheduling uninterruptible power supplies based on two-level optimization, characterized in that, include: Obtain the electricity price for each time period of the day, and construct the first objective function of the uninterruptible power supply based on it; The charging or discharging time of the uninterruptible power supply (UPS) during each time period of the day is determined using the first objective function, so as to mobilize the UPS to actively participate in grid regulation. The steps include: numbering each time period of the day in chronological order; presetting the UPS to discharge at rated output power and charge at rated input power, and maximizing the first objective function to determine the charging or discharging of the UPS during each time period of the day, and the corresponding charging or discharging time; wherein, the formula of the first objective function is as follows: , This represents the electricity price of an uninterruptible power supply during the t-th time period. This represents the interaction power between the uninterruptible power supply (UPS) and the power grid in time period t. This represents the degradation cost of the energy storage component in the uninterruptible power supply during the t-th time period; Predict the voltage fluctuation of an uninterruptible power supply (UPS) during different time periods of the day, and construct a second objective function for the UPS based on this prediction. The steps for predicting the voltage fluctuation of the UPS during different time periods of the day include: obtaining the voltage fluctuation data for each time period within a preset number of days, and establishing the state space equation of a model predictive control algorithm based on this data, so as to predict the voltage fluctuation of the UPS during different time periods of the day through the state space equation. For periods when the daily charging and discharging times are not zero, the second objective function is used to optimize the input power during each charging cycle and the output power during each discharging cycle of the uninterruptible power supply (UPS). The formula for the second objective function is as follows: , This represents the reference value for the input / output power of the uninterruptible power supply during the k-th time period. This represents the optimized input / output power of the uninterruptible power supply during the k-th time period. This represents the preset weighting coefficient. This indicates the voltage fluctuation of the uninterruptible power supply during the k-th time period when it is charging or discharging.

2. The uninterruptible power supply scheduling method based on two-layer optimization according to claim 1, characterized in that, The steps for optimizing the input power of the uninterruptible power supply during each charge and the output power during each discharge using the second objective function include: For each time period, exclude the periods when the charging or discharging time is 0; Based on the removed time periods, the second objective function is minimized to determine the input power of the uninterruptible power supply during each charging and the output power during each discharging.

3. The uninterruptible power supply scheduling method based on two-layer optimization according to claim 1, characterized in that, Also includes: The uninterruptible power supply is used to charge or discharge at different times according to the corresponding input / output power, and the corresponding charging or discharging time is maintained.

4. An uninterruptible power supply (UPS) scheduling system based on two-layer optimization, characterized in that, include: The first function construction module is used to obtain the electricity price for each time period of the day and construct the first objective function of the uninterruptible power supply based on it; The charging / discharging time calculation module is used to determine the charging or discharging time of the uninterruptible power supply (UPS) during each time period of the day using the first objective function, so as to call the UPS to actively participate in grid regulation. The steps include: numbering each time period of the day in chronological order; presetting the UPS to discharge at rated output power and charge at rated input power, and maximizing the first objective function to determine the charging or discharging of the UPS during each time period of the day, and the corresponding charging or discharging time; wherein, the formula of the first objective function is as follows: , This represents the electricity price of an uninterruptible power supply during the t-th time period. This represents the interaction power between the uninterruptible power supply (UPS) and the power grid in time period t. This represents the degradation cost of the energy storage component in the uninterruptible power supply during the t-th time period; The second function construction module is used to predict the voltage fluctuation of the uninterruptible power supply at different times of the day and construct the second objective function of the uninterruptible power supply based on it; wherein, the step of predicting the voltage fluctuation of the uninterruptible power supply at different times of the day includes: obtaining the voltage fluctuation of each time period within a preset number of days, and establishing the state space equation of the model predictive control algorithm based on it, so as to predict the voltage fluctuation of each time period of the day through the state space equation. The charging / discharging power calculation module is used to optimize the input power of the uninterruptible power supply (UPS) during each charging cycle and the output power during each discharging cycle using the second objective function. This includes: for periods when the daily charging and discharging times are not zero, optimizing the input power of the UPS during each charging cycle and the output power during each discharging cycle using the second objective function; wherein the formula for the second objective function is as follows: , This represents the reference value for the input / output power of the uninterruptible power supply during the k-th time period. This represents the optimized input / output power of the uninterruptible power supply during the k-th time period. This represents the preset weighting coefficient. This indicates the voltage fluctuation of the uninterruptible power supply during the k-th time period when it is charging or discharging.

5. An electronic device, characterized in that, The method includes a processor coupled to a memory storing program instructions, which, when executed by the processor, implement the method of any one of claims 1 to 3.

6. A computer-readable storage medium, characterized in that, Includes a program that, when run on a computer, causes the computer to perform the method as described in any one of claims 1 to 3.