Quantile-based energy storage control instruction generation method, device, equipment and product

By screening and analyzing the quantiles output by the prediction model, and combining them with pre-settlement price statistics and historical price difference direction accuracy, the direction of electricity market price difference is determined, and energy storage control instructions are generated. This solves the problem of inaccurate price difference direction prediction in existing technologies and improves the accuracy and reliability of electricity market prediction.

CN123184002APending Publication Date: 2026-11-27ZHONGKE ZIDONG TAICHU (BEIJING) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611026289.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-10
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately predict price spreads in the electricity market, resulting in suboptimal directional judgments in practical applications and a lack of dedicated optimization.

Method used

By obtaining the predicted price difference under multiple first candidate quantiles output by the prediction model, and combining the price statistics before settlement with the current time to select a smaller number of second candidate quantiles, the target quantile is determined based on the historical price difference direction accuracy of each second candidate quantile, and energy storage control commands are generated to control the charging and discharging state of the power energy storage system.

Benefits of technology

It improves the accuracy and robustness of electricity market price spread direction prediction, providing accurate and reliable directional basis for market participants' trading decisions, arbitrage judgments and risk control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123184002A_ABST
    Figure CN123184002A_ABST
Patent Text Reader

Abstract

The application relates to the technical fields of artificial intelligence and electric power control, and provides a quantile-based energy storage control instruction generation method, device, equipment and product. The method comprises the following steps: acquiring a predicted price difference under a plurality of first candidate quantiles output by a prediction model; determining a plurality of second candidate quantiles from the plurality of first candidate quantiles according to a pre-settlement price statistic and a current time; determining a target quantile from the plurality of second candidate quantiles based on an accuracy rate of a price difference direction indicated by each second candidate quantile in a historical time period; determining a price difference direction based on a predicted price difference corresponding to the target quantile, generating an energy storage control instruction according to the price difference direction, and sending the energy storage control instruction to an energy management system of an electric power energy storage system to control the charging and discharging state of an energy storage device. The quantile-based energy storage control instruction generation method provided by the application can improve the accuracy and robustness of price difference direction prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of artificial intelligence and power control technology, and in particular to a method, apparatus, equipment and product for generating energy storage control commands based on quantiles. Background Technology

[0002] In the electricity market, the price difference between the pre-settlement price and the actual settlement price is a key factor affecting market participants' trading decisions, arbitrage judgments, and risk control. Since the price difference is affected by a variety of factors such as supply and demand, fluctuations in new energy output, system reserve levels, unit outages, weather disturbances, and market behavior, it usually exhibits significant non-stationarity, abrupt changes, time-varying characteristics, and enhanced tail risk.

[0003] While existing technologies can directly predict price spreads or output price spread distributions, most still focus on the prediction accuracy or distribution characterization of the price spread values ​​themselves, lacking specific optimization for the more crucial aspect of price spread direction accuracy in practical applications. In other words, there may still be inconsistencies between the model training objectives and distribution modeling objectives of existing technologies and the direction judgment objectives in practical applications. This means that even if the model performs well in terms of numerical error metrics, it may not achieve ideal results in the direction judgment task.

[0004] Therefore, there is an urgent need for a technical solution that can directly predict the direction of price spreads in the electricity market in order to improve the accuracy and robustness of price spread prediction. Summary of the Invention

[0005] This application provides a method, apparatus, device, and product for generating energy storage control commands based on quantiles, which can improve the accuracy and robustness of price spread direction prediction.

[0006] This application provides a method for generating energy storage control commands based on quantiles, comprising the following steps: Obtain the predicted price difference under multiple first candidate quantiles output by the prediction model; the predicted price difference is the difference between the actual settlement price of the electricity market at the current moment and the price before settlement. Based on the pre-settlement price statistics and the current time, a plurality of second candidate quantiles are determined from the plurality of first candidate quantiles; the number of the plurality of second candidate quantiles is less than the number of the plurality of first candidate quantiles; the pre-settlement price statistics are used to quantify the level of the pre-settlement price at the current time; The target quantile is determined from the plurality of second candidate quantiles based on the accuracy of the price spread direction indicated by each second candidate quantile in the historical time period. Based on the predicted price difference corresponding to the target quantile, the direction of the price difference in the electricity market at the current moment is determined; the direction of the price difference is used to characterize the direction of the rise or fall of the actual settlement price compared with the price before settlement. Based on the direction of the price difference, an energy storage control command is generated and sent to the energy management system of the power energy storage system to control the charging and discharging status of the energy storage device.

[0007] According to the quantile-based energy storage control command generation method provided in this application, the step of determining multiple second candidate quantiles from the multiple first candidate quantiles based on the pre-settlement price statistics and the current time includes: Based on the pre-settlement price statistics, the search center quantile is determined using a price range mapping function; Based on the time period to which the current moment belongs, a search pattern is determined using a search pattern function; the search pattern includes wide search and narrow search; the search range of the wide search is greater than that of the narrow search. Based on the search center quantile and the search pattern, the plurality of second candidate quantiles are determined from the plurality of first candidate quantiles.

[0008] According to the quantile-based energy storage control command generation method provided in this application, the step of determining the target quantile from the plurality of second candidate quantiles based on the accuracy of the price difference direction indicated by each second candidate quantile in a historical time period includes: Construct a scrolling window that includes multiple first historical moments prior to the current moment; For each of the second candidate quantiles, in the first historical moment within the same time period as the current moment in the rolling window, the accuracy of the price difference direction indicated by the second candidate quantile is determined; The target quantile is determined based on the second candidate quantile, which has the highest accuracy.

[0009] According to the quantile-based energy storage control command generation method provided in this application, determining the target quantile based on the second candidate quantile with the highest accuracy includes: A first confidence level is determined for the second candidate quantile with the highest accuracy; the first confidence level is used to characterize the reliability of the price spread direction indicated by the second candidate quantile with the highest accuracy. If the first confidence level is greater than a preset first confidence threshold, the second candidate quantile with the highest accuracy is taken as the target quantile. If the first confidence level is less than the first confidence threshold, the target quantile is determined based on the current market state vector, whereby the current market state vector is used to quantify the multidimensional attribute information of the current electricity market.

[0010] According to the quantile-based energy storage control command generation method provided in this application, the step of selecting the second candidate quantile with the highest accuracy as the target quantile when the first confidence level is greater than a preset first confidence threshold includes: If the first confidence level is greater than a preset first confidence level threshold, a comprehensive switching score is determined based on the quantile performance degradation signal, the distribution skew drift signal, and the state space deviation signal. The quantile performance degradation signal is used to characterize the degree of decline in the accuracy of the recently indicated price spread direction. The distribution skew drift signal is used to characterize the skew direction of the predicted price spread distribution and the degree of continuous deviation relative to historical levels. The state space deviation signal is used to characterize the degree of deviation of the current market environment from the historical market environment. If the overall switching score is greater than a preset switching threshold, the target quantile is determined based on the current market state vector; the current market state vector is used to quantify the multidimensional attribute information of the current electricity market. If the overall switching score is less than the preset switching threshold, the second candidate quantile with the highest accuracy is taken as the target quantile.

[0011] According to the quantile-based energy storage control command generation method provided in this application, determining the target quantile based on the current market state vector includes: Discretize the current market state vector to obtain discrete market states; Based on the discrete market state and the time period to which the current time belongs, the accuracy of the price difference direction indicated by each first candidate quantile in the historical time period is determined in a pre-constructed state lookup table; the state lookup table stores the accuracy of the price difference direction indicated by each first candidate quantile in the historical time period under each combination of discrete market state and time period. The first candidate quantile with the highest accuracy is determined as the target quantile.

[0012] According to the quantile-based energy storage control command generation method provided in this application, the method further includes: If the number of historical samples corresponding to the discrete market state and the time period to which the current time belongs in the state lookup table is less than a preset threshold, determine the multiple second historical moments with the highest similarity to the current market state vector. The weight corresponding to each second historical moment is determined based on the similarity to the current market state vector; Based on the weight corresponding to each second historical moment, the accuracy indicated by each first candidate quantile at each second historical moment is weighted. The first candidate quantile with the highest weighted accuracy is determined as the target quantile.

[0013] According to the quantile-based energy storage control command generation method provided in this application, the market state vector includes a market perception index determined based on the predicted price difference of the plurality of first candidate quantiles, and the market perception index includes at least one of the following: Price spread prediction volatility index; the price spread prediction volatility index is used to predict the dispersion of price spread distribution; Price spread skewness risk index; the price spread skewness risk index is used to reflect the skewness direction of the predicted price spread distribution; Tail asymmetry index; the tail asymmetry index is used to reflect the difference between the upper tail span and the lower tail span of the predicted price spread distribution; Bimodal Spread Intensity Index; the bimodal spread intensity index is used to reflect the degree to which the predicted spread distribution exhibits a bimodal structure; Price spread directional pressure index; the price spread directional pressure index is used to reflect the degree of ambiguity of the predicted price spread distribution in determining the price spread direction.

