Adaptive sampling method for power market price sampling point and related device
Patent Information
- Application Number
- CN202610952238.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-29
- Publication Date
- 2026-09-25
AI Technical Summary
然而,固定采样间隔系数缺乏对电价曲线波动的自适应性,容易造成冗余采样或关键信息丢失
本发明电力市场电价采样点自适应采样方法,通过获取目标周期的初步电价预测曲线作为决策基础,通过调用基于强化学习模型构建的采样间隔系数确定模型来生成采样间隔系数组,利用强化学习的决策能力学习电价曲线形态与最优采样间隔系数之间的复杂映射关系;最终根据采样间隔系数组和预设的采样间隔确定电价采样点。其中,采样间隔系数确定模型的奖励函数被配置为:基于电价采样点的重构电价曲线的精度越高则奖励值越大,以及电价采样点的采样率越低则奖励值越大,即奖励重构精度和惩罚高采样率,构建了一个引导采样间隔系数确定模型进行多目标优化的机制,使得采样间隔系数确定模型能够在预测精度与计算效率这两个相互冲突的目标之间自主寻求最佳的平衡点,使得采样间隔系数确定模型能够根据初步电价预测曲线的波动情况自适应地调整采样间隔系数,以实现在电价平缓区域采用大间隔采样以降低计算成本,在电价波动剧烈区域采用小间隔采样以捕捉关键特征,从而在整体上大幅减少输入复杂市场出清机理模型的预测点数,显著缩短计算耗时,降低计算成本,且能够保证重构电价曲线的趋势准确度,为电力现货市场的实时运营监测提供有力的技术支撑。
Smart Images

