Load prediction method and device based on feature enhancement, computer device, storage medium and computer program product
Patent Information
- Application Number
- CN202611035445.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-13
- Publication Date
- 2026-09-15
AI Technical Summary
[0005]基于此,本申请的目的旨在至少能解决上述的技术缺陷之一,特别是现有技术中电力负荷预测准确性低的技术缺陷,本申请提供了一种基于特征增强的负荷预测方法、装置、计算机设备、存储介质和计算机程序产品
本申请提供的基于特征增强的负荷预测方法、装置、计算机设备、存储介质和计算机程序产品,通过同时提取负荷特征、时间特征和序列位置特征,并引入基于异常检测的日期类别来增强时间特征,再融合为联合特征序列输入预测模型,解决了传统负荷预测仅使用原始负荷序列或简单时间编码导致的特征单一、无法区分不同日期类型下负荷波动规律差异的问题,增强时间特征使模型能够学习到异常日期(如极端天气日或重大活动日)对负荷的特殊影响模式,从而显著提升在复杂场景下的预测准确性和鲁棒性,最终有效提高了电力负荷预测准确性。
Smart Images

Figure CN122763345A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of power system technology, and in particular to a load forecasting method, apparatus, computer equipment, storage medium and computer program product based on feature enhancement. Background Technology
[0002] Power load forecasting is a crucial foundation for power grid dispatching and risk early warning. In actual power systems, load time-series data is prone to abnormal fluctuations due to factors such as holidays, weekends, and weekday transitions. Accurately predicting load changes during these abnormal periods is of great significance for ensuring the safe and stable operation of the power grid.
[0003] Currently, existing solutions employ an Informer model based on an improved Transformer for medium- to long-term power load forecasting. This solution encodes historical load sequences using a probabilistic sparse self-attention mechanism and uses a generative decoder to output multi-step forecast results at once. In practical applications, this solution performs well in load forecasting during normal periods, but the forecasting error is significantly amplified in abnormal scenarios such as holidays and weekend transitions.
[0004] Therefore, existing technologies suffer from low accuracy in power load forecasting. Summary of the Invention
[0005] Based on this, the purpose of this application is to at least solve one of the above-mentioned technical defects, especially the technical defect of low accuracy in power load forecasting in the prior art. This application provides a load forecasting method, apparatus, computer equipment, storage medium and computer program product based on feature enhancement.
[0006] In a first aspect, this application provides a load forecasting method based on feature enhancement, comprising: Obtain historical load data sequences, and based on the historical load data sequences, extract load characteristics, time characteristics, and sequence location characteristics at each sampling time. Load fluctuation anomaly detection is performed on historical load data sequences, and the date category of each sampling time is determined based on the detection results; Based on the date category of each sampling time, the time features of each sampling time are enhanced to obtain the enhanced time features of each sampling time. The load characteristics, enhancement time characteristics, and sequence position characteristics at each sampling time are fused to obtain the fused characteristics at each sampling time. Based on the fusion characteristics at each sampling time, a historical load feature sequence is formed and input into a pre-trained load prediction model to obtain the load prediction result.
[0007] In one exemplary embodiment, the historical load data sequence includes load data at each sampling time; load fluctuation anomaly detection is performed on the historical load data sequence, including: Differential calculations are performed on the load data within each sliding window of the historical load data sequence to obtain the local differential sequence of each sliding window; Based on the local difference sequence of each sliding window, the threshold for judging abnormal load fluctuations at each sampling time is determined. Based on the load abnormal fluctuation judgment threshold at each sampling time and the difference value corresponding to each sampling time, the abnormal fluctuation time is determined in each sampling time.
[0008] In an exemplary embodiment, a threshold for determining abnormal load fluctuations at each sampling time is determined based on the local difference sequence of each sliding window, including: Based on the local difference sequence of each sliding window, determine the difference mean and difference standard deviation of each sliding window; Based on the mean and standard deviation of the difference of each sliding window, the threshold for judging abnormal load fluctuations at each sampling time is determined.
[0009] In one exemplary embodiment, based on the detection results, determining the date category of the date to which each sampling time belongs includes: The dates corresponding to each abnormal fluctuation are designated as abnormal dates, and the other dates are designated as normal dates. Determine the abnormal day category for each abnormal date. For any abnormal date, determine the abnormal day category to which the abnormal date belongs as the date category of each sampling time under that abnormal date. For any normal date, the normal category is determined as the date category of the date to which each sampling time belongs under that normal date.
[0010] In one exemplary embodiment, determining the abnormal day category for each abnormal date includes: Extract load data subsequences corresponding to each abnormal date from the historical load data sequence; Based on the load data subsequences corresponding to each abnormal date, the load differential features of each abnormal date are extracted; Based on the load difference characteristics of each abnormal date, cluster analysis is performed on each abnormal date to obtain the clustering results; Based on the clustering results, the abnormal day category for each abnormal date is determined.
[0011] In an exemplary embodiment, the historical load data sequence includes multi-dimensional time data at each sampling time; based on the historical load data sequence, load characteristics, time characteristics, and sequence position characteristics at each sampling time are extracted, including: Based on the multi-dimensional time data at each sampling time, the weekly, monthly, and annual cycle phase features are extracted at each sampling time. The weekly, monthly, and annual cyclic phase features at each sampling time are fused to obtain the temporal features at each sampling time.
[0012] Secondly, this application provides a load forecasting device based on feature enhancement, comprising: The acquisition module is used to acquire historical load data sequences and, based on the historical load data sequences, extract load characteristics, time characteristics, and sequence location characteristics at each sampling time. The detection module is used to detect load fluctuation anomalies in historical load data sequences and, based on the detection results, determine the date category of each sampling time. The enhancement module is used to perform feature enhancement processing on the time features of each sampling time based on the date category of the date to which each sampling time belongs, so as to obtain the enhanced time features of each sampling time; The fusion module is used to fuse the load features, enhancement time features, and sequence position features at each sampling time to obtain the fused features at each sampling time. The prediction module is used to form a historical load feature sequence based on the fusion features at each sampling time and input it into a pre-trained load prediction model to obtain the load prediction result.
[0013] Thirdly, this application 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 above-described method.
[0014] Fourthly, this application 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 above-described method.
[0015] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described method.
[0016] As can be seen from the above technical solutions, the embodiments of this application have the following advantages: The feature-enhanced load forecasting method, apparatus, computer equipment, storage medium, and computer program product provided in this application simultaneously extract load features, time features, and sequence location features, and introduce date categories based on anomaly detection to enhance time features. These features are then fused into a joint feature sequence input prediction model. This solves the problem that traditional load forecasting, which only uses the original load sequence or simple time coding, has single features and cannot distinguish the differences in load fluctuation patterns under different date types. Enhancing time features enables the model to learn the special impact patterns of abnormal dates (such as extreme weather days or major event days) on the load, thereby significantly improving the prediction accuracy and robustness in complex scenarios, and ultimately effectively improving the accuracy of power load forecasting. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a schematic diagram illustrating the load forecasting effect under different load fluctuations provided in the embodiments of this application; Figure 2 A flowchart illustrating a feature-enhanced load forecasting method provided in this application embodiment; Figure 3 A schematic diagram illustrating the improved Informer timing feature encoding provided in this application embodiment; Figure 4 A flowchart illustrating another feature-enhanced load forecasting method provided in this application embodiment; Figure 5 A schematic diagram of a feature-enhanced load prediction device provided in an embodiment of this application; Figure 6 This is a schematic diagram of the internal structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0019] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0020] Traditional Transformer's standard self-attention modeling requires calculating the correlation between any two time points. When the input sequence length is L, its time and space complexity are both O(L). 2 Meanwhile, in multi-step prediction scenarios, the Transformer's decoding process often uses a step-by-step generation method to output the predicted sequence. The inference speed decreases as the prediction step size increases, leading to error accumulation and making it difficult to balance accuracy and efficiency in long-span load prediction. The Informer, based on the Transformer, is a highly efficient improved framework for long-sequence prediction. It significantly reduces computational and storage overhead while modeling long-range dependencies, making it more suitable for time series prediction tasks with multiple periods, strong fluctuations, and long historical windows.
[0021] The core improvements of Informer include: (1) Probabilistic sparse self-attention: In long sequences, attention weights are usually sparsely distributed. Based on this, Informer avoids constructing a complete L×L correlation matrix. During training, it prioritizes retaining queries with greater information content and more significant contribution to the output to participate in attention calculation, so that key queries form a more concentrated attention distribution, extract more relevant values from the context, and significantly reduce multiply-accumulate operations and memory overhead under a longer historical window. (2) Self-attention distillation: In the process of multi-layer encoding, the intermediate representation is downsampled / aggregated, and the sequence length is compressed layer by layer, thereby reducing the computational burden of high-level attention modeling. (3) Generative style decoder: For multi-step prediction, it avoids the problem of decreased inference speed and error accumulation caused by the step-by-step decoding of the classic Transformer. Informer regards multi-step prediction as "conditional generation", using known historical sequences and known future time features (such as week / month / year, holiday markers) as conditions to generate a complete future sequence at once, thereby suppressing error propagation to a certain extent.
[0022] Traditional Transformer location encoding primarily describes absolute and relative positions, making it difficult to express temporal semantics such as "Monday morning" or "holidays." Informer employs a joint encoding approach combining multi-precision temporal feature decomposition and embedding learning. It first extracts multi-granularity cyclic features such as year, day, hour, and weekday, then maps them into continuous vectors through an embedding layer. Furthermore, it automatically learns temporal semantic representations (periodicity, event-based, etc.) at each granularity through training, enhancing the model's ability to learn the temporal patterns of electricity load. This mechanism can be summarized as: temporal feature encoding, feature embedding mapping, embedding synthesis, and dynamic fusion with attention / gating mechanisms to form a complete temporal feature representation.
[0023] In power industry applications, sudden power load fluctuations caused by unexpected events exhibit strong nonlinear characteristics. Under abnormal load scenarios, model prediction errors are significantly higher than in scenarios with normal fluctuations, such as... Figure 1As shown in the figure. This application makes corresponding improvements to the Informer algorithm for this type of abnormal load change scenario.
[0024] In one exemplary embodiment, Figure 2 A flowchart illustrating a feature-enhanced load forecasting method provided in this application is shown below. Figure 2 As shown, a load forecasting method based on feature enhancement is provided. Taking the application of this method to a server as an example, the method includes the following steps S202 to S210. Wherein: Step S202: Obtain historical load data sequence, and based on the historical load data sequence, extract load characteristics, time characteristics, and sequence position characteristics at each sampling time.
[0025] Historical load data series refers to time series data composed of actual power load values recorded at fixed sampling time intervals (such as every hour).
[0026] Among them, load characteristics are numerical indicators that are extracted directly or indirectly from historical load data and reflect the power consumption patterns and trends.
[0027] Among them, the time feature is an encoding that represents the time attribute extracted from the calendar information (such as hour, day of the week, month, whether it is a holiday, etc.) at the sampling time.
[0028] Among them, sequence position feature refers to the sequential sequence position feature (i.e., sequence index position) of the sampling time in the historical load data sequence.
[0029] Optionally, the server acquires a historical load data sequence over a continuous time period, such as load values from the past 30 days at 15-minute intervals. Then, for each sampling moment, three types of features are extracted in parallel: load features are extracted from the original load values; multi-granularity temporal features are extracted from the time data of the sampling moment; and sequence position features are extracted from the sequential index of the sampling moment in the historical load sequence. Specifically, sine / cosine position encoding of Transformer or learnable position embedding vectors can be used to add absolute sequential position information to each sampling moment to characterize its temporal dependency.
[0030] Step S204: Perform load fluctuation anomaly detection on the historical load data sequence, and determine the date category of each sampling time based on the detection results.
[0031] Among them, load fluctuation anomaly detection is the process of identifying abrupt changes or abnormal periods in historical load sequences that do not conform to normal fluctuation patterns.
[0032] Among them, the date category is a category label assigned to the date of each sampling time based on the load fluctuation anomaly detection results, such as normal day or specific abnormal day type.
[0033] Optionally, the server uses a load fluctuation anomaly detection algorithm to analyze historical load sequences and marks the date to which each sampling time belongs as normal or abnormal (such as "holiday").
[0034] Step S206: Based on the date category of the date to which each sampling time belongs, perform feature enhancement processing on the time features of each sampling time to obtain the enhanced time features of each sampling time.
[0035] Feature enhancement processing refers to transforming, weighting, or supplementing the original time features based on date categories to highlight the special characteristics of load behavior on abnormal dates.
[0036] Optionally, the server enhances the temporal features of each sampling time based on the date category, for example by multiplying the temporal features of abnormal days by a weighting coefficient or splicing the category embedding vector.
[0037] Step S208: The load features, enhancement time features, and sequence position features at each sampling time are fused to obtain the fused features at each sampling time.
[0038] Among them, the fusion feature is a joint feature vector formed by splicing or combining load features, enhanced time features, and sequence location features according to certain dimensions.
[0039] Optionally, the server concatenates the load features, enhanced time features, and sequence location features along the feature dimension to obtain fused features.
[0040] Step S210: Based on the fusion features of each sampling time, a historical load feature sequence is formed and input into the pre-trained load prediction model to obtain the load prediction result.
[0041] Among them, the historical load feature sequence is a sequence formed by arranging the fused features of all sampling times in chronological order.
[0042] Among them, the pre-trained load prediction model is a model that has completed parameter training using a large amount of historical data and can output future load values based on the input feature sequence.
[0043] Optionally, the fused features of all sampling times are arranged into a sequence according to time order and input into the pre-trained load prediction model. The model then forward-infers and outputs load prediction results for one or more future times.
[0044] The aforementioned feature-enhanced load forecasting method simultaneously extracts load features, time features, and sequence location features, and introduces date categories based on anomaly detection to enhance time features. These features are then fused into a joint feature sequence input prediction model. This solves the problem of traditional load forecasting, which only uses the original load sequence or simple time coding, resulting in single features and inability to distinguish the differences in load fluctuation patterns under different date types. Enhancing time features enables the model to learn the special impact patterns of abnormal dates (such as extreme weather days or major event days) on the load, thereby significantly improving the prediction accuracy and robustness in complex scenarios, and ultimately effectively improving the accuracy of power load forecasting.
[0045] In an exemplary embodiment, the historical load data sequence includes load data at each sampling time. The load fluctuation anomaly detection of the historical load data sequence includes: performing differential calculation on the load data within each sliding window of the historical load data sequence to obtain a local differential sequence for each sliding window; determining a load anomaly fluctuation judgment threshold for each sampling time based on the local differential sequence of each sliding window; and determining the abnormal fluctuation time in each sampling time based on the load anomaly fluctuation judgment threshold for each sampling time and the differential value corresponding to each sampling time.
[0046] The sliding window refers to a subsequence selection interval that moves over a historical load data sequence at a fixed length.
[0047] Among them, the local difference sequence refers to a series of difference values obtained by calculating the difference between the load values at adjacent sampling times within a sliding window.
[0048] The load abnormal fluctuation judgment threshold is calculated based on the statistical characteristics of the local difference sequence (such as mean and standard deviation) and is used to determine whether the difference value at a single sampling time belongs to the abnormal fluctuation.
[0049] Among them, the abnormal fluctuation moment refers to the sampling point where the load difference value at that moment exceeds the corresponding judgment threshold, indicating that the load has experienced abnormal and significant fluctuations.
[0050] Alternatively, assume that the original load value sequence in the historical load data series is The sliding window at time t is defined as The step size is set to 1 sampling point. Then, a k-order difference feature is constructed for the load value within each sliding window, which can be expressed by the difference operator as follows: When k=1, it is a first-order difference. This method is used to characterize the "instantaneous gradient change" of the load by sequentially calculating the differences between adjacent points. For load values L1, L2, ..., Ln within a window, the first-order difference is calculated to obtain a local difference sequence. Next, for each sliding window, based on all the difference values within that window, an abnormal fluctuation judgment threshold is set for the last sampling point of that sliding window, or an abnormal fluctuation judgment threshold is set for the next sampling point outside that sliding window. Finally, each sampling time in the original load value sequence is traversed, and the difference value corresponding to that sampling time is compared with the corresponding abnormal fluctuation judgment threshold. If the difference value exceeds the abnormal fluctuation judgment threshold, that time is marked as an abnormal fluctuation time.
[0051] In this embodiment, adaptive threshold calculation using local differences within a sliding window achieves highly sensitive and robust detection of load fluctuation anomalies, solving the problem of misjudgment or missed detection caused by using a globally fixed threshold, which is easily affected by overall trends or seasonal fluctuations. The threshold determined based on local statistical characteristics can dynamically adapt to the normal fluctuation range of load at different times (such as day and night, weekdays and weekends), thereby more accurately identifying the moments of abnormal fluctuations truly caused by special events. This provides a reliable basis for subsequent date classification and ultimately improves the load forecasting model's learning ability and prediction accuracy for abnormal days.
[0052] In one exemplary embodiment, determining the load anomaly judgment threshold for each sampling time based on the local difference sequence of each sliding window includes: determining the difference mean and difference standard deviation of each sliding window based on the local difference sequence of each sliding window; and determining the load anomaly judgment threshold for each sampling time based on the difference mean and difference standard deviation of each sliding window.
[0053] The difference mean refers to the arithmetic mean of all difference values in a local difference sequence within a sliding window, reflecting the average trend of load change within the window.
[0054] Among them, the difference standard deviation refers to the degree of dispersion of each difference value in the same difference sequence relative to the difference mean, which measures the stability of load fluctuations within the window.
[0055] Optionally, for each sliding window, the server first obtains the local difference sequence D=[d1,d2,...,dm] for that window, where m=window length-1. Then, it determines the mean and standard deviation of the differences. Next, it sets the threshold for judging abnormal load fluctuations for that sliding window to... , , where u t Let σ be the mean of the differences. t Let λ be the difference standard deviation, λ > 0, and λ be the threshold coefficient used to control the sensitivity of outlier detection. If Then xt This is a point of abnormal load fluctuation. The threshold for judging abnormal load fluctuations adaptively changes with the load value fluctuation level within the sliding window, eliminating the need to manually switch the threshold for different load areas.
[0056] In this embodiment, a statistical threshold is constructed using the difference mean and difference standard deviation, solving the problem that simply relying on empirical thresholds or using only the mean cannot distinguish the magnitude of fluctuations. The difference standard deviation fully reflects the normal range of load fluctuations within a local time period, making the judgment threshold adaptive: a narrower threshold during periods of stable load, sensitively capturing minor anomalies; and a wider threshold during periods of severe load fluctuations, avoiding excessive alarms. This threshold determination method based on statistical features improves the precision and recall of anomaly detection, thereby ensuring the reliability of date category classification, laying a solid foundation for feature enhancement and load forecasting, and effectively improving prediction accuracy.
[0057] For ease of understanding, two methods for determining the threshold for abnormal load fluctuations at the sampling time are provided below. Taking the load value sequence {100,102,105,103,101,110,115,112,108} as an example, the sliding window width W=3 (each window contains 3 sampling points), the step size s=1, and the first-order difference Δx t =x t -x t-1 The difference value starts from t=2.
[0058] The first method is to determine the threshold calculated by the sliding window as the threshold for judging abnormal fluctuations at the last sampling time of the sliding window.
[0059] For window Ωt, its last sampling point is x t A threshold θ is calculated based on all the difference values within the window Ωt. t Used to determine x t Is it abnormal (i.e., determine Δx)? t(Is it too large?) The calculation steps take Ω6 as an example: Ω6={x4,x5,x6}={103,101,110}, the difference sequence within the window D=[Δx5,Δx6]=[-2,+9], the mean difference μ=(-2+9) / 2=3.5, the standard deviation of the difference σ=sqrt([(-2-3.5)²+(9-3.5)²] / 2)=sqrt([30.25+30.25] / 2)=sqrt(30.25)≈5.5, taking λ=2, the threshold θ6=μ+λ·σ=3.5+2×5.5=3.5+11=14.5. The last sampling point corresponding to this window is x6=110, and its difference Δx6=9. Because 9<14.5, x6 is not considered an abnormal fluctuation point. For example, in a window Ω7={x5,x6,x7}={101,110,115}, the difference sequence within the window is D=[Δx6,Δx7]=[9,5], μ=(9+5) / 2=7, σ=sqrt([(9-7)²+(5-7)²] / 2)=sqrt([4+4] / 2)=sqrt(4)=2, θ7=7+2×2=11, Δx7=5, 5<11, so x7 is not considered an abnormal fluctuation point.
[0060] The first method involves each sampling point x t (Except for the first few) will be judged once by the threshold of their corresponding window Ωt, and this window contains x. t The previous W-1 points and x t The threshold itself reflects "reaching x". t "Previous local fluctuation level".
[0061] The second method is to determine the threshold calculated by the sliding window as the threshold for judging abnormal fluctuations at the next sampling time outside the sliding window.
[0062] For window Ωt, its last sampling point is x t A threshold θt' is calculated based on the difference values within the window, which is used to determine the next sampling point x outside the window. t+1 Is it abnormal (i.e., determine Δx)? t+1(Is it too large?) At this time, the window does not contain the point to be predicted, realizing "using historical windows to predict whether the next point will change abruptly". Taking Ω6={x4,x5,x6}={103,101,110} as an example, the difference sequence within the window is D=[Δx5,Δx6]=[-2,9], μ=3.5, σ≈5.5, take λ=2, and the threshold θ6'=μ+λ·σ=14.5. This threshold is used to determine the difference Δx7=x7-x6=115-110=5 of the next sampling point x7. Since 5<14.5, x7 is not determined to be an abnormal fluctuation point. If we use Ω7 to predict x8, Ω7={x5,x6,x7}={101,110,115}, the difference sequence within the window is D=[9,5], μ=7, σ=2, θ7'=11, Δx8=x8-x7=112-115=-3 (absolute value 3<11), then x8 is not considered an abnormal fluctuation point.
[0063] In the second method, a threshold is assigned to each window to detect whether abnormal fluctuations occur at the next time step immediately following the window. This approach is more suitable for scenarios of "online detection" or "early warning," as the threshold is based entirely on historical windows and does not include the point to be detected itself, thus avoiding the contamination of statistics by outliers at the point to be detected.
[0064] In an exemplary embodiment, based on the detection results, determining the date category of each sampling time includes: identifying the date of each abnormal fluctuation as an abnormal date and identifying other dates besides the abnormal dates as normal dates; determining the abnormal day category of each abnormal date, and for any abnormal date, determining the abnormal day category to which the abnormal date belongs as the date category of each sampling time under that abnormal date; for any normal date, determining the normal category as the date category of each sampling time under that normal date.
[0065] The date to which the abnormal fluctuation occurred refers to a calendar day that contains one or more abnormal fluctuations.
[0066] An abnormal date is a date on which at least one abnormal fluctuation occurs.
[0067] A normal date refers to a date without any abnormal fluctuations.
[0068] Among them, the abnormal day category is a sub-type of abnormal days based on load fluctuation patterns and causes (such as "major holidays", "Monday workday", "Sunday rest day").
[0069] The normal category is a uniform category label (such as "ordinary day") assigned to all normal dates.
[0070] Optionally, after marking abnormal fluctuations for all sampling moments, the server aggregates by date: if at least one sampling point within a certain date (0:00 to 23:59) is marked as an abnormal fluctuation moment, then that date is determined as an abnormal date; otherwise, it is determined as a normal date. For each abnormal date, its abnormal day category is further determined through clustering (e.g., category A is "Monday workday," and category B is "large event day"). Then, for all sampling moments under that abnormal date, their date category is uniformly assigned to that abnormal day category. For each normal date, the date category of all sampling moments under it is uniformly assigned to the "normal category." Finally, each sampling moment obtains a discrete date category label.
[0071] In this embodiment, by mapping the detection results of abnormal fluctuations to the date level and further subdividing them into different abnormal day categories, the problem of coarse information caused by simply dividing the entire date into abnormal / normal is solved. Different types of abnormal days have drastically different impact patterns on load, and uniformly labeling them as abnormal days would confuse model learning. By assigning a fine-grained date category (including normal and multiple abnormal subcategories) to each sampling moment, subsequent feature enhancements can be adjusted in a targeted manner. The model can learn the load patterns under different categories of dates, thereby significantly improving the predictive model's adaptability and accuracy under changing external conditions.
[0072] In an exemplary embodiment, determining the abnormal day category of each abnormal date includes: extracting load data subsequences corresponding to each abnormal date from historical load data sequences; extracting load differential features of each abnormal date based on the load data subsequences corresponding to each abnormal date; performing cluster analysis on each abnormal date based on the load differential features of each abnormal date to obtain clustering results; and determining the abnormal day category of each abnormal date based on the clustering results.
[0073] Among them, the load data subsequence corresponding to the abnormal date refers to the load value sequence extracted from the historical load data sequence that belongs to all sampling times of the entire day of the abnormal date.
[0074] Among them, load differential features are statistical or pattern features extracted from the subsequence that describe the dynamics of load changes, such as maximum positive differential, maximum negative differential, differential variance, peak-to-valley difference, and rate of change.
[0075] Cluster analysis is an unsupervised learning method that automatically groups outlier dates with similar load differential characteristics into one category. The clustering result refers to the category division output after processing by a clustering algorithm (such as K-means).
[0076] In practical applications, anomalous day categories can be obtained through K-means clustering, with the number of clusters K determined by the silhouette coefficient. In a specific example, K=3, the three categories of anomalous days are major holidays, Mondays (working days), and Sundays. Correspondingly, the semantic features of anomalous days include holiday type features, Monday features, and Sunday features.
[0077] Optionally, the server first iterates through each abnormal date from the set of marked abnormal dates, extracting the load values of all sampling points within that date to form a load data subsequence. Then, it performs first-order and second-order differencing on this subsequence, extracting several statistical features as load differencing features, specifically including: the mean, standard deviation, maximum positive value, minimum negative value, absolute value average, peak-to-peak value, etc., of the differencing sequence. Next, it constructs a feature matrix from the feature vectors corresponding to each abnormal date, and uses a K-means clustering algorithm (with a pre-defined number of categories K, such as 3-5 categories) to iteratively optimize the intra-cluster distance, obtaining a cluster label for each abnormal date. Finally, based on the clustering results, each abnormal date is assigned an abnormal day category number (e.g., 0, 1, 2), and the business meaning of each cluster can be backfilled as an interpretable category name.
[0078] In this embodiment, unsupervised clustering of load differential features on abnormal dates enables data-driven automatic classification of abnormal day types, solving the problems of time-consuming, subjective, and difficult-to-cover-all-scenario manual pre-setting of abnormal categories. Clustering can discover different naturally existing abnormal patterns in the data, enabling the model to distinguish and learn the impact of these different patterns. Automatic and refined abnormal day category classification provides more accurate prior information for subsequent feature enhancement, thereby directly improving the generalization ability and prediction accuracy of the load forecasting model when facing various unknown abnormal days.
[0079] In an exemplary embodiment, the historical load data sequence includes multi-dimensional time data at each sampling time. Based on the historical load data sequence, load characteristics, time characteristics, and sequence position characteristics at each sampling time are extracted, including: extracting weekly, monthly, and annual cyclic phase characteristics at each sampling time based on the multi-dimensional time data at each sampling time; and fusing the weekly, monthly, and annual cyclic phase characteristics at each sampling time to obtain the time characteristics at each sampling time.
[0080] Among them, multi-dimensional time data refers to the original time information such as year, month, day, hour, minute, second, day of the week, and day of the year, which is parsed from the timestamp of each sampling moment.
[0081] Among them, the weekly cyclic phase feature is a feature obtained by mapping the position of the sampling time in a week (such as Monday to Sunday) to a periodic continuous value (e.g., using sine / cosine coding) to reflect the periodic fluctuation pattern of the load within a week.
[0082] Among them, the monthly cycle phase feature maps the sampling time to the date (1st to 31st) in a month as a periodic feature, reflecting the load change pattern within the month.
[0083] Among them, the annual cycle phase feature maps the number of days in a year (1~365 / 366) of the sampling time into a periodic feature, reflecting the seasonal or annual load pattern.
[0084] Feature fusion refers to splicing or weighting the three types of cyclic phase features mentioned above in the feature dimension to form a unified time feature vector.
[0085] Optionally, for each sampling moment, the server first obtains its timestamp and extracts the following raw data: day of the week (0~6), day of the month (1~31), and day of the year (1~366). Then, to preserve the time periodicity and avoid numerical jumps, a trigonometric transformation is used to generate cyclic phase features, including weekly, monthly, and yearly cyclic phase features. Finally, the weekly, monthly, and yearly cyclic phase features are concatenated into a multi-dimensional vector, which serves as the initial time feature for that sampling moment (which can be further fused with other features or used as input for enhancement processing).
[0086] In practical applications, for input sequences, multi-dimensional features can be extracted using domain knowledge-driven decomposition methods. .
[0087] Wherein, F(t) represents the time feature expression after the fusion of multi-dimensional time features.
[0088] Where DayOfWeek(t) is the weekly cycle phase code, indicating which day of the week it is. The week number of the observation time point t is defined. A linear transformation maps it to the continuous phase space λweek(t). .
[0089] Here, DayOfMonth(t) is encoded as a monthly cycle phase code, meaning that the day is in the first month. The month ordinal number of the observation time point t is defined. It is mapped to the continuous phase space λmonth(t) through a linear transformation. .
[0090] Here, DayOfYear(t) is encoded as a yearly cyclic phase code, meaning that the day is a specific day of the year. The year ordinal number of the observation time point t is defined. It is mapped to the continuous phase space λyear(t) through a linear transformation. .
[0091] For discrete features of the input data, such as whether the date falls in winter, the original Informer model constructs a learnable embedding matrix. To achieve semantic mapping, .
[0092] in, Embedding(·) represents the semantic representation of discrete features, indicating that the semantic representation of discrete features is embedded into the temporal features of the model. This achieves alignment with the hidden layer dimensions of the model; for continuous features, a linear transformation is used. Projecting to a higher-dimensional space eliminates the influence of dimensional differences on the model. This bimodal processing strategy enables the model to simultaneously capture the categorical semantics of discrete features and the numerical trends of continuous features.
[0093] In this embodiment, by converting the original discrete time identifiers into continuous weekly, monthly, and yearly cyclical phase features, the problem of the model's difficulty in learning periodic proximity relationships (e.g., Monday and Tuesday are similar, but Monday and Sunday have large numerical differences yet are actually similar) caused by directly using discrete integer encodings such as days of the week and months is solved. Sine / cosine encoding maintains the smoothness of time cycles, enabling the model to naturally capture similar fluctuation patterns of load in different cycles. At the same time, the fusion of multi-scale cyclical features (weekly, monthly, and yearly) allows the prediction model to comprehensively utilize short-cycle (such as weekday patterns) and long-cycle (such as seasonal power consumption patterns) information, significantly enhancing the model's understanding of the time dimension, thereby improving the accuracy and stability of load forecasting.
[0094] In an exemplary embodiment, the pre-trained load prediction model is specifically an Informer model, which includes a probabilistic sparse self-attention mechanism, a self-attention distillation module, and a generative decoder.
[0095] The step in the above embodiment of "performing feature enhancement processing on the time features of each sampling time based on the date category of each sampling time to obtain the enhanced time features of each sampling time" can be implemented by the following method: First, for each sampling time, obtain the date category label c of its corresponding date. d (Including normal categories and various abnormal day categories), c d The mapping is performed as a K-dimensional semantic vector, and a binary compression form is used to match the original time encoding in scale. Specifically, for the date category label c...d One-hot encoding is performed to obtain a K-dimensional vector. , This represents the temporal feature vector after semantic mapping. To avoid excessive bias at the input level from newly added semantic features, [the following is omitted as it is not relevant to the translation]. Zero-mean compression This ensures that its value falls within the range of [-0.5, +0.5]. This represents the feature vector after zero-mean compression, within the same day. This feature is shared across all sampling times to enhance the model's ability to identify anomalous days. Simultaneously, the weekly, monthly, and yearly cyclic phase features of this sampling time are extracted and concatenated to form a basic time feature vector. .in , , These represent the improved feature vector, the original feature vector, and the anomaly feature semantic vector. Through extension, joint temporal coding can simultaneously express the anomaly feature semantics, thus serving as an enhanced temporal feature.
[0096] The step of "fusing the load features, enhancement time features, and sequence position features at each sampling time" in the above embodiment can be implemented by the following method: mapping the load features to a value encoding vector. Map sequence position features to position encoding vectors The enhanced temporal features are mapped to temporal encoding vectors. Adding the three together yields the final embedding vector at that sampling moment. Subsequently, the final embedding vectors from all sampling times are arranged in chronological order to form an input feature sequence, which is then input into the Informer model to obtain the load prediction results.
[0097] To establish interactive relationships across time features, a parameterized query vector is introduced. Generate feature-level attention weights .
[0098] in, , This represents the embedding vector for each feature. Weighted summation is then performed. Obtain basic fusion representations and further combine them with gating mechanisms. To achieve non-linear interaction, it can be represented as: .
[0099] Finally, the time embedding Tt is output after normalization by the LayerNorm() layer.
[0100] The technical solution of this application can further combine environmental data to achieve load forecasting. The following description uses a specific joint dataset of power load and meteorological data as an example. This dataset spans from January 1, 2012 to January 10, 2015, and includes daily power load sequences and meteorological characteristics data for the same period over several consecutive years. Data features include target variables (daily load time series data of the regional power grid) and covariates (environmental parameters such as daily maximum temperature, minimum temperature, average temperature, cumulative rainfall, and relative humidity). Preprocessing such as standardization, missing value imputation, and stabilization has been performed to reduce abnormal disturbances, unify the unit of measurement, and enhance the identifiability of load dynamic characteristics.
[0101] In the specific implementation, firstly, abrupt changes in intraday load variation are amplified using the sliding difference method. With a difference step size δ=1, window width W=2, and sliding step size s=1, a daily load abrupt change intensity index is calculated. This processing can quickly respond to local changes such as sudden increases and decreases on a smaller time scale, providing information on abnormal fluctuations. In the abnormal day screening stage, to reduce the complexity of the detection process, a simplified threshold strategy (λ=0) is used to construct an anomaly judgment threshold and screen abnormal days. Next, the abnormal day samples are clustered using the K-means clustering algorithm, with the number of clusters K=3 determined by the silhouette coefficient. The clustering results show that abnormal loads exhibit significant time-period clustering, with approximately 81.1% of abnormal samples concentrated in three typical time periods: major holidays, Monday workdays, and Sundays. This indicates that abnormal fluctuations are not random noise but are significantly correlated with the start-up and shutdown switching of industrial and commercial activities.
[0102] Furthermore, two types of anomalous day semantic features are constructed to expand the number of temporal features embedded in the Informer.
[0103] The first category is holiday type features. The HolidayTypeFeature feature is designed to encode holiday types. Unlike the traditional binary labeling of "whether it is a holiday", this strategy further distinguishes holiday types and maps important holidays into binary feature vectors for input into the model, supporting the algorithm to learn the differentiated impact of different holidays on the load.
[0104] The second category is weekly cycle features. Sunday and Monday feature extractors are designed to characterize load fluctuations caused by different weekly cycles. Monday features primarily represent the weekday start-up effect, such as production line startup and office load recovery, while Sunday features represent the weekend closing effect, such as the end of commercial activities and a decline in industrial and commercial electricity consumption. Furthermore, to avoid semantic confusion caused by the overlap of weekends and holidays, a joint verification mechanism using date indexes and holiday status is adopted.
[0105] Furthermore, the Informer time encoder is reconstructed, expanding the daily-scale time feature dimension to 6 dimensions, and the mapping table is reconstructed simultaneously, enabling the model to express the joint information of holiday semantics, weekly semantics, and basic time encoding (week / month / year).
[0106] Meanwhile, to ensure that the newly added semantic features can participate in the attention modeling process, the feature dictionary is expanded by injecting temporal features such as holidays, Mondays, and Sundays into the encoder input. For example... Figure 3 As shown, based on the previous Informer's week, month, and year codes, improved holiday codes, Monday codes, and Sunday codes have been added. The same color represents the same code type. E0, E1, E2, and E3 represent different code contents within the same code type. For example, in the Monday code embedding, E0 and E1 indicate that the date is Monday and not Monday, respectively; H1 indicates that the day is one type of holiday; H2 indicates that the day is another type of holiday; M1 indicates that today is Monday; and S1 indicates that today is Sunday.
[0107] By extending the encoding to include holidays, Sundays, and Mondays, the Informer model no longer relies solely on the periodicity of historical load sequences obtained through implicit learning. Instead, it leverages explicit daily semantic information to enhance prediction stability and generalization capabilities in holiday and weekday switching scenarios.
[0108] In the actual experiment, a stratified sampling strategy oriented towards time series was adopted, dividing the training and test sets into an 8:2 ratio. To evaluate the differences in statistical regularity characterization and nonlinear dynamic fitting capabilities among different models, a multi-source benchmark comparison system was constructed. Measured load data was used as an objective reference, and the Autoregressive Moving Average (ARIMA) model was selected as a typical statistical prediction benchmark model to characterize the fitting ability of traditional linear time series models. LSTM was selected as a representative of deep learning sequence prediction. The calculation results of each model on the five indicators—MAE, MSE, RMSE, MAPE, and R²—showed significant differences. The improved Informer model demonstrated the best overall performance in the power load forecasting task. Its MAE, MSE, RMSE, and MAPE were all significantly lower than those of LSTM and ARIMA, and its goodness of fit R² was 0.8035, significantly higher than LSTM's 0.3390 and ARIMA's 0.4011. This indicates that the improved Informer model can more fully explain the main fluctuation variance of the load series and achieve higher accuracy in trend and amplitude tracking. From the perspective of the time series curve shape, ARIMA is prone to prediction bias and over-smoothing, making it difficult to accurately depict the rapid change process of load. LSTM, on the other hand, has obvious overshoot during some peak periods, reflecting its limitations in characterizing extreme points and accumulating errors in long series. In contrast, the prediction curve of the improved Informer is closer to the actual load as a whole, and the tracking consistency of peak-valley switching and local abrupt change segments is stronger. This verifies that the proposed improved strategy has better accuracy and robustness in load prediction scenarios with long series, strong periodicity and abnormal fluctuations.
[0109] To verify the effectiveness of the proposed improved time-series feature embedding mechanism, ablation comparison experiments were conducted. Under the conditions of uniform hyperparameter configuration (e.g., learning rate, input sequence length of 120, prediction sequence length of 30, etc.) and the same data source, only the time-series embedding and feature injection strategies were changed, and the prediction performance of the original Informer and the improved model was compared and analyzed. The results show that both models can learn the overall trend and periodicity of the power load sequence well, but the improved model shows more significant advantages in error level, fitting consistency, and robustness to special daily scenarios. From the overall index comparison, the improved Informer outperforms the unimproved Informer in all five indices: MAE, MSE, RMSE, MAPE, and R². RMSE is reduced from 4.9206 × 10⁻⁶. 4 Reduced to 3.1390×10 4The results show that the model's ability to suppress extreme errors has been significantly enhanced; the MAPE decreased from 4.5433% to 3.0664%, indicating that the improved model not only has smaller errors on an absolute scale, but also has better stability in the sense of relative error; the goodness of fit R² increased from 0.8035 to 0.9200, an improvement of about 14.5%, which means that the improved model can explain more load fluctuation variance and achieve stronger trend consistency and amplitude tracking ability, reflecting higher global fitting quality and prediction reliability.
[0110] For typical abnormal day scenarios such as cycle switching, a comparison was made between July 31 and August 5, 2014 (including Sunday and Monday). The results showed that the peak prediction percentage error of the improved Informer decreased by 78.9%, indicating that compared with the original Informer, which mainly relied on implicit cycle learning based on historical load, the improved model, by introducing more semantically expressive temporal features, more closely approximates the actual load in terms of peak position and amplitude. To avoid the randomness of conclusions from a single interval, four other time periods were selected for comparison. The peak prediction percentage error decreased in all five time periods, with a maximum reduction of 94.0% and an average reduction of 73.6%, indicating that the improved strategy has good stability and transferability in abnormal cycle scenarios.
[0111] Besides weekly cycle switching, major holidays are also a challenging scenario for load forecasting. Taking the National Day holiday from September 30th to October 7th, 2014 as an example, compared with the original Informer model, the improved model reduced MAE by 27.6%, RMSE by 36.2%, MAPE by 32.5%, R² by 0.1165, and peak prediction percentage error by 44.2%. Further comparison with other holidays such as the Mid-Autumn Festival showed a significant reduction in peak prediction error for major holidays, with the largest reduction reaching 90.3% and an average reduction of 67.3%. The improved time-series feature embedding mechanism effectively enhances the model's ability to identify "atypical load patterns" during holidays. It should be noted that the peak error reduction in the National Day scenario is relatively lower than in some weekly cycle scenarios (44.2% vs. 78.9%), which reflects that the load during major holidays is more strongly influenced by the coupling of multiple factors such as travel and industrial shutdowns, and may still involve more complex nonlinear mechanisms.
[0112] In summary, the improved Informer not only achieves lower error across the entire test set, but also exhibits significant peak error suppression during typical special periods such as Sunday / Monday switching and major holidays. This demonstrates that the proposed improved temporal feature embedding mechanism can effectively compensate for the limitations of the original Informer in terms of insufficient daily semantic expression and inadequate learning of abnormal patterns, thereby improving the accuracy and stability of load prediction.
[0113] In another embodiment, such as Figure 4 As shown, a feature-enhanced load forecasting method is provided. Taking the application of this method to a server as an example, the method includes the following steps: Step S402: Obtain historical load data sequence, and based on the historical load data sequence, extract load characteristics, time characteristics, and sequence position characteristics at each sampling time.
[0114] Step S404: Perform differential calculation on the load data of the historical load data sequence within each sliding window to obtain the local differential sequence of each sliding window.
[0115] Step S406: Based on the local difference sequence of each sliding window, determine the threshold for judging abnormal load fluctuations at each sampling time.
[0116] Step S408: Based on the load abnormal fluctuation judgment threshold at each sampling time and the difference value corresponding to each sampling time, determine the abnormal fluctuation time in each sampling time.
[0117] Step S410: Determine the dates to which each abnormal fluctuation occurs as abnormal dates, and determine the other dates as normal dates.
[0118] Step S412: Determine the abnormal day category of each abnormal date. For any abnormal date, determine the abnormal day category to which the abnormal date belongs as the date category of each sampling time under the abnormal date.
[0119] Step S414: For any normal date, determine the normal category as the date category of each sampling time under that normal date.
[0120] Step S416: Based on the date category of the date to which each sampling time belongs, perform feature enhancement processing on the time features of each sampling time to obtain the enhanced time features of each sampling time.
[0121] Step S418: The load features, enhancement time features and sequence position features of each sampling time are fused to obtain the fused features of each sampling time.
[0122] Step S420: Based on the fusion features at each sampling time, a historical load feature sequence is formed and input into the pre-trained load prediction model to obtain the load prediction result.
[0123] It should be noted that the specific limitations of the above steps can be found in the specific limitations of a feature-enhanced load forecasting method described above.
[0124] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0125] The following describes the feature-enhanced load forecasting device provided in the embodiments of this application. The feature-enhanced load forecasting device has the same inventive concept as the feature-enhanced load forecasting method described above. The solution to the problem provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of one or more feature-enhanced load forecasting device embodiments provided below can be referred to the limitations of the feature-enhanced load forecasting method above. The feature-enhanced load forecasting device described below and the feature-enhanced load forecasting method described above can be referred to each other, and will not be repeated here.
[0126] In one exemplary embodiment, Figure 5 A schematic diagram of a feature-enhanced load forecasting device provided in this application embodiment is shown below. Figure 5 As shown, the feature-enhanced load prediction device includes: an acquisition module 502, a detection module 504, an enhancement module 506, a fusion module 508, and a prediction module 510, wherein: The acquisition module 502 is used to acquire historical load data sequences and extract load characteristics, time characteristics, and sequence position characteristics at each sampling time based on the historical load data sequences. The detection module 504 is used to detect load fluctuation anomalies in historical load data sequences and, based on the detection results, determine the date category of each sampling time. Enhancement module 506 is used to perform feature enhancement processing on the time features of each sampling time based on the date category of the date to which each sampling time belongs, so as to obtain the enhanced time features of each sampling time; The fusion module 508 is used to fuse the load characteristics, enhancement time characteristics and sequence position characteristics at each sampling time to obtain the fused characteristics at each sampling time. The prediction module 510 is used to form a historical load feature sequence based on the fusion features at each sampling time and input it into the pre-trained load prediction model to obtain the load prediction result.
[0127] In an exemplary embodiment, the detection module 504 is specifically used to perform differential calculation on the load data of the historical load data sequence within each sliding window to obtain the local differential sequence of each sliding window; based on the local differential sequence of each sliding window, determine the load abnormal fluctuation judgment threshold for each sampling time; and based on the load abnormal fluctuation judgment threshold for each sampling time and the differential value corresponding to each sampling time, determine the abnormal fluctuation time in each sampling time.
[0128] In an exemplary embodiment, the detection module 504 is specifically used to determine the mean difference and standard deviation of the difference for each sliding window based on the local difference sequence of each sliding window; and to determine the load abnormal fluctuation judgment threshold for each sampling time based on the mean difference and standard deviation of the difference for each sliding window.
[0129] In an exemplary embodiment, the detection module 504 is specifically configured to determine the date to which each abnormal fluctuation moment belongs as an abnormal date, and determine other dates besides the abnormal dates as normal dates; determine the abnormal day category of each abnormal date, and for any abnormal date, determine the abnormal day category to which the abnormal date belongs as the date category of the date to which each sampling moment belongs under the abnormal date; for any normal date, determine the normal category as the date category of the date to which each sampling moment belongs under the normal date.
[0130] In an exemplary embodiment, the detection module 504 is specifically used to extract load data subsequences corresponding to each abnormal date from the historical load data sequence; extract load differential features of each abnormal date based on the load data subsequences corresponding to each abnormal date; perform cluster analysis on each abnormal date based on the load differential features of each abnormal date to obtain clustering results; and determine the abnormal day category of each abnormal date based on the clustering results.
[0131] In an exemplary embodiment, the historical load data sequence includes multi-dimensional time data at each sampling time; the acquisition module 502 is specifically used to extract the weekly cycle phase feature, monthly cycle phase feature and annual cycle phase feature at each sampling time based on the multi-dimensional time data at each sampling time; and to fuse the weekly cycle phase feature, monthly cycle phase feature and annual cycle phase feature at each sampling time to obtain the time feature at each sampling time.
[0132] In one exemplary embodiment, this application also provides a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the steps of any of the feature-enhanced load forecasting methods described above.
[0133] In one exemplary embodiment, this application also 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 any of the feature-enhanced load prediction methods described above.
[0134] In one exemplary embodiment, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the feature-enhanced load forecasting methods described in the above embodiments.
[0135] Indicatively, such as Figure 6 As shown, Figure 6 This is a schematic diagram of the internal structure of a computer device 600 provided in an embodiment of this application. The computer device 600 can be provided as a server. (Refer to...) Figure 6 The computer device 600 includes a processing component 602, which further includes one or more processors, and memory resources represented by memory 601 for storing instructions, such as application programs, that can be executed by the processing component 602. The application programs stored in memory 601 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 602 is configured to execute instructions to perform the feature-enhanced load forecasting method of any of the above embodiments.
[0136] The computer device 600 may also include a power supply component 603 configured to perform power management of the computer device 600, a wired or wireless network interface 604 configured to connect the computer device 600 to a network, and an input / output (I / O) interface 606. The computer device 600 may operate on an operating system stored in memory 601, such as Windows Server™, Mac OS X™, Unix™, Linux™, Free BSD™, or similar.
[0137] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0138] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0139] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can be referred to each other.
[0140] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A feature enhancement based load forecasting method, characterized by, The method includes: Obtain historical load data sequences, and based on the historical load data sequences, extract load characteristics, time characteristics, and sequence position characteristics at each sampling time. Load fluctuation anomaly detection is performed on the historical load data sequence, and the date category of each sampling time is determined based on the detection results; Based on the date category of the date to which each sampling time belongs, feature enhancement processing is performed on the time features of each sampling time to obtain the enhanced time features of each sampling time; The load characteristics, enhancement time characteristics, and sequence position characteristics of each sampling time are fused to obtain the fused characteristics of each sampling time. Based on the fusion features of each sampling time, a historical load feature sequence is formed and input into a pre-trained load prediction model to obtain the load prediction result.
2. The method of claim 1, wherein, The historical load data sequence includes load data at each sampling time; the load fluctuation anomaly detection of the historical load data sequence includes: Differential calculations are performed on the load data within each sliding window of the historical load data sequence to obtain the local differential sequence of each sliding window; Based on the local difference sequence of each sliding window, a threshold for judging abnormal load fluctuations at each sampling time is determined. Based on the load abnormal fluctuation judgment threshold at each sampling time and the difference value corresponding to each sampling time, the abnormal fluctuation time is determined at each sampling time.
3. The method of claim 2, wherein, The determination of the load anomaly judgment threshold for each sampling time based on the local difference sequence of each sliding window includes: Based on the local difference sequence of each sliding window, the mean difference and standard deviation of the difference for each sliding window are determined; Based on the mean and standard deviation of the difference of each sliding window, the threshold for judging abnormal load fluctuations at each sampling time is determined.
4. The method of claim 2, wherein, The process of determining the date category of each sampling time based on the detection results includes: The dates corresponding to each of the abnormal fluctuation times are determined as abnormal dates, and the other dates besides the abnormal dates are determined as normal dates; Determine the abnormal day category for each of the abnormal dates. For any abnormal date, determine the abnormal day category to which the abnormal date belongs as the date category of each of the sampling times under that abnormal date. For any of the normal dates, the normal category is determined as the date category of the date to which each of the sampling times belongs under that normal date.
5. The method of claim 4, wherein, The determination of the abnormal day category for each of the abnormal dates includes: Extract the load data subsequence corresponding to each of the abnormal dates from the historical load data sequence; Based on the load data subsequences corresponding to each of the abnormal dates, the load differential features of each of the abnormal dates are extracted; Based on the load difference characteristics of each of the abnormal dates, cluster analysis is performed on each of the abnormal dates to obtain clustering results; Based on the clustering results, the abnormal day category of each abnormal date is determined.
6. The method of claim 1, wherein, The historical load data sequence includes multi-dimensional time data for each sampling time; the extraction of load characteristics, time characteristics, and sequence position characteristics for each sampling time based on the historical load data sequence includes: Based on the multi-dimensional time data at each of the sampling times, the weekly cycle phase features, monthly cycle phase features, and annual cycle phase features at each of the sampling times are extracted. The weekly, monthly, and annual cyclic phase features of each sampling time are fused to obtain the temporal features of each sampling time.
7. A load forecasting device based on feature enhancement, characterized in that, The device includes: The acquisition module is used to acquire historical load data sequences and, based on the historical load data sequences, extract load characteristics, time characteristics, and sequence position characteristics at each sampling time. The detection module is used to detect load fluctuation anomalies in the historical load data sequence and, based on the detection results, determine the date category of each sampling time. An enhancement module is used to perform feature enhancement processing on the time features of each sampling time based on the date category of the date to which each sampling time belongs, so as to obtain the enhanced time features of each sampling time; The fusion module is used to fuse the load features, enhancement time features, and sequence position features at each sampling time to obtain the fused features at each sampling time. The prediction module is used to form a historical load feature sequence based on the fusion features at each of the sampling times and input it into a pre-trained load prediction model to obtain the load prediction result.
8. 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 method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.