[0014] According to the quantile-based energy storage control command generation method provided in this application, the market state vector further includes a price spread directional momentum feature, which includes at least one of the following: The percentage of times the actual price difference is positive within a preset historical time period; The percentage of times the actual price difference is negative within a preset historical time period; The frequency at which the direction of the actual price difference reverses between adjacent moments within a preset historical time period.

[0015] According to the quantile-based energy storage control command generation method provided in this application, the method further includes: Based on the market perception indicators, market tension is determined, which is used to characterize the degree of deviation of the current market environment from the historical market environment; Based on the market tension, the search range size is adjusted when determining the multiple second candidate quantiles from the multiple first candidate quantiles.

[0016] According to the quantile-based energy storage control command generation method provided in this application, the method further includes: Detect whether there is a quantile crossover phenomenon in the predicted price difference of the plurality of second candidate quantiles; the quantile crossover phenomenon means that the predicted price difference corresponding to the lower quantile among the plurality of second candidate quantiles is greater than the predicted price difference corresponding to the higher quantile; In the presence of the quantile crossover phenomenon, the predicted price difference of the plurality of second candidate quantiles is corrected, and the predicted price difference of the plurality of second candidate quantiles after correction does not exhibit the quantile crossover phenomenon.

[0017] According to the quantile-based energy storage control command generation method provided in this application, the method further includes: Based on the predicted price difference under the plurality of first candidate quantiles, the upper tail strength and lower tail strength of the prediction distribution formed by the predicted price difference under the plurality of first candidate quantiles are determined; the upper tail strength is used to characterize the degree of deviation of the predicted price difference corresponding to the high quantile in the prediction distribution from the median, and the lower tail strength is used to characterize the degree of deviation of the predicted price difference corresponding to the low quantile in the prediction distribution from the median. The target quantile is offset and corrected based on the ratio of the upper tail strength to the lower tail strength.

[0018] According to the quantile-based energy storage control command generation method provided in this application, the step of offsetting the target quantile based on the ratio of the upper tail intensity to the lower tail intensity includes: If the ratio is greater than a preset benchmark value, the target quantile is increased. If the ratio is less than the preset benchmark value, the target quantile is lowered.

[0019] According to the quantile-based energy storage control command generation method provided in this application, the step of determining the current electricity market price difference direction based on the predicted price difference corresponding to the target quantile includes: A second confidence level is determined based on the predicted price difference under the multiple first candidate quantiles; the second confidence level is used to characterize the degree of certainty regarding the direction of the price difference. If the second confidence level is greater than or equal to the preset second confidence level threshold, the direction of the price difference is determined based on the predicted price difference corresponding to the target quantile.

[0020] According to the quantile-based energy storage control command generation method provided in this application, the step of determining the price difference direction based on the predicted price difference corresponding to the target quantile when the second confidence level is greater than or equal to a preset second confidence threshold includes: The predicted price difference corresponding to the target quantile is probabilistically calibrated to obtain the calibration probability; the calibration probability is used to characterize the probability that the price difference is upward under the predicted price difference corresponding to the target quantile. If the second confidence level is greater than or equal to a preset second confidence level threshold, and the calibration probability is greater than a preset first probability threshold, the price difference direction is determined to be upward. If the second confidence level is greater than or equal to a preset second confidence level threshold, and the calibration probability is less than a preset second probability threshold, the price spread direction is determined to be downward; the second probability threshold is less than the first probability threshold.

[0021] This application also provides a quantile-based energy storage control command generation device, comprising the following modules: The acquisition module is used to acquire the predicted price difference under multiple first candidate quantiles output by the prediction model; the predicted price difference is the difference between the actual settlement price of the electricity market at the current moment and the price before settlement. The first determining module is used to determine a plurality of second candidate quantiles from the plurality of first candidate quantiles based on the pre-settlement price statistics and the current time; the number of the plurality of second candidate quantiles is less than the number of the plurality of first candidate quantiles; the pre-settlement price statistics are used to quantify the level of the pre-settlement price at the current time; The second determining module is used to determine the target quantile from the plurality of second candidate quantiles based on the accuracy of the price difference direction indicated by each second candidate quantile in the historical time period; The third determining module is used to determine the direction of the price difference in the electricity market at the current moment based on the predicted price difference corresponding to the target quantile; the direction of the price difference is used to characterize the direction of the rise or fall of the actual settlement price compared with the price before settlement; The processing module is used to generate energy storage control commands based on the direction of the price difference and send them to the energy management system of the power energy storage system to control the charging and discharging status of the energy storage device.

[0022] This application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the quantile-based energy storage control instruction generation method described above.

[0023] This application also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the energy storage control instruction generation method based on quantiles as described above.

[0024] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the energy storage control instruction generation method based on quantiles as described above.

[0025] The above technical solution effectively addresses the shortcomings of existing technologies that focus on numerical price spread prediction but lack specific optimization for price spread direction, resulting in a mismatch between modeling objectives and actual directional judgment needs. This solution relies on multiple first-candidate quantiles output by the model to obtain price spread predictions. It then combines pre-settlement price statistics with the current moment to select fewer second-candidate quantiles, accurately adapting to the current price level. By statistically analyzing the historical price spread direction accuracy of each second-candidate quantile, the target quantile is selected based on its optimal value, and the direction of price spread increase or decrease is determined accordingly. This approach optimizes price spread direction judgment throughout the process, abandoning the modeling bias of prioritizing numerical accuracy in traditional methods. It effectively improves the accuracy and robustness of price spread direction prediction in the electricity market, providing accurate and reliable directional guidance for market participants' trading decisions, arbitrage judgments, and risk control. Attached Figure Description

[0026] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0027] Figure 1 This is a flowchart illustrating a method for generating energy storage control commands based on quantiles, as provided in this application.

[0028] Figure 2 This is a schematic diagram of a quantile-based energy storage control command generation device provided in this application.

[0029] Figure 3 This is a schematic diagram of the structure of an electronic device provided in this application. Detailed Implementation

[0030] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0031] In the electricity market, the price difference between the pre-settlement price and the actual settlement price is a key factor influencing market participants' trading decisions, arbitrage judgments, and risk control. Because the price difference is affected by a variety of factors, including supply and demand, fluctuations in renewable energy output, system reserve levels, unit outages, weather disturbances, and market behavior, it typically exhibits significant non-stationarity, abrupt changes, time-varying characteristics, and enhanced tail risk. Therefore, accurately predicting the electricity price difference, especially accurately determining its direction, has become a crucial technical issue in the field of electricity market forecasting and intelligent decision-making.

[0032] Currently, existing technologies for predicting electricity price spreads can be broadly categorized into the following two technical routes.

[0033] The first type of technical approach is the direct price difference prediction approach. This type of method typically uses the electricity price difference or related deviation sequence directly as the prediction object, and combines it with multi-source features such as boundary conditions, weather conditions, and historical price differences for modeling. For example, in existing schemes, a dataset for the test day is usually first obtained. This dataset includes boundary condition data, weather condition data, and historical price difference data. This dataset is then input into the price difference prediction model, and the price difference prediction result is finally output through sampling, partitioning, or iterative processing of the sample set. This type of method is no longer limited to predicting two prices separately and then taking the difference; instead, it directly focuses on predictive modeling around the price difference object.

[0034] The second type of technical approach involves first predicting the distributions of two types of prices, and then deriving the price spread distribution. This type of method typically performs point or probability predictions on the pre-settlement price and the actual settlement price separately, and then derives the predicted price spread through methods such as differencing, joint distribution modeling, or integral mapping. For example, in existing schemes, the probability distributions of the two types of prices can be modeled separately first, then the dependency between them can be characterized based on the joint distribution relationship, and finally the probability distribution prediction of the price spread can be obtained through distribution mapping. This type of method can better characterize features such as price skewness, peaks, and correlations, thus providing a probabilistic basis for price spread risk analysis.

[0035] However, while existing technologies can directly predict price spreads or output price spread distributions, most still focus on the prediction accuracy of the price spread values ​​themselves or the ability to characterize the distribution, lacking specific optimization for the more crucial aspect of price spread direction accuracy in practical applications. In other words, there may still be inconsistencies between the model training objectives and distribution modeling objectives of existing technologies and the direction judgment objectives in practical applications. This means that even if the model performs well in terms of numerical error metrics, it may not achieve ideal results in the direction judgment task.

[0036] Therefore, there is an urgent need for a technical solution that can directly predict the direction of price spreads in the electricity market in order to improve the accuracy and robustness of price spread prediction.

[0037] Based on this, this application provides a method for generating energy storage control commands based on quantiles. This method can obtain the predicted price difference under multiple first candidate quantiles output by a prediction model. The predicted price difference is the difference between the actual settlement price of the electricity market at the current moment and the price before settlement. Based on the pre-settlement price statistics and the current moment, multiple second candidate quantiles are determined from the multiple first candidate quantiles, with the number of second candidate quantiles being less than the number of first candidate quantiles. The pre-settlement price statistics are used to quantify the level of the pre-settlement price at the current moment. Based on the accuracy of the price difference direction indicated by each second candidate quantile in a historical time period, a target quantile is determined from the multiple second candidate quantiles. Based on the predicted price difference corresponding to the target quantile, the price difference direction of the electricity market at the current moment is determined. The price difference direction is used to characterize the rise or fall direction of the actual settlement price compared to the pre-settlement price.