Figure CN122820263A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of power system dispatch automation and relates to an adaptive sampling method and related devices for electricity market price sampling points. Background Technology
[0002] With the addition of diverse and uncertain resources to the power system, electricity price data exhibits characteristics of high frequency, massive volume, and multi-source heterogeneity. In the electricity spot market, accurate electricity price forecasting is crucial for market participants to formulate bidding strategies and allocate generating capacity. Currently, the data-model joint-driven forecasting paradigm is gradually becoming a research hotspot. This paradigm, based on a known market clearing mechanism model, uses data-driven methods to predict the unknown input parameters of the mechanism model, and then inputs these parameters into the mechanism model to complete electricity price simulation, significantly improving the accuracy of electricity price forecasting.
[0003] However, this high-precision advantage comes at the cost of introducing a complex mechanistic model solution process, resulting in significant computational overhead. In a model-data jointly driven forecasting framework, the computation time for electricity price forecasting is primarily limited by the complexity of solving the market clearing mechanism model. If a traditional full-volume high-frequency sampling method is used, such as sampling one electricity price point every 15 minutes, the large number of sampling points will lead to repeated calls to the mechanistic model, making it difficult to meet the actual response speed requirements of the electricity spot market. Specifically, electricity price sampling points refer to a selective selection of time points from the complete electricity price forecast time series. The mechanistic model is only run to calculate electricity prices for these sampling points, while the electricity price forecasts for the remaining time points are reconstructed using interpolation methods.
[0004] To improve computational efficiency, a common approach is to reduce the number of electricity price sampling points by setting a fixed sampling interval coefficient, i.e., setting one electricity price sampling point at each fixed preset sampling interval. However, the fixed sampling interval coefficient lacks adaptability to fluctuations in the electricity price curve, easily leading to redundant sampling or loss of key information. Although this sampling method can expand the sampling interval, thereby reducing the number of electricity price sampling points and lowering computational costs, it is highly prone to causing the loss of key features of the electricity price curve (such as peaks and troughs), resulting in distortion of the reconstructed electricity price curve. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of the prior art and provide an adaptive sampling method and related apparatus for electricity market price sampling points.
[0006] To achieve the above objectives, the present invention employs the following technical solution: In a first aspect, the present invention provides an adaptive sampling method for electricity market price sampling points, comprising: acquiring a preliminary electricity price prediction curve for a target period; based on the preliminary electricity price prediction curve, calling a preset sampling interval coefficient determination model to obtain a sampling interval coefficient set for electricity price sampling points in the target period; wherein the sampling interval coefficient set includes several sampling interval coefficients, and the sampling interval coefficient is the number of sampling intervals between adjacent electricity price sampling points; based on the sampling interval coefficient set and combined with a preset sampling interval, determining each electricity price sampling point in the target period; wherein the sampling interval coefficient determination model is constructed based on a reinforcement learning model; the reward function of the sampling interval coefficient determination model is configured such that: the higher the accuracy of the reconstructed electricity price curve based on the electricity price sampling points, the larger the reward value; and the lower the sampling rate of the electricity price sampling points, the larger the reward value.
[0007] Optionally, the step of calling a preset sampling interval coefficient determination model based on the preliminary electricity price prediction curve to obtain a sampling interval coefficient set for the electricity price sampling points of the target period includes: converting the preliminary electricity price prediction curve into a preliminary electricity price prediction array according to a preset sampling interval; normalizing the preliminary electricity price prediction array, and when the preliminary electricity price prediction curve includes at least two dimensions, sequentially concatenating the normalization results corresponding to each dimension to obtain a preprocessed preliminary electricity price prediction array; otherwise, using the normalization result as the preprocessed preliminary electricity price prediction array; inputting the preprocessed preliminary electricity price prediction array into the preset sampling interval coefficient determination model to obtain a sampling interval coefficient set for the electricity price sampling points of the target period; wherein, the sampling interval coefficient is not less than a preset first sampling interval coefficient threshold and not greater than a preset second sampling interval coefficient threshold.
[0008] Optionally, the sampling interval coefficient determines the model's reward function. for:
[0009] in, To improve the accuracy of reconstructing the electricity price curve based on electricity price sampling points; The sampling rate penalty weighting coefficient; The sampling rate is the sampling rate for electricity price sampling points.
[0010] Optionally, the accuracy of the reconstructed electricity price curve based on electricity price sampling points... We obtain it from the following formula:
[0011]
[0012]
[0013] in, The number of dimensions of the electricity price curve. For dimension The similarity of the reconstructed electricity price curves, For dimension The mean square error of the reconstructed electricity price curve, This is the scaling factor. For time period, To reconstruct the electricity price curve Electricity price, For the real electricity price curve at time The electricity price at that time; When the electricity price sampling point is used, It was predicted through a pre-set electricity market clearing mechanism model; at time... When not a sampling point for electricity prices, Through time Adjacent electricity price sampling points This is obtained by linear interpolation.
[0014] Optional, at time When not a sampling point for electricity prices, We obtain it from the following formula:
[0015] in, for of , for of , moments on the timeline The adjacent electricity price sampling point on the left, moments on the timeline The adjacent electricity price sampling point on the right.
[0016] Optionally, the sampling interval coefficient determination model is constructed based on a near-end policy optimization reinforcement learning model.
[0017] In a second aspect, the present invention provides an adaptive sampling system for electricity market price sampling points, comprising: a data acquisition module for acquiring a preliminary electricity price prediction curve for a target period; a model invocation module for invoking a preset sampling interval coefficient determination model based on the preliminary electricity price prediction curve to obtain a sampling interval coefficient set for electricity price sampling points in the target period; wherein the sampling interval coefficient set includes several sampling interval coefficients, and the sampling interval coefficient is the number of sampling intervals between adjacent electricity price sampling points; and a sampling execution module for determining each electricity price sampling point in the target period based on the sampling interval coefficient set and a preset sampling interval; wherein the sampling interval coefficient determination model is constructed based on a reinforcement learning model; and the reward function of the sampling interval coefficient determination model is configured such that the higher the accuracy of the reconstructed electricity price curve based on the electricity price sampling points, the larger the reward value, and the lower the sampling rate of the electricity price sampling points, the larger the reward value.
[0018] Optionally, the model calling module is specifically used for: converting the preliminary electricity price prediction curve into a preliminary electricity price prediction array according to a preset sampling interval; normalizing the preliminary electricity price prediction array, and when the preliminary electricity price prediction curve includes at least two dimensions, sequentially concatenating the normalization results corresponding to each dimension to obtain a preprocessed preliminary electricity price prediction array; otherwise, using the normalization result as the preprocessed preliminary electricity price prediction array; inputting the preprocessed preliminary electricity price prediction array into a preset sampling interval coefficient determination model to obtain a sampling interval coefficient group for the electricity price sampling points of the target period; wherein, the sampling interval coefficient is not less than a preset first sampling interval coefficient threshold and not greater than a preset second sampling interval coefficient threshold.
[0019] Optionally, the sampling interval coefficient determines the model's reward function. for:
[0020] in, To improve the accuracy of reconstructing the electricity price curve based on electricity price sampling points; The sampling rate penalty weighting coefficient; The sampling rate is the sampling rate for electricity price sampling points.
[0021] Optionally, the accuracy of the reconstructed electricity price curve based on electricity price sampling points... We obtain it from the following formula:
[0022]
[0023]
[0024] in, The number of dimensions of the electricity price curve. For dimension The similarity of the reconstructed electricity price curves, For dimension The mean square error of the reconstructed electricity price curve, This is the scaling factor. For time period, To reconstruct the electricity price curve Electricity price, For the real electricity price curve at time The electricity price at that time; When the electricity price sampling point is used, It was predicted through a pre-set electricity market clearing mechanism model; at time... When not a sampling point for electricity prices, Through time Adjacent electricity price sampling points This is obtained by linear interpolation.
[0025] Optional, at time When not a sampling point for electricity prices, We obtain it from the following formula:
[0026] in, for of , for of , moments on the timeline The adjacent electricity price sampling point on the left, moments on the timeline The adjacent electricity price sampling point on the right.
[0027] Optionally, the sampling interval coefficient determination model is constructed based on a near-end policy optimization reinforcement learning model.
[0028] In a third aspect, the present invention provides a computer 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 steps of the adaptive sampling method for electricity market price sampling points.
[0029] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the adaptive sampling method for electricity market price sampling points.
[0030] Compared with the prior art, the present invention has the following beneficial effects: The present invention provides an adaptive sampling method for electricity market price sampling points. It obtains a preliminary electricity price prediction curve for the target period as a decision basis, generates a sampling interval coefficient set by calling a sampling interval coefficient determination model built based on a reinforcement learning model, and uses the decision-making ability of reinforcement learning to learn the complex mapping relationship between the shape of the electricity price curve and the optimal sampling interval coefficient. Finally, it determines the electricity price sampling point based on the sampling interval coefficient set and the preset sampling interval. The reward function of the sampling interval coefficient determination model is configured such that the higher the accuracy of the reconstructed electricity price curve based on the electricity price sampling points, the greater the reward value; and the lower the sampling rate of the electricity price sampling points, the greater the reward value. That is, it rewards reconstruction accuracy and penalizes high sampling rates, thus constructing a mechanism to guide the sampling interval coefficient determination model to perform multi-objective optimization. This allows the model to autonomously seek the optimal balance between the two conflicting objectives of prediction accuracy and computational efficiency. The model can adaptively adjust the sampling interval coefficient according to the fluctuation of the preliminary electricity price prediction curve, so as to use large-interval sampling in areas with flat electricity prices to reduce computational costs, and small-interval sampling in areas with drastic price fluctuations to capture key features. This significantly reduces the number of prediction points input into the complex market clearing mechanism model, significantly shortens the computation time, reduces computational costs, and ensures the trend accuracy of the reconstructed electricity price curve, providing strong technical support for real-time operation monitoring of the electricity spot market. Attached Figure Description
[0031] Figure 1 This is a flowchart of the adaptive sampling method for electricity market price sampling points according to an embodiment of the present invention.
[0032] Figure 2 This is a block diagram of the adaptive sampling system for electricity market price sampling points according to an embodiment of the present invention. Detailed Implementation
[0033] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0034] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0035] The present invention will now be described in further detail with reference to the accompanying drawings: See Figure 1 In one embodiment of the present invention, an adaptive sampling method for electricity market price sampling points is provided, which aims to solve the problems of long computation time and insufficient real-time performance caused by repeated calls to complex mechanism models due to unreasonable electricity price sampling point settings in the data-model joint-driven prediction paradigm.
[0036] Specifically, the adaptive sampling method for electricity market price sampling points of the present invention includes the following steps: S1: Obtain the preliminary electricity price forecast curve for the target period.
[0037] Explanatoryly, step S1 is used to provide initial input data for the adaptive sampling process of the present invention. The preliminary electricity price forecast curve can be the result of a preliminary prediction of the electricity price for a target period (e.g., the next day) using any data-driven method in the prior art, such as time series analysis and neural network prediction models. This preliminary electricity price forecast curve represents an unsampled, complete estimate of the electricity price trend and serves as the basis for subsequent electricity price sampling point sampling and electricity price curve reconstruction operations.
[0038] S2: Based on the preliminary electricity price prediction curve, call the preset sampling interval coefficient determination model to obtain the sampling interval coefficient group of the electricity price sampling points for the target period.
[0039] The sampling interval coefficient group includes several sampling interval coefficients, which represent the number of sampling intervals between adjacent electricity price sampling points.
[0040] Explained, step S2 utilizes a trained sampling interval coefficient determination model to make adaptive sampling decisions. The sampling interval coefficient determination model is a pre-trained reinforcement learning model whose core function is to map the morphological features of the initial electricity price prediction curve into the optimal electricity price sampling point sampling strategy. Specifically, the sampling interval coefficient set, as the output of the sampling interval coefficient determination model, is a sequence containing multiple sampling interval coefficients. Each sampling interval coefficient defines the number of sampling intervals to skip between one electricity price sampling point and the next. For example, if the preset sampling interval is 5 minutes, a sampling interval coefficient of 3 means that there are 3 preset sampling intervals, or 15 minutes, between two electricity price sampling points. By combining different sampling interval coefficients, a non-uniform, adaptive sampling scheme can be output.
[0041] S3: Based on the sampling interval coefficient group and the preset sampling interval, determine the electricity price sampling points for the target period.
[0042] Explained, step S3 is used to convert the abstract sampling interval coefficients output by the sampling interval coefficient determination model into actual electricity price sampling points on the time axis. The preset sampling interval is the smallest time unit on the entire time axis, such as 5 minutes, 15 minutes, or 1 hour. Based on the first sampling interval coefficient in the sampling interval coefficient group, the interval length between the first electricity price sampling points can be determined from the starting point, thereby locating the position of the second electricity price sampling point; then, based on the second sampling interval coefficient, the third electricity price sampling point is located from the second electricity price sampling point, and so on, until the entire target period is covered.
[0043] Explaining the process, in determining each electricity price sampling point sequentially based on the sampling interval coefficient set, boundary processing is required when the time of the next electricity price sampling point calculated according to the current sampling interval coefficient exceeds the final time of the target period. Specifically, in this case, the sampling point is no longer set according to the theoretical time calculated by the sampling interval coefficient, but the final time is directly set as the last electricity price sampling point. This processing method ensures that the sampling scheme is always strictly limited to the time range of the target period, avoiding invalidity or errors caused by electricity price sampling points exceeding the boundary. Ultimately, these determined time points are the electricity price sampling points for accurate electricity price prediction using complex electricity market clearing mechanism models.
[0044] In the adaptive sampling method for electricity market prices provided by this invention, steps S1 to S3 constitute a complete closed-loop decision-making and execution process. Step S1 obtains an initial prediction curve reflecting the macroeconomic trend of electricity prices, providing a decision-making basis for the agent. Step S2 utilizes a reinforcement learning model to intelligently generate a variable-length, non-uniform sampling interval coefficient set based on the local morphological features of the curve. This is the core decision-making step for achieving cost reduction during periods of stability and precision preservation during periods of fluctuation. Step S3 maps the agent's decision results to the time axis of the physical world, precisely locking in the specific moment that needs to be calculated.
[0045] The sampling interval coefficient determination model is constructed based on a reinforcement learning model. The reward function of the sampling interval coefficient determination model is configured such that the higher the accuracy of the reconstructed electricity price curve based on the electricity price sampling points, the greater the reward value, and the lower the sampling rate of the electricity price sampling points, the greater the reward value.
[0046] Explained, the sampling interval coefficient determination model is built upon a reinforcement learning model, which leverages the decision-making capabilities of reinforcement learning to learn the complex mapping relationship between the shape of the electricity price curve and the optimal sampling interval coefficient. The reward function of the sampling interval coefficient determination model is configured such that the higher the accuracy of the reconstructed electricity price curve based on the electricity price sampling points, the greater the reward value; and the lower the sampling rate of the electricity price sampling points, the greater the reward value. This rewards reconstruction accuracy and penalizes high sampling rates, constructing a mechanism to guide the sampling interval coefficient determination model in multi-objective optimization. This allows the model to autonomously seek the optimal balance between the conflicting objectives of prediction accuracy and computational efficiency. The model can adaptively adjust the sampling interval coefficient based on the fluctuations of the initial electricity price prediction curve, using large-interval sampling in areas of stable electricity prices to reduce computational costs, and small-interval sampling in areas of volatile electricity prices to capture key features. This significantly reduces the number of prediction points input into the complex market clearing mechanism model, substantially shortens computation time, reduces computational costs, and ensures the trend accuracy of the reconstructed electricity price curve, providing strong technical support for real-time operation monitoring of the electricity spot market.
[0047] For example, the preset sampling interval coefficient determination model can be understood as a reinforcement learning model that has been specifically trained. Specifically, the training process of this model models the electricity price sampling problem as a Markov decision process, using historical electricity price curves as states and sampling interval coefficients as actions. Through continuous interaction between the agent and the environment, the agent outputs the corresponding sampling interval coefficient based on the current state of the electricity price curve. The environment then determines the electricity price sampling point based on this coefficient and reconstructs the electricity price curve based on the sampling point. Simultaneously, it calculates the reward value according to the reward function, thereby obtaining empirical data from the interaction process. This empirical data is then used to iteratively update the model's network parameters until the model converges, thus obtaining the preset sampling interval coefficient determination model.
[0048] In one possible implementation, the step of calling a preset sampling interval coefficient determination model based on the preliminary electricity price prediction curve to obtain a sampling interval coefficient set for the electricity price sampling points of the target period includes: converting the preliminary electricity price prediction curve into a preliminary electricity price prediction array according to a preset sampling interval; normalizing the preliminary electricity price prediction array, and when the preliminary electricity price prediction curve includes at least two dimensions, sequentially concatenating the normalization results corresponding to each dimension to obtain a preprocessed preliminary electricity price prediction array; otherwise, using the normalization result as the preprocessed preliminary electricity price prediction array; and inputting the preprocessed preliminary electricity price prediction array into the preset sampling interval coefficient determination model to obtain a sampling interval coefficient set for the electricity price sampling points of the target period.
[0049] Explanatoryly, to enable the sampling interval coefficient determination model to fully perceive global electricity price characteristics and make better sampling decisions, this implementation flattens the electricity price prediction curves of each dimension into a multi-dimensional vector as the state input in the design of the model's state space. Based on this, when using the trained model for actual sampling, the initial electricity price prediction curve to be processed also needs to undergo the same preprocessing, i.e., converting it into an input format acceptable to the sampling interval coefficient determination model.
[0050] Specifically, firstly, based on a preset sampling interval, such as 15 minutes, the continuous preliminary electricity price forecast curve is discretized and converted into a preliminary electricity price forecast array consisting of a series of electricity prices arranged in chronological order. For example, if there are 96 points in a day, it is converted into a preliminary electricity price forecast array with 96 electricity price data points.
[0051] Next, the Min-Max normalization method is used to process the preliminary electricity price prediction array, mapping its numerical range to a fixed interval, such as [0, 1]. Interpretably, the purpose of normalization is to eliminate differences in dimensions and orders of magnitude between different dimensions of electricity price data, enabling the reinforcement learning model to learn and make decisions more stably and effectively. Specifically, for a preliminary electricity price prediction curve with only one dimension, the normalization result can be directly used as the preprocessed preliminary electricity price prediction array; however, for preliminary electricity price prediction curves containing multiple dimensions, such as a unified purchase price, sales price, and clearing prices for thermal power and photovoltaic power, the preliminary electricity price prediction array for each dimension is normalized separately. Then, all the normalized arrays are concatenated end-to-end to form a one-dimensional long vector, which is used as the preprocessed preliminary electricity price prediction array. Interpretably, this concatenation method integrates all the information from the multi-dimensional preliminary electricity price prediction curves into a unified state representation, enabling the model to simultaneously perceive the electricity price characteristics of all dimensions.
[0052] Finally, the preprocessed preliminary electricity price prediction array is input into the sampling interval coefficient determination model, and the sampling interval coefficient group of the electricity price sampling points for the target period is obtained using the sampling interval coefficient determination model.
[0053] The sampling interval coefficient is not less than a preset first sampling interval coefficient threshold and not greater than a preset second sampling interval coefficient threshold. For clarity, to ensure the physical meaning and validity of the sampling results, each sampling interval coefficient in the sampling interval coefficient group output by the sampling interval coefficient determination model is limited to a reasonable range, defined by the first sampling interval coefficient threshold (minimum value) and the second sampling interval coefficient threshold (maximum value). For example, a minimum sampling interval coefficient of 1 can be set, meaning sampling occurs at least once every two preset sampling intervals to avoid over-compression; simultaneously, a maximum sampling interval coefficient of 24 can be set, meaning sampling occurs at most once every 24 preset sampling intervals to ensure the most basic sampling density.
[0054] In one possible implementation, the sampling interval coefficient determines the model's reward function. for:
[0055] in, To improve the accuracy of reconstructing the electricity price curve based on electricity price sampling points; The sampling rate penalty weighting coefficient; The sampling rate is the sampling rate for electricity price sampling points.
[0056] Specifically, the reward function is the goal-oriented function of the reinforcement learning model, defining whether taking a certain action in a given state is good or bad. In this implementation, the reward function is designed as a quotient. The numerator is the accuracy of reconstructing the electricity price curve based on the sampling points. It encourages the model to select sampling actions that make the reconstructed electricity price curve as close as possible to the original electricity price curve; the larger this value, the larger the reward value; the denominator is the sampling rate penalty term. ,in The sampling rate for electricity price sampling points is the ratio of electricity price sampling points to the number of sampling points calculated based on a preset sampling interval. (Explanatory) A smaller value indicates sparser sampling and higher computational efficiency. However, if only high accuracy is pursued, the model tends to perform full sampling, leading to inefficiency; if only a low sampling rate is pursued, the model may not sample at all, resulting in zero accuracy. This is addressed by introducing a sampling rate penalty weight coefficient. This allows us to unify these two objectives into a single formula. (Explanatory) As an adjustable hyperparameter, it is used to control the degree of emphasis on computational efficiency (i.e., low sampling rate). When When the value is large, the influence of the denominator is amplified, and the model will tend to choose a lower sampling rate in order to obtain a larger reward value, that is, it will pay more attention to computational efficiency; conversely, when the value is small, the influence of the denominator is amplified. When the value is small, molecular accuracy has a dominant influence, and the model will focus more on reconstruction accuracy.
[0057] In this embodiment, the carefully designed reward function guides the model to learn a sampling strategy that achieves a relatively optimal balance between prediction accuracy and computational efficiency.
[0058] In one possible implementation, the accuracy of the reconstructed electricity price curve based on electricity price sampling points... We obtain it from the following formula:
[0059]
[0060]
[0061] in, The number of dimensions of the electricity price curve. For dimension The similarity of the reconstructed electricity price curves, For dimension The mean square error of the reconstructed electricity price curve, This is the scaling factor. For time period, To reconstruct the electricity price curve Electricity price, For the real electricity price curve at time Electricity prices.
[0062] At that moment When the electricity price sampling point is used, It was predicted through a pre-set electricity market clearing mechanism model; at time... When not a sampling point for electricity prices, Through time Adjacent electricity price sampling points This is obtained by linear interpolation.
[0063] For explanatory purposes, this embodiment uses geometric mean. This aggregates similarity across multiple dimensions, rather than using the arithmetic mean. This is because the geometric mean is more sensitive to smaller similarity values; if even one dimension performs poorly in reconstruction, the overall similarity will suffer. It will also approach 0, which forces the model to take into account the electricity price prediction curves of all dimensions, and cannot sacrifice one dimension in pursuit of the accuracy of one dimension.
[0064] Explanatoryly, in the design of similarity across a single dimension, the mean squared error is expressed in reciprocal form. The similarity is mapped to the interval (0, 1). Based on this, when When it is 0, Reaching the maximum value of 1; The larger, The closer it is to 0. At the same time, a scaling factor was designed. Used to control the sensitivity of similarity to mean squared error. The larger the value, the more identical. This will lead to a more drastic decrease in similarity, meaning the punishment will be more severe.
[0065] for Its value can be determined in two ways: if at time... If it happens to be a selected electricity price sampling point, then It was obtained by calling a pre-set electricity market clearing mechanism model that has high accuracy but complex calculations; if at time... If it's not an electricity price sampling point, then... The electricity price is obtained by linear interpolation of the reconstructed electricity price curves corresponding to adjacent electricity price sampling points. Explain, this hybrid calculation method is the key to the efficiency improvement of the method of this invention: that is, the high-cost mechanistic model is called only for a few electricity price sampling points, while low-cost linear interpolation is used for estimation for the vast majority of other times, thereby significantly reducing the total amount of computation.
[0066] In one possible implementation, when time When not a sampling point for electricity prices, We obtain it from the following formula:
[0067] in, for of , for of , moments on the timeline The adjacent electricity price sampling point on the left, moments on the timeline The adjacent electricity price sampling point on the right.
[0068] Explanatory, the formula describes how to connect and A straight line between two points is used to calculate time. The estimated value is obtained by this method, which assumes that the electricity price changes linearly between two sampling points. Although the actual electricity price curve is not strictly linear, linear interpolation can provide a computationally efficient and acceptablely accurate approximation over a sufficiently small sampling interval, thus avoiding the need to invoke complex mechanistic models at non-critical points.
[0069] In one possible implementation, the sampling interval coefficient determination model is constructed based on a proximal policy optimization reinforcement learning model.
[0070] Specifically, proximal policy optimization is an advanced policy gradient-based reinforcement learning algorithm. The loss function of the proximal policy optimization reinforcement learning model... Generally:
[0071] in, The pruning strategy loss is used to guide the update direction of the action network; This is the value loss coefficient, used to balance the weight of value loss in the total loss; This is a value loss, used to improve the accuracy of the evaluation network in assessing the value of a state; This is the entropy regularization coefficient, used to control the influence of the entropy regularization term; This is an entropy regularization term, used to encourage the model to maintain a certain degree of exploratory behavior.
[0072] During the training process of the model to determine the sampling interval coefficient, the evaluation network assesses the state value and combines it with the reward value calculated based on the reward function. The preset pruning objective function is used to calculate the pruning policy loss, value loss, and entropy regularization term, thereby updating the network parameters of the action network and the evaluation network.
[0073] Interpretive, compared to traditional Q-learning or policy gradient algorithms, the proximal policy optimization algorithm limits the magnitude of policy changes in each update by introducing a pruning objective function. This mechanism prevents the model from taking too large a step in a single update, thus generating an extreme new policy with a sharp performance drop. In this implementation, the sampling problem of electricity price sampling points is modeled as a sequential decision problem. The model's action network outputs sampling interval coefficients based on the current state of the electricity price curve, the environment returns reward values based on the actions and enters the next state, and the evaluation network is responsible for assessing the quality of the current state. Proximal policy optimization can stably and efficiently train the model in this interactive learning environment, enabling it to master a complex strategy of adaptively adjusting the sampling interval coefficients under different electricity price curve shapes, i.e., achieving an intelligent decision-making mechanism that reduces costs during periods of calm and maintains accuracy during periods of fluctuation.
[0074] The following are embodiments of the apparatus of the present invention, which can be used to execute embodiments of the method of the present invention. For details not disclosed in the apparatus embodiments, please refer to the embodiments of the method of the present invention.
[0075] See Figure 2 In another embodiment of the present invention, an adaptive sampling system for electricity market price sampling points is provided to implement the above-mentioned adaptive sampling method for electricity market price sampling points. Specifically, the adaptive sampling system for electricity market price sampling points includes a data acquisition module, a model calling module, and a sampling execution module.
[0076] The data acquisition module is used to acquire the preliminary electricity price prediction curve for the target period; the model invocation module is used to determine the model by invoking the preset sampling interval coefficients based on the preliminary electricity price prediction curve, and obtain the sampling interval coefficient group of the electricity price sampling points for the target period; wherein, the sampling interval coefficient group includes several sampling interval coefficients, and the sampling interval coefficient is the number of sampling intervals between adjacent electricity price sampling points; the sampling execution module is used to determine each electricity price sampling point for the target period based on the sampling interval coefficient group and the preset sampling interval.
[0077] The sampling interval coefficient determination model is constructed based on a reinforcement learning model. The reward function of the sampling interval coefficient determination model is configured such that the higher the accuracy of the reconstructed electricity price curve based on the electricity price sampling points, the greater the reward value, and the lower the sampling rate of the electricity price sampling points, the greater the reward value.
[0078] In one possible implementation, the model invocation module is specifically used to: convert the preliminary electricity price prediction curve into a preliminary electricity price prediction array according to a preset sampling interval; normalize the preliminary electricity price prediction array, and when the preliminary electricity price prediction curve includes at least two dimensions, sequentially concatenate the normalization results corresponding to each dimension to obtain a preprocessed preliminary electricity price prediction array; otherwise, use the normalization result as the preprocessed preliminary electricity price prediction array; input the preprocessed preliminary electricity price prediction array into a preset sampling interval coefficient determination model to obtain a sampling interval coefficient group for the electricity price sampling points of the target period; wherein the sampling interval coefficient is not less than a preset first sampling interval coefficient threshold and not greater than a preset second sampling interval coefficient threshold.
[0079] In one possible implementation, the sampling interval coefficient determines the model's reward function. for:
[0080] in, To improve the accuracy of reconstructing the electricity price curve based on electricity price sampling points; The sampling rate penalty weighting coefficient; The sampling rate is the sampling rate for electricity price sampling points.
[0081] In one possible implementation, the accuracy of the reconstructed electricity price curve based on electricity price sampling points... We obtain it from the following formula:
[0082]
[0083]
[0084] in, The number of dimensions of the electricity price curve. For dimension The similarity of the reconstructed electricity price curves, For dimension The mean square error of the reconstructed electricity price curve, This is the scaling factor. For time period, To reconstruct the electricity price curve Electricity price, For the real electricity price curve at time Electricity prices.
[0085] At that moment When the electricity price sampling point is used, It was predicted through a pre-set electricity market clearing mechanism model; at time... When not a sampling point for electricity prices, Through time Adjacent electricity price sampling points This is obtained by linear interpolation.
[0086] In one possible implementation, when time When not a sampling point for electricity prices, We obtain it from the following formula:
[0087] in, for of , for of , moments on the timeline The adjacent electricity price sampling point on the left, moments on the timeline The adjacent electricity price sampling point on the right.
[0088] In one possible implementation, the sampling interval coefficient determination model is constructed based on a proximal policy optimization reinforcement learning model.
[0089] All relevant content of each step involved in the aforementioned embodiments of the adaptive sampling method for electricity market price sampling points can be referenced to the functional description of the corresponding functional module of the adaptive sampling system for electricity market price sampling points in the embodiments of the present invention, and will not be repeated here.
[0090] The module division in this embodiment of the invention is illustrative and represents only one logical functional division. In actual implementation, other division methods may be used. Furthermore, the functional modules in the various embodiments of the invention can be integrated into a single processor, exist as separate physical entities, or be integrated into a single module. The integrated modules described above can be implemented in hardware or as software functional modules.
[0091] In another embodiment of the present invention, a computer device is provided, comprising a processor and a memory. The memory stores a computer program, which includes program instructions. The processor executes the program instructions stored in the computer storage medium. The processor may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing and control core of the terminal, suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions in the computer storage medium to achieve a corresponding method flow or corresponding function. The processor described in this embodiment of the present invention can be used for the operation of an adaptive sampling method for electricity market price sampling points.
[0092] In another embodiment of the present invention, a storage medium is provided, specifically a computer-readable storage medium (Memory), which is a memory device in a computer device used to store programs and data. It is understood that the computer-readable storage medium here can include both the built-in storage medium in the computer device and extended storage media supported by the computer device. The computer-readable storage medium provides storage space that stores the terminal's operating system. Furthermore, the storage space also stores one or more instructions suitable for loading and execution by a processor. These instructions can be one or more computer programs (including program code). It should be noted that the computer-readable storage medium here can be high-speed RAM or non-volatile memory, such as at least one disk storage device. The processor can load and execute one or more instructions stored in the computer-readable storage medium to implement the corresponding steps of the adaptive sampling method for electricity market price sampling points in the above embodiments.
[0093] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0094] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0095] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0096] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0097] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the protection scope of the claims of the present invention.
Claims
1. An adaptive sampling method for electricity market price sampling points, characterized in that, include: Obtain the preliminary electricity price forecast curve for the target period; Based on the preliminary electricity price prediction curve, a preset sampling interval coefficient determination model is invoked to obtain a sampling interval coefficient group for the electricity price sampling points of the target period; wherein, the sampling interval coefficient group includes several sampling interval coefficients, and the sampling interval coefficient is the number of sampling intervals between adjacent electricity price sampling points; Based on the sampling interval coefficient group and the preset sampling interval, determine the electricity price sampling points for the target period; The sampling interval coefficient determination model is constructed based on a reinforcement learning model. The reward function of the sampling interval coefficient determination model is configured such that the higher the accuracy of the reconstructed electricity price curve based on the electricity price sampling points, the greater the reward value, and the lower the sampling rate of the electricity price sampling points, the greater the reward value.
2. The adaptive sampling method for electricity market price sampling points according to claim 1, characterized in that, Based on the preliminary electricity price prediction curve, a preset sampling interval coefficient determination model is invoked to obtain a set of sampling interval coefficients for the electricity price sampling points in the target period, including: Based on the preset sampling interval, the preliminary electricity price forecast curve is converted into a preliminary electricity price forecast array; The preliminary electricity price prediction array is normalized. When the preliminary electricity price prediction curve includes at least two dimensions, the normalization results corresponding to each dimension are concatenated sequentially to obtain the preprocessed preliminary electricity price prediction array; otherwise, the normalization result is used as the preprocessed preliminary electricity price prediction array. The preprocessed preliminary electricity price prediction array is input into the preset sampling interval coefficient determination model to obtain the sampling interval coefficient group of the electricity price sampling points in the target period; wherein, the sampling interval coefficient is not less than the preset first sampling interval coefficient threshold and not greater than the preset second sampling interval coefficient threshold.
3. The adaptive sampling method for electricity market price sampling points according to claim 1, characterized in that, The sampling interval coefficient determines the model's reward function. for: in, To improve the accuracy of reconstructing the electricity price curve based on electricity price sampling points; The sampling rate penalty weighting coefficient; The sampling rate is the sampling rate for electricity price sampling points.
4. The adaptive sampling method for electricity market price sampling points according to claim 1, characterized in that, The accuracy of the reconstructed electricity price curve based on electricity price sampling points We obtain it from the following formula: in, The number of dimensions of the electricity price curve. For dimension The similarity of the reconstructed electricity price curves, For dimension The mean square error of the reconstructed electricity price curve, This is the scaling factor. For time period, To reconstruct the electricity price curve Electricity price, For the real electricity price curve at time Electricity price; At that moment When the electricity price sampling point is used, It was predicted through a pre-set electricity market clearing mechanism model; at time... When not a sampling point for electricity prices, Through time Adjacent electricity price sampling points This is obtained by linear interpolation.
5. The adaptive sampling method for electricity market price sampling points according to claim 4, characterized in that, At that moment When not a sampling point for electricity prices, We obtain it from the following formula: in, for of , for of , moments on the timeline The adjacent electricity price sampling point on the left, moments on the timeline The adjacent electricity price sampling point on the right.
6. The adaptive sampling method for electricity market price sampling points according to claim 1, characterized in that, The sampling interval coefficient determination model is constructed based on a near-end policy optimization reinforcement learning model.
7. An adaptive sampling system for electricity market price sampling points, characterized in that, include: The data acquisition module is used to acquire the preliminary electricity price forecast curve for the target period; The model invocation module is used to determine the model by invoking a preset sampling interval coefficient based on the preliminary electricity price prediction curve, and to obtain a sampling interval coefficient group for the electricity price sampling points of the target period; wherein, the sampling interval coefficient group includes several sampling interval coefficients, and the sampling interval coefficient is the number of sampling intervals between adjacent electricity price sampling points; The sampling execution module is used to determine the electricity price sampling points of the target period based on the sampling interval coefficient group and the preset sampling interval. The sampling interval coefficient determination model is constructed based on a reinforcement learning model. The reward function of the sampling interval coefficient determination model is configured such that the higher the accuracy of the reconstructed electricity price curve based on the electricity price sampling points, the greater the reward value, and the lower the sampling rate of the electricity price sampling points, the greater the reward value.
8. The adaptive sampling system for electricity market price sampling points according to claim 7, characterized in that, The model invocation module is specifically used for: Based on the preset sampling interval, the preliminary electricity price forecast curve is converted into a preliminary electricity price forecast array; The preliminary electricity price prediction array is normalized. When the preliminary electricity price prediction curve includes at least two dimensions, the normalization results corresponding to each dimension are concatenated sequentially to obtain the preprocessed preliminary electricity price prediction array; otherwise, the normalization result is used as the preprocessed preliminary electricity price prediction array. The preprocessed preliminary electricity price prediction array is input into the preset sampling interval coefficient determination model to obtain the sampling interval coefficient group of the electricity price sampling points in the target period; wherein, the sampling interval coefficient is not less than the preset first sampling interval coefficient threshold and not greater than the preset second sampling interval coefficient threshold.
9. The adaptive sampling system for electricity market price sampling points according to claim 7, characterized in that, The sampling interval coefficient determines the model's reward function. for: in, To improve the accuracy of reconstructing the electricity price curve based on electricity price sampling points; The sampling rate penalty weighting coefficient; The sampling rate is the sampling rate for electricity price sampling points.
10. The adaptive sampling system for electricity market price sampling points according to claim 7, characterized in that, The accuracy of the reconstructed electricity price curve based on electricity price sampling points We obtain it from the following formula: in, The number of dimensions of the electricity price curve. For dimension The similarity of the reconstructed electricity price curves, For dimension The mean square error of the reconstructed electricity price curve, This is the scaling factor. For time period, To reconstruct the electricity price curve Electricity price, For the real electricity price curve at time Electricity price; At that moment When the electricity price sampling point is used, It was predicted through a pre-set electricity market clearing mechanism model; at time... When not a sampling point for electricity prices, Through time Adjacent electricity price sampling points This is obtained by linear interpolation.
11. The adaptive sampling system for electricity market price sampling points according to claim 10, characterized in that, At that moment When not a sampling point for electricity prices, We obtain it from the following formula: in, for of , for of , moments on the timeline The adjacent electricity price sampling point on the left, moments on the timeline The adjacent electricity price sampling point on the right.
12. The adaptive sampling system for electricity market price sampling points according to claim 7, characterized in that, The sampling interval coefficient determination model is constructed based on a near-end policy optimization reinforcement learning model.
13. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the adaptive sampling method for electricity market price sampling points as described in any one of claims 1 to 6.
14. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the adaptive sampling method for electricity market price sampling points as described in any one of claims 1 to 6.