A minute-level load curve forecasting method, system, device and medium
Patent Information
- Application Number
- CN202610756714.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-29
- Publication Date
- 2026-10-23
AI Technical Summary
[0006]因此,本发明解决的技术问题是:现有的粒子群参数优化方法通常仅以单点预测误差作为适应度评价依据,比如用均方误差,所得参数虽能降低单点偏差,却无法约束相邻预测时刻之间的变化特性,导致输出的预测曲线存在明显的局部振荡与异常跳变
[0018]本发明的有益效果:通过在粒子群参数优化阶段引入曲线连续性惩罚量,能够解决了现有方法仅依赖单点预测误差进行参数寻优、导致分钟级预测曲线出现异常跳变的问题。
Smart Images

Figure CN122968907A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of load curve prediction technology, specifically to a method, system, device, and medium for minute-level load curve prediction. Background Technology
[0002] With the widespread adoption of smart meters and data acquisition terminals, the sampling granularity of load data has been gradually refined to the minute level. The minute-level load curve can reflect short-term electricity consumption behaviors such as equipment start-up and shutdown, and shift switching.
[0003] Support Vector Machines (SVMs) have the advantage of strong generalization ability with small sample sizes, and are therefore applied in the field of load forecasting, often combined with Particle Swarm Optimization (PSO) to optimize penalty parameters and kernel function parameters. However, existing PSO parameter optimization methods typically use only single-point prediction errors as the fitness evaluation criterion, such as mean squared error. While the resulting parameters can reduce single-point bias, they cannot constrain the variation characteristics between adjacent prediction times, leading to obvious local oscillations and anomalous jumps in the output prediction curve.
[0004] In an industrial park, a minute-level load forecasting model predicted 850kW, 923kW, and 849kW at three adjacent times: 10:00, 10:01, and 10:02, respectively. The single-point errors were all within acceptable range. However, there were jumps of more than 70kW between adjacent minutes, which exceeded the actual physical rate of change of load during that period. This curve cannot be directly used to guide energy storage charging and discharging or demand response control. Summary of the Invention
[0005] In view of the above-mentioned problems, the present invention provides a method, system, device and medium for predicting minute-level load curves.
[0006] Therefore, the technical problem solved by this invention is that existing particle swarm optimization methods usually only use single-point prediction error as the fitness evaluation basis, such as using mean square error. Although the obtained parameters can reduce single-point bias, they cannot constrain the change characteristics between adjacent prediction times, resulting in obvious local oscillations and abnormal jumps in the output prediction curve.
[0007] To address the aforementioned technical problems, this invention provides the following technical solution: a minute-level load curve prediction method, comprising the following steps: reconstructing multi-scale features from collected minute-level load data to obtain multi-scale feature vectors; performing primary screening of target historical operating periods using the multi-scale feature vectors, extracting minute-level load samples based on the screening results to form a dynamic sample pool; establishing a vector regression model using the dynamic sample pool as the training set, and jointly optimizing the parameters to be optimized in the vector regression model to obtain optimized model parameters; performing support vector regression inference on the multi-scale feature vectors at the time of prediction using the optimized model parameters to obtain an initial prediction curve; correcting the initial prediction curve, projecting the correction result onto a physically feasible interval, and outputting a minute-level load prediction curve.
[0008] As a preferred embodiment of the minute-level load curve prediction method of the present invention, the step of performing the multi-scale feature reconstruction includes: applying sine and cosine continuous encoding to the intraday position of the time to be predicted based on the load of the same minute cycle to obtain the periodic position feature; extracting the morphological features of the load sequence of the neighboring time period of the time to be predicted to obtain the neighborhood window morphological feature; and merging the periodic position feature and the neighborhood window morphological feature to obtain the multi-scale feature vector.
[0009] As a preferred embodiment of the minute-level load curve prediction method of the present invention, the step of performing the first-level screening includes: calculating the comprehensive attribute similarity between the target historical running segment and the window to be predicted using the multi-scale feature vector; sorting the target historical running segments according to the comprehensive attribute similarity to obtain a running segment sequence; extracting the running segment sequence that meets the preset conditions, and constructing the dynamic sample pool using the extracted minute-level load samples.
[0010] As a preferred embodiment of the minute-level load curve prediction method of the present invention, the step of extracting minute-level load samples includes: matching event labels of the runtime sequence that meets preset conditions with the window to be predicted to obtain an event matching degree; adjusting the sample weights of the target historical runtime according to the event matching degree; and extracting minute-level load samples from the target historical runtime based on the adjusted sample weights to form the dynamic sample pool.
[0011] As a preferred embodiment of the minute-level load curve prediction method of the present invention, the joint optimization step includes: constructing a particle population for the parameters to be optimized in the vector regression model; iteratively evaluating the particle population with a fitness function to obtain a fitness score; updating the particle population according to the fitness score, and selecting the optimal parameters from the updated particle population to obtain the optimized model parameters.
[0012] As a preferred embodiment of the minute-level load curve prediction method of the present invention, the iterative evaluation step includes: setting a validation segment for time-blocking cross-validation; running the vector regression model on the validation segment for each set of parameters to be optimized to obtain validation prediction results; calculating the point prediction error by comparing the validation prediction results with the measured load sequence; quantifying the variation characteristics of the validation prediction results between adjacent time points to obtain the curve continuity penalty; and weighting and merging the point prediction error and the curve continuity penalty to obtain the fitness score.
[0013] In a preferred embodiment of the minute-level load curve prediction method of the present invention, the step of correcting the initial prediction curve includes: constructing a residual correction amount by means of the deviation between the measured load sequence and the initial prediction curve; applying an attenuation coefficient to the residual correction amount to obtain a step size correction amount; and superimposing the initial prediction curve and the step size correction amount to obtain the correction result.
[0014] This invention provides a minute-level load curve prediction system.
[0015] To solve the above-mentioned technical problems, the present invention provides the following technical solution: a minute-level load curve prediction system, comprising: a multi-scale feature reconstruction module, which performs multi-scale feature reconstruction in response to the collected minute-level load data to obtain a multi-scale feature vector; The dynamic sample pool construction module performs a first-level screening of the target historical runtime segments through the multi-scale feature vectors, and extracts minute-level load samples based on the screening results to form a dynamic sample pool. The vector regression model training and inference module establishes a vector regression model using the dynamic sample pool as the training set, and performs joint optimization on the parameters to be optimized in the vector regression model to obtain optimized model parameters; and performs support vector regression inference on the multi-scale feature vectors at the time to be predicted using the optimized model parameters to obtain the initial prediction curve. The prediction curve correction and output module corrects the initial prediction curve and projects the correction result onto the physically feasible range, outputting a minute-level load prediction curve.
[0016] The present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the minute-level load curve prediction method.
[0017] The present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the minute-level load curve prediction method.
[0018] The beneficial effects of this invention are: by introducing a curve continuity penalty in the particle swarm optimization stage, it can solve the problem that existing methods rely solely on single-point prediction errors for parameter optimization, leading to abnormal jumps in minute-level prediction curves.
[0019] In this invention, when jointly optimizing the parameters of a vector regression model, a validation segment with time-blocking cross-validation is first set up. For each set of parameters to be optimized, the vector regression model is run on the validation segment, and the point prediction error is calculated. Simultaneously, the variation characteristics of the validation prediction results between adjacent time points are quantified to obtain a curve continuity penalty. Then, the point prediction error and the curve continuity penalty are weighted and combined to obtain a fitness score, which drives the iterative update of the particle population and the selection of optimal parameters. Since the fitness score simultaneously constrains prediction accuracy and curve continuity, the initial prediction curve output by the optimized model parameters in the support vector regression inference stage can maintain a natural slope of minute-level load variation, fundamentally suppressing abnormal jumps between adjacent time points. Attached Figure Description
[0020] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 The following is a flowchart of a minute-level load curve prediction method provided in one embodiment of the present invention.
[0022] Figure 2 This diagram illustrates an application scenario of a minute-level load curve prediction method provided in one embodiment of the present invention.
[0023] Figure 3 The flowchart illustrates the process of obtaining optimized model parameters for a minute-level load curve prediction method according to an embodiment of the present invention. Detailed Implementation
[0024] To make the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, not all of them. 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 protection scope of the present invention.
[0025] Example 1, referring to Figure 1 This is one embodiment of the present invention, which provides a method for predicting minute-level load curves, including: S1. Responding to the collected minute-level load data, perform multi-scale feature reconstruction to obtain multi-scale feature vectors.
[0026] S2. Using the multi-scale feature vector, perform a first-level screening of the target historical runtime segments, and extract minute-level load samples based on the screening results to form a dynamic sample pool.
[0027] S3. Establish a vector regression model using the dynamic sample pool as the training set, and jointly optimize the parameters to be optimized in the vector regression model to obtain the optimized model parameters.
[0028] S4. Using the optimized model parameters, perform support vector regression inference on the multi-scale feature vectors at the time to be predicted to obtain the initial prediction curve.
[0029] S5. Correct the initial prediction curve and project the correction result onto the physically feasible range to output a minute-level load prediction curve.
[0030] Existing particle swarm optimization methods typically use single-point prediction errors as the basis for fitness evaluation, such as using mean square error. While the resulting parameters can reduce single-point bias, they cannot constrain the variation characteristics between adjacent prediction times, leading to obvious local oscillations and anomalous jumps in the output prediction curve.
[0031] By introducing a curve continuity penalty during the particle swarm optimization stage, the problem of existing methods relying solely on single-point prediction errors for parameter optimization, leading to abnormal jumps in minute-level prediction curves, can be solved.
[0032] In this invention, when jointly optimizing the parameters of a vector regression model, a validation segment with time-blocking cross-validation is first set up. For each set of parameters to be optimized, the vector regression model is run on the validation segment, and the point prediction error is calculated. Simultaneously, the variation characteristics of the validation prediction results between adjacent time points are quantified to obtain a curve continuity penalty. Then, the point prediction error and the curve continuity penalty are weighted and combined to obtain a fitness score, which drives the iterative update of the particle population and the selection of optimal parameters. Since the fitness score simultaneously constrains prediction accuracy and curve continuity, the initial prediction curve output by the optimized model parameters in the support vector regression inference stage can maintain a natural slope of minute-level load variation, fundamentally suppressing abnormal jumps between adjacent time points.
[0033] Example 2, refer to Figures 1-3 As an embodiment of the present invention, a minute-level load curve prediction method is provided based on the previous embodiment, including the following steps: S1. Responding to the collected minute-level load data, perform multi-scale feature reconstruction to obtain multi-scale feature vectors.
[0034] The steps of the multi-scale feature reconstruction include S1.1 to S1.3: S1.1. Using the same minute-cycle load as a benchmark, apply sine and cosine continuous encoding to the intraday position of the time to be predicted to obtain the cycle position characteristics.
[0035] Using the load of the same minute cycle as a benchmark, historical load values for the same minute of the day before and the day before the predicted time are extracted and used as the benchmark for the cycle load, reflecting the typical load level at that time under the daily and weekly cycles. Sine and cosine continuous encoding is applied to the intraday position of the time to be predicted, with the encoding method as follows: ; Where M is the number of sampling points, m is the sampling sequence number corresponding to the prediction time, and t is the prediction time.
[0036] Sine and cosine continuous coding maps discrete minute numbers to continuous quantities with bounded amplitudes and smooth transitions, perceiving the intraday positional continuity of adjacent sampling times and avoiding artificial breaks between zero and M-1 points when minute numbers are directly used as linear features. By concatenating the load of the same minute period with the sine and cosine codes, a periodic positional feature vector is obtained.
[0037] In this embodiment, the sampling interval is 1 minute, with a total of 1440 sampling points per day. The time to be predicted is 10:30 AM on the current day, corresponding to the daily sequence number 630. The measured load at 10:30 AM the previous day was 820 kW, and the measured load at 10:30 AM the previous 7 days was 805 kW. The sine and cosine coding calculation is expressed as follows: and ; The periodic position characteristics are as follows: Since the sine and cosine codes maintain a smooth transition between 10:29 and 10:30, and between 23:59 and 00:00, the changes in the periodic position characteristics of adjacent times are always bounded and will not jump due to the reversal of the sequence number.
[0038] S1.2 Extract morphological features from the load sequence of the neighborhood time period to be predicted to obtain the morphological features of the neighborhood window.
[0039] Morphological feature extraction includes, but is not limited to, mean, standard deviation, maximum slope, and local peak and valley markers. Then, all morphological features are concatenated to obtain the morphological features of the neighborhood window.
[0040] In this embodiment, when the calculated mean is 800 kW, the standard deviation is 12.4 kW, the maximum slope is 15 kW / min, and the local peak and valley labels are both 0, the neighborhood window morphology features are [800, 12.4, 15, 0, 0].
[0041] S1.3. Merge the periodic position features with the neighborhood window shape features to obtain the multi-scale feature vector.
[0042] The multi-scale feature vector obtained by concatenation is represented as [820,805,0.782,-0.623,800,12.4,15,0,0].
[0043] S2. Using the multi-scale feature vector, perform a first-level screening of the target historical runtime segments, and extract minute-level load samples based on the screening results to form a dynamic sample pool.
[0044] The first-level screening process includes steps S2.1 to S2.3: S2.1 Calculate the comprehensive attribute similarity between the target's historical runtime segment and the window to be predicted using multi-scale feature vectors.
[0045] There are N target historical runtime segments in the historical database. For each target historical runtime segment, extract its corresponding multi-scale feature vector.
[0046] A comprehensive attribute similarity can be obtained by weighting and merging periodic position similarity and neighborhood window shape similarity. It's important to note that both periodic position similarity and neighborhood window shape similarity are calculated using normalized Gaussian kernel similarity, expressed mathematically as follows: ; ; in, and Here are the bandwidth parameters for each component. and These are periodic position similarity and neighborhood window shape similarity, respectively. and These are the target historical runtime segment and the runtime segment corresponding to the window to be predicted, respectively. It is a periodic positional feature. It is a feature of the neighborhood window shape.
[0047] In this embodiment, the window to be predicted is the 30-minute window before 10:00 on June 10, 2024. Its multi-scale feature vector, obtained from step S1, is [820, 805, 0.782, -0.623, 800, 12.4, 15, 0, 0]. The comprehensive attribute similarity is then calculated for the two candidate historical runtime segments: D1: June 3, 2024, X(D1)=[815,802,0.782,-0.623,795,11.8,12,0,0]. The values of each dimension of the two vectors are close, and the calculated comprehensive attribute similarity is 0.91. D2: On May 25, 2024, X(D2)=[650,630,0.782,-0.623,640,8.2,5,0,0]. The load and neighborhood pattern of the same minute cycle are significantly different from D0, and the calculated comprehensive attribute similarity is 0.34.
[0048] The results show that D1 has a higher overall attribute similarity to the window to be predicted than D2.
[0049] S2.2 Sort the target historical runtime segments according to the comprehensive attribute similarity to obtain the runtime segment sequence.
[0050] Specifically, all N candidate historical runtime segments are sorted in descending order of comprehensive attribute similarity to obtain the runtime segment sequence.
[0051] The ranking results reflect the comprehensive similarity between each historical operating period and the current forecast window in terms of load cycle level and neighborhood pattern. The higher the ranking of the historical operating period, the more valuable the minute-level load sample it carries for the current forecast window.
[0052] In this embodiment, the sorting results are shown in Table 1: Table 1: Ranking Table of Comprehensive Attribute Similarity
[0053] As can be seen from Table 1, the top-ranked days are all similar working days, which are highly consistent with the load pattern of the window to be predicted. However, non-working days such as D2 have a similarity of 0.34, rank low, and are not included in the dynamic sample pool.
[0054] S2.3 Extract the runtime sequence that meets the preset conditions, and construct the dynamic sample pool from the extracted minute-level load samples.
[0055] The steps for extracting minute-level load samples include A1 to A3: A1. Match the event labels of the runtime segment sequence that meets the preset conditions with the window to be predicted to obtain the event matching degree.
[0056] The preset conditions are set to have a comprehensive attribute similarity of no less than a preset similarity threshold, or to be ranked in the top K positions of the sequence.
[0057] A dynamic sample pool is formed for each historical runtime segment in a subsequence that meets the preset conditions.
[0058] Specifically, the preset conditions are that the comprehensive attribute similarity is not less than 0.70 and the ranking does not exceed 20. The sorting results from step S2.2 show that a total of 15 historical runtime segments meet these conditions.
[0059] For each historical runtime segment of a subsequence that meets the preset conditions, its event label set is read; at the same time, the event label set of the window to be predicted is read.
[0060] Event tag types include, but are not limited to, holiday tags, production shift tags, equipment planned start / stop tags, and demand response event tags.
[0061] In calculating event matching degree When the time is right, the calculation formula is expressed as: ; in, Indicates the number of elements in the set. It is a collection of event tags from the historical runtime segment. It is the set of event labels for the window to be predicted.
[0062] The event matching degree is 1 when the event label set of the historical runtime segment is consistent with the event label set of the window to be predicted; the event matching degree is 0 when the two have no common labels.
[0063] If neither the window to be predicted nor a certain historical runtime segment has any event labels, it is considered a label match, and the event match degree is set to 1.
[0064] A2. Adjust the sample weights of the target historical runtime segment according to the event matching degree.
[0065] In this embodiment, the event adjustment coefficient is set to 0.3.
[0066] The overall attribute similarity of D1 is 0.91, and the event matching degree is 1.00; The overall attribute similarity of D4 is 0.79, and the event matching degree is 0.5. The adjusted sample weights for D1 are 0.91 × [0.3 + 0.7 × 1.00] = 0.910; The adjusted sample weight for D4 is 0.79 × [0.3 + 0.7 × 0.50] = 0.514.
[0067] Therefore, although the overall similarity and difference between the two are not large, the event matching degree is only 0.50. Thus, the weights after adjustment show a difference, thereby reducing the interference of heterogeneous samples containing maintenance events on model training.
[0068] A3. Based on the adjusted sample weights, extract minute-level load samples from the target historical runtime to form the dynamic sample pool.
[0069] For each historical runtime segment that meets the preset conditions, all minute-level load sample points of its corresponding prediction window are extracted. After assigning sample weights according to normalized weights, the samples from each historical runtime segment are aggregated to form a dynamic sample pool.
[0070] The sample points with higher weights in the dynamic sample pool are from historical runtime segments that have high similarity to the comprehensive attributes of the window to be predicted and match the event labels. Specifically, the subsequence records based on preset conditions include 15 historical runtime periods, each period corresponding to 30 minute-level sample points. Based on multiplication calculations, the dynamic sample pool contains a total of 450 sample points.
[0071] Of these, the 30 sample points from historical runtime segment D1 have the highest weight in model training, while the 30 sample points from D4 have lower weight but were not removed. The resulting dynamic sample pool serves as the training set.
[0072] Reference Figure 3 As shown, S3, a vector regression model is established using the dynamic sample pool as the training set, and the parameters to be optimized in the vector regression model are jointly optimized to obtain the optimized model parameters.
[0073] The vector regression model is expressed as: ; in, and Let b be a Lagrange multiplier, b be a bias term, and K be a kernel function. These are samples from the dynamic sample pool.
[0074] in, , These are kernel function parameters.
[0075] The steps for performing the joint optimization include S3.1 to S3.3: S3.1 Construct a particle population for the parameters to be optimized in the vector regression model.
[0076] When constructing the particle population, each particle i represents a set of parameters to be optimized, and the parameters to be optimized are kernel function parameters.
[0077] For example, suppose the population size is 20 and the kernel function parameter is set to σ∈[0.01,10]. After random initialization, the initial positions of two particles are shown in Table 2: Table 2: Initial Particle Positions
[0078] Table 2 shows that the 20 particles are distributed in different regions of the parameter space, together forming the initial particle population.
[0079] S3.2. Iteratively evaluate the particle population using the fitness function to obtain a fitness score.
[0080] The steps for performing the iterative evaluation include B1 to B5: B1. Set the verification segment for time-blocking cross-validation.
[0081] The samples from historical runtime periods in the dynamic sample pool are arranged in chronological order on the historical timeline.
[0082] Time-blocking cross-validation is adopted to divide the historical runtime segments into training segments and validation segments: the earliest Kn historical runtime segments are taken as training segments, and the most recent Km historical runtime segments are taken as validation segments.
[0083] A time interval is maintained between the training and validation segments to prevent residual correlation between adjacent time periods from interfering with the evaluation results.
[0084] Specifically, the dynamic sample pool has a total of 15 historical runtime segments, which are arranged in chronological order and set to Kn=12 and Km=3. Therefore, during the training phase, the 12 earliest historical runtime segments contain a total of 12×30=360 minute-level sample points; during the validation phase, the 3 most recent historical runtime segments contain a total of 3×30=90 minute-level sample points.
[0085] B2. For each set of parameters to be optimized, run the vector regression model on the validation segment to obtain the validation prediction results.
[0086] In this embodiment, for particle 1, i.e., the parameter to be optimized is 0.50, the vector regression model is trained with 360 training segment samples and then run on 90 validation segment sample points to obtain the validation prediction results.
[0087] Table 3 shows a comparison between the predicted and measured values for five consecutive consecutive minutes. Table 3: Comparison of Predicted and Measured Values
[0088] As can be seen from Table 3, there is a large deviation at 10:27, and the predicted value jumps by 29kW between 10:26 and 10:27, while the actual measurement only changes by 7kW, indicating that the parameter combination has insufficient control over the continuity of the curve.
[0089] B3. The prediction error between the verification prediction results and the actual load sequence calculation points.
[0090] For the validation segment, there are n minute-level sample points. The point prediction error is calculated by verifying the prediction results and the measured load sequence. The point prediction error is represented by the root mean square error and the mean absolute percentage error.
[0091] For example, the root mean square error (RMSE) of the prediction for particle 1, calculated from 90 sample points, is 18.6 kW, with a calculated average absolute percentage of 2.31%. This indicates that the point prediction accuracy for particle 1 is within an acceptable range.
[0092] B4. Quantify the variation characteristics of the verification prediction results between adjacent time points to obtain the curve continuity penalty.
[0093] The variation characteristics are slope error and anomalous jumps. Among them, slope error measures the deviation between the predicted curve and the measured curve in adjacent minutes of slope, and anomalous jump penalty is imposed on jumps in the predicted curve that exceed the upper limit of the physically reasonable slope.
[0094] Then, the slope error and the abnormal jump penalty are weighted and combined to obtain the curve continuity penalty.
[0095] In this embodiment, the slope error is expressed as: ; The penalty for abnormal transitions is represented as follows: ; in, For slope error, This is the sequence of validation prediction results at time t. Let be the measured load sequence at time t. It's an abnormal jump penalty. The setting is based on the high quantile of the changes in adjacent minutes in the historical load sequence.
[0096] In this embodiment, when Δmax = 20 kW / min, the slope error weight is set to 0.6, and the abnormal jump penalty weight is set to 0.4. The slope difference between adjacent time points is calculated for the verification prediction results of particle 1 at 90 verification segment sample points: The predicted slope is 831-802=+29kW, the measured slope is 805-798=+7kW, and the absolute value of the slope error contribution of 29-7 is 22kW. The predicted slope exceeds 20kW at this moment, and the calculated contribution of the jump penalty is (29-20). 2 =81.
[0097] The results of summarizing and calculating all 89 adjacent time points are as follows: ; After weighted calculation, we obtain 0.6*8.4 + 0.4*12.3, resulting in a value of 9.96. This result reflects that the predicted curve under the particle 1 parameter combination exhibits local jumps, and the continuity penalty of the curve is too high.
[0098] B5. The point prediction error and the curve continuity penalty are weighted and combined to obtain the fitness score.
[0099] Specifically, the three weight values are set to 0.35, 0.35, and 0.3, respectively. In the current iteration, after normalizing the error terms of the 20 particles in the population, the fitness scores of particle 1 and particle 2 are calculated as shown in Table 4: Table 4: Fitness Score Calculation Table
[0100] As shown in Table 4, the fitness score of particle 2 is lower than that of particle 1, indicating that the parameter combination represented by particle 2 is superior to particle 1 in both point prediction accuracy and curve continuity.
[0101] S3.3 Update the particle population according to the fitness score, and select the optimal parameters for the updated particle population to obtain the optimized model parameters.
[0102] In this embodiment, the inertia weight is set to 0.7, the learning factor is 1.5, the maximum number of iterations is 100, and the convergence threshold is 10. -4 .
[0103] Taking the update process of particle 1 after the first iteration as an example, let the current individual optimality be (50.0, 0.50, 0.050), the global optimality be (280.0, 1.20, 0.018), and the current velocity be (10.0, 0.08, 0.003). Two random numbers are taken, 0.6 and 0.4, and both random numbers are in the interval [0, 1]. Then: ; After iterating to the 100th generation, the global optimal fitness score converged, and the output optimized model parameters were 0.88.
[0104] S4. Using the optimized model parameters, perform support vector regression inference on the multi-scale feature vectors at the time to be predicted to obtain the initial prediction curve.
[0105] Substitute the optimized model parameters obtained in step S3 into the vector regression model, use all sample points in the dynamic sample pool as the support vector set, construct multi-scale feature vectors minute by minute for each time to be predicted within the prediction window and perform regression inference, and splice the inference output values of each time in chronological order to obtain the initial prediction curve.
[0106] In this embodiment, the prediction window is set from 10:30 to 11:00 on June 10, 2024, for a total of 30 minutes to be predicted. For each minute, a multi-scale feature vector is extracted according to the method described in step S1, and then substituted into a vector regression model with a kernel function parameter of 0.88 for inference.
[0107] Taking the six adjacent times from 10:30 to 10:35 as an example, the model outputs initial predicted values of 817kW, 821kW, 826kW, 829kW, 833kW and 836kW respectively. The changes between adjacent times are all between 3 and 5kW / min, and no abnormal jumps are observed.
[0108] By splicing together the inference results of all 30 time points within the prediction window in chronological order, the complete initial prediction curve is obtained.
[0109] S5. Correct the initial prediction curve and project the correction result onto the physically feasible range to output a minute-level load prediction curve.
[0110] The steps for correcting the initial prediction curve include S5.1 to S5.3: S5.1 Construct the residual correction amount by the deviation between the measured load sequence and the initial prediction curve.
[0111] Take the measured load values from the most recent few minutes before the start of the prediction window, compare them with the inference values of the vector regression model at the corresponding time, calculate the pointwise residuals, and then combine the residuals in an exponentially weighted manner.
[0112] The closer the observation residual is to the start time of the prediction, the greater the weight it is assigned, so that the residual correction amount reflects the systematic deviation state of the current period more.
[0113] In this embodiment, the measured values at three observed times before the prediction start time of 10:30, namely 10:27, 10:28 and 10:29, are compared with the initial predicted value.
[0114] At 10:27, the measured load was 805kW, the initial predicted value was 831kW, and the point residual was -26kW. The measured load at 10:28 was 809kW, the initial predicted value was 808kW, and the point residual was +1kW; At 10:29, the measured load was 812kW, the initial predicted value was 814kW, and the point residual was -2kW.
[0115] With a time weighting factor of 0.6, the final residual correction after weighted merging is approximately -5.49kW. This result indicates that the initial prediction curve is generally overestimated in the near term.
[0116] S5.2 Apply an attenuation coefficient to the residual correction amount to obtain the step size correction amount.
[0117] Specifically, assuming an attenuation coefficient of 0.85, the residual correction amount of -5.49kW is multiplied by the attenuation factor corresponding to each step size in sequence.
[0118] 10:30 corresponds to step 1, with a step size correction of -4.67kW; 10:31 corresponds to step 2, the step size correction decreases to -3.97kW; 10:32 corresponds to step 3, where the step size correction is further reduced to -3.37kW; At 10:35, corresponding to step 6, the step size correction has decayed to -2.07kW. This shows that as the prediction step size increases, the step size correction continuously decreases.
[0119] S5.3. The initial prediction curve is superimposed with the step size correction amount to obtain the correction result.
[0120] For each time step within the prediction window, the initial predicted value is directly superimposed with the corresponding step size correction to obtain the corrected predicted value. Then, the corrected predicted value is projected onto the physically feasible region.
[0121] Specifically, the physically feasible range is set at 600kW~1000kW.
[0122] Taking the period from 10:30 to 10:35 as an example, the initial predicted value of 817kW is adjusted by adding a step size correction of -4.67kW to obtain a corrected value of approximately 812kW. The initial predicted value of 821kW is adjusted by adding -3.97kW to obtain approximately 817kW. The initial predicted value of 826kW is adjusted by adding -3.37kW to obtain approximately 823kW. The initial predicted value of 829kW is adjusted by adding -2.87kW to obtain approximately 826kW. The initial predicted value of 833kW is adjusted by adding -2.44kW to obtain approximately 831kW. The initial predicted value of 836kW is adjusted by adding -2.07kW to obtain approximately 834kW.
[0123] All corrected predicted values fall within the physically feasible range of 600kW to 1000kW, requiring no boundary truncation. Furthermore, the change in predicted values between adjacent time points remains at 4 to 5 kW / min, satisfying the physically reasonable slope constraint determined by the historical load sequence, and the curve exhibits good continuity.
[0124] By concatenating the final output values of all 30 time points in the forecast window in chronological order, the minute-level load forecast curve for 10:30 to 11:00 on June 10, 2024 is obtained, thus completing this minute-level load curve forecast task.
[0125] Example 3 is an embodiment of the present invention, which provides a minute-level load curve prediction system, including.
[0126] This embodiment also provides an electronic device applicable to a minute-level load curve prediction method, comprising: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the minute-level load curve prediction method proposed in the above embodiment.
[0127] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements a minute-level load curve prediction method as proposed in the above embodiments.
[0128] The storage medium proposed in this embodiment and the method for predicting a minute-level load curve proposed in the above embodiments belong to the same inventive concept. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.
[0129] Based on the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, 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 a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.
Claims
1. A method for predicting load curves at the minute level, characterized in that, Includes the following steps: Multi-scale feature reconstruction is performed on the collected minute-level load data to obtain multi-scale feature vectors; The target historical runtime segment is first-level filtered using the multi-scale feature vectors, and minute-level load samples are extracted from the filtering results to form a dynamic sample pool. A vector regression model is established using the dynamic sample pool as the training set, and the parameters to be optimized in the vector regression model are jointly optimized to obtain the optimized model parameters. The initial prediction curve is obtained by performing support vector regression inference on the multi-scale feature vectors at the time to be predicted using the optimized model parameters. The initial prediction curve is corrected, and the correction result is projected onto the physically feasible range to output a minute-level load prediction curve.
2. The minute-level load curve prediction method as described in claim 1, characterized in that, The steps for performing the multi-scale feature reconstruction include: Based on the load of the same minute cycle, the intraday position of the time to be predicted is continuously encoded by sine and cosine to obtain the periodic position characteristics; Morphological features are extracted from the load sequence of the neighborhood time period to be predicted to obtain the morphological features of the neighborhood window. The periodic position feature is combined with the neighborhood window shape feature to obtain the multi-scale feature vector.
3. The minute-level load curve prediction method as described in claim 2, characterized in that, The steps for performing the first-level screening include: The comprehensive attribute similarity between the target historical runtime segment and the window to be predicted is calculated using the multi-scale feature vector. The target historical runtime segments are sorted according to the comprehensive attribute similarity to obtain a runtime segment sequence; The runtime sequence that meets the preset conditions is extracted, and the extracted minute-level load samples constitute the dynamic sample pool.
4. The minute-level load curve prediction method as described in claim 3, characterized in that, The steps for extracting minute-level load samples include: The event matching degree is obtained by matching the event labels of the runtime segment sequence that meets the preset conditions with the window to be predicted. The sample weights of the target historical runtime segment are adjusted according to the event matching degree; Based on the adjusted sample weights, minute-level load samples are extracted from the target historical runtime to form the dynamic sample pool.
5. The minute-level load curve prediction method as described in claim 4, characterized in that, The steps for performing the joint optimization include: A particle population is constructed for the parameters to be optimized in the vector regression model; The particle population is iteratively evaluated using a fitness function to obtain a fitness score. The particle population is updated according to the fitness score, and the optimal parameters are selected from the updated particle population to obtain the optimized model parameters.
6. The minute-level load curve prediction method as described in claim 5, characterized in that, The steps for performing the iterative evaluation include: Configure the validation segment for time-blocking cross-validation; For each set of parameters to be optimized, the vector regression model is run on the validation segment to obtain validation prediction results; The error between the verified prediction results and the calculated points of the measured load sequence is used to determine the prediction error. The variation characteristics of the verification prediction results between adjacent time points are quantified to obtain the curve continuity penalty. The fitness score is obtained by weighting and combining the point prediction error with the curve continuity penalty.
7. The minute-level load curve prediction method as described in claim 6, characterized in that, The steps for correcting the initial prediction curve include: The residual correction amount is constructed by the deviation between the measured load sequence and the initial prediction curve; A decay coefficient is applied to the residual correction amount to obtain the step size correction amount; The initial prediction curve is superimposed with the step size correction amount to obtain the correction result.
8. A minute-level load curve prediction system, employing the minute-level load curve prediction method as described in any one of claims 1 to 7, characterized in that, include: The multi-scale feature reconstruction module performs multi-scale feature reconstruction in response to the collected minute-level load data, and obtains multi-scale feature vectors; The dynamic sample pool construction module performs a first-level screening of the target historical runtime segments through the multi-scale feature vectors, and extracts minute-level load samples based on the screening results to form a dynamic sample pool. The vector regression model training and inference module establishes a vector regression model using the dynamic sample pool as the training set, and performs joint optimization on the parameters to be optimized in the vector regression model to obtain optimized model parameters; and performs support vector regression inference on the multi-scale feature vectors at the time to be predicted using the optimized model parameters to obtain the initial prediction curve. The prediction curve correction and output module corrects the initial prediction curve and projects the correction result onto the physically feasible range, outputting a minute-level load prediction curve.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the minute-level load curve prediction method according to any one of claims 1 to 7.
10. A 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 steps of the minute-level load curve prediction method according to any one of claims 1 to 7.