[0038] The above technical solution effectively addresses the shortcomings of existing technologies that focus on numerical price spread prediction but lack specific optimization for price spread direction, resulting in a mismatch between modeling objectives and actual directional judgment needs. This solution relies on multiple first-candidate quantiles output by the model to obtain price spread predictions. It then combines pre-settlement price statistics with the current moment to select fewer second-candidate quantiles, accurately adapting to the current price level. By statistically analyzing the historical price spread direction accuracy of each second-candidate quantile, the target quantile is selected based on its optimal value, and the direction of price spread increase or decrease is determined accordingly. This approach optimizes price spread direction judgment throughout the process, abandoning the modeling bias of prioritizing numerical accuracy in traditional methods. It effectively improves the accuracy and robustness of price spread direction prediction in the electricity market, providing accurate and reliable directional guidance for market participants' trading decisions, arbitrage judgments, and risk control.

[0039] The following is combined Figures 1 to 3 This application describes a method for generating energy storage control commands based on quantiles, as provided in its embodiments.

[0040] Figure 1 This is a flowchart illustrating a method for generating energy storage control commands based on quantiles, as provided in this application. Figure 1 As shown, the method includes the following steps S101-S105.

[0041] S101, obtain the predicted price difference under multiple first candidate quantiles output by the prediction model.

[0042] The forecast price spread is the difference between the actual settlement price and the price before settlement in the electricity market at the current predicted moment. In one example, the difference between the actual settlement price and the price before settlement (also called the price spread) can be expressed as: in, This represents the price difference at time t. This represents the actual settlement price at time t. This represents the price before settlement at time t.

[0043] The embodiments of this application directly use the price difference as the prediction object, which can effectively avoid the problem of error accumulation caused by separately predicting the actual settlement price and the price before settlement and then performing difference, thereby reducing the problem of superposition of prediction errors from the source.

[0044] The prediction model can also be called a basic probability prediction model. Multiple first candidate quantiles can be pre-set. For example, multiple first candidate quantiles can include quantiles such as 0.05, 0.25, 0.50, 0.75, and 0.95.

[0045] Specifically, the feature sequence consisting of each first candidate quantile and historical data before the current time can be input into the prediction model, and the prediction model can output the predicted price difference under each first candidate quantile.

[0046] In one example, the set containing multiple first candidate quantiles is used as the complete set of candidate quantiles. For example, the prediction model can be represented as: in, This represents the predicted price difference at the first candidate quantile q. This represents a feature sequence composed of historical data up to the current time t. This represents the prediction model.

[0047] In one example, the prediction model can be represented as a conditional distribution function. Specifically, the prediction model can be represented as: in, Indicating in the feature sequence The probability that the target price difference is less than y.

[0048] In the above technical solution, by outputting the predicted price difference under multiple first candidate quantiles, the low-tail, median and high-tail structure of the price difference prediction distribution can be characterized, providing a more sufficient information basis for subsequent dynamic selection of quantiles.

[0049] S102, based on the price statistics before settlement and the current time, determine multiple second candidate quantiles from multiple first candidate quantiles.

[0050] The number of multiple second candidate quantiles is less than the number of multiple first candidate quantiles.

[0051] Pre-settlement price statistics are used to quantify the pre-settlement price level at the current moment. In one example, the pre-settlement price statistics can be the pre-settlement price, the average of the pre-settlement prices at multiple moments before the current moment, the median of the pre-settlement prices at multiple moments before the current moment, etc. This application embodiment does not specifically limit the pre-settlement price statistics.

[0052] In one example, S102 can be specifically implemented as follows: based on the price statistics before settlement, determine the search center quantile through a price interval mapping function; determine the search pattern through a search pattern function according to the time period to which the current time belongs (which can be called the target time period); and determine multiple second candidate quantiles from multiple first candidate quantiles based on the search center quantile and the search pattern.

[0053] Search patterns include wide search and narrow search, with wide search having a wider search scope than narrow search.

[0054] Wide search refers to selecting multiple second candidate quantiles from multiple first candidate quantiles, centered on the search center quantile, to cover the low-tail, median, and high-tail regions of the predicted distribution. It is suitable for periods of high volatility or uncertainty. Narrow search refers to selecting multiple second candidate quantiles from multiple first candidate quantiles, centered on the search center quantile, focusing on the vicinity of the center. It is suitable for periods of relatively stable or highly certain markets.

[0055] In one example, the pre-settlement price statistic is used as... For example, the search center quantile is determined using the price range mapping function g(·). It can be represented as: In one example, the price range mapping function g(·) can be expressed in the form of a linear mapping as follows: in, and These are the lower and upper bounds of the search center quantile, respectively. and These represent the minimum and maximum values ​​of the historical price statistics before settlement, respectively. Through this mapping, when the price statistics before settlement... When the price is in a high range, the search center quantile can automatically shift to a higher quantile, reflecting a market prior with a higher probability of a positive price spread, as shown in the pre-settlement price statistics. When the price is in a low range, the search center quantile can be automatically shifted down to a lower quantile to accommodate the increased probability of a negative price spread.

[0056] In one example, based on the target time period, a search pattern function is used. Determining the search pattern can be represented as: in, For the index of the target time period, Indicates a narrow search. This indicates a wide search.

[0057] In one example, the determined set containing multiple second candidate quantiles can be called the partial candidate quantile set. .

[0058] S103, determine the target quantile from multiple second candidate quantiles based on the accuracy of the price spread direction indicated by each second candidate quantile in the historical time period.

[0059] In one example, S103 above can be specifically implemented as: constructing a scrolling window, which can include multiple historical moments before the current moment (hereinafter referred to as the first historical moment). In one example, taking the current moment as time t and the number of first historical moments as L, i.e., the length of the scrolling window as L, the constructed scrolling window can be represented as follows: .

[0060] For each second candidate quantile, within the first historical time period that is in the same time period as the current time in the rolling window, determine the accuracy of the price difference direction indicated by the second candidate quantile. Based on the second candidate quantile with the highest accuracy, determine the target quantile.

[0061] "Belonging to the same time period as the current time" means that the time period index is the same as the current time period. The time period to which the current time belongs is used as... For example, the set of simultaneous segments consisting of the first historical moments belonging to the same time period as the current moment in the scrolling window can be represented as follows: .

[0062] To quantify the accuracy of the price difference direction indicated by each second candidate quantile q at time t, a direction-hit reward function can be defined. : in, This represents the true price difference at time t for the second candidate quantile q. This represents the predicted price difference at time t for the second candidate quantile q. The actual price difference at time t for the second candidate quantile q. Price difference with forecast When the signs are consistent, =1; otherwise It is 0.

[0063] The rolling strategy, expressed by the following formula, outputs the second candidate quantile with the highest accuracy, which is the target quantile: in, This represents the second candidate quantile with the highest accuracy.

[0064] In one example, the complete scrolling strategy described above The form can be expressed as: In one example, determining the target quantile based on the second candidate quantile with the highest accuracy can be implemented as follows: First, determine the first confidence level of the second candidate quantile with the highest accuracy (hereinafter referred to as the rolling strategy confidence level). The rolling strategy confidence level characterizes the reliability of the price spread direction indicated by the second candidate quantile with the highest accuracy. If the rolling strategy confidence level is greater than a preset first confidence level threshold (hereinafter referred to as the rolling strategy confidence threshold), the second candidate quantile with the highest accuracy is used as the target quantile. If the rolling strategy confidence level is less than the rolling strategy confidence threshold, the target quantile is determined based on the current market state vector.

[0065] The current market state vector is used to quantify the multidimensional attribute information of the current electricity market. The strategy described above for determining the target quantile based on the current market state vector can be called a state-conditional strategy.

[0066] In one example, the confidence level of a rolling strategy can be expressed as: The above formula allows us to determine the rolling strategy confidence level for the second candidate quantile, which offers the highest accuracy. At this rolling strategy confidence level... > Confidence threshold for rolling strategy In this case, the second candidate quantile with the highest accuracy can be used as the target quantile. < In such cases, a state-conditional strategy can be switched to, which determines the target quantile based on the current market state vector to form a confidence fallback mechanism.

[0067] The specific process of determining the target quantile based on the current market state vector will be described in detail later and will not be discussed here.

[0068] In one example, the above direction hits the reward function. It can be replaced with the following magnitude-weighted directional hit reward function. express: Where k is the normalized scroll window length. It is a minimal stability constant greater than 0, used to avoid the denominator being zero and to ensure computational stability.

[0069] To simultaneously select high-stability and high-accuracy quantiles and avoid misselection caused by occasional hits in a single sample, one example can define a risk-adjusted hit rate. This risk-adjusted hit rate is used to comprehensively evaluate the sustained hit performance of quantiles by combining the reward mean and volatility variance. The expression for the risk-adjusted hit rate is: in, This represents the mean of the directional hit reward sequence corresponding to the second candidate quantile q within a rolling window of length k, and characterizes the average hit level of the quantile. It represents the standard deviation of the directional hit reward sequence corresponding to the second candidate quantile q within a rolling window of length k, and characterizes the degree of fluctuation in quantile hit performance.

[0070] Within the overall technical framework of this application, the directional hit reward function Amplitude-weighted directional hit reward function Risk-adjusted hit rate These three elements can be flexibly replaced, and can replace all parts of the text involving reward statistics, accuracy calculations, strategy scoring, and confidence assessments. The calculation location forms a multi-dimensional, adaptable, and systematic performance evaluation and upgrade solution to meet the evaluation needs of different market fluctuations and risk scenarios.

[0071] S104, based on the predicted price difference corresponding to the target quantile, determine the direction of the price difference in the electricity market at the current moment.

[0072] S105 generates energy storage control commands based on the direction of the price difference and sends them to the energy management system of the power energy storage system to control the charging and discharging status of the energy storage equipment.

[0073] The direction of the price spread is used to characterize the direction of the actual settlement price compared to the price before settlement.

[0074] Specifically, after determining the target quantile, the predicted price difference at the current moment can be determined to be upward if the predicted price difference corresponding to the target quantile is positive, and downward if the predicted price difference corresponding to the target quantile is negative. Then, energy storage control commands can be generated based on the price difference direction and sent to the energy management system of the power energy storage system. Upon receiving the intelligent control commands, the energy management system can control the charging and discharging status of the energy storage devices.

[0075] The above technical solution effectively addresses the shortcomings of existing technologies that focus on numerical price spread prediction but lack specific optimization for price spread direction, resulting in a mismatch between modeling objectives and actual directional judgment needs. This solution relies on multiple first-candidate quantiles output by the model to obtain price spread predictions. It then combines pre-settlement price statistics with the current moment to select fewer second-candidate quantiles, accurately adapting to the current price level. By statistically analyzing the historical price spread direction accuracy of each second-candidate quantile, the target quantile is selected based on its optimal value, and the direction of price spread increase or decrease is determined accordingly. This approach optimizes price spread direction judgment throughout the process, abandoning the modeling bias of prioritizing numerical accuracy in traditional methods. It effectively improves the accuracy and robustness of price spread direction prediction in the electricity market, providing accurate and reliable directional guidance for market participants' trading decisions, arbitrage judgments, and risk control.

[0076] The market state vector will be explained in detail below.

[0077] This application does not specifically limit the market state vector. For example, the market state vector may include, but is not limited to: system pressure, net load ramp-up, wind power penetration rate, photovoltaic penetration rate, reserve margin, outage rate, day-ahead price position, lag spread, quantile span, quantile skewness, and characteristics such as temperature, wind speed, and irradiance deviation.

[0078] In one example, the market state vector may further include a market perception indicator determined based on predicted spreads from multiple first candidate quantiles. This market perception indicator may include at least one of the following: Expected Spread Volatility Index (ESVI), Spread Skew Risk Index (SSRI), Spread Tail Asymmetry Index (STAI), Spread Bimodality Intensity Index (SBII), and Spread Directional Pressure Index (SDPI).

[0079] ESVI reflects the dispersion of the predicted price spread distribution, which refers to the predicted price spread formed by multiple first candidate quantiles. A larger ESVI indicates a greater difference between the predicted price spreads at higher and lower quantiles among the first candidate quantiles; a smaller ESVI indicates a smaller difference between the predicted price spreads at higher and lower quantiles among the first candidate quantiles. In one example, ESVI can be expressed as: Among them, the mean calculation item The calculation formula is: in, Indicates the quantile interval.

[0080] SSRI is used to reflect the skewness of the predicted spread distribution. It can effectively identify the left-right asymmetry of the spread prediction distribution and reflect the risk of one-sided deviation of the market spread.

[0081] In one example, SSRI can be represented as: in, , , These represent the predicted price differences corresponding to the 0.75, 0.5, and 0.25 quantiles at time t. It is a very small constant used to avoid the denominator being zero and to ensure computational stability.

[0082] STAI is used to reflect the difference between the upper and lower tail spans of the predicted spread distribution, that is, to reflect the difference in the degree of deviation between the upper and lower tails of the predicted distribution. It accurately reflects the deviation difference between the upper and lower tails of the distribution and can quantify the asymmetric characteristics of extreme spread risk in the market.

[0083] In one example, STAI can be represented as: in, Let be the predicted price difference corresponding to the 0.95 quantile at time t. .

[0084] SBII is used to reflect the degree of bimodal structure in the distribution of predicted price spreads, and can identify the polarization characteristics of market price spreads.

[0085] In one example, SBII can be represented as: in, , These represent the predicted price differences corresponding to the 0.875 and 0.125 quantiles at time t, respectively.

[0086] Furthermore, a preset bimodal threshold can be used. Determine the distribution pattern: when the following conditions are met When the predicted price spread distribution triggers a bimodal pattern, the bimodal indicator value is set. Based on this determination, the search range for candidate quantiles at time t can be determined. By shifting towards the two ends of the quantile, the trough of the bimodal structure is avoided, effectively improving the accuracy of price spread direction judgment.

[0087] SDPI is used to reflect the degree of ambiguity in the prediction of the spread direction. In one example, SDPI can be expressed as: in, The cumulative probability of the predicted distribution at zero, which is composed of the predicted price difference under multiple first candidate quantiles, can be estimated by linear interpolation of adjacent quantiles. The closer the value is to 1, the more significant the predicted spread distribution crosses the zero axis, and the more ambiguous and uncertain the market spread's bullish or bearish direction becomes; conversely, The closer it is to 0, the clearer the trend of the price spread.

[0088] In one example, in addition to the market perception indicators mentioned above, the market state vector may also include price spread direction momentum features, which include at least one of the following: the percentage of positive true price spreads within a preset historical time period; the percentage of negative true price spreads within a preset historical time period; and the frequency of reversals in the true price spread direction between adjacent times within a preset historical time period.

[0089] Taking a historical time period of length L within a scrolling window as an example, the percentage of actual price differences that are positive is... It can be represented as: in, This represents the true price difference at time tj.

[0090] The percentage of true price differences that are negative. It can be represented as: Frequency of reversal of the direction of the true price difference between adjacent time points It can be represented as: in, The closer the value is to 1, the more frequently the price difference direction reverses within the rolling window, indicating a lack of market trend continuity. In this case, it is appropriate to select a quantile near the median to conduct price difference prediction and judgment. The closer the quantile is to 0, the more stable the price spread is and the more significant the trend inertia is. In this case, prioritizing the quantile that is biased towards the current dominant market direction can effectively improve the accuracy of the judgment.

[0091] In one example, after obtaining the current market state vector, each market state vector can be standardized separately in order to unify the units of measurement.

[0092] The formula for standardizing the market state vector can be expressed as: in, This represents the standardized market state vector. This represents the market state vector before standardization. and These represent the mean and standard deviation of the market state vector within the rolling window, respectively.

[0093] In one example, when the market state vector includes market perception indicators, the market tension can be determined based on the market perception indicators. Market tension is used to characterize the degree of deviation of the current market environment from the historical market environment. Based on the market tension, the search range size when determining multiple second candidate quantiles from multiple first candidate quantiles is adjusted.

[0094] Specifically, the five market perception indicators included in the market perception index—spread prediction volatility index, spread skewness risk index, tail asymmetry index, spread bimodal strength index, and spread directional pressure index—can be integrated using the following formula to obtain a joint perception vector. : Among them, the rolling skew drift amount It can be represented as: Dynamic skew drift It can be used as a detection signal for continuous changes in the direction of skew.

[0095] The market tension can then be determined using the following formula. : In the formula, v is a preset fixed risk weight vector for each market perception indicator, which is obtained through prior human configuration or offline training, and is used to characterize the contribution priority of each market perception indicator to abnormal market conditions.

[0096] Once market tension is determined, the search range (e.g., wide search or narrow search) for determining multiple second-candidate quantiles from multiple first-candidate quantiles can be adjusted based on this tension. Specifically, higher market tension indicates a greater deviation from historical norms, more volatile price spread distributions, unclear bullish / bearish directions, prominent extreme risks, and a more chaotic overall market condition; in this case, the search range can be expanded. Conversely, lower market tension indicates a market that closely follows historical norms, operates smoothly, and has strong certainty in price spread trends; in this case, the search range can be narrowed.

[0097] In one example, the above refers to the confidence level of the rolling strategy. Greater than the confidence threshold of the rolling strategy In this case, the second candidate quantile with the highest accuracy is used as the target quantile, which can be implemented as follows: If the confidence level of the rolling strategy is greater than the preset confidence level threshold, the comprehensive switching score is determined based on the quantile performance degradation signal, distribution skew drift signal, and state space deviation signal. If the comprehensive switching score is greater than the preset switching threshold, the target quantile is determined based on the current market state vector. If the comprehensive switching score is less than the preset switching threshold, the second candidate quantile with the highest accuracy is taken as the target quantile.

[0098] The specific process of determining the target quantile based on the current market state vector can be found in the following description, which will not be elaborated here.

[0099] The current market state vector can be referred to in the above description of the market state vector, and will not be repeated here.

[0100] Among them, the three types of switching signals—quantile performance degradation signal, distribution skew drift signal, and state space deviation signal—describe the differences between the current model operation and historical norms from three dimensions: historical quantile performance, predicted distribution pattern, and macroeconomic market state, respectively, as detailed below.

[0101] The quantile performance degradation signal is used to characterize the decline in the accuracy of recently indicated price spread directions, depicting the real-time performance degradation characteristics of a rolling strategy. A larger value indicates a more significant degradation in the historical hit rate of the recent best quantile, and a lower reliability of the rolling strategy. In one example, the quantile performance degradation signal can be represented as: In the formula, Let k be the length of the recent scroll window, where k is less than L. This represents the second candidate quantile with the highest accuracy at historical time j. A larger value for this metric indicates a more significant degradation in the historical hit rate of the second candidate quantile with the highest recent accuracy, and a lower reliability of the rolling strategy.

[0102] The distribution skewness drift signal is used to characterize the skewness direction of the predicted price spread formed by multiple first candidate quantiles, and the degree of continuous shift relative to historical levels; it reflects the structural drift of the price spread probability distribution shape. The larger the value, the more significant the deviation of the current price spread distribution asymmetry from historical norms. In one example, the distribution skewness drift signal can be represented as: in, This represents the rolling standard deviation of the long-window SSRI series, characterizing the steady-state fluctuation range of historical skewness. The larger the value of the distribution skewness drift signal, the more significant the deviation of the current price spread distribution asymmetry from historical norms.

[0103] State-space deviation signals are used to characterize the degree of deviation of the current market environment from historical market environments, quantifying the overall level of market disorder and anomaly, and comprehensively reflecting the overall deviation of the current multidimensional market state. In one example, the state-space deviation signal can be represented as: in, This is due to market tension.

[0104] After obtaining the quantile performance degradation signal, distribution skew drift signal, and state space deviation signal using the above method, the comprehensive switching score can be determined using the following formula. : in, , , These are preset fixed weighting coefficients, corresponding to the decision contribution weights of three types of signals: quantile performance degradation signals, distribution skew drift signals, and state space deviation signals. (Comprehensive switching score) The higher the value, the more severe the current market distribution pattern deviation, the more significant the historical performance degradation of the quantile, the stronger the market state deviates from the norm, and the higher the necessity of strategy switching.

[0105] To avoid the rigidity of judgment caused by a fixed switching threshold, this scheme adopts a rolling quantile adaptive threshold mechanism, which determines the switching threshold using the following formula. : In the formula, W represents the length of the scrolling window. This formula dynamically calculates the adaptive switching threshold by extracting the combined switching scores of the W historical moments preceding the current moment, replacing the fixed threshold determination method. This allows the switching boundary to adaptively evolve with market fluctuations over time, effectively adapting to the market fluctuation baseline of different time periods and avoiding the rigidity of static threshold determination.

[0106] Based on the above description, the conditions for switching decision-making strategies can be expressed as follows: That is: confidence level of the rolling strategy Or a comprehensive switching score In this case, At this point, the current market state vector can be used to determine the target quantile, i.e., a state-conditional strategy can be used to determine the target quantile. (Regarding the confidence level of the rolling strategy...) Furthermore, the overall switching score In this case, a rolling strategy can be adopted, that is... Figure 1 The target quantile is determined as shown.

[0107] The process of determining the target quantile based on the current market state vector will be described below.

[0108] In one example, the above method of determining the target quantile based on the current market state vector can be specifically implemented as follows: the current market state vector is discretized to obtain discrete market states; based on the discrete market states and the time period to which the current time belongs, the accuracy of the price difference direction indicated by each first candidate quantile in the historical time period is determined in a pre-built state lookup table, and the first candidate quantile with the highest accuracy is determined as the target quantile.

[0109] The state lookup table stores the accuracy of the price spread direction indicated by each first candidate quantile in the historical time period under each combination of discrete market state and time period.

[0110] Specifically, the current market state vector can be represented by the following formula. Discretization is performed to obtain discrete market states. This mapping allows high-dimensional continuous states to be quantized into indexable discrete states, effectively reducing the difficulty of scene matching.

[0111] Taking the time period h as an example, for any discrete state s, samples with discrete state s and time period h can be selected from historical data to construct a historical sample set: State-conditional policies can be constructed based on historical sample sets. The expression for a state-conditional policy can be: In the formula, This represents the number of valid historical samples with discrete state s and time period h in the historical data. The target quantile is determined based on the current market state vector.

[0112] In one example, if the number of historical samples corresponding to the discrete market state and the time period to which the current time belongs (i.e., the number of effective historical samples mentioned above) in the state lookup table is less than a preset threshold, multiple historical moments (i.e., second historical moments) with the highest similarity to the current market state vector can be determined. Based on the similarity to the current market state vector, the weight corresponding to each second historical moment is determined. Based on the weight corresponding to each second historical moment, the accuracy indicated by each first candidate quantile at each second historical moment is weighted, and the first candidate quantile with the highest weighted accuracy is determined as the target quantile.

[0113] In real-world electricity market scenarios, some discrete market states occur infrequently and have scarce historical samples, easily leading to insufficient historical coverage and sparse samples in the state lookup table, thus reducing the statistical reliability of the aforementioned state condition strategies. To address this issue, this embodiment introduces a K-nearest neighbor historical state weighting strategy as a fallback compensation mechanism for sparse states. This strategy overcomes the sample limitations of strict discrete state matching and mines similar historical samples through high-dimensional market state similarity matching, achieving adaptive optimization of quantiles.

[0114] This strategy uses a Gaussian kernel function to quantify the similarity between the current market state and historical market states, constructing adaptive weights for the samples. The similarity calculation formula is defined as follows: In the formula, Let be the market state vector at the current time t. Let j be the market state vector corresponding to the second historical moment. express and Similarity; The L2 distance between the current state vector and the historical state vector is used to characterize the degree of state difference. The preset state Gaussian kernel bandwidth hyperparameter is used to control the decay rate of similarity weights.

[0115] After determining the similarity between the market state vector at each historical moment and the current market state vector using the above formula, the K second historical moments with the highest similarity to the current market state vector can be selected to form a nearest neighbor sample set. Then, based on the similarity between the K second historical moments and the current market state vector, the weight corresponding to each of these historical moments can be determined. The specific expression is: This formula assigns weighted values ​​to the judgment effects of different historical samples based on state similarity. The higher the similarity of the historical sample, the greater its contribution to the current quantile selection, which is in line with the characteristics of the current market operation.

[0116] In one example, a three-layer policy switching mechanism can be constructed based on the number of valid historical samples to achieve optimal adaptation under different sample sparsity levels. The specific switching rules are as follows: When the number of valid historical samples satisfy When there are sufficient valid historical samples, a state-conditional strategy can be adopted. When the number of valid historical samples satisfy When the effective historical samples are sparse and insufficiently covered, a K-nearest neighbor weighted compensation strategy can be adopted. When the number of valid historical samples satisfy < When this occurs, it indicates that valid historical samples are extremely scarce, and a rolling strategy can be adopted initially. Figure 1 The target quantile is determined in the manner shown. .

[0117] in, , Two preset sample size thresholds are used to define the regions with sufficient samples and those with sparse samples, respectively. This hierarchical switching mechanism can effectively solve the problem of quantile selection failure caused by discrete state sparsity and lack of historical scenarios, taking into account the matching accuracy of normal scenarios and the robustness of sparse scenarios, and comprehensively improving the stability of price difference direction determination under different market conditions.

[0118] In one example, a soft routing mechanism can be used to weight different decision-making modes, achieving multi-mode result fusion output. The dynamic weight calculation formula for each decision-making mode is as follows: In the formula, The weight is the weight of the m-th decision mode at the current moment; m represents the various pre-set decision modes, specifically including system stress mode, weather disturbance mode, tail risk mode, performance degradation mode, and normal mode. The score represents the matching score between the current working condition and the m-th decision mode; m' is the traversal index of all preset decision modes, and the denominator represents the summation of the exponent terms of all decision modes, completing the weight normalization. This method no longer selects a single decision mode, but rather integrates the quantile results of multiple modes based on the real-time weights of each mode to obtain the final target quantile.

[0119] In one example, it is also possible to detect whether there is a quantile crossover phenomenon in the predicted price difference of multiple second candidate quantiles. If the quantile crossover phenomenon exists, the predicted price difference of multiple second candidate quantiles is corrected, and the corrected predicted price difference of multiple second candidate quantiles does not have a quantile crossover phenomenon.

[0120] Quantile crossover refers to the phenomenon where the predicted price difference corresponding to the lower quantile among multiple second candidate quantiles is greater than the predicted price difference corresponding to the higher quantile. ,but .

[0121] First, we define a quantile cross-detection metric to determine whether the current second candidate quantile prediction sequence has an order disorder problem. The specific expression is as follows: Using the above expression, if there exists any set of predicted price differences corresponding to high and low quantiles that are out of order, then 1. Confirm the existence of quantile crossover; if the predicted price difference of all quantiles strictly satisfies the monotonically non-decreasing property, then 0 indicates that there is no quantile crossover and no correction is needed.

[0122] When detected The predicted price difference between multiple second candidate quantiles can be corrected using the following formula: In the formula, This represents the original predicted price difference corresponding to the second candidate quantile. The corrected predicted price difference to be optimized is the solution to be obtained. As a monotonic constraint, the new sequence obtained is required to remain monotonically constant as the quantile increases.

[0123] After correction, the monotonic price difference sequence after order-preserving correction is used for prediction. It replaces the original predicted price difference and participates in the entire process of subsequent calculations, including quantile hit rate statistics, strategy scoring calculation, target quantile selection, and price difference direction determination. This method can effectively ensure the physical rationality and logical consistency of the multi-quantile prediction distribution, avoid problems such as strategy failure and judgment bias caused by quantile crossover defects, and improve the stability and reliability of the overall prediction framework.

[0124] In one example, the upper tail strength and lower tail strength of the prediction distribution (i.e., the prediction price difference distribution) formed by the prediction price difference under multiple first candidate quantiles can be determined based on the prediction price difference under multiple first candidate quantiles. The target quantile is then offset and corrected based on the ratio of the upper tail strength to the lower tail strength.

[0125] The upper tail strength characterizes the deviation of the predicted price difference corresponding to the high quantile in the prediction distribution from the median, while the lower tail strength characterizes the deviation of the predicted price difference corresponding to the low quantile in the prediction distribution from the median.

[0126] In one example, the above-mentioned offset correction of the target quantile based on the ratio of the upper tail strength to the lower tail strength includes: raising the target quantile when the ratio is greater than a preset reference value; and lowering the target quantile when the ratio is less than a preset reference value.

[0127] The upper tail strength of the predicted price spread distribution is used as The lower tail strength of the predicted price spread distribution is The ratio of upper tail strength to lower tail strength can be expressed as: Tail strength ratio It can intuitively depict the difference in strength between the upper and lower tails of the forecast distribution, reflecting the relative dominance of extreme upward and downward risks.

[0128] To further improve the standardization and scenario adaptability of the tail strength ratio, one example is to use the tail asymmetry index. A standardized tail strength ratio is constructed to replace the original direct ratio calculation method, avoiding the defects of inconsistent dimensions and drastic fluctuations in the original strength ratio. The expression for the standardized tail strength ratio is as follows: This mapping can smoothly transform tail asymmetric features into intensity weights that can be used for quantile shifts, thus enabling the quantification of tail risk.

[0129] Then, the target quantile can be offset using the following formula: In the formula, The target quantile before offset correction. The target quantile after offset correction. This is the preset tail offset correction function.

[0130] In one example, the aforementioned tail offset correction function This can be defined as a truncated linear offset, and correspondingly, the tail offset correction function can be expressed as: In the formula, The preset offset step size, The truncation constraint function ensures that the corrected quantiles are always within the valid range, preventing quantiles from going out of bounds and becoming invalid.

[0131] when When the value is greater than 1, it indicates a stronger upper tail in the predicted distribution and a more prominent positive extreme risk in the market, allowing for an upward shift of the target quantile; when... When <1, it indicates a stronger lower tail in the predicted distribution and a dominance of negative extreme market risk, allowing for a downward shift of the target quantile; when When = 1, the distribution tails are symmetrical and the quantiles remain unchanged.

[0132] By using this tail strength adaptive offset correction, the limitations of fixed quantile selection can be overcome, and the final target quantile can be dynamically matched with the asymmetric tail structure of the current price spread prediction distribution, which significantly improves the accuracy and robustness of price spread direction judgment under extreme market conditions and asymmetric fluctuation scenarios in the power market.

[0133] In one example, the above method of determining the current direction of the electricity market price difference based on the predicted price difference corresponding to the target quantile can be implemented as follows: a second confidence level (hereinafter referred to as the direction confidence level) is determined based on the predicted price difference under multiple first candidate quantiles; the direction confidence level is used to characterize the degree of certainty about the current direction of the price difference; when the direction confidence level is greater than or equal to the preset second confidence level threshold (hereinafter referred to as the direction confidence threshold), the direction of the price difference is determined based on the predicted price difference corresponding to the target quantile.

[0134] In one example, when the direction confidence is greater than or equal to a preset direction confidence threshold, the direction of the price difference is determined based on the predicted price difference corresponding to the target quantile. Specifically, this can be implemented as follows: The predicted price difference corresponding to the target quantile is probabilistically calibrated to obtain the calibration probability. The calibration probability is used to characterize the probability that the price difference is upward under the predicted price difference corresponding to the target quantile. If the direction confidence is greater than or equal to the preset direction confidence threshold and the calibration probability is greater than the preset first probability threshold, the price difference is determined to be upward. If the direction confidence is greater than or equal to the preset direction confidence and the calibration probability is less than the preset second probability threshold, the price difference is determined to be downward. The second probability threshold is less than the first probability threshold.

[0135] Specifically, the direction confidence level can be determined based on the following formula. : In the formula, To predict the cumulative probability of the price spread distribution reaching zero, it can be estimated through linear interpolation of adjacent first candidate quantiles. Directional confidence. The larger the value, the stronger the certainty of the direction; direction confidence. The smaller the value, the higher the uncertainty in direction.

[0136] To avoid poor adaptability issues with fixed directional confidence thresholds, one approach is to construct the directional confidence threshold using a time-series rolling quantile method. The specific expression is: When the direction confidence satisfies When the current direction is determined to be predictable, the direction of rise or fall can be output; when the confidence level of the direction is satisfied... < When the current direction is extremely uncertain, a neutral abstention mechanism is triggered, and no conclusion on whether the price will rise or fall is output.

[0137] To further correct the inherent bias of the model predictions and improve the reasonableness of the probability output, one example is to use Platt scaling to perform probability calibration on the predicted price difference corresponding to the target quantile, and output the calibration probability. The specific formula is: In the formula, The predicted price difference corresponding to the target quantile; This is the sigmoid activation function, used to map the output to the probability range of 0 to 1; , The online scaling parameters are updated in real time, dynamically updated by fitting the most recent n historical samples with maximum likelihood, ensuring that the probability calibration results are adapted to the latest market characteristics in real time. This is the calibration probability.

[0138] Based on the adaptive confidence judgment condition and calibration probability, the final three-state direction output rule can be constructed. (Setting...) The first probability threshold, It is the second probability threshold, and satisfies < The final output logic is as follows: When satisfied > and At that time, the output price difference direction is upward, that is... When satisfied < and At that time, the output price spread direction is downward, that is... In all other scenarios, a neutral abstention state is output uniformly, i.e. 0, without forcibly determining the direction of price difference rise or fall.

[0139] This three-state output and online calibration mechanism can effectively solve the misjudgment problem of traditional binary output models in scenarios with ambiguous and volatile markets. Through uncertainty-aware waiver and dynamic probability calibration, it can significantly improve the safety and robustness of price spread direction prediction.

[0140] After completing the tail strength shift correction and quantile cross-detection processes sequentially using the methods described above, the optimal final target quantile at the current moment can be determined as follows: Based on this final quantile, the corresponding predicted price difference is extracted, and the final predicted price difference satisfies: In the formula, This represents the final predicted price difference output at the current moment. This represents the predicted price difference corresponding to the final target quantile after correction.

[0141] To achieve time-series iterative optimization of strategy parameters and dynamic adaptation to market conditions, this solution constructs a sample rolling update mechanism. As the time series unfolds, the current feature sequence and the actual price difference sample form newly added valid historical samples, which are incorporated into the rolling window in real time to complete the window's iterative update. The specific update method is as follows: In the formula, Let be the historical rolling window sample set at time t. For the historical feature sequence at time t, Let be the true price difference at time t. A mechanism for incorporating new samples is used to achieve real-time updates and time-series iterations of the rolling window sample set.

[0142] In one example, this application can set three levels of update frequencies, forming a fast-medium-slow three-speed online adaptive closed loop: First layer: Real-time updates per sample, specifically a rolling strategy. The momentum feature of the price spread direction is updated with each new sample, ensuring an immediate response to recent market changes.

[0143] The second layer: batch mid-frequency updates, specifically, state condition strategies. KNN strategy weights and subsequent online scaling parameters , After accumulating a preset number Δn new samples, the data is updated in batches to adapt to the gradual changes in the market state structure in the medium term.

[0144] The third layer: periodic long-term retraining. Specifically, the prediction model parameters are fully retrained after accumulating a second preset number of ΔN (ΔN ≫ Δn) new samples to cope with long-term structural drift in the market.

[0145] The three-layer update frequency together constitute a complete multi-granularity online optimization system of rapid response, medium-term adaptation and long-term correction, forming a complete closed-loop adaptive mechanism of probability prediction, price range positioning, time period search, MISI perception, strategy switching, quantile correction, three-state output and layered online update.

[0146] Through the above technical solution, this application directly uses the price difference as the prediction target, abandoning the method of predicting the two types of prices separately and then performing difference calculations. This effectively reduces the error accumulation caused by difference calculations, ensuring that the model training target is consistent with the actual price difference direction evaluation target, and significantly improving the accuracy of price difference direction judgment. This solution fully utilizes the multi-quantile information output by the basic probability prediction model to build a dynamic quantile decision layer. It can flexibly adjust the quantile selection logic based on market conditions, price ranges, and time period characteristics, greatly enhancing the flexibility and scenario adaptability of the prediction strategy. This solution integrates multiple technologies such as joint perception vectors, comprehensive switching scores, state lookup tables, K-nearest neighbor historical state weighted strategies, K-nearest neighbor historical state weighted strategy detection, and STAI tail asymmetry correction. It can quickly identify abnormal conditions such as abrupt changes in price difference distribution patterns, bimodal structures, and strategy performance degradation, and adaptively switch decision logic, exhibiting better robustness in complex market environments with high volatility and non-stationarity. Simultaneously, relying on rolling optimization and hierarchical online update mechanisms, the entire model and strategy can be continuously iterated and optimized based on new samples, effectively avoiding the problem of long-term failure of fixed strategies and meeting the actual operational and decision-making needs of dynamic changes in the electricity market. This solution integrates multiple types of information such as price range, time period characteristics, market status, and forecast distribution into a unified quantile decision framework, improving the interpretability and implementability of price spread direction prediction results. The solution also introduces a three-state output mechanism for directional uncertainty perception and an online post-calibration layer. When the forecast distribution crosses the zero axis and the market direction is highly uncertain, it actively outputs a neutral conclusion while continuously correcting the model's forecast bias, strengthening the reliability of decision-making and risk control capabilities under extreme uncertainty scenarios.

[0147] Furthermore, this application sets up a three-speed hierarchical update mode for different functional components, namely, real-time update per sample, batch mid-frequency update, and long-term periodic retraining, which respectively realizes the immediate response of rolling strategy and directional momentum features, state lookup table, mid-term adaptation of KNN weights and post-calibration parameters, and long-term structural correction of the basic probability prediction model. It constructs a multi-granularity online optimization system of "fast response - mid-term adaptation - long-term correction", forming a complete closed-loop adaptive mechanism for coverage probability prediction, price range positioning, time period search, MISI perception, strategy switching, quantile correction, three-state output, and hierarchical online update. This solves the overfitting or response lag problem that is easily caused by uniform update frequency, and further ensures the long-term stable and efficient operation of the entire system.

[0148] The quantile-based energy storage control command generation device provided in this application is described below. The quantile-based energy storage control command generation device described below and the quantile-based energy storage control command generation method described above can be referred to in correspondence.

[0149] Figure 2 A schematic diagram of a quantile-based energy storage control command generation device provided in this application embodiment is shown below. Figure 2 As shown, the device includes: The acquisition module 201 is used to acquire the predicted price difference under multiple first candidate quantiles output by the prediction model; the predicted price difference is the difference between the actual settlement price of the electricity market at the current moment and the price before settlement. The first determining module 202 is used to determine a plurality of second candidate quantiles from the plurality of first candidate quantiles based on the pre-settlement price statistics and the current time; the number of the plurality of second candidate quantiles is less than the number of the plurality of first candidate quantiles; the pre-settlement price statistics are used to quantify the level of the pre-settlement price at the current time; The second determining module 203 is used to determine the target quantile from the plurality of second candidate quantiles based on the accuracy of the price difference direction indicated by each second candidate quantile in the historical time period; The third determining module 204 is used to determine the direction of the price difference in the electricity market at the current moment based on the predicted price difference corresponding to the target quantile; the direction of the price difference is used to characterize the direction of the rise or fall of the actual settlement price compared with the price before settlement; The processing module 205 is used to generate energy storage control commands according to the direction of the price difference and send them to the energy management system of the power energy storage system to control the charging and discharging status of the energy storage device.

[0150] Figure 3 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 3 As shown, the electronic device may include: a processor 310, a communications interface 320, a memory 330, and a communication bus 340, wherein the processor 310, the communications interface 320, and the memory 330 communicate with each other via the communication bus 340. The processor 310 can call logical instructions in the memory 330 to execute a quantile-based energy storage control instruction generation method, which includes: Obtain the predicted price difference under multiple first candidate quantiles output by the prediction model; the predicted price difference is the difference between the actual settlement price of the electricity market at the current moment and the price before settlement. Based on the pre-settlement price statistics and the current time, a plurality of second candidate quantiles are determined from the plurality of first candidate quantiles; the number of the plurality of second candidate quantiles is less than the number of the plurality of first candidate quantiles; the pre-settlement price statistics are used to quantify the level of the pre-settlement price at the current time; The target quantile is determined from the plurality of second candidate quantiles based on the accuracy of the price spread direction indicated by each second candidate quantile in the historical time period. Based on the predicted price difference corresponding to the target quantile, the direction of the price difference in the electricity market at the current moment is determined; the direction of the price difference is used to characterize the direction of the rise or fall of the actual settlement price compared with the price before settlement. Based on the direction of the price difference, an energy storage control command is generated and sent to the energy management system of the power energy storage system to control the charging and discharging status of the energy storage device.

[0151] Furthermore, the logical instructions in the aforementioned memory 330 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0152] On the other hand, this application also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the quantile-based energy storage control instruction generation method provided by the above methods, the method including: Obtain the predicted price difference under multiple first candidate quantiles output by the prediction model; the predicted price difference is the difference between the actual settlement price of the electricity market at the current moment and the price before settlement. Based on the pre-settlement price statistics and the current time, a plurality of second candidate quantiles are determined from the plurality of first candidate quantiles; the number of the plurality of second candidate quantiles is less than the number of the plurality of first candidate quantiles; the pre-settlement price statistics are used to quantify the level of the pre-settlement price at the current time; The target quantile is determined from the plurality of second candidate quantiles based on the accuracy of the price spread direction indicated by each second candidate quantile in the historical time period. Based on the predicted price difference corresponding to the target quantile, the direction of the price difference in the electricity market at the current moment is determined; the direction of the price difference is used to characterize the direction of the rise or fall of the actual settlement price compared with the price before settlement. Based on the direction of the price difference, an energy storage control command is generated and sent to the energy management system of the power energy storage system to control the charging and discharging status of the energy storage device.

[0153] Furthermore, this application also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, is implemented to perform the quantile-based energy storage control instruction generation method provided by the above methods, the method comprising: Obtain the predicted price difference under multiple first candidate quantiles output by the prediction model; the predicted price difference is the difference between the actual settlement price of the electricity market at the current moment and the price before settlement. Based on the pre-settlement price statistics and the current time, a plurality of second candidate quantiles are determined from the plurality of first candidate quantiles; the number of the plurality of second candidate quantiles is less than the number of the plurality of first candidate quantiles; the pre-settlement price statistics are used to quantify the level of the pre-settlement price at the current time; The target quantile is determined from the plurality of second candidate quantiles based on the accuracy of the price spread direction indicated by each second candidate quantile in the historical time period. Based on the predicted price difference corresponding to the target quantile, the direction of the price difference in the electricity market at the current moment is determined; the direction of the price difference is used to characterize the direction of the rise or fall of the actual settlement price compared with the price before settlement. Based on the direction of the price difference, an energy storage control command is generated and sent to the energy management system of the power energy storage system to control the charging and discharging status of the energy storage device.

[0154] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0155] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0156] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A method for generating energy storage control commands based on quantiles, characterized in that, The method includes: Obtain the predicted price difference under multiple first candidate quantiles output by the prediction model; the predicted price difference is the difference between the actual settlement price of the electricity market at the current moment and the price before settlement. Based on the pre-settlement price statistics and the current time, a plurality of second candidate quantiles are determined from the plurality of first candidate quantiles; the number of the plurality of second candidate quantiles is less than the number of the plurality of first candidate quantiles; the pre-settlement price statistics are used to quantify the level of the pre-settlement price at the current time; The target quantile is determined from the plurality of second candidate quantiles based on the accuracy of the price spread direction indicated by each second candidate quantile in the historical time period. Based on the predicted price difference corresponding to the target quantile, the direction of the price difference in the electricity market at the current moment is determined; the direction of the price difference is used to characterize the direction of the rise or fall of the actual settlement price compared with the price before settlement. Based on the direction of the price difference, an energy storage control command is generated and sent to the energy management system of the power energy storage system to control the charging and discharging status of the energy storage device.

2. The method for generating energy storage control commands based on quantiles according to claim 1, characterized in that, The step of determining multiple second candidate quantiles from the multiple first candidate quantiles based on pre-settlement price statistics and the current time includes: Based on the pre-settlement price statistics, the search center quantile is determined using a price range mapping function; Based on the time period to which the current moment belongs, a search pattern is determined using a search pattern function; the search pattern includes wide search and narrow search; the search range of the wide search is greater than that of the narrow search. Based on the search center quantile and the search pattern, the plurality of second candidate quantiles are determined from the plurality of first candidate quantiles.

3. The method for generating energy storage control commands based on quantiles according to claim 1 or 2, characterized in that, The determination of the target quantile from the plurality of second candidate quantiles based on the accuracy of the price spread direction indicated by each second candidate quantile in the historical time period includes: Construct a scrolling window that includes multiple first historical moments prior to the current moment; For each of the second candidate quantiles, in the first historical moment within the same time period as the current moment in the rolling window, the accuracy of the price difference direction indicated by the second candidate quantile is determined; The target quantile is determined based on the second candidate quantile, which has the highest accuracy.

4. The method for generating energy storage control commands based on quantiles according to claim 3, characterized in that, Determining the target quantile based on the second candidate quantile with the highest accuracy includes: A first confidence level is determined for the second candidate quantile with the highest accuracy; the first confidence level is used to characterize the reliability of the price spread direction indicated by the second candidate quantile with the highest accuracy. If the first confidence level is greater than a preset first confidence threshold, the second candidate quantile with the highest accuracy is taken as the target quantile. If the first confidence level is less than the first confidence threshold, the target quantile is determined based on the current market state vector, whereby the current market state vector is used to quantify the multidimensional attribute information of the current electricity market.

5. The method for generating energy storage control commands based on quantiles according to claim 4, characterized in that, The step of selecting the second candidate quantile with the highest accuracy as the target quantile when the first confidence level is greater than a preset first confidence threshold includes: If the first confidence level is greater than a preset first confidence level threshold, a comprehensive switching score is determined based on the quantile performance degradation signal, the distribution skew drift signal, and the state space deviation signal. The quantile performance degradation signal is used to characterize the degree of decline in the accuracy of the recently indicated price spread direction. The distribution skew drift signal is used to characterize the skew direction of the predicted price spread distribution and the degree of continuous deviation relative to historical levels. The state space deviation signal is used to characterize the degree of deviation of the current market environment from the historical market environment. If the overall switching score is greater than a preset switching threshold, the target quantile is determined based on the current market state vector; the current market state vector is used to quantify the multidimensional attribute information of the current electricity market. If the overall switching score is less than the preset switching threshold, the second candidate quantile with the highest accuracy is taken as the target quantile.

6. The method for generating energy storage control commands based on quantiles according to claim 4 or 5, characterized in that, Determining the target quantile based on the current market state vector includes: Discretize the current market state vector to obtain discrete market states; Based on the discrete market state and the time period to which the current time belongs, the accuracy of the price difference direction indicated by each first candidate quantile in the historical time period is determined in a pre-constructed state lookup table; the state lookup table stores the accuracy of the price difference direction indicated by each first candidate quantile in the historical time period under each combination of discrete market state and time period. The first candidate quantile with the highest accuracy is determined as the target quantile.

7. The method for generating energy storage control commands based on quantiles according to claim 6, characterized in that, The method further includes: If the number of historical samples corresponding to the discrete market state and the time period to which the current time belongs in the state lookup table is less than a preset threshold, determine the multiple second historical moments with the highest similarity to the current market state vector. The weight corresponding to each second historical moment is determined based on the similarity to the current market state vector; Based on the weight corresponding to each second historical moment, the accuracy indicated by each first candidate quantile at each second historical moment is weighted. The first candidate quantile with the highest weighted accuracy is determined as the target quantile.

8. The method for generating energy storage control commands based on quantiles according to claim 6, characterized in that, The market state vector includes a market perception indicator determined based on the predicted price spread of the plurality of first candidate quantiles, and the market perception indicator includes at least one of the following: Price spread prediction volatility index; the price spread prediction volatility index is used to predict the dispersion of price spread distribution; Price spread skewness risk index; the price spread skewness risk index is used to reflect the skewness direction of the predicted price spread distribution; Tail asymmetry index; the tail asymmetry index is used to reflect the difference between the upper tail span and the lower tail span of the predicted price spread distribution; Bimodal Spread Intensity Index; the bimodal spread intensity index is used to reflect the degree to which the predicted spread distribution exhibits a bimodal structure; Price spread directional pressure index; the price spread directional pressure index is used to reflect the degree of ambiguity of the predicted price spread distribution in determining the price spread direction.

9. The method for generating energy storage control commands based on quantiles according to claim 8, characterized in that, The market state vector also includes a spread directional momentum feature, which includes at least one of the following: The percentage of times the actual price difference is positive within a preset historical time period; The percentage of times the actual price difference is negative within a preset historical time period; The frequency at which the direction of the actual price difference reverses between adjacent moments within a preset historical time period.

10. The method for generating energy storage control commands based on quantiles according to claim 8, characterized in that, The method further includes: Based on the market perception indicators, market tension is determined, which is used to characterize the degree of deviation of the current market environment from the historical market environment; Based on the market tension, the search range size is adjusted when determining the multiple second candidate quantiles from the multiple first candidate quantiles.

11. The method for generating energy storage control commands based on quantiles according to claim 1 or 2, characterized in that, The method further includes: Detect whether there is a quantile crossover phenomenon in the predicted price difference of the plurality of second candidate quantiles; the quantile crossover phenomenon means that the predicted price difference corresponding to the lower quantile among the plurality of second candidate quantiles is greater than the predicted price difference corresponding to the higher quantile; In the presence of the quantile crossover phenomenon, the predicted price difference of the plurality of second candidate quantiles is corrected, and the predicted price difference of the plurality of second candidate quantiles after correction does not exhibit the quantile crossover phenomenon.

12. The method for generating energy storage control commands based on quantiles according to claim 1 or 2, characterized in that, The method further includes: Based on the predicted price difference under the plurality of first candidate quantiles, the upper tail strength and lower tail strength of the prediction distribution formed by the predicted price difference under the plurality of first candidate quantiles are determined; the upper tail strength is used to characterize the degree of deviation of the predicted price difference corresponding to the high quantile in the prediction distribution from the median, and the lower tail strength is used to characterize the degree of deviation of the predicted price difference corresponding to the low quantile in the prediction distribution from the median. The target quantile is offset and corrected based on the ratio of the upper tail strength to the lower tail strength.

13. The method for generating energy storage control commands based on quantiles according to claim 12, characterized in that, The step of shifting and correcting the target quantile based on the ratio of the upper tail strength to the lower tail strength includes: If the ratio is greater than a preset benchmark value, the target quantile is increased. If the ratio is less than the preset benchmark value, the target quantile is lowered.

14. The method for generating energy storage control commands based on quantiles according to claim 1 or 2, characterized in that, Determining the direction of the current electricity market price spread based on the predicted price spread corresponding to the target quantile includes: A second confidence level is determined based on the predicted price difference under the multiple first candidate quantiles; the second confidence level is used to characterize the degree of certainty regarding the direction of the price difference. If the second confidence level is greater than or equal to the preset second confidence level threshold, the direction of the price difference is determined based on the predicted price difference corresponding to the target quantile.

15. The method for generating energy storage control commands based on quantiles according to claim 14, characterized in that, When the second confidence level is greater than or equal to a preset second confidence threshold, determining the direction of the price difference based on the predicted price difference corresponding to the target quantile includes: The predicted price difference corresponding to the target quantile is probabilistically calibrated to obtain the calibration probability; the calibration probability is used to characterize the probability that the price difference is upward under the predicted price difference corresponding to the target quantile. If the second confidence level is greater than or equal to a preset second confidence level threshold, and the calibration probability is greater than a preset first probability threshold, the price difference direction is determined to be upward. If the second confidence level is greater than or equal to a preset second confidence level threshold, and the calibration probability is less than a preset second probability threshold, the price spread direction is determined to be downward; the second probability threshold is less than the first probability threshold.

16. A quantile-based energy storage control command generation device, characterized in that, The device includes: The acquisition module is used to acquire the predicted price difference under multiple first candidate quantiles output by the prediction model; the predicted price difference is the difference between the actual settlement price of the electricity market at the current moment and the price before settlement. The first determining module is used to determine a plurality of second candidate quantiles from the plurality of first candidate quantiles based on the pre-settlement price statistics and the current time; the number of the plurality of second candidate quantiles is less than the number of the plurality of first candidate quantiles; the pre-settlement price statistics are used to quantify the level of the pre-settlement price at the current time; The second determining module is used to determine the target quantile from the plurality of second candidate quantiles based on the accuracy of the price difference direction indicated by each second candidate quantile in the historical time period; The third determining module is used to determine the direction of the price difference in the electricity market at the current moment based on the predicted price difference corresponding to the target quantile; the direction of the price difference is used to characterize the direction of the rise or fall of the actual settlement price compared with the price before settlement; The processing module is used to generate energy storage control commands based on the direction of the price difference and send them to the energy management system of the power energy storage system to control the charging and discharging status of the energy storage device.

17. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the quantile-based energy storage control instruction generation method as described in any one of claims 1 to 15.

18. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the quantile-based energy storage control instruction generation method as described in any one of claims 1 to 15.

19. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the quantile-based energy storage control instruction generation method as described in any one of claims 1 to 15.