Power grid load restoration method and device based on virtual reference and abnormal three classification, computer equipment, readable storage medium and program product
Patent Information
- Application Number
- CN202610804505.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-05
- Publication Date
- 2026-09-22
AI Technical Summary
然而,这些参照系本身即受异常数据污染,导致电网负荷的还原准确度下降
[0018]第四方面,本申请还提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述的方法的步骤。
Smart Images

Figure CN122801328A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of power technology, and in particular to a method, apparatus, computer equipment, computer-readable storage medium, and computer program product for power grid load restoration based on virtual benchmarks and three-class anomalies. Background Technology
[0002] High-quality load data is fundamental for power system planning, dispatching, trading, and forecasting model training. However, actual grid load data is often affected by multiple factors such as demand response, equipment failures, communication outages, and extreme weather, resulting in various anomalies. Directly using raw, unwashed data will severely distort the inherent patterns of load, leading to errors in subsequent analysis and decision-making. Current methods for restoring grid load often employ comparisons between adjacent time periods, comparisons between similar days, or simple statistical mean substitution. However, these reference systems themselves are contaminated by anomalies, causing a decrease in the accuracy of grid load restoration.
[0003] Therefore, current methods for reconstructing grid load suffer from low accuracy. Summary of the Invention
[0004] Therefore, it is necessary to provide a method, apparatus, computer equipment, computer-readable storage medium, and computer program product for power grid load restoration based on virtual benchmark and anomaly three-classification that can improve accuracy in addressing the above-mentioned technical problems.
[0005] Firstly, this application provides a power grid load restoration method based on virtual benchmarks and three-class anomaly classification, including:
[0006] Obtain load information corresponding to the power grid system;
[0007] Based on the load information and the virtual reference load information corresponding to the power grid system, the abnormal interval in the load information is determined; the virtual reference load information represents the predicted load information when the power grid system is operating normally.
[0008] Obtain the abnormal features corresponding to the abnormal interval; the abnormal features include numerical change abnormal features and time period abnormal features of the abnormal interval;
[0009] Based on the preset identification strategy priority, the numerical change anomaly features and time period anomaly features in the anomaly features, the anomaly type corresponding to the anomaly interval is determined;
[0010] Based on the load restoration strategy corresponding to the anomaly type, load restoration is performed on the anomaly interval to obtain the load restoration result.
[0011] Secondly, this application also provides a power grid load restoration device based on virtual benchmark and three-class anomaly classification, comprising:
[0012] The first acquisition module is used to acquire load information corresponding to the power grid system;
[0013] The first determining module is used to determine the abnormal interval in the load information based on the load information and the virtual reference load information corresponding to the power grid system; the virtual reference load information represents the predicted load information when the power grid system is operating normally.
[0014] The second acquisition module is used to acquire the abnormal features corresponding to the abnormal interval; the abnormal features include numerical change abnormal features and time period abnormal features of the abnormal interval.
[0015] The second determining module is used to determine the anomaly type corresponding to the anomaly interval based on the priority of the preset identification strategy, the numerical change anomaly feature and the time period anomaly feature in the anomaly feature;
[0016] The restoration module is used to perform load restoration on the abnormal interval according to the load restoration strategy corresponding to the abnormal type, and obtain the load restoration result.
[0017] Thirdly, 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 the above-described method.
[0018] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.
[0019] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described method.
[0020] The aforementioned power grid load restoration method, apparatus, computer equipment, computer-readable storage medium, and computer program product based on virtual benchmark and three-class anomaly classification determine abnormal intervals in the load information based on the power grid system's load information and virtual benchmark load information. They then identify the abnormal characteristics within these intervals, determine the anomaly type corresponding to each interval based on preset identification strategy priorities, numerical change anomalies, and time-period anomalies, and finally restore the load based on the load restoration strategy corresponding to each anomaly type. Compared to the traditional method of restoration using statistical mean replacement, this application combines actual load information and virtual benchmark load information to determine abnormal intervals, identifies anomaly types based on the abnormal characteristics within these intervals and various preset identification strategies, and performs load restoration based on the load restoration strategy corresponding to each anomaly type. This multi-dimensional approach to identifying and restoring load anomalies in the power grid system improves the accuracy of load restoration. Attached Figure Description
[0021] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 This is a flowchart illustrating a power grid load restoration method based on a virtual baseline and three-class anomaly classification in one embodiment.
[0023] Figure 2 This is a flowchart illustrating a power grid load restoration method based on a virtual baseline and three-class anomaly classification in another embodiment.
[0024] Figure 3 This is a structural block diagram of a power grid load restoration device based on virtual benchmark and anomaly three-classification in one embodiment;
[0025] Figure 4 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0027] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.
[0028] In related technologies, high-quality load data is the foundation for power system planning, dispatching, trading, and predictive model training. However, actual power grid load data is often affected by multiple factors such as demand response, equipment failure, communication interruptions, and extreme weather, resulting in various types of abnormal data. Directly using raw data that has not been cleaned and restored will severely distort the inherent patterns of the load, leading to errors in subsequent analysis and decision-making. Current load data restoration technologies mainly suffer from the following defects: lack of stable and independent anomaly identification reference benchmarks: Currently, most methods use adjacent time comparison, similar day comparison, or simple statistical mean replacement. Adjacent time comparison cannot identify persistent anomalies; similar day comparison is highly dependent on the accuracy of labels and similarity algorithms and cannot handle anomalies on atypical days. More importantly, these reference systems themselves are contaminated by abnormal data, lacking a theoretical benchmark independent of measured values to determine what constitutes an anomaly; ambiguity and coarsening in anomaly cause discrimination: Most methods only identify anomaly points without distinguishing their causes, using smoothing, elimination, or interpolation processing. However, anomalies with different causes have vastly different data values: data acquisition-related anomalies (such as dead counts and jumps) are worthless and should be completely eliminated; operational control-related anomalies (such as demand response), while real events, distort basic electricity consumption patterns; and meteorological-driven anomalies (such as load surges caused by high temperatures) are themselves important meteorological response characteristics that should be retained. Crude processing methods incorrectly correct genuine meteorologically sensitive load patterns, introducing new system biases; the simplistic approach to meteorological impact assessments—when determining whether anomalies are meteorologically driven, often only temperature is simply correlated, failing to quantify the combined sensitizing effects of multiple meteorological factors (temperature, humidity, wind, rain), making it difficult to distinguish between normal load surges caused by extreme high temperatures and spurious load spikes caused by data acquisition failures, resulting in poor physical interpretability.
[0029] Based on this, this application determines abnormal intervals by combining actual load information and virtual reference load information, determines the abnormal type based on the abnormal characteristics in the abnormal interval and various preset identification strategies, and performs load restoration based on the load restoration strategy corresponding to the abnormal type. This improves the accuracy of load restoration by identifying and restoring load anomalies in the power grid system from multiple dimensions.
[0030] In one embodiment, such as Figure 1 As shown, a power grid load restoration method based on virtual benchmark and three-class anomaly classification is provided. This embodiment illustrates the application of this method to a server. It is understood that this method can also be applied to a terminal, and further to a system including both a terminal and a server, and implemented through interaction between the terminal and the server, including the following steps S202 to S210. Wherein:
[0031] Step S202: Obtain the load information corresponding to the power grid system.
[0032] The server can be a network device that manages the power grid system. Load information can be the actual load information of the power grid system, presented in a sequential format. The load information includes multiple actual load values within the power grid system, each with a corresponding acquisition time point. To reconstruct abnormal load information, the server can obtain the corresponding load information from the power grid system.
[0033] Step S204: Based on the above load information and the virtual reference load information corresponding to the above power grid system, determine the abnormal interval in the above load information; the above virtual reference load information represents the predicted load information when the above power grid system is operating normally.
[0034] The virtual baseline load information can be virtual load information predicted in advance by the server, representing the predicted load information of the power grid system during normal operation. For example, the server trains a recognition model using sample data corresponding to the normal operation of the power grid system, and then uses the recognition model to predict the load information of the power grid system under various actual conditions to obtain the virtual baseline load information. The virtual baseline load information can be presented in a sequential form; for example, it includes the predicted load information for normal operation at various time points, including the current time point and future time points.
[0035] The server can determine abnormal intervals in the load information based on the aforementioned load information and the virtual baseline load information. An abnormal interval represents abnormal information within the load information; for example, load information deviating from the virtual baseline load information can be considered abnormal load information. The server will group consecutive and abnormal load information into abnormal intervals. The aforementioned load information may include one or more abnormal intervals.
[0036] Step S206: Obtain the abnormal features corresponding to the above-mentioned abnormal intervals; the above-mentioned abnormal features include abnormal features of numerical changes in the abnormal intervals and abnormal features of time periods.
[0037] The abnormal load information within the abnormal interval can possess different abnormal characteristics, such as abnormal numerical changes and abnormal time periods. Abnormal numerical changes indicate anomalies in the numerical changes of the load information, while abnormal time periods indicate anomalies during the data collection period. The server can obtain the abnormal characteristics corresponding to the abnormal interval. These obtained abnormal characteristics can include various types, such as abnormal numerical changes and abnormal time periods.
[0038] Step S208: Based on the preset identification strategy priority, the numerical change anomaly features and time period anomaly features among the above-mentioned anomaly features, determine the anomaly type corresponding to the above-mentioned anomaly interval.
[0039] The server can pre-set preset identification strategies, each with a corresponding priority. These preset strategies include, but are not limited to, a first, second, and third identification strategy. The first strategy can be a data acquisition anomaly identification strategy, the second strategy can be an operational control anomaly identification strategy, and the third strategy can be a meteorological-driven anomaly identification strategy, used to identify data acquisition anomalies, operational control anomalies, and meteorological-driven anomalies, respectively. The server can combine the priorities of the preset identification strategies with the numerical change anomaly characteristics and time-period anomaly characteristics mentioned above to determine the anomaly type corresponding to the aforementioned anomaly interval. For example, the server first identifies whether a data acquisition anomaly exists based on the data acquisition anomaly identification strategy, then identifies whether an operational control anomaly exists based on the operational control anomaly identification strategy, and then identifies whether a meteorological-driven anomaly exists based on the meteorological-driven anomaly identification strategy, thereby determining the anomaly type corresponding to the anomaly interval through multiple identification strategies.
[0040] Step S210: Based on the load restoration strategy corresponding to the above-mentioned anomaly type, perform load restoration on the above-mentioned anomaly interval to obtain the load restoration result.
[0041] The aforementioned anomaly types can include multiple categories, each with a corresponding load restoration strategy. For example, data acquisition anomalies may correspond to one load restoration strategy, while operational control anomalies and meteorological-driven anomalies may correspond to another. The server can perform load restoration on the aforementioned anomaly intervals according to the load restoration strategies corresponding to the anomaly types, obtaining the load restoration results. For instance, the server adjusts the values of abnormal load information within the anomaly interval according to the corresponding load restoration strategy, restoring them to the values represented by the load information during normal operation, thus reflecting the true load in the power grid system.
[0042] The aforementioned power grid load restoration method based on virtual benchmark and three-class anomaly classification determines abnormal intervals within the load information based on the power grid system's load information and virtual benchmark load information. It then identifies the abnormal characteristics within these intervals and determines the corresponding anomaly type based on preset identification strategy priorities, numerical variation anomalies, and time-period anomalies. Finally, it restores the load within the abnormal intervals using the corresponding load restoration strategy. Compared to the traditional method of restoring load anomalies using statistical mean replacement, this application combines actual load information and virtual benchmark load information to determine abnormal intervals. Based on the abnormal characteristics within these intervals and various preset identification strategies, it determines the anomaly type and performs load restoration based on the corresponding load restoration strategy. This multi-dimensional approach to identifying and restoring load anomalies in the power grid system improves the accuracy of load restoration.
[0043] In one embodiment, determining the abnormal interval in the load information based on the load information and the virtual reference load information corresponding to the power grid system includes: determining candidate abnormal intervals based on the load information and the virtual reference load information corresponding to the power grid system; for each candidate abnormal interval, if the candidate abnormal interval meets the target abnormal condition, then the candidate abnormal interval is determined to be an abnormal interval in the load information; the target abnormal condition includes: the candidate abnormal load information at each time point in the candidate abnormal interval is greater than the abnormal load threshold, the deviation direction of the candidate abnormal load information in the candidate abnormal interval is consistent, and the duration of the candidate abnormal interval is greater than or equal to the duration threshold.
[0044] In this embodiment, the load information may contain minor data changes due to data fluctuations. The server needs to remove these minor changes from the abnormal load information to extract the true abnormal intervals. Specifically, the server can determine candidate abnormal intervals based on the load information and the virtual reference load information corresponding to the power grid system. For example, the server extracts load information that deviates from the virtual reference load information to form various candidate abnormal intervals. The server can pre-set target abnormal conditions for extracting abnormal intervals. These target abnormal conditions include: the candidate abnormal load information at each time point within the candidate abnormal interval is greater than an abnormal load threshold; the deviation directions of the candidate abnormal load information within the candidate abnormal interval are consistent; and the duration of the candidate abnormal interval is greater than or equal to a duration threshold. Thus, the server can determine abnormal intervals based on the target abnormal conditions. For example, for each candidate abnormal interval, if the candidate abnormal interval meets the target abnormal conditions, the server can determine that the candidate abnormal interval is an abnormal interval in the load information.
[0045] Specifically, the server can calculate the relative deviation rate when identifying abnormal intervals. For example, for each time t, the server calculates the actual load (load information) l. t real With virtual baseline load l ~ t relative deviation rate t To quantify the degree to which the measured value deviates from the theoretical expectation: t =(l t real -l ~ t ) / l ~ t ×100%. Where, l ~ tThe virtual prediction payload (MW) output by a Temporal Convolutional Network (TCN) - Bidirectional Long Short-Term Memory (BiLSTM) - Attention deep neural network model (recognition model) is given. t real The actual load value (load information, MW) collected from the power grid. t >0 indicates that the actual load is higher than the virtual baseline (positive deviation). t <0 indicates that the actual load is lower than the virtual baseline (negative deviation).
[0046] The server can also perform adaptive anomaly threshold determination. Fixed threshold methods cannot adapt to the natural differences in deviation distribution under different power grid load levels and seasonal patterns. The server employs an adaptive threshold method based on the statistical characteristics of normal operating conditions, allowing the anomaly judgment criteria to automatically adjust with the inherent variability of the data.
[0047] On the selected dataset of normal operating time periods, calculate the relative deviation rate for all times. t Standard deviation σ The threshold for anomaly detection is a multiple of this standard deviation. upper =+kσ Threshold lower =-kσ Where k is the threshold factor, typically ranging from 2 to 3. k=2 corresponds to an approximately 95% confidence interval (under the normality assumption), suitable for general accuracy requirements; k=3 corresponds to an approximately 99.7% confidence interval, suitable for scenarios with high specificity requirements and reduced false alarm rates. The default value is k=3, consistent with the screening logic of 3 times the standard deviation of the daily maximum ramp rate.
[0048] The server further determines the valid outlier intervals. Specifically, the server identifies a valid outlier interval (outlier interval) as a continuous time sequence that meets the following three conditions: Condition 1, threshold breach: the deviation rate of all times within the interval. t All satisfy | t |>kσ Condition 1: Exceeding the adaptive threshold range (abnormal load threshold); Condition 2: Consistent direction: The sign (positive / negative) of the deviation within the interval remains consistent, i.e., a set of consecutive positive deviations or consecutive negative deviations, with no alternating reversals in direction; Condition 3: Duration: The duration of the interval exceeds the minimum time window (duration threshold) T. min For example, 1 hour (corresponding to 4 sampling points at 15-minute resolution) to exclude instantaneous single-point out-of-bounds errors caused by random noise. The server defines the abnormal interval satisfying the above conditions as I=[t]. start ,t end The number of sampling points it contains is |I|, t start t represents the start time of the interval. end Indicates the end time of the interval.
[0049] Through this embodiment, the server can combine virtual baseline load information and target anomaly conditions to determine the abnormal interval, thereby improving the accuracy of abnormal interval identification.
[0050] In one embodiment, obtaining the abnormal characteristics corresponding to the aforementioned abnormal interval includes: determining a first abnormal characteristic based on each load information with a consistent and continuous deviation direction in the aforementioned abnormal interval; determining a second abnormal characteristic based on the standard deviation of the rate of change of the abnormal load information in the aforementioned abnormal interval; determining a third abnormal characteristic based on the rate of change of the aforementioned abnormal load information from an abnormal state to a non-abnormal state; determining a fourth abnormal characteristic based on a target time period in the aforementioned abnormal interval that matches a preset abnormal time period; determining a fifth abnormal characteristic based on the continuous abnormal load information in the aforementioned abnormal interval whose rate of change is less than a preset rate of change threshold; determining the numerical change abnormal characteristic based on the aforementioned first abnormal characteristic, the aforementioned second abnormal characteristic, the aforementioned third abnormal characteristic, and the aforementioned fifth abnormal characteristic; and determining the time period abnormal characteristic based on the aforementioned fourth abnormal characteristic.
[0051] In this embodiment, to determine the anomaly type corresponding to the anomaly interval, the server can extract anomaly features from the anomaly interval. These anomaly features can include multiple types, such as a first anomaly feature, a second anomaly feature, a third anomaly feature, a fourth anomaly feature, and a fifth anomaly feature. Specifically, the server can determine the first anomaly feature based on continuous load information with consistent deviation directions within the anomaly interval; the second anomaly feature can be determined based on the standard deviation of the rate of change of the abnormal load information within the anomaly interval; the third anomaly feature can be determined based on the rate of recovery of the abnormal load information from an abnormal state to a non-abnormal state; the fourth anomaly feature can be determined based on a target time period within the anomaly interval that matches a preset abnormal time period; the fifth anomaly feature can be determined based on continuous abnormal load information within the anomaly interval with a rate of change less than a preset rate of change threshold; the fifth anomaly feature can be determined based on the proportion of average value. Therefore, the server can determine the above-mentioned numerical change anomaly based on the above-mentioned first anomaly, the above-mentioned second anomaly, the above-mentioned third anomaly, and the above-mentioned fifth anomaly, and determine the above-mentioned time period anomaly based on the above-mentioned fourth anomaly.
[0052] Specifically, the server can perform feature extraction for three-category classification of anomaly causes. For each identified valid anomaly interval I, the server automatically calculates and extracts the following five types of discriminative features, forming a five-dimensional feature vector f=[f1,f2,f3,f4,f5], providing a quantitative basis for subsequent priority-based three-category classification. Among them, feature one is the consistency of deviation direction (first anomaly feature) f1. This feature quantifies the consistency of deviation direction within the interval, used to distinguish between continuous direction-regulating anomalies and frequent direction-reversing acquisition-type jump anomalies. f1=(|{t∈I| t t-1 >0»ò| t - t-1 |<ε fluct}|) / (|I|-1). Wherein, the number of sampling points whose deviation direction remains unchanged or only fluctuates slightly between adjacent time points is counted. t t-1 >0 indicates that the deviations between two adjacent time points have the same sign (same direction); | t - t-1 |<ε fluctThis indicates that the change in deviation between adjacent time points is less than the threshold for minor fluctuations. Even if such fluctuations lead to sign reversal, they are not counted as substantial directional changes.
[0053] Small fluctuation threshold ε fluct The determination method is as follows: Calculate the first difference δ of the deviation rate sequence on the dataset during the server's normal operation period. t =| t - t-1 |Standard deviation σ δ Take ε fluct =0.5σ δ The physical meaning is that only when the fluctuation of the deviation rate reaches more than half of the normal fluctuation level is it considered a substantial change in direction; minor fluctuations below this threshold are considered random noise.
[0054] Feature two is the standard deviation of the load change rate (second anomaly feature) f2. This feature quantifies the smoothness of load changes within the interval, reflecting whether the fluctuation pattern of the anomaly interval is a high-frequency oscillation or a smooth transition. Specifically, the server analyzes the load sequence {l} within the interval. t real} t∈I Calculate its first-order difference sequence: r t =l t+1 real -l t real , t∈[t start ,t end -1]. Then f2=√(1 / (|I|-2)∑ t=t_start t_end-1 (r t -r ~ ) 2 ), where r ~ f2 represents the mean of the first difference. A larger f2 value indicates more drastic and less smooth load changes within the interval; a smaller f2 value indicates smoother changes.
[0055] Feature three is the recovery feature before and after the interval (third anomaly feature) f3. This feature describes the load recovery pattern after the anomaly interval ends, used to distinguish between instantaneous jumpback (data acquisition-type anomaly recovery feature) and smooth ramp-up (control or meteorological anomaly recovery feature). The server sets the interval end time as t. end The first stable time thereafter is t. rec (Take t) end +1 to t end +n rec The first sampling point within the range that meets the recovery condition. The recovery condition is defined as the absolute value of the load returning to a reasonable neighborhood of the virtual baseline.
[0056] |lt_rec real -l ~ t_rec |≤μ e +kσ e Among them, μ e With σ e The absolute deviation e under normal operating conditions t =|l t real -l ~ t | represents the mean and standard deviation, where k is the recovery tolerance coefficient, typically 1.0. The determination of instantaneous jump can include: if t rec -t end If the load change rate during the recovery process exceeds the average maximum ramp rate under normal operating conditions (≤2, i.e., 1~2 sampling periods, corresponding to 15~30 minutes), then f3 outputs instantaneous jump back to mode. The determination of smooth ramp can include: if t rec -t end If the value is ≥4 (meaning at least 4 sampling cycles, corresponding to a gradual recovery of more than 1 hour), then f3 will output a smooth ramp mode. Otherwise, f3 will output other recovery modes.
[0057] Feature four represents the abnormal time period characteristic (fourth abnormal feature) f4. This feature determines whether the occurrence time of the abnormal interval matches the typical time period of power grid operation and control, providing a business rationality verification for the determination of operation and control type anomalies. Specifically, regarding the basis for setting the typical control time period database, operation and control type anomalies (such as demand response, orderly power consumption, peak shaving and valley filling, etc.) are triggered by manual control commands from the power grid dispatching agency, exhibiting significant time period clustering and strong correlation with time and business rules. Data acquisition type anomalies, on the other hand, can occur at any time and are unrelated to time attributes. Therefore, time period matching plays a business rationality verification role among the three necessary conditions for determining operation and control type anomalies, avoiding misjudging similar anomalies occurring outside of control periods as operation and control type. The method for determining the typical control time period database can be a dual-source calibration method using local dispatching procedures and historical event logs on the server.
[0058] First, the server initializes based on the scheduling procedures. It accesses documents such as the grid dispatching operation procedures, orderly electricity consumption plans, and demand response agreements, extracting clearly defined time periods, including: morning peak shaving period (07:00-09:00 on weekdays), evening peak shaving period (17:00-21:00 on weekdays), midday valley filling period (11:00-14:00 during peak photovoltaic season), orderly electricity consumption execution period (dynamically determined based on the power supply gap plan), demand response execution period (based on the demand response contract's agreed window), and major holiday periods (statutory holidays).
[0059] Second, the server verifies and supplements based on historical event logs. The initial time period database is compared with historical demand response event logs and scheduling operation ticket records. If a certain type of control event exhibits a regular time clustering in the historical records that exceeds the initial time period range, the server appropriately expands the time period boundaries.
[0060] Third, a dynamic update mechanism. The control period database is updated synchronously with revisions to dispatching procedures, orderly electricity consumption plans, and time-of-use pricing.
[0061] For the matching and determination method of the fourth abnormal feature, the server can set the time index range of the abnormal interval to [t]. start ,t end The time index set covered by the m-th preset time period in the control time period database is T. m The server calculates the overlap rate: m =(|[t star ,t end ]∩T m |) / (|[t start ,t end If there exists any m such that Overlap m If the value is ≥0.7, then f4 is considered a successful match.
[0062] Feature five can be the proportion of sustained flat values (the fifth anomaly feature), f5. This feature is used to identify dead counts, i.e., when the acquisition equipment malfunctions, causing the load value to remain almost unchanged for multiple consecutive sampling points. f5=(∑ t=t_start t_end-1 I(|l t+1 real -l t real |<ε flat )) / (|I|-1). Where I() is an indicator function, taking the value 1 if the condition is true, and 0 otherwise; ε flat Preset tolerance. Preset tolerance ε flat The method for determining this may include: on the dataset during normal operation, the server calculates the absolute value d of the load difference between adjacent sampling points. t =|l t+1 real -l t real |, take the larger value between its 1st percentile and the lower limit of measurement accuracy: ε flat =max(Q1(d),ε min Among them, ε min To determine the lower limit of measurement accuracy, a typical value of 0.1 to 0.5 MW is used for 15-minute load data in MW. If the load difference between two adjacent sampling points is less than this tolerance, the server considers that the load has not changed substantially within that interval.
[0063] Through this embodiment, the server can identify multiple types of abnormal features from the abnormal range, thereby determining the abnormal type of the abnormal range based on the multiple types of abnormal features, which improves the accuracy of abnormal type determination.
[0064] In one embodiment, determining the anomaly type corresponding to the above-mentioned abnormal interval based on the priority of a preset identification strategy, the numerical change anomaly characteristics, and the time-period anomaly characteristics among the above-mentioned anomaly features includes: if the above-mentioned abnormal interval is determined to meet a first anomaly condition according to the first identification strategy, then the anomaly type of the above-mentioned abnormal interval is determined to be a data acquisition anomaly; the above-mentioned first anomaly condition includes one or more of the following: the proportion of continuous abnormal load information with a change rate less than a preset change rate threshold in the above-mentioned abnormal interval is greater than or equal to a preset proportion threshold, the above-mentioned change rate is greater than or equal to a preset change rate threshold, and the proportion of consistent and continuous deviation directions in the above-mentioned abnormal interval is less than a preset deviation direction proportion threshold; if the above-mentioned abnormal interval does not meet the above-mentioned first anomaly condition, and the above-mentioned abnormal interval is determined to meet a second anomaly condition according to the second identification strategy, then the anomaly type of the above-mentioned abnormal interval is determined to be an operation control anomaly; the above-mentioned second anomaly condition includes one or more of the following: consistent and continuous deviation directions in the above-mentioned abnormal interval If the proportion of the deviation direction is greater than the preset deviation direction proportion threshold, the standard deviation of the above abnormal load information change rate is less than the preset standard deviation threshold, and the above target time period is greater than or equal to the preset time period matching threshold; if the above abnormal interval does not meet the above first abnormal condition and the above second abnormal condition, and the above abnormal interval is determined to meet the third abnormal condition according to the third identification strategy, then the abnormal type of the above abnormal interval is determined to be a meteorological driven anomaly; the above third abnormal condition includes one or more of the following: the correlation of the target somatosensory index sequence of the above abnormal load information is greater than or equal to the preset correlation threshold, the deviation between the above abnormal load information and the above virtual reference load information is less than or equal to the load deviation threshold corresponding to the target meteorological sensitivity; the above target somatosensory index sequence represents the driving direction and magnitude of all meteorological factors on the load at each moment; the above target meteorological sensitivity represents the load change caused by a unit temperature change, and the above target meteorological sensitivity is determined based on the temperature corresponding to the collection time of the above load information.
[0065] In this embodiment, the server can pre-set multiple identification strategies, such as a first identification strategy, a second identification strategy, and a third identification strategy. The priority of the pre-set identification strategies decreases sequentially from first to third. The server identifies the anomaly types within the anomaly range in the order of the first, second, and third identification strategies. Specifically, the first identification strategy can be based on a first anomaly condition, the second identification strategy can be based on a second anomaly condition, and the third identification strategy can be based on a third anomaly condition.
[0066] The first abnormal condition includes one or more of the following: the proportion of abnormal load information that is continuous and has a rate of change less than a preset rate of change threshold in the above-mentioned abnormal interval is greater than or equal to a preset proportion threshold; the change rate is greater than or equal to a preset rate of change threshold; and the proportion of consistent and continuous deviation directions in the above-mentioned abnormal interval is less than a preset deviation direction proportion threshold. The second abnormal condition includes one or more of the following: the proportion of consistent and continuous deviation directions in the above-mentioned abnormal interval is greater than a preset deviation direction proportion threshold; the standard deviation of the change rate of the above-mentioned abnormal load information is less than a preset standard deviation threshold; and the target time period is greater than or equal to a preset time period matching threshold. The third abnormal condition includes one or more of the following: the correlation of the target somatosensory index sequence of the above-mentioned abnormal load information is greater than or equal to a preset correlation threshold; and the deviation between the above-mentioned abnormal load information and the above-mentioned virtual baseline load information is less than or equal to a load deviation threshold corresponding to the target meteorological sensitivity. The target somatosensory index sequence represents the driving direction and magnitude of all meteorological factors on the load at each moment; the target meteorological sensitivity represents the load change caused by a unit temperature change, and the target meteorological sensitivity is determined based on the temperature corresponding to the collection time of the above-mentioned load information. The server can pre-determine the above-mentioned target somatosensory index sequence and target meteorological sensitivity.
[0067] When identifying anomaly types, the server can first determine whether the anomaly interval meets the first anomaly condition according to the preset identification strategy priority. If the server detects that the anomaly interval meets the first anomaly condition, the anomaly type of the above anomaly interval is determined to be a data acquisition anomaly, which indicates that an anomaly occurred during the data acquisition process. If the above anomaly interval does not meet the first anomaly condition, and the server determines that the above anomaly interval meets the second anomaly condition according to the second identification strategy, the anomaly type of the above anomaly interval is determined to be an operation and control anomaly, which indicates an anomaly caused by power grid control behavior. If the above anomaly interval does not meet the first anomaly condition and the second anomaly condition, and the server determines that the above anomaly interval meets the third anomaly condition according to the third identification strategy, the anomaly type of the above anomaly interval is determined to be a weather-driven anomaly, which indicates an anomaly caused by changes in weather conditions.
[0068] Specifically, to identify the anomaly types within anomaly intervals, the server can pre-quantify a single meteorological sensitivity coefficient (target meteorological sensitivity). The server uses temperature T as a representative variable and quantifies its sensitivity coefficient (target meteorological sensitivity) S through piecewise linear fitting to characterize the statistical driving force of a single meteorological element on the load.
[0069] The server can segment temperature ranges. The response of electrical load to temperature exhibits a significant nonlinear characteristic. Within the comfortable temperature range, the load is primarily driven by production and daily life rhythms and is insensitive to temperature changes. When the temperature falls below or rises above a certain critical value, heating or cooling loads are activated, and the relationship between load and temperature changes from a gradual trend to a significant monotonic change, forming a statistically identifiable inflection point. Based on the above physical mechanism, the server employs a data-driven adaptive segmentation method, with the following specific steps:
[0070] Step 1, Data Preparation. The server retrieves the daily average temperature and corresponding daily maximum load from all samples in the training set under normal operating conditions, forming a scatter dataset {(T... i ,L i max )} i=1 N .
[0071] Step 2, Inflection Point Identification. The server uses temperature T as the independent variable and daily maximum load L... i max As the dependent variable, fit a locally weighted regression curve and calculate the first numerical derivative of the curve. Define the temperature point where the absolute value of the curve's slope changes significantly as the inflection point: the lower limit inflection point T. low The inflection point T represents the point where the absolute value of the slope decreases and approaches zero as the temperature transitions from the low-temperature zone to the comfort zone. high This is the inflection point where the absolute value of the slope increases significantly from near zero as the temperature transitions from the comfort zone to the high-temperature zone. The specific value of the inflection point is automatically determined by minimizing the residuals of the piecewise linear fitting.
[0072] Step 3, Inflection Point Adaptive Calibration. To avoid the subjectivity and regional limitations of manually setting fixed thresholds, the server adopts a data-driven calibration method combining traversal search and residual minimization. First, the temperature values are sorted in ascending order, and the minimum and maximum temperatures are set to Tmin and Tmax, respectively. min With T max After removing the extreme temperature values at both ends (typically α=10), all observed values within the remaining temperature range are used as the candidate inflection point set: T cand ={T i |T i ∈[Q α (T),Q 1-α (T)]}。 Where Q α (T) and Q 1-α (T) represents the αth and (1-α)th percentiles of the temperature series, respectively. For any pair of ordered inflection point combinations (T) in the candidate set... a ,T b ), satisfying T a <T bThe server divides the temperature domain into three intervals and fits a linear model to each, applying a continuity constraint on the piecewise function at the inflection points: L max {a L T+b L , T≤T a; a C T+b C T a <T<T b ;a H T+b H , T≥T b The constraints include: a L T a +b L =a C T a +b C a C T b +b C =a H T b +b H .
[0073] The server can define the global fit residual sum of squares corresponding to this inflection point combination: RSS(T a ,T b )=∑ i N (L i max -L ~ i max (T a ,T b )) 2 ), where L ~ i max (T a ,T b ) is at the inflection point (T) a ,T b The piecewise linear model predicts the i-th sample. The server iterates through all samples that satisfy T. a <T b The optimal inflection point is selected from the ordered combinations of inflection points that minimize the Residual Sum of Squares (RSS): (T low ,T high )=argmin T_a,T_b∈T_cand, T_a<T_b RSS(T a ,T b ).
[0074] At the same time, the server introduces a minimum comfort zone span constraint T. high -Tlow ≥ T min (Typical value is 3~5℃) to prevent overfitting due to an excessively narrow comfort zone. If the optimal solution does not meet this constraint, then the suboptimal solution under the constraint is adopted.
[0075] Step four, interval definition and sensitivity extraction. The server, based on the inflection point obtained from calibration, divides the temperature domain into three non-overlapping continuous intervals: Low temperature region: Ω L : T≤T low Comfort zone: Ω C :T low <T<T high High temperature zone: Ω H : T≥T high The sensitivity coefficient for each interval is the regression slope of the corresponding segment: S L =a L S C =a C S H =a H Among them, S k (Target meteorological sensitivity, unit: MW / ℃) Quantitatively characterizes the load change caused by a unit temperature change within this temperature range. Comfort zone Ω C Inner S C It usually approaches zero, while in the low-temperature region S L With high temperature zone S H The absolute values are significantly greater than zero, reflecting heating sensitivity and cooling sensitivity, respectively. This calibration is automatically completed based entirely on the statistical characteristics of local historical data. Power grids in different regions and seasons only need to re-execute the above process using local data to adaptively obtain suitable inflection point locations and sensitivity coefficients.
[0076] For the target perceived load index sequence, the server can first perform a multi-factor Shapley Additive Explanations (SHAP) contribution decomposition. However, single temperature sensitivity can only characterize the relationship between load and temperature from a statistical correlation perspective, failing to quantify the synergistic driving effect of multiple meteorological factors such as humidity, wind speed, and rainfall, nor can it reflect the complex mapping between meteorological conditions and load learned by the deep neural network model from a high-dimensional feature space. The server can use the pre-trained TCN-BiLSTM-Attention deep neural network model as a black box, applying the SHAP method for global and local interpretation, quantifying the comprehensive contribution of multiple meteorological factors to the predicted load from a model attribution perspective.
[0077] The calculation principle of the SHAP value is based on the Shapley value theory of cooperative game theory. It calculates the expected marginal contribution of each feature across all possible combinations of feature subsets to obtain the attribution value of that feature to a single predicted value. For the virtual predicted value at time t (the predicted load information in the virtual baseline load information), l... ~ t =f(x t ), where x t =(x t (1) ,x t (2) ,...,x t (D) Let φ be a D-dimensional input feature vector. The SHAP value of the j-th feature is defined as: φ j (t)=∑ S包含于F?{j} (|S|!(|F|-|S|-1)!) / (|F|!)[f S (x t (S∪{j}) )-f S (x t (S) Where F = {1, 2, ..., D} is the set of indices of all input features; S is any subset of F that does not contain feature j, and |S| is the size of the subset; (|S|!(|F|-|S|-1)!) / (|F|!) is the Shapley weight, ensuring that all feature subsets are considered equally; f S (x t (S) f represents the expected output of the model when only a subset of features S is used, achieved by averaging the background dataset with masked features; S (x t (S ∪{j}) )-f S (x t (S) Let φ be the marginal contribution of feature j under a specific subset S. The physical meaning of this formula is: the SHAP value φ of feature j at time t. j (t) is equal to the weighted average of the marginal contribution of this feature to the predicted output across all possible combinations of features. SHAP values satisfy additivity—the sum of the SHAP values of all input features equals the difference between the model's predicted value and its baseline expected value: l ~ t -E[l ~ ]=∑ j=1 D φ j(t). In actual computation, the server uses TreeSHAP or its kernel SHAP approximation algorithm to reduce computational complexity while ensuring accuracy, making time-by-time SHAP decomposition feasible for large-scale datasets.
[0078] Regarding the choice of computational granularity for SHAP decomposition, the server selects a single prediction time t as the smallest unit for SHAP contribution decomposition, rather than aggregating and attributing a continuous load interval as a whole. This is mainly based on the following technical considerations: First, the SHAP method is based on the Shapley value theory of cooperative game theory. Its calculation process requires evaluating the marginal contribution of each feature value at a specific time relative to the baseline expected value for a clear scalar prediction output. If a load interval is treated as a whole, its output is a vector sequence, lacking a single output scalar, making it impossible to directly apply SHAP decomposition. If the load values at each time within the interval are aggregated into a mean or sum, the subtle differences in time-varying patterns will be lost. Second, the driving force of meteorological factors on load has significant time-varying and non-stationarity. The magnitude and even direction of the SHAP contribution of the same meteorological element at different times within the same day may be completely different. For example, on a hot summer day, the temperature at 2 PM has a very strong positive driving force on the cooling load, while at 4 AM the cooling load subsides, and the SHAP value of the temperature feature approaches zero. Only by breaking down the data hourly can the aforementioned refined intraday differences be captured. Thirdly, the determination of meteorological-driven anomalies requires a Pearson correlation coefficient test on the deviation sequence and the comprehensive sensory index sequence at each time point within the anomaly interval. This test uses time points as statistical sample units; only by calculating the SHAP value hourly and constructing the comprehensive sensory index φ hourly can this be achieved. t This ensures that each anomalous interval has a sufficient number of effective sample points commensurate with its length, guaranteeing the statistical power of the correlation test. Fourth, it provides diagnostic information for heterogeneity within anomalous intervals. In practical engineering, the intensity of meteorological driving forces within an identified anomalous interval may not be uniform. Time-by-time SHAP decomposition can reveal which sub-periods within the interval are indeed driven by meteorology and which sub-periods may be subject to superimposed interference from other factors, providing a more granular basis for differential correction.
[0079] Regarding the selection criteria for meteorological features, the meteorological features included in the SHAP decomposition of the server follow three principles: physical interpretability, which requires a recognized physical driving relationship with the power load; temperature directly affects heating and cooling loads through perceived comfort; humidity indirectly drives air conditioning loads by affecting the heat dissipation efficiency of the human body; wind speed affects heat loads by changing the convective heat transfer coefficient of the building envelope; and rainfall affects commercial and residential electricity consumption by changing outdoor activity patterns and lighting conditions; data availability, which requires standardized elements that are routinely collected by power dispatching or meteorological departments to ensure the portability of the method across different power grids; and model effectiveness, which only retains features whose global mean absolute value of SHAP in the deep neural network model exceeds a preset threshold, and removes redundant elements that are not identified as effective predictors by the model.
[0080] Based on the above, the meteorological features included in the server's data include: dry-bulb temperature T. dry Dew point temperature T dew Relative humidity (RH), wind speed (WS), rainfall (P) rain And the perceived temperature T_ constructed from a nonlinear combination of temperature and humidity. apparent Derivative features, etc. After standardization, the SHAP values of the above features are summed to obtain the total contribution of multi-factor meteorological factors: SHAP. t met =∑ j∈F_met φ j (t). Wherein, F met For a set of meteorological feature indexes, φ j (t) represents the SHAP value (in MW) of the j-th meteorological feature at time t. t met From the perspective of model attribution, it reflects the comprehensive driving direction and magnitude of all meteorological factors on the predicted load at a specific moment. Positive values indicate that meteorological factors drive the load to increase, negative values indicate that they drive the load to decrease, and absolute values indicate the driving intensity.
[0081] The server can combine the above parameters to construct a comprehensive somatosensory index (target somatosensory index sequence) φ t The server integrates univariate sensitivity, reflecting statistical regularities, with multi-factor SHAP contribution, reflecting model attribution logic, to construct a comprehensive, multi-dimensional perception index. This index confirms the combined effect of meteorological factors on the load from both statistical and model-aware dimensions. For time t, the formula for calculating the comprehensive perception index (target perception index sequence) is: φ t =λ1(S k T t )+λ2SHAP t met Among them, S k The current temperature Tt Sensitivity coefficient (MW / ℃) for the temperature range k∈{L,C,H}. T t =T t -T ref The current temperature and the comfort zone reference temperature T ref The difference (°C), T ref Take the comfort zone Ω C Midpoint temperature; SHAP t met The total contribution of meteorological factors (MW) is denoted as λ1 and λ2, which are the fusion weights and satisfy the normalization constraint λ1+λ2=1.
[0082] Specifically, regarding the method for determining the fusion weights, the calibration of weights λ1 and λ2 adopts a data-driven method based on historical typical meteorological scenarios to avoid biases caused by subjective manual weighting. This includes:
[0083] Step 1: Selection of Typical Scenarios. The server selects several typical scenarios with clear meteorological load characteristics from the training set under normal operating conditions, including extreme high temperature days (dominated by cooling load), extreme low temperature days (dominated by heating load), and comfortable temperature days (dominated by base load). Under each scenario, the driving force of meteorological factors on the load should have significantly distinguishable differences in magnitude.
[0084] Step two: Independently calculate the standard deviation of each of the two components. The server calculates the sensitivity-weighted temperature difference term S for each of the selected typical scenarios. k T t SHAP Total Contribution Item t met Standard deviation σ S With σ SHAP .
[0085] Step 3, Weight Initialization and Normalization. To ensure that the two components have a balanced expression strength in the fusion index and to avoid one component dominating the fusion result due to differences in dimensions and variation amplitudes, the server initializes the fusion weights to be inversely proportional to the standard deviation of each component: λ1 (0) =(1 / σ S ) / (1 / σ S +1 / σ SHAP ), λ2 (0) =(1 / σ SHAP ) / (1 / σ S +1 / σ SHAP This initialization strategy ensures that components with greater variation are moderately compressed and components with less variation are moderately amplified, resulting in a balanced expression intensity of both in the fusion index.
[0086] Step four, grid search fine-tuning. The server aims to optimize the accuracy of weather-driven anomaly detection (using a manually labeled validation set as a reference), with an initial value of λ1. (0) With λ2 (0) A grid search is performed within the neighborhood of φ. The step size is 0.05, and the search range is [0.2, 0.8] (restricted by the normalization constraint λ1+λ2=1). The step size of 0.05 is set based on the following: First, a change in weight on the order of 0.01 affects φ t The impact of the correlation coefficient between the sequence and the biased sequence is below the statistical noise level, and an accuracy of 0.05 is sufficient to capture the substantial impact of weight changes on the discrimination performance. Secondly, under the normalization constraint, only a single free parameter λ1 needs to be searched. A step size of 0.05 generates 13 candidate values in the range [0.2, 0.8]. Combined with a validation set evaluation of a small number of typical scenarios, the efficiency of completing the full grid traversal can be improved. Furthermore, the weight initialization value λ1... (0) After calculation using the inverse standard deviation, the values typically fall within the range of [0.4, 0.6]. The search range of [0.2, 0.8] covers a neighborhood of approximately 0.2 above and below the initial value. A step size of 0.05 can generate a sufficiently high density of high-quality candidate points within this range. The weight combination that yields the highest classification accuracy is selected as the final calibration value. Regarding the interpretable range and boundary thresholds for meteorological sensitivity, to quantitatively delineate meteorological-driven anomalies from non-meteorological deviations, the server defines the interpretable range and its boundary threshold system for meteorological sensitivity. The interpretable range for meteorological sensitivity refers to the reasonable portion of the load deviation that can be explained by temperature changes within a given temperature range k. Its upper limit is the temperature change and the sensitivity coefficient S for that range. k The product is multiplied by β. Let I be the set of time indices for the identified anomalous intervals, then the upper limit of the meteorologically explainable deviation for each interval is: explainable =β|S k |1 / (|I|)∑ t∈I | T t | Wherein, β is the tolerance factor, typically 1.2, which physically means allowing a 20% margin between measured and theoretical meteorological deviations to cover additional deviations caused by the synergistic effects of multiple meteorological elements and model simplification approximations. The value of β should not exceed 1.5, otherwise it will lose its demarcation significance, and its value can be fine-tuned based on the accuracy evaluation of historical validation sets.
[0087] The following boundary threshold conditions must be met for the determination of meteorological driving anomalies:
[0088] Correlation condition: Deviation sequence { t} t∈I With the comprehensive sensory index sequence {φ t} t∈IThe Pearson correlation coefficient must satisfy ρ ≥ 0.7. This threshold is set based on the following statistical argument: From the perspective of significance testing, for a typical outlier interval size—assuming an outlier interval lasting 4 hours contains n=16 time sampling points at a 15-minute resolution—the correlation coefficient ρ follows a t-distribution with n-2=14 degrees of freedom. When ρ = 0.7, the test statistic t = ρ√(n-2) / √(1-ρ) 2 The p-value is approximately 0.0025 with 14 degrees of freedom, which is much smaller than the commonly used significance level of 0.01. This indicates that the probability of this correlation being caused by random factors is less than three per thousand. In statistical correlation interpretation conventions, |ρ| ≥ 0.7 is defined as a strong correlation interval, which can exclude non-meteorological driving components that may be mixed in with moderate correlation (0.3 ≤ |ρ| < 0.7). Based on the hypothesis testing framework, the server sets the null hypothesis H0 as no correlation between the biased sequence and the comprehensive sensory index (ρ = 0), and the significance level is set to α = 0.01, corresponding to the minimum determinable correlation coefficient ρ. min (When n=16). The threshold of 0.7 is higher than the statistical significance threshold, ensuring a high degree of statistical confidence in the decision; at the same time, it is lower than the high confidence value (ρ) for the minimum 1-hour interval. min (When n=4), it balances sensitivity and specificity within the typical anomaly interval length of 1 to 4 hours.
[0089] Furthermore, the 0.7 threshold also possesses methodological self-consistency. The server's three-classification anomaly system employs priority criteria, with meteorological-driven anomalies at the third priority. Intervals reaching this level of inspection have undergone multiple filters, including dead counts, jumps, instantaneous jumps, direction reversals, smooth ramps, and time-period matching, placing them within a high-purity candidate pool. Setting a high threshold of ρ≥0.7 reflects a defensive principle, allowing a few meteorologically driven intervals with ambiguous boundaries to be temporarily unclassified for manual confirmation. This prevents the lowering of standards and the erroneous inclusion of non-meteorological biases into the meteorological-driven category, thus avoiding the solidification of data distortion. This threshold can be adaptively adjusted based on the correlation coefficient distribution of known meteorological-driven anomalies in the local power grid's historical data.
[0090] Reasonableness condition for amplitude: The average absolute deviation amplitude within the interval must be within the range that meteorological sensitivity can explain. ~ avg =1 / (|I|)∑ t∈I | t |≤β|S k |(| T|) ~ avg Among them, (| T|) ~avg =1 / (|I|)∑ t∈I |T t -T ref | represents the deviation of the average temperature over the interval. This condition ensures that the magnitude of the deviation is consistent with the physical inference magnitude of the meteorological sensitivity coefficient. Deviations exceeding this range are more likely caused by non-meteorological factors (such as equipment failure, manual scheduling, etc.) and should be classified as fallback or manually confirmed. The physical meaning of this comprehensive perceived index is the magnitude of the combined force of meteorological factors on the load, confirmed from both statistical regularities (sensitivity-weighted temperature difference term) and model cognition (SHAP total contribution term). φ t The positive or negative sign indicates whether meteorological factors collectively drive the load up or down, and its absolute value represents the driving intensity (MW). When the actual load deviation is different from φ... t The trends are highly consistent (ρ≥0.7), and the amplitude is within the range that can be explained by meteorological sensitivity. ~ avg ≤β|S k |(| T|) ~ avg When the deviation is determined to be driven by meteorological factors, it can be confidently determined that the deviation is driven by meteorological factors, thus providing a solid physical and data-driven identification basis for the three-classification of anomalies in step three.
[0091] After determining the target somatic perception index sequence and target meteorological sensitivity, the server can identify the anomaly types within abnormal intervals. The server can perform a three-class classification discrimination logic based on priority. For the extracted feature vector f=[f1,f2,f3,f4,f5], classification discrimination is performed in the following priority order. This priority design reflects a progressive logic from data pathological features (easiest to determine and should be eliminated first) to operational morphological features and then to meteorological correlation features (requiring the most complex correlation analysis).
[0092] The first priority (first identification strategy) is data acquisition anomalies (data acquisition anomalies can be identified if any one of the following conditions is met). Data acquisition anomalies are caused by physical factors such as measurement equipment failure, communication interruption, and signal interference. The data is completely distorted and has no value for preservation; therefore, they should be identified and eliminated first. Condition 1: Dead count characteristic: f5 > 0.8. The threshold of 0.8 is set based on the following: even during the most stable off-peak period at night, normal load fluctuations should not cause more than 80% of adjacent sampling intervals to remain almost unchanged. A balance is achieved between the detection rate and the false alarm rate. Condition 2: Drastic jump characteristic (must simultaneously meet the following two sub-conditions). Sub-condition a is abnormally large change: max t∈[t_start,t_end-1] |r t |>3σ ramp Among them, σ rampThis represents the standard deviation of the absolute value of the load change rate during historical normal operation. The setting of 3 standard deviations is based on the assumption of a normal distribution; the probability of data exceeding this range is less than 0.3%, constituting a highly confident anomaly. Sub-condition b is frequent direction reversal: f1 < 0.5. Here, f1 < 0.5 indicates that more than half of the sampling points within the interval exhibit alternating positive and negative directions, the deviation direction cannot be maintained, and it exhibits high-frequency oscillation characteristics. 0.5 is the natural boundary between consistent and inconsistent directions; less than 0.5 means that reversal occurs most of the time, and its ability to maintain direction is weaker than a random coin toss (expected value 0.5). Sub-conditions a and b must be satisfied simultaneously, thus ensuring that the magnitude of the jump is far greater than normal fluctuations through 3 standard deviations; frequent direction reversals exclude true unidirectional load abrupt changes (such as start-up and shutdown of large industrial users), locking the anomaly into the unique bidirectional violent oscillation characteristic of data acquisition failures. Condition 3: Instantaneous jump back characteristic: f3 = instantaneous jump back mode. This means that within 1-2 sampling periods after the abnormal interval ends, the load instantly recovers to a reasonable neighborhood of the virtual reference, with a recovery rate far exceeding the normal operating ramp-up level. This mode is a typical recovery characteristic of faults such as data retransmission after communication interruption and acquisition channel switching.
[0093] The second priority (second identification strategy) is operational control anomalies (operational control anomalies must simultaneously meet all of the following conditions and not meet any of the first priority conditions). Operational control anomalies are caused by proactive grid control behaviors such as demand response, orderly power consumption, and peak shaving and valley filling. Although the data is a true record, it reflects load distortion under human intervention. When correcting, it is necessary to reasonably retain some control information while restoring the basic pattern. Condition 1: Continuous direction: f1>0.7. Here, 0.7 means that more than 70% of the sampling points in the interval have a consistent deviation direction, indicating the existence of continuous and conscious load adjustment behavior. This threshold is higher than the random boundary of 0.5, but not too strict (such as 0.9), in order to take into account the possible short-term reverse fluctuations that may exist in the early or late stages of control. Condition 2: Smooth change: f2<3σ rampThe first condition is that the standard deviation of the load change rate within the interval is lower than the threshold set in the first-priority drastic change criterion. This condition ensures that the change amplitude of the interval does not reach the level of a data acquisition failure. Intervals reaching the second priority no longer meet the first priority, and their maximum change rate does not exceed 3 times the standard deviation. On this basis, the standard deviation of the change rate of the entire interval is also required to be lower than this threshold, ensuring that the control behavior is a continuous and smooth load adjustment, rather than intermittent drastic oscillations. Condition 3: Time period matching: f4 = successful matching. That is, the overlap rate between the abnormal interval and at least one time period in the preset typical control time period library is not less than 0.7. This condition provides a business rationality verification to ensure that the time of occurrence of the anomaly coincides with the known control activity time period of the power grid. All three conditions above must be met simultaneously to determine it as an operational control type anomaly. Among them, the direction of continuity confirms the consciousness of the adjustment, the change of smoothness confirms the physical feasibility of the adjustment, and the time period matching confirms the business rationality of the adjustment.
[0094] The third priority (third identification strategy) is meteorological-driven anomalies (meteorological-driven anomalies must simultaneously meet all of the following conditions). Meteorological-driven anomalies are triggered by extreme weather or significant changes in meteorological elements, and represent the actual physical response of the load to meteorological conditions. Such deviations are important characteristics of meteorologically sensitive loads and should be identified and retained, rather than mistakenly rejected as data problems. Condition 1: The data acquisition anomaly criterion is not met, i.e., the anomaly interval does not meet any of the first priority conditions. Condition 2: All conditions for operational control anomalies are not met, i.e., the interval does not meet at least one of the three conditions of the second priority (i.e., inconsistent direction, insufficient smoothness of change, or mismatch in time periods). Condition 3: The comprehensive correlation between the deviation and meteorology is established (the following two sub-conditions must be met simultaneously). Sub-condition a is the correlation condition: the actual load deviation sequence within the interval { t} t∈I With the comprehensive somatosensory index sequence (target somatosensory index sequence) {φ t} t∈I The Pearson correlation coefficient must satisfy: ρ({ t},{φ t})≥0.7. Sub-condition b is the amplitude reasonableness condition: the average absolute deviation amplitude within the interval must be within the range that meteorological sensitivity can interpret: 1 / (|I|)∑ t∈I | t |≤β|S k |1 / (|I|)∑ t∈I | T t |. Among them, S k This is the sensitivity coefficient (target meteorological sensitivity, MW / ℃) for the current temperature range. Tt =T t -T ref β is the tolerance factor (typically 1.2).
[0095] In addition, in some embodiments, if the server detects that an abnormal interval does not meet all the conditions of the above three criteria (i.e., it is not a data collection type, not a control type, and not a weather-driven type), the server will classify it into an unclassified abnormal category, mark it in the system and trigger an alarm. By default, the server will conservatively use the substitution method correction strategy corresponding to the first priority for processing. After manual confirmation, the classification label can be adjusted according to the actual situation.
[0096] Through this embodiment, the server can use a three-category discrimination logic to prioritize and accurately classify data pathology (collection type), human intervention (regulation type) to natural response (weather-driven type) in sequence, providing clear and reliable type basis for differentiated load correction and improving the accuracy of load restoration.
[0097] In one embodiment, load restoration is performed on the abnormal interval according to the load restoration strategy corresponding to the above-mentioned anomaly type to obtain a load restoration result, including: if the above-mentioned anomaly type is a data acquisition anomaly, then according to the first load restoration strategy, the load information at the corresponding time in the above-mentioned virtual reference load information is replaced in the above-mentioned abnormal interval to obtain a first load restoration result; if the above-mentioned anomaly type is an operation control anomaly and / or a meteorological driving anomaly, then according to the second load restoration strategy, each abnormal load information in the above-mentioned abnormal interval is weighted and fused with each predicted load information in the above-mentioned virtual reference load information to obtain a second load restoration result; the weights of the above-mentioned abnormal load information and the weights of the above-mentioned predicted load information are determined based on the magnitude of the deviation between the above-mentioned abnormal load information and the above-mentioned predicted load information.
[0098] In this embodiment, the server can employ different load restoration strategies for different anomaly types within different anomaly intervals. The anomaly types include data acquisition anomalies, operational control anomalies, and weather-driven anomalies. The load restoration strategies include a first load restoration strategy and a second load restoration strategy. Specifically, the first load restoration strategy corresponds to data acquisition anomalies, while the second load restoration strategy corresponds to operational control anomalies and weather-driven anomalies.
[0099] If the server detects an anomaly type as a data acquisition anomaly, it can replace the load information at the corresponding time in the virtual baseline load information with the anomaly interval according to the first load restoration strategy, thus obtaining the first load restoration result. That is, the first load restoration strategy can be a restoration achieved by replacing values. If the server detects an anomaly type as an operation control anomaly and / or a weather-driven anomaly, it can perform a weighted fusion of each anomaly load information in the anomaly interval with each predicted load information in the virtual baseline load information according to the second load restoration strategy, thus obtaining the second load restoration result. That is, the second load restoration strategy can be a restoration achieved by detecting the rationality between the predicted load information in the virtual baseline load information and the actually collected load information through fusion. The weights of the anomaly load information and the predicted load information are determined based on the magnitude of the deviation between the anomaly load information and the predicted load information. For example, the larger the deviation, the smaller the weight of the anomaly load information and the larger the weight of the predicted load information, and vice versa.
[0100] Specifically, the server performs differentiated load correction and adaptive weight adjustment based on cause classification. The restoration strategy includes substitution correction (the first load restoration strategy, applicable to data acquisition anomalies and unclassified anomalies). Data acquisition anomalies are caused by physical factors such as measurement equipment failure and communication interruptions; their data is completely distorted and contains no usable real load information. Unclassified anomalies, because their true cause cannot be identified, should also be handled with the most conservative strategy from a data security perspective. Therefore, for all measured values within the two types of anomaly interval I, the server directly replaces them with virtual predicted load: l * t =l ~ t For any t∈I, where l * t To correct the afterload value (MW), l ~ t This provides a virtual forecast load value (forecast load information, MW). This eliminates the interference of distorted data on subsequent analysis and applications.
[0101] The restoration strategy also includes weighted fusion correction (a second load restoration strategy, applicable to operational control-type and meteorologically driven anomalies). Although operational control-type anomalies are triggered by human intervention, the measured values still record the occurrence process and intensity of the control events; meteorologically driven anomalies are the true physical response of the load to meteorological conditions, and their fluctuation characteristics have important preservation value. Therefore, these two types of anomalies should not be simply discarded, but a weighted fusion strategy should be adopted, somewhere between complete replacement and complete preservation, seeking the optimal balance between restoring the basic laws and preserving true information. The weighted fusion formula can be expressed as: l * t =wl~ t +(1-w)l t real Let t ∈ I. Here, w ∈ [0,1] represents the weighting coefficients. When w=1, the virtual baseline is fully trusted (equivalent to the substitution method); when w=0, the measured values (abnormal load information) are fully preserved. The closer w is to 1, the closer the correction result is to the normal baseline (predicted load information); the closer w is to 0, the more likely it is to preserve the original information (abnormal load information). The initial value of the weighting coefficients is w. (0) The determination can include: the initial weight values are set differently based on the severity of the abnormal intervals. The larger the deviation, the more serious the disturbance to the measured value, and the higher the confidence level of the virtual benchmark should be.
[0102] First, the server defines the severity metric for the interval as the mean absolute deviation rate: ~ abs =1 / (|I|)∑ t∈I | t |. Among them, t =(l t real -l ~ t ) / l ~ t ×100% represents the relative deviation rate. Then, the server maps the deviation rate to the weight space using an exponentially decaying mapping function: w (0) =1-exp(- ~ abs / τ). Where τ is the normalization parameter, typically taking a value of 0.25. The mathematical properties and physical meaning of this mapping function are: when ~ abs When w approaches 0 (the deviation is minimal), (0) Approaching 0, almost completely trusting the measured values; when ~ abs When τ=0.25, w (0) =1-e -1 ≈0.63, the virtual benchmark and the measured value are close to being in equilibrium; when ~ abs When w is much greater than τ (maximum deviation), (0) The value tends towards 1, indicating a strong tendency to trust the virtual benchmark. The normalization parameter τ = 0.25 is set based on the fact that, under normal operating conditions, the deviation rate... tThe threshold of three times the standard deviation usually falls within the 15% to 30% range, and τ=0.25 is exactly in the middle of this range, so that the initial weight of moderate severity anomalies falls within a reasonable correction range.
[0103] The server can also adaptively adjust the weighting coefficients. After the initial weighted fusion correction, the server needs to evaluate the correction quality. If it fails to meet the standards, the weighting coefficients are adaptively adjusted through an iterative mechanism until the correction result meets the preset accuracy requirements. Specifically, for the target residual threshold, the server uses Mean Absolute Percentage Error (MAPE) as the correction quality evaluation index. First, on the dataset during normal operation, the baseline residual level between the virtual predicted load and the measured load is calculated: MAPE. normal =1 / N normal ∑ i=1 N_normal 1 / M∑ t=1 M |(l i,t real -l ~ i,t ) / (l i,t real )|×100%.
[0104] Wherein, the target residual threshold ε target Set as the tolerance factor for this baseline residual: ε target =ηMAPE normal Wherein, η is the tolerance factor, typically set at 1.5. Its setting is based on the following: Abnormal intervals contain real meteorological or regulatory disturbances; the corrected residuals should not be required to reach the same level as the normal state, otherwise excessive smoothing will erase effective information. A tolerance of 1.5 statistically allows the corrected residuals to be slightly higher than the upper limit of normal fluctuations, but significantly lower than the abnormal residual level before correction, balancing the sufficiency of correction with the need for information preservation.
[0105] The iterative optimization process for weights includes:
[0106] Step 1, Initial Revision and Evaluation: Using initial weights w (0) Perform weighted fusion correction and calculate the MAPE residual index for the outlier interval after correction. (0) MAPE (0) =1 / (|I|)∑ t∈I |(l * t (0) -l ~ t ) / l ~ t |×100%.
[0107] Step 2, Standard Assessment: If MAPE (0) ≤ε target If the correction meets the standard, the correction result will be output directly.
[0108] Step 3, Weight Iterative Update: If MAPE (k) >ε target The server then adaptively updates the weight coefficients using a mapping function: w (k+1) =w (k) + w (k) , w (k) =(1-w (k) (MAPE) (k) -ε target ) / (MAPE (k) The update function exhibits monotonically convergent properties; the greater the residual exceeds the target threshold, the larger the weight increase. When w approaches 1, the update step size... w approaches 0, ensuring it does not exceed the upper bound of the weight domain. The server can then use the updated weight w. (k+1) Re-execute the weighted fusion correction and calculate MAPE. (k+1) Repeat steps two and three until the termination and degradation conditions are met. The termination and degradation conditions include: Termination condition one, reaching the target, if MAPE is achieved after the k-th iteration. (k) ≤ε target The server outputs the corrected result. Termination condition two: maximum iteration limit; if the number of iterations reaches the preset upper limit N... max If the target is still not met, the server will forcibly trigger the degradation mechanism. max The default value is set to 5, based on the following: the weight mapping function has monotonically convergent properties, and the weight space is a finite closed interval [0,1]. According to the fixed-point theorem, the mapping will converge or reach the boundary within a finite number of steps. Simultaneously, the improvement in marginal residuals decreases with each iteration, with the most significant improvement in the first iteration followed by rapid decay. Under the standard configuration of normalization parameter τ=0.25, adjusting the weights from the initial value to a steady state typically requires 2-3 effective iterations. Setting the upper limit to 5, based on typical requirements and safety margins, can adequately cover the convergence requirements of most abnormal intervals. This default value can be adjusted according to the deployment scenario: it can be increased to 7-8 for offline high-precision scenarios and reduced to 3 for real-time online scenarios. Termination condition three: degradation triggering, if MAPE occurs during the iteration process. (k+1) >MAPE (k)If the residual increases instead of decreasing, it indicates that the current weight search direction has deviated from the optimal value, and continuing iteration is not conducive to convergence. In this case, the server immediately terminates the iteration and triggers the degradation mechanism. The degradation mechanism includes forcing w=1, that is, completely using the virtual benchmark substitution method to output the correction result, to ensure that the correction operation obtains deterministic output within a limited computational cost and avoids infinite loops.
[0109] The server can also perform boundary step correction. After correction, the load values at the start and end boundaries of abnormal intervals may exhibit discontinuous jumps compared to adjacent normal intervals, disrupting the physical smoothness of the load curve. The server introduces a boundary smoothing transition mechanism after the correction process is complete.
[0110] The server can perform step detection and calculate the load difference between the boundary point of the abnormal interval and the adjacent normal point after correction: δ start =|l * t_start -l t_start-1 real |,δ end =|l * t _ end -l t_end+1 real |。 Where, if δ start >θ jump or δ end >θ jump If so, the server determines that a boundary step jump exists. The step threshold θ jump Take twice the standard deviation of load change at adjacent times under normal operating conditions to distinguish between artificial jumps introduced by correction and reasonable ramp-up of the load itself.
[0111] The server can also construct and asymptotically correct boundary transition bands. At the beginning and end of the anomaly interval, the server extends a transition band with a width of L sampling points (typically L=2, corresponding to 30 minutes). The weights within the transition bands use a linear gradient at the endpoints. For the initial transition band time t=t... start +i, w t trans =w(i / L); l * t =w t trans l ~ t +(1-w t trans )l t realThe server linearly transitions from the start of the transition zone (i=0, weight 0, fully trusting the measured values, maintaining continuity with the previous normal point) to the end of the transition zone (i=L, weight reaches the standard fusion weight w within the interval). The symmetrical design of the transition zone is terminated, and the weight gradually changes linearly from w to 0. Sampling points within the transition zone do not participate in the residual compliance test.
[0112] The server can also perform multi-interval coupling processing. When multiple abnormal intervals are temporally adjacent or very close together (e.g., only 1-2 sampling points apart), independent correction may introduce artificial discontinuities at interval boundaries or narrow normal gaps. The server addresses this issue using an adaptive merging and segmented coordinated correction strategy based on interval spacing.
[0113] The server can merge and determine all abnormal intervals in chronological order. For any two adjacent abnormal intervals I... a =[t start a ,t end a ], I b =[t start b ,t end b ] Calculate the normal gap width between them: d ab =t start b -t end a -1. If d ab ≤d merge (Typical value d) merge =2), then the server will I a I b The brief normal intervals in between are merged into an extended abnormal interval: I merged =[t start a ,t end b ]. Wherein, d merge The basis for setting =2 is that if the interval between two abnormal intervals is only 1 to 2 sampling points, the normal segment in between lacks sufficient independent statistical stability. It is likely that the two intervals are the continuation of the same disturbance event or a short interruption recovery period. Merging the intervals can avoid forcibly implementing independent corrections on the narrow normal segment and causing artificial oscillations.
[0114] The server can also perform segmentation labeling and coordination correction. Within the merged interval, the original classification labels of each sub-segment are retained, the original abnormal sub-segments maintain their original types, and the intermediate normal gap segments are marked as normal transition segments. Each sub-segment is subject to differential correction according to the following rules: (a) the original abnormal sub-segments are selected using the substitution method or weighted fusion strategy according to the original classification labels; (b) the normal transition segments are assigned low weights (w tends to 0, almost completely retaining the measured values) to ensure a natural transition.
[0115] The server can also perform global weight coordination, using the aforementioned boundary smoothing transition mechanism to linearly and gradually connect the weight changes at the boundaries of each sub-segment, ensuring the weight continuity of the entire curve across the entire merge interval. The server can also perform unified residual evaluation, with the server using I... merged To ensure the overall implementation of residual compliance verification and weight iterative adjustment, the normal transition period is not included in the residual calculation. This mechanism, through a process of merging, segmenting and classifying, global coordination, and unified evaluation, ensures that adjacent abnormal intervals form a continuous and coordinated load curve after correction.
[0116] The server can also perform multi-dimensional comprehensive evaluation and closed-loop feedback of the restoration effect. The completion of the correction operation does not automatically mean that the restoration result is qualified. After outputting the correction curve, the server quantitatively evaluates the restoration effect from two dimensions: numerical error and curve shape. This ensures that the corrected load curve is both statistically close to the normal baseline and physically reasonable. For abnormal intervals where the evaluation fails to meet the standards, local closed-loop feedback is triggered, returning the correction parameters for readjustment.
[0117] During the evaluation, the server can perform numerical error assessment. This assessment uses the virtual predicted load as the theoretically optimal reference to measure the degree to which the corrected full curve deviates from the normal baseline. Evaluation metrics include: calculating the corrected load sequence l. * t Relative to virtual prediction baseline l ~ t The root mean square error (RMSE) and mean absolute percentage error (MAPE) are: RMSE = √(1 / N) total ∑ t=1 N_total (l * t -l ~ t ) 2 MAPE = 1 / N total ∑ t=1 N_total |(l * t -l ~ t ) / l~ t | × 100%, where N total is the total number of sampling points in the full curve. For the qualification standard, the error level of the corrected curve shall be equivalent to the natural deviation level under normal operation conditions, and shall not be significantly higher than the normal benchmark. To this end, the server first calculates the reference error RMSE between the virtual predicted load and the measured load on the filtered data set of normal operation time periods normal and MAPE normal . The qualification standard is set as: RMSE ≤ η RMSE RMSE normal , MAPE ≤ η MAPE MAPE normal , where η RMSE and η MAPE are tolerance multiple factors, and the typical value of both is 1.5. The setting of 1.5 times tolerance takes into account both the sufficiency of correction and the requirement of information retention—since the abnormal interval contains real meteorological or regulation disturbances, the residual after correction should not be forced to reach the same level as that in the normal state. Otherwise, effective information will be erased due to excessive smoothing; however, it shall not be significantly higher than the upper limit of normal fluctuation, otherwise it indicates that the abnormal disturbance has not been effectively suppressed. Wherein, both RMSE and MAPE indicators shall meet the above conditions at the same time, and the server can determine that the numerical error assessment is qualified.
[0118] The server can also perform curve morphology assessment. Meeting the numerical error standard only guarantees statistical proximity, and cannot guarantee the rationality of the corrected curve in physical morphology. The server further conducts quantitative inspection on the morphological characteristics of the corrected curve from the following three dimensions, and the three sub-standards shall be satisfied simultaneously to determine that the curve morphology assessment is qualified.
[0119] Peak-valley consistency: the time of peak and valley of the load curve is the core structural characteristic of power grid dispatching operation, and the correction operation shall not significantly change its time position. If the server detects that the deviation between the occurrence time of the peak and valley of the corrected curve and the corresponding peak-valley time of the virtual prediction benchmark does not exceed δ peak sampling points, the morphology is determined to be qualified. δ peak typically takes a value of 2 (corresponding to 30 minutes at a 15-minute resolution). If the peak-valley time offset exceeds 2 sampling points, it indicates that the correction operation has changed the basic time-varying law of the load, and it is determined to be unqualified.
[0120] Slope deviation in key time periods. The slope of the load during the key morning-evening ramping / declining periods reflects the rate characteristic of load change, which is an important reference for unit ramping capability verification and reserve capacity configuration. If the server detects that the relative deviation between the average slope of the corrected curve during the key load ramping periods (e.g., the rising segment of the morning peak from 06:00 to 08:00) and key load declining periods (e.g., the declining segment of the evening peak from 19:00 to 21:00) and the slope of the virtual benchmark in the corresponding period shall be within ε slope , the result is determined to be qualified. ε slope typically takes a typical value of 20%. If the slope deviation exceeds 20%, it indicates that the correction operation has distorted the dynamic change characteristic of the load, and the result is determined as unqualified.
[0121] Retention of meteorological response characteristics. For intervals marked as meteorology-driven and corrected by weighted fusion, additional verification is required to ensure that the real meteorological load response has not been excessively smoothed. Meteorology-driven anomalies themselves are an important meteorology-sensitive load characteristic that should be retained, and improper correction will introduce systematic deviation. If the server detects that the peak-valley difference amplitude A of the corrected interval corrected is not less than 70% of the peak-valley difference amplitude A of the virtual benchmark in this interval baseline : A corrected ≥0.7A baseline , the result is judged as qualified.
[0122] Wherein, the peak-valley difference amplitude is defined as the difference between the maximum load and the minimum load within the interval. The basis for setting the 70% threshold is: under normal operation conditions, the amplitude of meteorology-driven load fluctuation is usually within the range of 80% to 120% of that of the virtual benchmark; if it is lower than 70%, it indicates that the correction has eliminated most of the meteorological response, and the physically meaningful meteorology-sensitive characteristics are almost completely lost.
[0123] Evaluation and feedback mechanism. The evaluation and feedback mechanism connects the inspection result of step five with the weight adjustment capability of step four, forming a local quality closed-loop of evaluation, feedback, re-correction and re-evaluation. The trigger condition for feedback is expressed as: if any abnormal interval fails to meet the standard in numerical error evaluation (RMSE or MAPE exceeds the limit), or fails to meet the standard in curve shape evaluation (any one of peak-valley consistency, slope deviation in key periods, and retention of meteorological response characteristics is unqualified), the server triggers feedback adjustment for this interval. The feedback path includes: marking the unqualified interval as to be readjusted, returning to the weight adjustment link corresponding to the type of the interval (operation regulation type or meteorology-driven type), starting from the current weight coefficient, and re-executing the adaptive weight adjustment within the upper limit of the remaining iteration times. The server only adjusts the weight coefficient parameters of the interval to be adjusted, which neither changes the benchmark value of the virtual prediction benchmark curve, nor triggers re-correction of other qualified intervals in the whole curve, thus ensuring the efficiency of correction operation and the global stability of the reference system.
[0124] The termination and degradation decisions for feedback adjustments are uniformly completed by the termination and degradation conditions of weight adjustments, without setting separate iteration limits or degradation strategies. Specifically: after being triggered by feedback, the target range is adjusted within the remaining iterations, and the system re-enters feedback evaluation; if the target is still not met within the total iteration limit, or if the residual increases instead of decreasing during the adjustment process, the server executes the final degradation strategy according to the anomaly type: for regulatory degradation, a weighted fusion output of w=0.8 is used; for meteorological-driven degradation, an equally weighted fusion output of w=0.5 is used. The server accepts this degradation result and stops iterating.
[0125] Through this embodiment, the server can use different recovery strategies to restore different types of anomalies, thereby improving the accuracy of load restoration.
[0126] In one embodiment, the method further includes: acquiring the target unit load utilization rate, target unit peak-valley difference rate, target unit maximum ramp rate, and target unit load information corresponding to the aforementioned power grid system; the target unit load utilization rate, the target unit peak-valley difference rate, the target unit maximum ramp rate, and the target unit load information respectively characterize the load utilization rate, peak-valley difference rate, maximum ramp rate, and load information of the aforementioned power grid system during non-abnormal operation within a unit time period; inputting the target unit load utilization rate, the target unit peak-valley difference rate, the target unit maximum ramp rate, and the corresponding target meteorological information into a recognition model to be trained; the recognition model is used to determine the target unit predicted load information based on the target unit load utilization rate, the target unit peak-valley difference rate, the target unit maximum ramp rate, and the corresponding target meteorological information; adjusting the model parameters of the recognition model based on the matching degree between the target unit predicted load information and the target unit load information until a preset training termination condition is met, thereby obtaining a trained recognition model; and determining the virtual reference load information of the collection time corresponding to the aforementioned load information based on the trained recognition model.
[0127] In this embodiment, the aforementioned virtual baseline load information can be obtained through the output of a recognition model. The server can pre-train the recognition model. Specifically, the server can acquire the target unit load utilization rate, target unit peak-valley difference rate, target unit maximum ramp rate, and target unit load information corresponding to the aforementioned power grid system. The target unit load utilization rate, target unit peak-valley difference rate, target unit maximum ramp rate, and target unit load information respectively characterize the load utilization rate, peak-valley difference rate, maximum ramp rate, and load information of the aforementioned power grid system during non-abnormal operation within a unit time period.
[0128] The server can input the target unit load utilization rate, the target unit peak-valley difference rate, the target unit maximum ramp rate, and the corresponding target meteorological information into the recognition model to be trained. The recognition model is used to determine the target unit predicted load information based on the target unit load utilization rate, the target unit peak-valley difference rate, the target unit maximum ramp rate, and the corresponding target meteorological information.
[0129] The server adjusts the model parameters of the identification model based on the matching degree between the predicted load information and the target unit load information until a preset training termination condition is met, thus obtaining a trained identification model. The preset training termination condition includes, but is not limited to, the model parameters converging within a preset number of training iterations, or the training iterations reaching the preset number of iterations. Therefore, the server can determine the virtual baseline load information for the collection time corresponding to the aforementioned load information based on the trained identification model.
[0130] Specifically, the server establishes a stable, independent, and highly accurate theoretical reference system for the entire reconstruction method by constructing a virtual predicted load baseline curve. The server can define normal operating conditions and automatically filter training samples to identify pure samples representing the intrinsic operating patterns of the power grid from massive historical load data. This provides a high-quality data foundation for training the deep neural network model (recognition model), thereby constructing a stable, independent virtual predicted load baseline that is unaffected by abnormal data.
[0131] The server can statistically define its normal operating status. The server can adaptively quantify its normal operating status based on sliding window statistical features. For a date d to be determined, the server's intraday load sequence is set to L. d ={l d,1 ,l d,2 ,...,l d,N}, where N is the number of sampling points within a day. The three core statistical indicators for that day are defined as follows: Daily load factor (target unit load utilization rate) R d R: Characterizes the overall utilization and stability of intraday load. d =(1 / N∑ t=1 N l d,t ) / (max t l d,t Daily peak-to-valley difference rate (target unit peak-to-valley difference rate) V d V: Characterizes the natural fluctuation range of intraday load. d =(max t l d,t -min t l d,t ) / (max t ld,t Daily maximum gradeability (maximum gradeability per target unit) C d : Characterizes the instantaneous drasticness of intraday load changes. C d =max t∈{1,2,...,N-1} |l d,t+1 -l d,t |
[0132] Among them, a load day d is judged as a candidate day for normal operation if it simultaneously meets the following three conditions. This judgment logic can be formally expressed as: IsNormal(d)={True,if(P low ≤R d ≤P high )∧(P' low ≤V d ≤P' high )∧(C d ≤μ C +3σ C ));False,otherwise)}。 Where, P low P high These are the lower and upper limits of the daily load factor calculated based on historical windows, respectively; P' low , P' high These are the lower and upper threshold values for the daily peak-to-valley difference rate; μ C With σ C These represent the mean and standard deviation of the maximum daily climbing rate within the historical window, respectively.
[0133] Regarding the logic for setting the sliding time window, the length of the time window needs to achieve an optimal balance between statistical stability and seasonal adaptability. The server sets the window length to W = 90 days (approximately one quarter). For the date d to be determined, its reference window is the consecutive 90 days prior to that date, i.e., the historical sample date index set is: W(d) = {dW, d-W+1, ..., d-1}. This achieves cycle completeness: 90 days can cover multiple complete weekday and weekend cycle patterns, effectively smoothing short-term random fluctuations and enabling statistical indicators to reflect stable seasonal trends; seasonal stability: within the 90-day window, the basic load characteristics of the power grid (such as basic industrial load, air conditioning ownership level, etc.) can be reasonably assumed to be approximately stable, avoiding the distribution drift problem caused by cross-seasonal data mixing; sample sufficiency: the window length W = 90 is twice the 45-day input sequence length of the deep neural network model, ensuring that the historical perspective used for determining normality is sufficiently broad, reliably eliminating abnormal samples falling at the edge of the model's cognition, while isolating the training data from the judgment criteria in terms of time sequence, avoiding data crossing and information leakage.
[0134] The server can determine dynamic statistical intervals. For the two indicators of load factor and peak-to-valley difference rate, the server adopts a dynamic interval definition mechanism based on the quantile method. The specific steps are as follows: Sample pool construction: Taking the date d to be determined as the benchmark, the server takes all daily load curves within the window W(d) of the previous 90 days, calculates the daily load factor and peak-to-valley difference rate, and forms a statistical sample sequence: R W ={R i |i∈W(d)},V W ={V i |i∈W(d)}. Each sequence contains 90 values. Sorting and quantile delimitation: The server sorts the sequence R... W With V W Sort them in ascending order. Let Q be the order of the results. p (X) represents the p-th percentile of sequence X. The reasonable fluctuation range within the historical window (typically set in engineering to exclude the extreme values at both ends of the distribution, 5%) is: P low =Q5(R W ), P high =Q 95 (R W );P' low =Q5(V W ), P' high =Q 95 (V W This means that the middle 90% of the samples are retained as representatives of the normal distribution, while the extreme cases with the lowest probability at each of the two ends outside the interval are judged as abnormal. Dynamic update mechanism: As the judgment date d advances daily, the window W(d) is updated synchronously in a sliding manner, and the above quantile threshold P... low P high ,P' low , P' high It automatically recalculates daily without requiring manual setting of fixed thresholds, possesses full adaptive capabilities, and can track the seasonal evolution of grid load.
[0135] The goal of the maximum ramp rate metric is to capture instantaneous, point-like sharp jumps caused by data acquisition failures, etc. The server first calculates the statistical parameters within the historical window: μ C =1 / W∑ i∈W(d) C i , σ C =√(1 / W∑ i∈W(d) (C i -μ C ) 2 Based on the assumption of a normal distribution, the data falls within μ. C ±3σ CThe probability of an event outside the specified range is less than 0.3%, which is a statistically highly reliable low-probability event that can be classified as abnormal. Therefore, the server uses no more than three standard deviations above the historical mean as the upper limit threshold for one-sided judgment, with the judgment condition being: C d ≤μ C +3σ C This allows for more accurate detection of spikes and pulse anomalies in the load sequence, while maintaining sufficient tolerance for normal load fluctuations.
[0136] The server can also perform supplementary filtering and dataset construction. Specifically, to further improve the purity of the training set under normal operating conditions, based on the aforementioned statistical filtering, the server synchronously accesses operational data such as power grid dispatch and maintenance logs and demand response event logs, forming a set A of known abnormal event dates. The final sample set D is used for training. train Defined as: D train ={d|IsNormal(d)=True}\A. The dataset D after the above statistical filtering and rule filtering... train This constitutes the normal operating state training set used to train deep neural network models. This automatic filtering mechanism effectively excludes most dates containing drastic fluctuations, abnormally flat periods, or inverted peaks and troughs, laying a solid data foundation for constructing a high-precision virtual forecast load baseline curve.
[0137] The server can also construct and train deep neural network models (recognition models). To achieve high-precision learning of the inherent laws of load under normal power grid operation, the server integrates a combination of temporal convolution, bidirectional recurrent memory, and feature adaptive weighting to construct a deep learning model (TCN-BiLSTM-Attention network). This architecture aims to comprehensively capture the short-term local fluctuations, long-term periodic dependence, and differentiated contributions of multi-source input features of the load sequence, thereby generating a virtual predicted load curve (virtual baseline load information) that is independent of measured anomalies and reflects the pure intrinsic laws.
[0138] Specifically, regarding the combinatorial logic of the model architecture, the power grid load sequence exhibits rapid hourly increases / decreases (short-term dynamics), diurnal and weekly / monthly cycles (long-term patterns), and strong nonlinear coupling with multiple factors such as weather and date. A single deep learning structure is insufficient to simultaneously handle the learning tasks involving these multiple time scales and multi-feature interactions. The server employs a progressive cascaded design of TCN, BiLSTM, and Attention, with clear functional divisions for each module: TCN (Temporal Convolutional Network) acts as a short-term local feature extractor: through causal dilated convolutions, it captures hourly local fluctuation patterns in the load sequence (such as rapid rises and falls of midday and evening peaks) with an exponentially increased receptive field while maintaining temporal order. Its parallel computing characteristics also improve training efficiency. BiLSTM (Bidirectional Long Short-Term Memory Network) acts as a long-term periodic dependency encoder: utilizing recurrent connections in both forward and backward directions, it fully learns the diurnal periodicity, weekday-weekend pattern differences, and weekly / monthly trend evolution of the load sequence, compensating for the TCN's insufficient ability to model ultra-long temporal dependencies. The attention layer is a dynamic focuser for multi-source features: it automatically learns and assigns higher weights to key information in the input features (such as special power consumption patterns before holidays, extreme temperature times, etc.), suppresses irrelevant or redundant features, and improves the model's representation ability and interpretability.
[0139] The technical logic of the progressive cascaded design of the above three modules includes: TCN is placed at the bottom layer, using its causal convolution to extract local fluctuation features while maintaining temporal order, reducing the sensitivity of subsequent recurrent networks to short-term noise; BiLSTM is placed in the middle layer, receiving high-quality feature sequences filtered by TCN, allowing for more focused capture of long-term periodic dependencies and trend evolution; and the Attention layer is placed at the top layer, performing key information focusing based on global context encoding. If Attention is placed at the top, the attention weights will be calculated without sufficient contextual representation, significantly degrading the focusing effect; if TCN is omitted and the original sequence is directly fed into BiLSTM, long- and short-term information are mixed, and short-term spikes may interfere with periodic pattern learning. Therefore, the progressive arrangement of TCN, BiLSTM, and Attention is the structural guarantee for this combined architecture to achieve optimal performance. The three form a feature learning path of local perception, global context encoding, and key information weight allocation, which can comprehensively characterize the load change patterns under normal power grid operation.
[0140] The server can design the input feature system and sequence length. The model's input features are carefully selected to balance physical interpretability, data availability, and quantifiable impact. For the prediction time t, its input tensor consists of three types of features: historical load features. The server takes the historical load sequence of the past T days as input, where T = 45 days, and each day contains M sampling points (e.g., M = 96 at 15-minute resolution). The historical load features can then be represented as a two-dimensional tensor: X load ∈R T ×M The length of 45 days covers at least six complete cycles, providing sufficient samples for BiLSTM to learn weekday and weekend patterns. Furthermore, the 45-day span falls within the quasi-stationary timescale of power load, avoiding distribution drift caused by seasonal changes. Additionally, the 45-day input window is completely enclosed within the 90-day normal operation filtering window, ensuring that all input data comes from identified normal, clean periods, thus preventing information leakage in terms of time sequence. Therefore, T=45 was chosen.
[0141] It also includes the date encoding feature DateFeat, where all date-related features are discrete categorical variables, specifically: DateFeat = {month, weekday, hour, holiday} flag Each discrete feature is mapped to a low-dimensional dense real-valued vector through an independent embedding layer. Let V be the number of categories for the j-th date feature. j The embedding dimension is d j Then the embedding representation of this feature is: e (j) =Embedding j (c j )∈R d_j c j ∈{1,2,...,V j The embedding vectors of all date features are concatenated to form the date-encoded feature vector for time t: x t date =[e t (1) ;e t (2) ;...;e t (K_d) ]∈R D_d Among them, K d D represents the number of date features. d =∑ j=1 K_d d jThis represents the total dimension after concatenation. The advantage of using embedding vectors is that the model can adaptively learn the semantic similarity and periodic association between categories through end-to-end training (e.g., Monday and Tuesday should be close in the embedding space, while they should be far apart from Sunday). Compared with one-hot encoding, this reduces dimensionality while preserving the structural information between categories.
[0142] It also includes meteorological features from MetFeat. The meteorological elements included were selected based on the principles of physical interpretability, data availability, and quantifiable impact, including the following K... m Core features and derived features: MetFeat={T dry ,T dew ,RH,WS,P rain ,T apparent ,...}。 Among them, T dry T represents the dry bulb temperature (°C). dew Here, RH is the dew point temperature (°C), RH is the relative humidity (%), WS is the wind speed (m / s), and P is the relative humidity (%). rain Rainfall (mm), T apparent This is to derive features from perceived temperature by integrating temperature and humidity. All meteorological features have been matched and filtered against normal operating conditions to ensure that the correspondence between meteorological data and load in the training data is not affected by abnormal events. The meteorological feature vector at time t is represented as: x t met ∈R K_m .
[0143] The final input tensor can be formed by aligning and concatenating the three types of features mentioned above along the time dimension, thus creating the final input representation of the model. For an input sequence containing T time steps, its dimension is T×D, where D=M+D d +K m : X=[X load ,X date ,X met This multi-dimensional, multi-source feature system provides a complete foundation of input information for the subsequent TCN-BiLSTM-Attention model, enabling it to learn the load evolution pattern under normal grid operation from three dimensions: historical load inertia, human activity cycle patterns, and meteorological driving forces.
[0144] The server can perform forward computation and mathematical expression of the model. Let the input time series be x. 1:T Its dimension is T×D (D is the feature dimension after concatenation at each time step). The calculation process of the model is as follows: TCN layer: One-dimensional causal dilated convolution is used. For the convolution operation of the l-th layer with kernel size k and dilation factor d, the output at time s is: h s (l) =ReLU(∑ i=0k-1 W i (l) x s-d⋅i +b (l) By stacking multiple layers of dilated convolutions, TCN encodes the input sequence into a feature sequence H with local contextual information. TCN ∈R T×dtcn For the l-th layer TCN, its expansion factor is typically calculated according to d. l =2 l-1 The exponential increase means that the effective receptive field of a single layer is k+(k-1)(d l -1). After stacking L layers, the temporal receptive field that the top layer features can cover is: RF(L)=1+∑ l=1 L (k-1)d l By adjusting the number of layers L and the kernel size k, the server can ensure that the receptive field covers the entire intraday cycle (e.g., M=96 sampling points), ensuring that the model has fully perceived the dynamic changes in load over the preceding and following hours when extracting features at the current moment, thus providing high-quality feature sequences with local noise eliminated for subsequent long-range modeling of BiLSTM.
[0145] In the BiLSTM layer, the internal computation process of a single-layer LSTM unit at time t is as follows: f t =σ(W f [h t-1 ,x t ]+b f );i t =σ(W i [h t-1 ,x t ]+b i );C * t =tanh(W C [h t-1 ,x t ]+b C ); C t =f t ⊙C t-1 +i t ⊙C * t ;o t =σ(W o [h t-1 ,x t ]+b o );h t =o t ⊙tanh(C t ), where f t i t ,o t These are the forget gate, input gate, and output gate, respectively. (C)* t For candidate memory cell states, C t Let σ represent the state of the memory cell, σ be the sigmoid activation function, and ⊙ represent the element-wise product. The forget gate controls the degree of retention of historical information, the input gate adjusts the proportion of new information written, and the output gate determines the strength of the transition from memory to the hidden state. The server feeds the TCN output into a bidirectional LSTM to obtain the forward hidden state h. → t and backward hidden state h ← t The global context representation of time t is formed by splicing: h t LSTM =[h → t ;h ← t ]∈R 2d_lstm The splicing result at all moments is H. LSTM ∈R T×2d_lstm .
[0146] In the attention layer, to address the technical challenge of the non-uniform distribution of contributions to the current prediction target across different time points in the historical load sequence, the server introduces an additive attention mechanism after the BiLSTM layer. This mechanism adaptively quantifies the importance weights of each historical time point using a learnable global query vector, enabling the model to automatically focus on key information and suppress irrelevant or redundant inputs. The server can construct the global query vector, where u∈R. 2d_lstm This is a trainable global query vector, which serves as an internal parameter of the model and is independent of the specific time point of the input sequence, remaining consistent across all samples. Its technical significance lies in the fact that, through end-to-end training, the model determines which historical load patterns are most critical global cognitive criteria for the prediction task, and uses these criteria to perform relevance retrieval and information filtering on the BiLSTM-encoded hidden state sequences.
[0147] The server can calculate the attention weights for the hidden state h at time t of the BiLSTM layer output. t LSTM ∈R 2d_lstm The server first maps the query vector u to the same latent space using a linear transformation, and then calculates the matching score after nonlinear activation. Its mathematical expression is: e t =v unknown tanh(W1h t LSTM +W2u+b a Where W1∈R d _a×2d_lstm Let W2 be the hidden state transformation matrix, where W2∈R d_a×2d_lstm To query the vector transformation matrix, ba ∈R d_a For the bias term, v unknown ∈R d_a Let d be the score mapping vector. a α represents the attention hidden layer dimension and is an adjustable hyperparameter. Based on the obtained matching scores, the server normalizes the values using the Softmax function to obtain the attention weight coefficients for each historical time step: α. t =(exp(e t )) / (∑ τ=1 T∑_τ exp). Where, α t ∈(0,1) and satisfy the normalization constraint ∑ t=1 T α t =1. Weight α t The magnitude of the value directly quantifies the relative importance of the load pattern at historical time t to the current forecast target.
[0148] The server can also aggregate context vectors. Using attention weights as coefficients, the server performs a weighted summation of the hidden states across all historical time points to obtain a fixed-dimensional context vector: c. context =∑ t=1 T α t h t LSTM ∈R 2d_lstm This context vector condenses global information across the entire sequence through differentiated aggregation: key moments highly relevant to the prediction target (such as special electricity consumption patterns the day before a holiday, load response during periods of sudden weather changes, etc.) are automatically assigned greater weights due to their high matching degree between their hidden states and the global query vector, and their pattern features are extracted with emphasis; while the weights of constant patterns or noisy moments are suppressed. Compared to the traditional approach of simply averaging the hidden states or only taking the output of the last moment, this mechanism significantly improves the model's ability to capture key information and its prediction accuracy, while the visualization of attention weights also enhances the interpretability of the model's decision-making process.
[0149] At the output layer, the server fuses the context vector with external features (date and weather information of the time to be predicted) and outputs the virtual forecast load through a fully connected layer. ~ t :l ~ t =W o [c context ;f t ]+b o Among them, f t Let l be the date and meteorological feature vector at time t. ~ tThis is the virtual forecast load (MW) at that moment. The server repeats this process to generate forecast values for all times of the day, thus forming the virtual forecast load curve L. ~virtual =[l ~ 1,l ~ 2,…,l ~ M The output resolution matches the measured load. Where f t The known external condition vector for the time t to be predicted is formed by concatenating the date encoding embedding of that time with meteorological elements along the feature dimension: f t =[x t date ;x t met ]∈R D_d+K_m This vector contains only predictable non-load information at time t, and does not contain any measured load values at future times, ensuring that the virtual baseline curve generation strictly satisfies the temporal causality constraint. That is, for any predicted time t, the model outputs l based solely on historical information up to and including t. ~ t .
[0150] The server can also establish a principle for partitioning the training and test sets. Specifically, it uses a 70% training set and 30% test set ratio, adhering to the principle of maintaining the correct temporal sequence: 70% of the normally functioning samples are used for model parameter training, ensuring sufficient learning under massive datasets; 30% of the independent samples are used to evaluate the model's generalization performance on unseen data. This partition balances training sufficiency and evaluation reliability. Temporal partitioning: Instead of random shuffling, all filtered clean samples are sorted chronologically by date, with the first 70% used as the training set and the last 30% as the test set. This ensures that all training data comes from periods prior to the test data's historical timeframe, preventing future information leakage and accurately reflecting the model's forward predictive capabilities in actual deployment.
[0151] Suppose that the date sequence of the purified samples obtained after screening is arranged in ascending order of time as D = {d1, d2, ..., d...} |D|}, where d1 <d2<...<d |D| The server takes the floor function of the boundary index s = 0.7 × |D|, and the training and test sets are respectively: D train ={d1,d2,...,d s}, D test ={d s+1 ,d s+2 ,...,d |D| This partition applies to any d. train ∈D train With d test ∈D test , always have dtrain <d test This eliminates time-series travel, ensuring that test evaluation results reflect the model's forward predictive performance under actual deployment conditions. The server can also guarantee data purity, with the sample set D participating in the partitioning... train =D normal ∩A ~ Statistical screening and known abnormal log filtering have been performed, eliminating the interference of data pollution on training and evaluation at the source.
[0152] The server can also perform training objectives and optimization. The model aims to minimize the error between the virtual predicted load and the measured load (on normal samples), and the loss function uses mean squared error (MSE): L MSE =1 / N b ∑ i=1 N_b ∑ t=1 M (l ~ i,t -l i,t real ) 2 Among them, N b l represents the batch sample size. i,t real Let be the actual load of the i-th normal day sample at time t. The model parameters are iteratively updated using gradient descent to ultimately obtain a virtual benchmark generator (identification model) capable of stably outputting a pure theoretical reference curve.
[0153] In this embodiment, the server can train a recognition model by combining multiple data sources, and then use the recognition model to output predicted load information, thereby improving the accuracy of the predicted load information output.
[0154] In one exemplary embodiment, such as Figure 2 As shown, Figure 2 This is a flowchart illustrating a power grid load restoration method based on a virtual benchmark and three-class anomaly classification in another embodiment. This embodiment relates to the fields of power system data processing, load characteristic analysis, and data governance, and particularly to a method for accurately identifying, classifying, and differentially correcting anomalies of different causes in historical power grid load data. Specifically, this embodiment constructs a three-class anomaly classification system that uses a virtual predicted load (virtual benchmark load information) generated by a deep neural network as a unified benchmark, integrates multi-dimensional meteorological sensitivity analysis and multi-feature joint discrimination, and introduces a weight-adaptive adjustment differential correction mechanism to solve the problem of difficulty in distinguishing between normal meteorological fluctuations and various abnormal disturbances, leading to low load restoration accuracy and poor physical rationality. Steps S100 to S500 are included:
[0155] Step S100: Construct a virtual forecast load baseline curve.
[0156] The server utilizes a deep neural network to learn the patterns of normal power grid operation and generates a pure theoretical load curve P that eliminates abnormal disturbances such as demand response and equipment failure. virtual This serves as a unified reference system for all subsequent anomaly detection and restoration.
[0157] The server establishes a stable, independent, and highly accurate theoretical reference system for the entire reconstruction method by constructing a virtual predicted load baseline curve. Specifically, the server can define normal operating conditions and automatically filter training samples to identify pure samples representing the intrinsic operating patterns of the power grid from massive historical load data. This provides a high-quality data foundation for training the deep neural network model (recognition model), thereby constructing a stable, independent virtual predicted load baseline that is unaffected by abnormal data.
[0158] The server can statistically define its normal operating status. The server can adaptively quantify its normal operating status based on sliding window statistical features. For a date d to be determined, the server's intraday load sequence is set to L. d ={l d,1 ,l d,2 ,...,l d,N}, where N is the number of sampling points within a day. The three core statistical indicators for that day are defined as follows: Daily load factor (target unit load utilization rate) R d R: Characterizes the overall utilization and stability of intraday load. d =(1 / N∑ t=1 N l d,t ) / (max t l d,t Daily peak-to-valley difference rate (target unit peak-to-valley difference rate) V d V: Characterizes the natural fluctuation range of intraday load. d =(max t l d,t -min t l d,t ) / (max t l d,t Daily maximum gradeability (maximum gradeability per target unit) C d : Characterizes the instantaneous drasticness of intraday load changes. C d =max t∈{1,2,...,N-1} |l d,t+1 -l d,t |
[0159] Among them, a load day d is judged as a candidate day for normal operation if it simultaneously meets the following three conditions. This judgment logic can be formally expressed as: IsNormal(d)={True,if(P low ≤R d ≤P high )∧(P' low ≤V d ≤P' high )∧(C d ≤μ C +3σ C ));False,otherwise)}。 Where, P low P high These are the lower and upper limits of the daily load factor calculated based on historical windows, respectively; P' low , P' high These are the lower and upper threshold values for the daily peak-to-valley difference rate; μ C With σ C These represent the mean and standard deviation of the maximum daily climbing rate within the historical window, respectively.
[0160] Regarding the logic for setting the sliding time window, the length of the time window needs to achieve an optimal balance between statistical stability and seasonal adaptability. The server sets the window length to W = 90 days (approximately one quarter). For the date d to be determined, its reference window is the consecutive 90 days prior to that date, i.e., the historical sample date index set is: W(d) = {dW, d-W+1, ..., d-1}. This achieves cycle completeness: 90 days can cover multiple complete weekday and weekend cycle patterns, effectively smoothing short-term random fluctuations and enabling statistical indicators to reflect stable seasonal trends; seasonal stability: within the 90-day window, the basic load characteristics of the power grid (such as basic industrial load, air conditioning ownership level, etc.) can be reasonably assumed to be approximately stable, avoiding the distribution drift problem caused by cross-seasonal data mixing; sample sufficiency: the window length W = 90 is twice the 45-day input sequence length of the deep neural network model, ensuring that the historical perspective used for determining normality is sufficiently broad, reliably eliminating abnormal samples falling at the edge of the model's cognition, while isolating the training data from the judgment criteria in terms of time sequence, avoiding data crossing and information leakage.
[0161] The server can determine dynamic statistical intervals. For the two indicators of load factor and peak-to-valley difference rate, the server adopts a dynamic interval definition mechanism based on the quantile method. The specific steps are as follows: Sample pool construction: Taking the date d to be determined as the benchmark, the server takes all daily load curves within the window W(d) of the previous 90 days, calculates the daily load factor and peak-to-valley difference rate, and forms a statistical sample sequence: R W ={R i |i∈W(d)},V W ={Vi |i∈W(d)}. Each sequence contains 90 values. Sorting and quantile delimitation: The server sorts the sequence R... W With V W Sort them in ascending order. Let Q be the order of the results. p (X) represents the p-th percentile of sequence X. The reasonable fluctuation range within the historical window (typically set in engineering to exclude the extreme values at both ends of the distribution, 5%) is: P low =Q5(R W ), P high =Q 95 (R W );P' low =Q5(V W ), P' high =Q 95 (V W This means that the middle 90% of the samples are retained as representatives of the normal distribution, while the extreme cases with the lowest probability at each of the two ends outside the interval are judged as abnormal. Dynamic update mechanism: As the judgment date d advances daily, the window W(d) is updated synchronously in a sliding manner, and the above quantile threshold P... low P high ,P' low , P' high It automatically recalculates daily without requiring manual setting of fixed thresholds, possesses full adaptive capabilities, and can track the seasonal evolution of grid load.
[0162] The goal of the maximum ramp rate metric is to capture instantaneous, point-like sharp jumps caused by data acquisition failures, etc. The server first calculates the statistical parameters within the historical window: μ C =1 / W∑ i∈W(d) C i , σ C =√(1 / W∑ i∈W(d) (C i -μ C ) 2 Based on the assumption of a normal distribution, the data falls within μ. C ±3σ C The probability of an event outside the specified range is less than 0.3%, which is a statistically highly reliable low-probability event that can be classified as abnormal. Therefore, the server uses no more than three standard deviations above the historical mean as the upper limit threshold for one-sided judgment, with the judgment condition being: C d ≤μ C +3σ C This allows for more accurate detection of spikes and pulse anomalies in the load sequence, while maintaining sufficient tolerance for normal load fluctuations.
[0163] The server can also perform supplementary filtering and dataset construction. Specifically, to further improve the purity of the training set under normal operating conditions, based on the aforementioned statistical filtering, the server synchronously accesses operational data such as power grid dispatch and maintenance logs and demand response event logs, forming a set A of known abnormal event dates. The final sample set D is used for training. train Defined as: D train ={d|IsNormal(d)=True}\A. The dataset D after the above statistical filtering and rule filtering... train This constitutes the normal operating state training set used to train deep neural network models. This automatic filtering mechanism effectively excludes most dates containing drastic fluctuations, abnormally flat periods, or inverted peaks and troughs, laying a solid data foundation for constructing a high-precision virtual forecast load baseline curve.
[0164] The server can also construct and train deep neural network models (recognition models). To achieve high-precision learning of the inherent laws of load under normal power grid operation, the server integrates a combination of temporal convolution, bidirectional recurrent memory, and feature adaptive weighting to construct a deep learning model (TCN-BiLSTM-Attention network). This architecture aims to comprehensively capture the short-term local fluctuations, long-term periodic dependence, and differentiated contributions of multi-source input features of the load sequence, thereby generating a virtual predicted load curve (virtual baseline load information) that is independent of measured anomalies and reflects the pure intrinsic laws.
[0165] Specifically, regarding the combinatorial logic of the model architecture, the power grid load sequence exhibits rapid hourly increases / decreases (short-term dynamics), diurnal and weekly / monthly cycles (long-term patterns), and strong nonlinear coupling with multiple factors such as weather and date. A single deep learning structure is insufficient to simultaneously handle the learning tasks involving these multiple time scales and multi-feature interactions. The server employs a progressive cascaded design of TCN, BiLSTM, and Attention, with clear functional divisions for each module: TCN (Temporal Convolutional Network) acts as a short-term local feature extractor: through causal dilated convolutions, it captures hourly local fluctuation patterns in the load sequence (such as rapid rises and falls of midday and evening peaks) with an exponentially increased receptive field while maintaining temporal order. Its parallel computing characteristics also improve training efficiency. BiLSTM (Bidirectional Long Short-Term Memory Network) acts as a long-term periodic dependency encoder: utilizing recurrent connections in both forward and backward directions, it fully learns the diurnal periodicity, weekday-weekend pattern differences, and weekly / monthly trend evolution of the load sequence, compensating for the TCN's insufficient ability to model ultra-long temporal dependencies. The attention layer is a dynamic focuser for multi-source features: it automatically learns and assigns higher weights to key information in the input features (such as special power consumption patterns before holidays, extreme temperature times, etc.), suppresses irrelevant or redundant features, and improves the model's representation ability and interpretability.
[0166] The technical logic of the progressive cascaded design of the above three modules includes: TCN is placed at the bottom layer, using its causal convolution to extract local fluctuation features while maintaining temporal order, reducing the sensitivity of subsequent recurrent networks to short-term noise; BiLSTM is placed in the middle layer, receiving high-quality feature sequences filtered by TCN, allowing for more focused capture of long-term periodic dependencies and trend evolution; and the Attention layer is placed at the top layer, performing key information focusing based on global context encoding. If Attention is placed at the top, the attention weights will be calculated without sufficient contextual representation, significantly degrading the focusing effect; if TCN is omitted and the original sequence is directly fed into BiLSTM, long- and short-term information are mixed, and short-term spikes may interfere with periodic pattern learning. Therefore, the progressive arrangement of TCN, BiLSTM, and Attention is the structural guarantee for this combined architecture to achieve optimal performance. The three form a feature learning path of local perception, global context encoding, and key information weight allocation, which can comprehensively characterize the load change patterns under normal power grid operation.
[0167] The server can design the input feature system and sequence length. The model's input features are carefully selected to balance physical interpretability, data availability, and quantifiable impact. For the prediction time t, its input tensor consists of three types of features: historical load features. The server takes the historical load sequence of the past T days as input, where T = 45 days, and each day contains M sampling points (e.g., M = 96 at 15-minute resolution). The historical load features can then be represented as a two-dimensional tensor: X load ∈R T ×M The length of 45 days covers at least six complete cycles, providing sufficient samples for BiLSTM to learn weekday and weekend patterns. Furthermore, the 45-day span falls within the quasi-stationary timescale of power load, avoiding distribution drift caused by seasonal changes. Additionally, the 45-day input window is completely enclosed within the 90-day normal operation filtering window, ensuring that all input data comes from identified normal, clean periods, thus preventing information leakage in terms of time sequence. Therefore, T=45 was chosen.
[0168] It also includes the date encoding feature DateFeat, where all date-related features are discrete categorical variables, specifically: DateFeat = {month, weekday, hour, holiday} flag Each discrete feature is mapped to a low-dimensional dense real-valued vector through an independent embedding layer. Let V be the number of categories for the j-th date feature. j The embedding dimension is d j Then the embedding representation of this feature is: e (j) =Embedding j (cj )∈R d_j c j ∈{1,2,...,V j The embedding vectors of all date features are concatenated to form the date-encoded feature vector for time t: x t date =[e t (1) ;e t (2) ;...;e t (K_d) ]∈R D_d Among them, K d D represents the number of date features. d =∑ j=1 K_d d j This represents the total dimension after concatenation. The advantage of using embedding vectors is that the model can adaptively learn the semantic similarity and periodic association between categories through end-to-end training (e.g., Monday and Tuesday should be close in the embedding space, while they should be far apart from Sunday). Compared with one-hot encoding, this reduces dimensionality while preserving the structural information between categories.
[0169] It also includes meteorological features from MetFeat. The meteorological elements included were selected based on the principles of physical interpretability, data availability, and quantifiable impact, including the following K... m Core features and derived features: MetFeat={T dry ,T dew ,RH,WS,P rain ,T apparent ,...}。 Among them, T dry T represents the dry bulb temperature (°C). dew Here, RH is the dew point temperature (°C), RH is the relative humidity (%), WS is the wind speed (m / s), and P is the relative humidity (%). rain Rainfall (mm), T apparent This is to derive features from perceived temperature by integrating temperature and humidity. All meteorological features have been matched and filtered against normal operating conditions to ensure that the correspondence between meteorological data and load in the training data is not affected by abnormal events. The meteorological feature vector at time t is represented as: x t met ∈R K_m .
[0170] The final input tensor can be formed by aligning and concatenating the three types of features mentioned above along the time dimension, thus creating the final input representation of the model. For an input sequence containing T time steps, its dimension is T×D, where D=M+D d +K m : X=[X load ,X date ,Xmet This multi-dimensional, multi-source feature system provides a complete foundation of input information for the subsequent TCN-BiLSTM-Attention model, enabling it to learn the load evolution pattern under normal grid operation from three dimensions: historical load inertia, human activity cycle patterns, and meteorological driving forces.
[0171] The server can perform forward computation and mathematical expression of the model. Let the input time series be x. 1:T Its dimension is T×D (D is the feature dimension after concatenation at each time step). The calculation process of the model is as follows: TCN layer: One-dimensional causal dilated convolution is used. For the convolution operation of the l-th layer with kernel size k and dilation factor d, the output at time s is: h s (l) =ReLU(∑ i=0 k-1 W i (l) x s-d⋅i +b (l) By stacking multiple layers of dilated convolutions, TCN encodes the input sequence into a feature sequence H with local contextual information. TCN ∈R T×dtcn For the l-th layer TCN, its expansion factor is typically calculated according to d. l =2 l-1 The exponential increase means that the effective receptive field of a single layer is k+(k-1)(d l -1). After stacking L layers, the temporal receptive field that the top layer features can cover is: RF(L)=1+∑ l=1 L (k-1)d l By adjusting the number of layers L and the kernel size k, the server can ensure that the receptive field covers the entire intraday cycle (e.g., M=96 sampling points), ensuring that the model has fully perceived the dynamic changes in load over the preceding and following hours when extracting features at the current moment, thus providing high-quality feature sequences with local noise eliminated for subsequent long-range modeling of BiLSTM.
[0172] In the BiLSTM layer, the internal computation process of a single-layer LSTM unit at time t is as follows: f t =σ(W f [h t-1 ,x t ]+b f );i t =σ(W i [h t-1 ,x t ]+b i ); C * t =tanh(W C [h t-1 ,xt ]+b C ); C t =f t ⊙C t-1 +i t ⊙C * t ;o t =σ(W o [h t-1 ,x t ]+b o );h t =o t ⊙tanh(C t ), where f t i t ,o t These are the forget gate, input gate, and output gate, respectively. (C) * t For candidate memory cell states, C t Let σ represent the state of the memory cell, σ be the sigmoid activation function, and ⊙ represent the element-wise product. The forget gate controls the degree of retention of historical information, the input gate adjusts the proportion of new information written, and the output gate determines the strength of the transition from memory to the hidden state. The server feeds the TCN output into a bidirectional LSTM to obtain the forward hidden state h. → t and backward hidden state h ← t The global context representation of time t is formed by splicing: h t LSTM =[h → t ;h ← t ]∈R 2d_lstm The splicing result at all moments is H. LSTM ∈R T×2d_lstm .
[0173] In the attention layer, to address the technical challenge of the non-uniform distribution of contributions to the current prediction target across different time points in the historical load sequence, the server introduces an additive attention mechanism after the BiLSTM layer. This mechanism adaptively quantifies the importance weights of each historical time point using a learnable global query vector, enabling the model to automatically focus on key information and suppress irrelevant or redundant inputs. The server can construct the global query vector, where u∈R. 2d_lstm This is a trainable global query vector, which serves as an internal parameter of the model and is independent of the specific time point of the input sequence, remaining consistent across all samples. Its technical significance lies in the fact that, through end-to-end training, the model determines which historical load patterns are most critical global cognitive criteria for the prediction task, and uses these criteria to perform relevance retrieval and information filtering on the BiLSTM-encoded hidden state sequences.
[0174] The server can calculate the attention weights for the hidden state h at time t of the BiLSTM layer output. t LSTM ∈R 2d_lstm The server first maps the query vector u to the same latent space using a linear transformation, and then calculates the matching score after nonlinear activation. Its mathematical expression is: e t =v unknown tanh(W1h t LSTM +W2u+b a Where W1∈R d _a×2d_lstm Let W2 be the hidden state transformation matrix, where W2∈R d_a×2d_lstm To query the vector transformation matrix, b a ∈R d_a For the bias term, v unknown ∈R d_a Let d be the score mapping vector. a α represents the attention hidden layer dimension and is an adjustable hyperparameter. Based on the obtained matching scores, the server normalizes the values using the Softmax function to obtain the attention weight coefficients for each historical time step: α. t =(exp(e t )) / (∑ τ=1 T∑_τ exp). Where, α t ∈(0,1) and satisfy the normalization constraint ∑ t=1 T α t =1. Weight α t The magnitude of the value directly quantifies the relative importance of the load pattern at historical time t to the current forecast target.
[0175] The server can also aggregate context vectors. Using attention weights as coefficients, the server performs a weighted summation of the hidden states across all historical time points to obtain a fixed-dimensional context vector: c. context =∑ t=1 T α t h t LSTM ∈R 2d_lstmThis context vector condenses global information across the entire sequence through differentiated aggregation: key moments highly relevant to the prediction target (such as special electricity consumption patterns the day before a holiday, load response during periods of sudden weather changes, etc.) are automatically assigned greater weights due to their high matching degree between their hidden states and the global query vector, and their pattern features are extracted with emphasis; while the weights of constant patterns or noisy moments are suppressed. Compared to the traditional approach of simply averaging the hidden states or only taking the output of the last moment, this mechanism significantly improves the model's ability to capture key information and its prediction accuracy, while the visualization of attention weights also enhances the interpretability of the model's decision-making process.
[0176] At the output layer, the server fuses the context vector with external features (date and weather information of the time to be predicted) and outputs the virtual forecast load through a fully connected layer. ~ t :l ~ t =W o [c context ;f t ]+b o Among them, f t Let l be the date and meteorological feature vector at time t. ~ t This is the virtual forecast load (MW) at that moment. The server repeats this process to generate forecast values for all times of the day, thus forming the virtual forecast load curve L. ~virtual =[l ~ 1,l ~ 2,…,l ~ M The output resolution matches the measured load. Where f t The known external condition vector for the time t to be predicted is formed by concatenating the date encoding embedding of that time with meteorological elements along the feature dimension: f t =[x t date ;x t met ]∈R D_d+K_m This vector contains only predictable non-load information at time t, and does not contain any measured load values at future times, ensuring that the virtual baseline curve generation strictly satisfies the temporal causality constraint. That is, for any predicted time t, the model outputs l based solely on historical information up to and including t. ~ t .
[0177] The server can also establish a principle for partitioning the training and test sets. Specifically, it uses a 70% training set and 30% test set ratio, adhering to the principle of maintaining the correct temporal sequence: 70% of the normally functioning samples are used for model parameter training, ensuring sufficient learning under massive datasets; 30% of the independent samples are used to evaluate the model's generalization performance on unseen data. This partition balances training sufficiency and evaluation reliability. Temporal partitioning: Instead of random shuffling, all filtered clean samples are sorted chronologically by date, with the first 70% used as the training set and the last 30% as the test set. This ensures that all training data comes from periods prior to the test data's historical timeframe, preventing future information leakage and accurately reflecting the model's forward predictive capabilities in actual deployment.
[0178] Suppose that the date sequence of the purified samples obtained after screening is arranged in ascending order of time as D = {d1, d2, ..., d...} |D|}, where d1 <d2<...<d |D| The server takes the floor function of the boundary index s = 0.7 × |D|, and the training and test sets are respectively: D train ={d1,d2,...,d s}, D test ={d s+1 ,d s+2 ,...,d |D| This partition applies to any d. train ∈D train With d test ∈D test , always have d train <d test This eliminates time-series travel, ensuring that test evaluation results reflect the model's forward predictive performance under actual deployment conditions. The server can also guarantee data purity, with the sample set D participating in the partitioning... train =D normal ∩A ~ Statistical screening and known abnormal log filtering have been performed, eliminating the interference of data pollution on training and evaluation at the source.
[0179] The server can also perform training objectives and optimization. The model aims to minimize the error between the virtual predicted load and the measured load (on normal samples), and the loss function uses mean squared error (MSE): L MSE =1 / N b ∑ i=1 N_b ∑ t=1 M (l ~ i,t -l i,t real ) 2Among them, N b l represents the batch sample size. i,t real Let be the actual load of the i-th normal day sample at time t. The model parameters are iteratively updated using gradient descent to ultimately obtain a virtual benchmark generator (identification model) capable of stably outputting a pure theoretical reference curve.
[0180] Step S200: Multi-dimensional meteorological sensitivity analysis and construction of comprehensive human perception index.
[0181] Among them, the server integrates a single meteorological sensitivity coefficient with the contribution of multi-factor SHAP based on model attribution to construct a comprehensive human perception index I. weather This allows for the precise quantification of the combined driving force of multiple meteorological factors on the load, providing a scientific basis for identifying meteorological-driven deviations.
[0182] The purpose of this step is to construct a quantitative indicator that combines physical interpretability and statistical significance to distinguish between normal load changes driven by meteorological factors and anomalous disturbances caused by non-meteorological factors, providing a scientific and objective basis for identifying meteorological-driven anomalies. A comprehensive perceptual indicator integrating statistical regularity and model cognition is proposed.
[0183] To identify the anomaly types within abnormal intervals, the server can pre-quantify a single meteorological sensitivity coefficient (target meteorological sensitivity). Specifically, the server uses temperature T as a representative variable and quantifies its sensitivity coefficient (target meteorological sensitivity) S through piecewise linear fitting to characterize the statistical driving force of a single meteorological element on the load.
[0184] The server can segment temperature ranges. The response of electrical load to temperature exhibits a significant nonlinear characteristic. Within the comfortable temperature range, the load is primarily driven by production and daily life rhythms and is insensitive to temperature changes. When the temperature falls below or rises above a certain critical value, heating or cooling loads are activated, and the relationship between load and temperature changes from a gradual trend to a significant monotonic change, forming a statistically identifiable inflection point. Based on the above physical mechanism, the server employs a data-driven adaptive segmentation method, with the following specific steps:
[0185] Step 1, Data Preparation. The server retrieves the daily average temperature and corresponding daily maximum load from all samples in the training set under normal operating conditions, forming a scatter dataset {(T... i ,L i max )} i=1 N .
[0186] Step 2, Inflection Point Identification. The server uses temperature T as the independent variable and daily maximum load L... i maxAs the dependent variable, fit a locally weighted regression curve and calculate the first numerical derivative of the curve. Define the temperature point where the absolute value of the curve's slope changes significantly as the inflection point: the lower limit inflection point T. low The inflection point T represents the point where the absolute value of the slope decreases and approaches zero as the temperature transitions from the low-temperature zone to the comfort zone. high This is the inflection point where the absolute value of the slope increases significantly from near zero as the temperature transitions from the comfort zone to the high-temperature zone. The specific value of the inflection point is automatically determined by minimizing the residuals of the piecewise linear fitting.
[0187] Step 3, Inflection Point Adaptive Calibration. To avoid the subjectivity and regional limitations of manually setting fixed thresholds, the server adopts a data-driven calibration method combining traversal search and residual minimization. First, the temperature values are sorted in ascending order, and the minimum and maximum temperatures are set to Tmin and Tmax, respectively. min With T max After removing the extreme temperature values at both ends (typically α=10), all observed values within the remaining temperature range are used as the candidate inflection point set: T cand ={T i |T i ∈[Q α (T),Q 1-α (T)]}。 Where Q α (T) and Q 1-α (T) represents the αth and (1-α)th percentiles of the temperature series, respectively. For any pair of ordered inflection point combinations (T) in the candidate set... a ,T b ), satisfying T a <T b The server divides the temperature domain into three intervals and fits a linear model to each, applying a continuity constraint on the piecewise function at the inflection points: L max {a L T+b L , T≤T a; a C T+b C T a <T<T b ;a H T+b H , T≥T b The constraints include: a L T a +b L =a C T a +b C a C T b +b C =a H T b +b H.
[0188] The server can define the global fit residual sum of squares corresponding to this inflection point combination: RSS(T a ,T b )=∑ i N (L i max -L ~ i max (T a ,T b )) 2 ), where L ~ i max (T a ,T b ) is at the inflection point (T) a ,T b The piecewise linear model predicts the i-th sample. The server iterates through all samples that satisfy T. a <T b The optimal inflection point is selected from the ordered combinations of inflection points that minimize the Residual Sum of Squares (RSS): (T low ,T high )=argmin T_a,T_b∈T_cand, T_a<T_b RSS(T a ,T b ).
[0189] At the same time, the server introduces a minimum comfort zone span constraint T. high -T low ≥ T min (Typical value is 3~5℃) to prevent overfitting due to an excessively narrow comfort zone. If the optimal solution does not meet this constraint, then the suboptimal solution under the constraint is adopted.
[0190] Step four, interval definition and sensitivity extraction. The server, based on the inflection point obtained from calibration, divides the temperature domain into three non-overlapping continuous intervals: Low temperature region: Ω L : T≤T low Comfort zone: Ω C :T low <T<T high High temperature zone: Ω H : T≥T high The sensitivity coefficient for each interval is the regression slope of the corresponding segment: S L =a L S C =a C S H =a H Among them, Sk (Target meteorological sensitivity, unit: MW / ℃) Quantitatively characterizes the load change caused by a unit temperature change within this temperature range. Comfort zone Ω C Inner S C It usually approaches zero, while in the low-temperature region S L With high temperature zone S H The absolute values are significantly greater than zero, reflecting heating sensitivity and cooling sensitivity, respectively. This calibration is automatically completed based entirely on the statistical characteristics of local historical data. Power grids in different regions and seasons only need to re-execute the above process using local data to adaptively obtain suitable inflection point locations and sensitivity coefficients.
[0191] For the target perceived load index sequence, the server can first perform a multi-factor Shapley Additive Explanations (SHAP) contribution decomposition. However, single temperature sensitivity can only characterize the relationship between load and temperature from a statistical correlation perspective, failing to quantify the synergistic driving effect of multiple meteorological factors such as humidity, wind speed, and rainfall, nor can it reflect the complex mapping between meteorological conditions and load learned by the deep neural network model from a high-dimensional feature space. The server can use the pre-trained TCN-BiLSTM-Attention deep neural network model as a black box, applying the SHAP method for global and local interpretation, quantifying the comprehensive contribution of multiple meteorological factors to the predicted load from a model attribution perspective.
[0192] The calculation principle of the SHAP value is based on the Shapley value theory of cooperative game theory. It calculates the expected marginal contribution of each feature across all possible combinations of feature subsets to obtain the attribution value of that feature to a single predicted value. For the virtual predicted value at time t (the predicted load information in the virtual baseline load information), l... ~ t =f(x t ), where x t =(x t (1) ,x t (2) ,...,x t (D) Let φ be a D-dimensional input feature vector. The SHAP value of the j-th feature is defined as: φ j (t)=∑ S包含于F?{j} (|S|!(|F|-|S|-1)!) / (|F|!)[f S (x t (S∪{j}) )-f S (x t (S)Where F = {1, 2, ..., D} is the set of indices of all input features; S is any subset of F that does not contain feature j, and |S| is the size of the subset; (|S|!(|F|-|S|-1)!) / (|F|!) is the Shapley weight, ensuring that all feature subsets are considered equally; f S (x t (S) f represents the expected output of the model when only a subset of features S is used, achieved by averaging the background dataset with masked features; S (x t (S ∪{j}) )-f S (x t (S) Let φ be the marginal contribution of feature j under a specific subset S. The physical meaning of this formula is: the SHAP value φ of feature j at time t. j (t) is equal to the weighted average of the marginal contribution of this feature to the predicted output across all possible combinations of features. SHAP values satisfy additivity—the sum of the SHAP values of all input features equals the difference between the model's predicted value and its baseline expected value: l ~ t -E[l ~ ]=∑ j=1 D φ j (t). In actual computation, the server uses TreeSHAP or its kernel SHAP approximation algorithm to reduce computational complexity while ensuring accuracy, making time-by-time SHAP decomposition feasible for large-scale datasets.
[0193] Regarding the choice of computational granularity for SHAP decomposition, the server selects a single prediction time t as the smallest unit for SHAP contribution decomposition, rather than aggregating and attributing a continuous load interval as a whole. This is mainly based on the following technical considerations: First, the SHAP method is based on the Shapley value theory of cooperative game theory. Its calculation process requires evaluating the marginal contribution of each feature value at a specific time relative to the baseline expected value for a clear scalar prediction output. If a load interval is treated as a whole, its output is a vector sequence, lacking a single output scalar, making it impossible to directly apply SHAP decomposition. If the load values at each time within the interval are aggregated into a mean or sum, the subtle differences in time-varying patterns will be lost. Second, the driving force of meteorological factors on load has significant time-varying and non-stationarity. The magnitude and even direction of the SHAP contribution of the same meteorological element at different times within the same day may be completely different. For example, on a hot summer day, the temperature at 2 PM has a very strong positive driving force on the cooling load, while at 4 AM the cooling load subsides, and the SHAP value of the temperature feature approaches zero. Only by breaking down the data hourly can the aforementioned refined intraday differences be captured. Thirdly, the determination of meteorological-driven anomalies requires a Pearson correlation coefficient test on the deviation sequence and the comprehensive sensory index sequence at each time point within the anomaly interval. This test uses time points as statistical sample units; only by calculating the SHAP value hourly and constructing the comprehensive sensory index φ hourly can this be achieved. t This ensures that each anomalous interval has a sufficient number of effective sample points commensurate with its length, guaranteeing the statistical power of the correlation test. Fourth, it provides diagnostic information for heterogeneity within anomalous intervals. In practical engineering, the intensity of meteorological driving forces within an identified anomalous interval may not be uniform. Time-by-time SHAP decomposition can reveal which sub-periods within the interval are indeed driven by meteorology and which sub-periods may be subject to superimposed interference from other factors, providing a more granular basis for differential correction.
[0194] Regarding the selection criteria for meteorological features, the meteorological features included in the SHAP decomposition of the server follow three principles: physical interpretability, which requires a recognized physical driving relationship with the power load; temperature directly affects heating and cooling loads through perceived comfort; humidity indirectly drives air conditioning loads by affecting the heat dissipation efficiency of the human body; wind speed affects heat loads by changing the convective heat transfer coefficient of the building envelope; and rainfall affects commercial and residential electricity consumption by changing outdoor activity patterns and lighting conditions; data availability, which requires standardized elements that are routinely collected by power dispatching or meteorological departments to ensure the portability of the method across different power grids; and model effectiveness, which only retains features whose global mean absolute value of SHAP in the deep neural network model exceeds a preset threshold, and removes redundant elements that are not identified as effective predictors by the model.
[0195] Based on the above, the meteorological features included in the server's data include: dry-bulb temperature T. dry Dew point temperature Tdew Relative humidity (RH), wind speed (WS), rainfall (P) rain And the perceived temperature T_ constructed from a nonlinear combination of temperature and humidity. apparent Derivative features, etc. After standardization, the SHAP values of the above features are summed to obtain the total contribution of multi-factor meteorological factors: SHAP. t met =∑ j∈F_met φ j (t). Wherein, F met For a set of meteorological feature indexes, φ j (t) represents the SHAP value (in MW) of the j-th meteorological feature at time t. t met From the perspective of model attribution, it reflects the comprehensive driving direction and magnitude of all meteorological factors on the predicted load at a specific moment. Positive values indicate that meteorological factors drive the load to increase, negative values indicate that they drive the load to decrease, and absolute values indicate the driving intensity.
[0196] The server can combine the above parameters to construct a comprehensive somatosensory index (target somatosensory index sequence) φ t The server integrates univariate sensitivity, reflecting statistical regularities, with multi-factor SHAP contribution, reflecting model attribution logic, to construct a comprehensive, multi-dimensional perception index. This index confirms the combined effect of meteorological factors on the load from both statistical and model-aware dimensions. For time t, the formula for calculating the comprehensive perception index (target perception index sequence) is: φ t =λ1(S k T t )+λ2SHAP t met Among them, S k The current temperature T t Sensitivity coefficient (MW / ℃) for the temperature range k∈{L,C,H}. T t =T t -T ref The current temperature and the comfort zone reference temperature T ref The difference (°C), T ref Take the comfort zone Ω C Midpoint temperature; SHAP t met The total contribution of meteorological factors (MW) is denoted as λ1 and λ2, which are the fusion weights and satisfy the normalization constraint λ1+λ2=1.
[0197] Specifically, regarding the method for determining the fusion weights, the calibration of weights λ1 and λ2 adopts a data-driven method based on historical typical meteorological scenarios to avoid biases caused by subjective manual weighting. This includes:
[0198] Step 1: Selection of Typical Scenarios. The server selects several typical scenarios with clear meteorological load characteristics from the training set under normal operating conditions, including extreme high temperature days (dominated by cooling load), extreme low temperature days (dominated by heating load), and comfortable temperature days (dominated by base load). Under each scenario, the driving force of meteorological factors on the load should have significantly distinguishable differences in magnitude.
[0199] Step two: Independently calculate the standard deviation of each of the two components. The server calculates the sensitivity-weighted temperature difference term S for each of the selected typical scenarios. k T t SHAP Total Contribution Item t met Standard deviation σ S With σ SHAP .
[0200] Step 3, Weight Initialization and Normalization. To ensure that the two components have a balanced expression strength in the fusion index and to avoid one component dominating the fusion result due to differences in dimensions and variation amplitudes, the server initializes the fusion weights to be inversely proportional to the standard deviation of each component: λ1 (0) =(1 / σ S ) / (1 / σ S +1 / σ SHAP ), λ2 (0) =(1 / σ SHAP ) / (1 / σ S +1 / σ SHAP This initialization strategy ensures that components with greater variation are moderately compressed and components with less variation are moderately amplified, resulting in a balanced expression intensity of both in the fusion index.
[0201] Step four, grid search fine-tuning. The server aims to optimize the accuracy of weather-driven anomaly detection (using a manually labeled validation set as a reference), with an initial value of λ1. (0) With λ2 (0) A grid search is performed within the neighborhood of φ. The step size is 0.05, and the search range is [0.2, 0.8] (restricted by the normalization constraint λ1+λ2=1). The step size of 0.05 is set based on the following: First, a change in weight on the order of 0.01 affects φ t The impact of the correlation coefficient between the sequence and the biased sequence is below the statistical noise level, and an accuracy of 0.05 is sufficient to capture the substantial impact of weight changes on the discrimination performance. Secondly, under the normalization constraint, only a single free parameter λ1 needs to be searched. A step size of 0.05 generates 13 candidate values in the range [0.2, 0.8]. Combined with a validation set evaluation of a small number of typical scenarios, the efficiency of completing the full grid traversal can be improved. Furthermore, the weight initialization value λ1... (0)After calculation using the inverse standard deviation, the values typically fall within the range of [0.4, 0.6]. The search range of [0.2, 0.8] covers a neighborhood of approximately 0.2 above and below the initial value. A step size of 0.05 can generate a sufficiently high density of high-quality candidate points within this range. The weight combination that yields the highest classification accuracy is selected as the final calibration value. Regarding the interpretable range and boundary thresholds for meteorological sensitivity, to quantitatively delineate meteorological-driven anomalies from non-meteorological deviations, the server defines the interpretable range and its boundary threshold system for meteorological sensitivity. The interpretable range for meteorological sensitivity refers to the reasonable portion of the load deviation that can be explained by temperature changes within a given temperature range k. Its upper limit is the temperature change and the sensitivity coefficient S for that range. k The product is multiplied by β. Let I be the set of time indices for the identified anomalous intervals, then the upper limit of the meteorologically explainable deviation for each interval is: explainable =β|S k |1 / (|I|)∑ t∈I | T t | Wherein, β is the tolerance factor, typically 1.2, which physically means allowing a 20% margin between measured and theoretical meteorological deviations to cover additional deviations caused by the synergistic effects of multiple meteorological elements and model simplification approximations. The value of β should not exceed 1.5, otherwise it will lose its demarcation significance, and its value can be fine-tuned based on the accuracy evaluation of historical validation sets.
[0202] The following boundary threshold conditions must be met for the determination of meteorological driving anomalies:
[0203] Correlation condition: Deviation sequence { t} t∈I With the comprehensive sensory index sequence {φ t} t∈I The Pearson correlation coefficient must satisfy ρ ≥ 0.7. This threshold is set based on the following statistical argument: From the perspective of significance testing, for a typical outlier interval size—assuming an outlier interval lasting 4 hours contains n=16 time sampling points at a 15-minute resolution—the correlation coefficient ρ follows a t-distribution with n-2=14 degrees of freedom. When ρ = 0.7, the test statistic t = ρ√(n-2) / √(1-ρ) 2The p-value is approximately 0.0025 with 14 degrees of freedom, which is much smaller than the commonly used significance level of 0.01. This indicates that the probability of this correlation being caused by random factors is less than three per thousand. In statistical correlation interpretation conventions, |ρ| ≥ 0.7 is defined as a strong correlation interval, which can exclude non-meteorological driving components that may be mixed in with moderate correlation (0.3 ≤ |ρ| < 0.7). Based on the hypothesis testing framework, the server sets the null hypothesis H0 as no correlation between the biased sequence and the comprehensive sensory index (ρ = 0), and the significance level is set to α = 0.01, corresponding to the minimum determinable correlation coefficient ρ. min (When n=16). The threshold of 0.7 is higher than the statistical significance threshold, ensuring a high degree of statistical confidence in the decision; at the same time, it is lower than the high confidence value (ρ) for the minimum 1-hour interval. min (When n=4), it balances sensitivity and specificity within the typical anomaly interval length of 1 to 4 hours.
[0204] Furthermore, the 0.7 threshold also possesses methodological self-consistency. The server's three-classification anomaly system employs priority criteria, with meteorological-driven anomalies at the third priority. Intervals reaching this level of inspection have undergone multiple filters, including dead counts, jumps, instantaneous jumps, direction reversals, smooth ramps, and time-period matching, placing them within a high-purity candidate pool. Setting a high threshold of ρ≥0.7 reflects a defensive principle, allowing a few meteorologically driven intervals with ambiguous boundaries to be temporarily unclassified for manual confirmation. This prevents the lowering of standards and the erroneous inclusion of non-meteorological biases into the meteorological-driven category, thus avoiding the solidification of data distortion. This threshold can be adaptively adjusted based on the correlation coefficient distribution of known meteorological-driven anomalies in the local power grid's historical data.
[0205] Reasonableness condition for amplitude: The average absolute deviation amplitude within the interval must be within the range that meteorological sensitivity can explain. ~ avg =1 / (|I|)∑ t∈I | t |≤β|S k |(| T|) ~ avg Among them, (| T|) ~ avg =1 / (|I|)∑ t∈I |T t -T ref| represents the deviation of the average temperature over the interval. This condition ensures that the magnitude of the deviation is consistent with the physical inference magnitude of the meteorological sensitivity coefficient. Deviations exceeding this range are more likely caused by non-meteorological factors (such as equipment failure, manual scheduling, etc.) and should be classified as fallback or manually confirmed. The physical meaning of this comprehensive perceived index is the magnitude of the combined force of meteorological factors on the load, confirmed from both statistical regularities (sensitivity-weighted temperature difference term) and model cognition (SHAP total contribution term). φ t The positive or negative sign indicates whether meteorological factors collectively drive the load up or down, and its absolute value represents the driving intensity (MW). When the actual load deviation is different from φ... t The trends are highly consistent (ρ≥0.7), and the amplitude is within the range that can be explained by meteorological sensitivity. ~ avg ≤β|S k |(| T|) ~ avg When the deviation is determined to be driven by meteorological factors, it can be confidently determined that the deviation is driven by meteorological factors, thus providing a solid physical and data-driven identification basis for the three-classification of anomalies in step three.
[0206] Step S300: Identification of abnormal load intervals and three-class classification of causes.
[0207] The server calculates the dynamic deviation between the actual load and the virtual baseline to identify valid abnormal intervals. Based on five characteristics, including the consistency of deviation direction and load change rate, the abnormal intervals are automatically classified into three categories according to priority logic: data acquisition type, operation control type, and weather-driven type.
[0208] This step is the core decision-making link of the entire load restoration method. It aims to use the virtual predicted load benchmark constructed in step one and the comprehensive perception index constructed in step two to accurately identify abnormal intervals from massive historical data, and automatically classify them into three categories based on the cause of the anomalies: data collection type, operation control type, and weather-driven type, providing type labels and interval boundaries for differentiated correction in subsequent steps.
[0209] When identifying abnormal intervals, the server can calculate the relative deviation rate. For example, for each time t, the server calculates the actual load (load information) l. t real With virtual baseline load l ~ t relative deviation rate t To quantify the degree to which the measured value deviates from the theoretical expectation: t =(l t real -l ~t ) / l ~ t ×100%. Where, l ~ t The virtual prediction payload (MW) output by a Temporal Convolutional Network (TCN) - Bidirectional Long Short-Term Memory (BiLSTM) - Attention deep neural network model (recognition model), l t real The actual load value (load information, MW) collected from the power grid. t >0 indicates that the actual load is higher than the virtual baseline (positive deviation). t <0 indicates that the actual load is lower than the virtual baseline (negative deviation).
[0210] The server can also perform adaptive anomaly threshold determination. Fixed threshold methods cannot adapt to the natural differences in deviation distribution under different power grid load levels and seasonal patterns. The server employs an adaptive threshold method based on the statistical characteristics of normal operating conditions, allowing the anomaly judgment criteria to automatically adjust with the inherent variability of the data.
[0211] On the selected dataset of normal operating time periods, calculate the relative deviation rate for all times. t Standard deviation σ The threshold for anomaly detection is a multiple of this standard deviation. upper =+kσ Threshold lower =-kσ Where k is the threshold factor, typically ranging from 2 to 3. k=2 corresponds to an approximately 95% confidence interval (under the normality assumption), suitable for general accuracy requirements; k=3 corresponds to an approximately 99.7% confidence interval, suitable for scenarios with high specificity requirements and reduced false alarm rates. The default value is k=3, consistent with the screening logic of 3 times the standard deviation of the daily maximum ramp rate.
[0212] The server further determines the valid outlier intervals. Specifically, the server identifies a valid outlier interval (outlier interval) as a continuous time sequence that meets the following three conditions: Condition 1, threshold breach: the deviation rate of all times within the interval. t All satisfy | t |>kσ Condition 1: Exceeding the adaptive threshold range (abnormal load threshold); Condition 2: Consistent direction: The sign (positive / negative) of the deviation within the interval remains consistent, i.e., a set of consecutive positive deviations or consecutive negative deviations, with no alternating reversals in direction; Condition 3: Duration: The duration of the interval exceeds the minimum time window (duration threshold) T. min For example, 1 hour (corresponding to 4 sampling points at 15-minute resolution) to exclude instantaneous single-point out-of-bounds errors caused by random noise. The server defines the abnormal interval satisfying the above conditions as I=[t]. start ,t end The number of sampling points it contains is |I|, t start t represents the start time of the interval. end Indicates the end time of the interval.
[0213] The server can perform feature extraction for three-class classification of anomaly causes. For each identified valid anomaly interval I, the server automatically calculates and extracts the following five types of discriminative features, forming a five-dimensional feature vector f=[f1,f2,f3,f4,f5], providing a quantitative basis for subsequent priority-based three-class classification. Among them, feature one is the consistency of deviation direction (first anomaly feature) f1. This feature quantifies the consistency of deviation direction within the interval, used to distinguish between continuous direction-regulating anomalies and frequent direction-reversing acquisition-type jump anomalies. f1=(|{t∈I| t t-1 >0»ò| t - t-1 |<ε fluct}|) / (|I|-1). Wherein, the number of sampling points whose deviation direction remains unchanged or only fluctuates slightly between adjacent time points is counted. t t-1 >0 indicates that the deviations between two adjacent time points have the same sign (same direction); | t - t-1 |<ε fluct This indicates that the change in deviation between adjacent time points is less than the threshold for minor fluctuations. Even if such fluctuations lead to sign reversal, they are not counted as substantial directional changes.
[0214] Small fluctuation threshold ε fluct The determination method is as follows: Calculate the first difference δ of the deviation rate sequence on the dataset during the server's normal operation period. t =| t - t-1 |Standard deviation σ δTake ε fluct =0.5σ δ The physical meaning is that only when the fluctuation of the deviation rate reaches more than half of the normal fluctuation level is it considered a substantial change in direction; minor fluctuations below this threshold are considered random noise.
[0215] Feature two is the standard deviation of the load change rate (second anomaly feature) f2. This feature quantifies the smoothness of load changes within the interval, reflecting whether the fluctuation pattern of the anomaly interval is a high-frequency oscillation or a smooth transition. Specifically, the server analyzes the load sequence {l} within the interval. t real} t∈I Calculate its first-order difference sequence: r t =l t+1 real -l t real , t∈[t start ,t end -1]. Then f2=√(1 / (|I|-2)∑ t=t_start t_end-1 (r t -r ~ ) 2 ), where r ~ f2 represents the mean of the first difference. A larger f2 value indicates more drastic and less smooth load changes within the interval; a smaller f2 value indicates smoother changes.
[0216] Feature three is the recovery feature before and after the interval (third anomaly feature) f3. This feature describes the load recovery pattern after the anomaly interval ends, used to distinguish between instantaneous jumpback (data acquisition-type anomaly recovery feature) and smooth ramp-up (control or meteorological anomaly recovery feature). The server sets the interval end time as t. end The first stable time thereafter is t. rec (Take t) end +1 to t end +n rec The first sampling point within the range that meets the recovery condition. The recovery condition is defined as the absolute value of the load returning to a reasonable neighborhood of the virtual baseline.
[0217] |l t_rec real -l ~ t_rec |≤μ e +kσ e Among them, μ e With σ e The absolute deviation e under normal operating conditions t =|l t real -l ~ t| represents the mean and standard deviation, where k is the recovery tolerance coefficient, typically 1.0. The determination of instantaneous jump can include: if t rec -t end If the load change rate during the recovery process exceeds the average maximum ramp rate under normal operating conditions (≤2, i.e., 1~2 sampling periods, corresponding to 15~30 minutes), then f3 outputs instantaneous jump back to mode. The determination of smooth ramp can include: if t rec -t end If the value is ≥4 (meaning at least 4 sampling cycles, corresponding to a gradual recovery of more than 1 hour), then f3 will output a smooth ramp mode. Otherwise, f3 will output other recovery modes.
[0218] Feature four represents the abnormal time period characteristic (fourth abnormal feature) f4. This feature determines whether the occurrence time of the abnormal interval matches the typical time period of power grid operation and control, providing a business rationality verification for the determination of operation and control type anomalies. Specifically, regarding the basis for setting the typical control time period database, operation and control type anomalies (such as demand response, orderly power consumption, peak shaving and valley filling, etc.) are triggered by manual control commands from the power grid dispatching agency, exhibiting significant time period clustering and strong correlation with time and business rules. Data acquisition type anomalies, on the other hand, can occur at any time and are unrelated to time attributes. Therefore, time period matching plays a business rationality verification role among the three necessary conditions for determining operation and control type anomalies, avoiding misjudging similar anomalies occurring outside of control periods as operation and control type. The method for determining the typical control time period database can be a dual-source calibration method using local dispatching procedures and historical event logs on the server.
[0219] First, the server initializes based on the scheduling procedures. It accesses documents such as the grid dispatching operation procedures, orderly electricity consumption plans, and demand response agreements, extracting clearly defined time periods, including: morning peak shaving period (07:00-09:00 on weekdays), evening peak shaving period (17:00-21:00 on weekdays), midday valley filling period (11:00-14:00 during peak photovoltaic season), orderly electricity consumption execution period (dynamically determined based on the power supply gap plan), demand response execution period (based on the demand response contract's agreed window), and major holiday periods (statutory holidays).
[0220] Second, the server verifies and supplements based on historical event logs. The initial time period database is compared with historical demand response event logs and scheduling operation ticket records. If a certain type of control event exhibits a regular time clustering in the historical records that exceeds the initial time period range, the server appropriately expands the time period boundaries.
[0221] Third, a dynamic update mechanism. The control period database is updated synchronously with revisions to dispatching procedures, orderly electricity consumption plans, and time-of-use pricing.
[0222] For the matching and determination method of the fourth abnormal feature, the server can set the time index range of the abnormal interval to [t]. start ,t end The time index set covered by the m-th preset time period in the control time period database is T. m The server calculates the overlap rate: m =(|[t star ,t end ]∩T m |) / (|[t start ,t end If there exists any m such that Overlap m If the value is ≥0.7, then f4 is considered a successful match.
[0223] Feature five can be the proportion of sustained flat values (the fifth anomaly feature), f5. This feature is used to identify dead counts, i.e., when the acquisition equipment malfunctions, causing the load value to remain almost unchanged for multiple consecutive sampling points. f5=(∑ t=t_start t_end-1 I(|l t+1 real -l t real |<ε flat )) / (|I|-1). Where I() is an indicator function, taking the value 1 if the condition is true, and 0 otherwise; ε flat Preset tolerance. Preset tolerance ε flat The method for determining this may include: on the dataset during normal operation, the server calculates the absolute value d of the load difference between adjacent sampling points. t =|l t+1 real -l t real |, take the larger value between its 1st percentile and the lower limit of measurement accuracy: ε flat =max(Q1(d),ε min Among them, ε min To determine the lower limit of measurement accuracy, a typical value of 0.1 to 0.5 MW is used for 15-minute load data in MW. If the load difference between two adjacent sampling points is less than this tolerance, the server considers that the load has not changed substantially within that interval.
[0224] The server can perform a three-class classification logic based on priority. For the extracted feature vector f=[f1,f2,f3,f4,f5], classification is performed in the following priority order. This priority design reflects a progressive logic from pathological features of data (easiest to determine and should be removed first) to operational morphological features and then to meteorological correlation features (requiring the most complex correlation analysis).
[0225] The first priority (first identification strategy) is data acquisition anomalies (data acquisition anomalies can be identified if any one of the following conditions is met). Data acquisition anomalies are caused by physical factors such as measurement equipment failure, communication interruption, and signal interference. The data is completely distorted and has no value for preservation; therefore, they should be identified and eliminated first. Condition 1: Dead count characteristic: f5 > 0.8. The threshold of 0.8 is set based on the following: even during the most stable off-peak period at night, normal load fluctuations should not cause more than 80% of adjacent sampling intervals to remain almost unchanged. A balance is achieved between the detection rate and the false alarm rate. Condition 2: Drastic jump characteristic (must simultaneously meet the following two sub-conditions). Sub-condition a is abnormally large change: max t∈[t_start,t_end-1] |r t |>3σ ramp Among them, σ ramp This represents the standard deviation of the absolute value of the load change rate during historical normal operation. The setting of 3 standard deviations is based on the assumption of a normal distribution; the probability of data exceeding this range is less than 0.3%, constituting a highly confident anomaly. Sub-condition b is frequent direction reversal: f1 < 0.5. Here, f1 < 0.5 indicates that more than half of the sampling points within the interval exhibit alternating positive and negative directions, the deviation direction cannot be maintained, and it exhibits high-frequency oscillation characteristics. 0.5 is the natural boundary between consistent and inconsistent directions; less than 0.5 means that reversal occurs most of the time, and its ability to maintain direction is weaker than a random coin toss (expected value 0.5). Sub-conditions a and b must be satisfied simultaneously, thus ensuring that the magnitude of the jump is far greater than normal fluctuations through 3 standard deviations; frequent direction reversals exclude true unidirectional load abrupt changes (such as start-up and shutdown of large industrial users), locking the anomaly into the unique bidirectional violent oscillation characteristic of data acquisition failures. Condition 3: Instantaneous jump back characteristic: f3 = instantaneous jump back mode. This means that within 1-2 sampling periods after the abnormal interval ends, the load instantly recovers to a reasonable neighborhood of the virtual reference, with a recovery rate far exceeding the normal operating ramp-up level. This mode is a typical recovery characteristic of faults such as data retransmission after communication interruption and acquisition channel switching.
[0226] The second priority (second identification strategy) is operational control anomalies (operational control anomalies must simultaneously meet all of the following conditions and not meet any of the first priority conditions). Operational control anomalies are caused by proactive grid control behaviors such as demand response, orderly power consumption, and peak shaving and valley filling. Although the data is a true record, it reflects load distortion under human intervention. When correcting, it is necessary to reasonably retain some control information while restoring the basic pattern. Condition 1: Continuous direction: f1>0.7. Here, 0.7 means that more than 70% of the sampling points in the interval have a consistent deviation direction, indicating the existence of continuous and conscious load adjustment behavior. This threshold is higher than the random boundary of 0.5, but not too strict (such as 0.9), in order to take into account the possible short-term reverse fluctuations that may exist in the early or late stages of control. Condition 2: Smooth change: f2<3σ rampThe first condition is that the standard deviation of the load change rate within the interval is lower than the threshold set in the first-priority drastic change criterion. This condition ensures that the change amplitude of the interval does not reach the level of a data acquisition failure. Intervals reaching the second priority no longer meet the first priority, and their maximum change rate does not exceed 3 times the standard deviation. On this basis, the standard deviation of the change rate of the entire interval is also required to be lower than this threshold, ensuring that the control behavior is a continuous and smooth load adjustment, rather than intermittent drastic oscillations. Condition 3: Time period matching: f4 = successful matching. That is, the overlap rate between the abnormal interval and at least one time period in the preset typical control time period library is not less than 0.7. This condition provides a business rationality verification to ensure that the time of occurrence of the anomaly coincides with the known control activity time period of the power grid. All three conditions above must be met simultaneously to determine it as an operational control type anomaly. Among them, the direction of continuity confirms the consciousness of the adjustment, the change of smoothness confirms the physical feasibility of the adjustment, and the time period matching confirms the business rationality of the adjustment.
[0227] The third priority (third identification strategy) is meteorological-driven anomalies (meteorological-driven anomalies must simultaneously meet all of the following conditions). Meteorological-driven anomalies are triggered by extreme weather or significant changes in meteorological elements, and represent the actual physical response of the load to meteorological conditions. Such deviations are important characteristics of meteorologically sensitive loads and should be identified and retained, rather than mistakenly rejected as data problems. Condition 1: The data acquisition anomaly criterion is not met, i.e., the anomaly interval does not meet any of the first priority conditions. Condition 2: All conditions for operational control anomalies are not met, i.e., the interval does not meet at least one of the three conditions of the second priority (i.e., inconsistent direction, insufficient smoothness of change, or mismatch in time periods). Condition 3: The comprehensive correlation between the deviation and meteorology is established (the following two sub-conditions must be met simultaneously). Sub-condition a is the correlation condition: the actual load deviation sequence within the interval { t} t∈I With the comprehensive somatosensory index sequence (target somatosensory index sequence) {φ t} t∈I The Pearson correlation coefficient must satisfy: ρ({ t},{φ t})≥0.7. Sub-condition b is the amplitude reasonableness condition: the average absolute deviation amplitude within the interval must be within the range that meteorological sensitivity can interpret: 1 / (|I|)∑ t∈I | t |≤β|S k |1 / (|I|)∑ t∈I | T t |. Among them, S k This is the sensitivity coefficient (target meteorological sensitivity, MW / ℃) for the current temperature range. Tt =T t -T ref β is the tolerance factor (typically 1.2).
[0228] In addition, in some embodiments, if the server detects that an abnormal interval does not meet all the conditions of the above three criteria (i.e., it is not a data collection type, not a control type, and not a weather-driven type), the server will classify it into an unclassified abnormal category, mark it in the system and trigger an alarm. By default, the server will conservatively use the substitution method correction strategy corresponding to the first priority for processing. After manual confirmation, the classification label can be adjusted according to the actual situation.
[0229] Step S400: Differential load correction and adaptive weight adjustment based on causal classification.
[0230] For data acquisition-related anomalies, the server uses a virtual benchmark substitution method to directly replace the data. For operation control-related and weather-driven anomalies, a weighted fusion correction strategy is adopted, and an adaptive adjustment mechanism for weight coefficients is introduced to ensure that the corrected load curve is close to the normal benchmark while reasonably preserving the actual physical characteristics of electricity consumption.
[0231] In this step, the corrective strategy is automatically selected based on the type of abnormality cause label; an adaptive adjustment mechanism for weight coefficients is introduced for types that need to be fused and corrected; and boundary smoothing and multi-interval coordination mechanisms are used to ensure the global physical rationality of the corrected curve.
[0232] The restoration strategy includes substitution correction (the first load restoration strategy, applicable to data acquisition anomalies and unclassified anomalies). Data acquisition anomalies are caused by physical factors such as measurement equipment failure and communication interruption; their data is completely distorted and contains no usable real load information. Unclassified anomalies, because their true cause cannot be confirmed, should also be handled with the most conservative strategy from a data security perspective. Therefore, for all measured values within the two types of anomaly interval I, the server directly replaces them completely with virtual predicted load: l * t =l ~ t For any t∈I, where l * t To correct the afterload value (MW), l ~ t This provides a virtual forecast load value (forecast load information, MW). This eliminates the interference of distorted data on subsequent analysis and applications.
[0233] The restoration strategy also includes weighted fusion correction (a second load restoration strategy, applicable to operational control-type and meteorologically driven anomalies). Although operational control-type anomalies are triggered by human intervention, the measured values still record the occurrence process and intensity of the control events; meteorologically driven anomalies are the true physical response of the load to meteorological conditions, and their fluctuation characteristics have important preservation value. Therefore, these two types of anomalies should not be simply discarded, but a weighted fusion strategy should be adopted, somewhere between complete replacement and complete preservation, seeking the optimal balance between restoring the basic laws and preserving true information. The weighted fusion formula can be expressed as: l * t =wl ~ t +(1-w)l t real Let t ∈ I. Here, w ∈ [0,1] represents the weighting coefficients. When w=1, the virtual baseline is fully trusted (equivalent to the substitution method); when w=0, the measured values (abnormal load information) are fully preserved. The closer w is to 1, the closer the correction result is to the normal baseline (predicted load information); the closer w is to 0, the more likely it is to preserve the original information (abnormal load information). The initial value of the weighting coefficients is w. (0) The determination can include: the initial weight values are set differently based on the severity of the abnormal intervals. The larger the deviation, the more serious the disturbance to the measured value, and the higher the confidence level of the virtual benchmark should be.
[0234] First, the server defines the severity metric for the interval as the mean absolute deviation rate: ~ abs =1 / (|I|)∑ t∈I | t |. Among them, t =(l t real -l ~ t ) / l ~ t ×100% represents the relative deviation rate. Then, the server maps the deviation rate to the weight space using an exponentially decaying mapping function: w (0) =1-exp(- ~ abs / τ). Where τ is the normalization parameter, typically taking a value of 0.25. The mathematical properties and physical meaning of this mapping function are: when ~ abs When w approaches 0 (the deviation is minimal), (0) Approaching 0, almost completely trusting the measured values; when ~abs When τ=0.25, w (0) =1-e -1 ≈0.63, the virtual benchmark and the measured value are close to being in equilibrium; when ~ abs When w is much greater than τ (maximum deviation), (0) The value tends towards 1, indicating a strong tendency to trust the virtual benchmark. The normalization parameter τ = 0.25 is set based on the fact that, under normal operating conditions, the deviation rate... t The threshold of three times the standard deviation usually falls within the 15% to 30% range, and τ=0.25 is exactly in the middle of this range, so that the initial weight of moderate severity anomalies falls within a reasonable correction range.
[0235] The server can also adaptively adjust the weighting coefficients. After the initial weighted fusion correction, the server needs to evaluate the correction quality. If it fails to meet the standards, the weighting coefficients are adaptively adjusted through an iterative mechanism until the correction result meets the preset accuracy requirements. Specifically, for the target residual threshold, the server uses Mean Absolute Percentage Error (MAPE) as the correction quality evaluation index. First, on the dataset during normal operation, the baseline residual level between the virtual predicted load and the measured load is calculated: MAPE. normal =1 / N normal ∑ i=1 N_normal 1 / M∑ t=1 M |(l i,t real -l ~ i,t ) / (l i,t real )|×100%.
[0236] Wherein, the target residual threshold ε target Set as the tolerance factor for this baseline residual: ε target =ηMAPE normal Wherein, η is the tolerance factor, typically set at 1.5. Its setting is based on the following: Abnormal intervals contain real meteorological or regulatory disturbances; the corrected residuals should not be required to reach the same level as the normal state, otherwise excessive smoothing will erase effective information. A tolerance of 1.5 statistically allows the corrected residuals to be slightly higher than the upper limit of normal fluctuations, but significantly lower than the abnormal residual level before correction, balancing the sufficiency of correction with the need for information preservation.
[0237] The iterative optimization process for weights includes:
[0238] Step 1, Initial Revision and Evaluation: Using initial weights w(0) Perform weighted fusion correction and calculate the MAPE residual index for the outlier interval after correction. (0) MAPE (0) =1 / (|I|)∑ t∈I |(l * t (0) -l ~ t ) / l ~ t |×100%.
[0239] Step 2, Standard Assessment: If MAPE (0) ≤ε target If the correction meets the standard, the correction result will be output directly.
[0240] Step 3, Weight Iterative Update: If MAPE (k) >ε target The server then adaptively updates the weight coefficients using a mapping function: w (k+1) =w (k) + w (k) , w (k) =(1-w (k) (MAPE) (k) -ε target ) / (MAPE (k) The update function exhibits monotonically convergent properties; the greater the residual exceeds the target threshold, the larger the weight increase. When w approaches 1, the update step size... w approaches 0, ensuring it does not exceed the upper bound of the weight domain. The server can then use the updated weight w. (k+1) Re-execute the weighted fusion correction and calculate MAPE. (k+1) Repeat steps two and three until the termination and degradation conditions are met. The termination and degradation conditions include: Termination condition one, reaching the target, if MAPE is achieved after the k-th iteration. (k) ≤ε target The server outputs the corrected result. Termination condition two: maximum iteration limit; if the number of iterations reaches the preset upper limit N... max If the target is still not met, the server will forcibly trigger the degradation mechanism. maxThe default value is set to 5, based on the following: the weight mapping function has monotonically convergent properties, and the weight space is a finite closed interval [0,1]. According to the fixed-point theorem, the mapping will converge or reach the boundary within a finite number of steps. Simultaneously, the improvement in marginal residuals decreases with each iteration, with the most significant improvement in the first iteration followed by rapid decay. Under the standard configuration of normalization parameter τ=0.25, adjusting the weights from the initial value to a steady state typically requires 2-3 effective iterations. Setting the upper limit to 5, based on typical requirements and safety margins, can adequately cover the convergence requirements of most abnormal intervals. This default value can be adjusted according to the deployment scenario: it can be increased to 7-8 for offline high-precision scenarios and reduced to 3 for real-time online scenarios. Termination condition three: degradation triggering, if MAPE occurs during the iteration process. (k+1) >MAPE (k) If the residual increases instead of decreasing, it indicates that the current weight search direction has deviated from the optimal value, and continuing iteration is not conducive to convergence. In this case, the server immediately terminates the iteration and triggers the degradation mechanism. The degradation mechanism includes forcing w=1, that is, completely using the virtual benchmark substitution method to output the correction result, to ensure that the correction operation obtains deterministic output within a limited computational cost and avoids infinite loops.
[0241] The server can also perform boundary step correction. After correction, the load values at the start and end boundaries of abnormal intervals may exhibit discontinuous jumps compared to adjacent normal intervals, disrupting the physical smoothness of the load curve. The server introduces a boundary smoothing transition mechanism after the correction process is complete.
[0242] The server can perform step detection and calculate the load difference between the boundary point of the abnormal interval and the adjacent normal point after correction: δ start =|l * t_start -l t_start-1 real |,δ end =|l * t _ end -l t_end+1 real |。 Where, if δ start >θ jump or δ end >θ jump If so, the server determines that a boundary step jump exists. The step threshold θ jump Take twice the standard deviation of load change at adjacent times under normal operating conditions to distinguish between artificial jumps introduced by correction and reasonable ramp-up of the load itself.
[0243] The server can also construct and asymptotically correct boundary transition bands. At the beginning and end of the anomaly interval, the server extends a transition band with a width of L sampling points (typically L=2, corresponding to 30 minutes). The weights within the transition bands use a linear gradient at the endpoints. For the initial transition band time t=t... start +i, w t trans =w(i / L); l * t =w t trans l ~ t +(1-w t trans )l t real The server linearly transitions from the start of the transition zone (i=0, weight 0, fully trusting the measured values, maintaining continuity with the previous normal point) to the end of the transition zone (i=L, weight reaches the standard fusion weight w within the interval). The symmetrical design of the transition zone is terminated, and the weight gradually changes linearly from w to 0. Sampling points within the transition zone do not participate in the residual compliance test.
[0244] The server can also perform multi-interval coupling processing. When multiple abnormal intervals are temporally adjacent or very close together (e.g., only 1-2 sampling points apart), independent correction may introduce artificial discontinuities at interval boundaries or narrow normal gaps. The server addresses this issue using an adaptive merging and segmented coordinated correction strategy based on interval spacing.
[0245] The server can merge and determine all abnormal intervals in chronological order. For any two adjacent abnormal intervals I... a =[t start a ,t end a ], I b =[t start b ,t end b ] Calculate the normal gap width between them: d ab =t start b -t end a -1. If d ab ≤d merge (Typical value d) merge =2), then the server will I a I b The brief normal intervals in between are merged into an extended abnormal interval: I merged =[t start a ,t endb ]. Wherein, d merge The basis for setting =2 is that if the interval between two abnormal intervals is only 1 to 2 sampling points, the normal segment in between lacks sufficient independent statistical stability. It is likely that the two intervals are the continuation of the same disturbance event or a short interruption recovery period. Merging the intervals can avoid forcibly implementing independent corrections on the narrow normal segment and causing artificial oscillations.
[0246] The server can also perform segmentation labeling and coordination correction. Within the merged interval, the original classification labels of each sub-segment are retained, the original abnormal sub-segments maintain their original types, and the intermediate normal gap segments are marked as normal transition segments. Each sub-segment is subject to differential correction according to the following rules: (a) the original abnormal sub-segments are selected using the substitution method or weighted fusion strategy according to the original classification labels; (b) the normal transition segments are assigned low weights (w tends to 0, almost completely retaining the measured values) to ensure a natural transition.
[0247] The server can also perform global weight coordination, using the aforementioned boundary smoothing transition mechanism to linearly and gradually connect the weight changes at the boundaries of each sub-segment, ensuring the weight continuity of the entire curve across the entire merge interval. The server can also perform unified residual evaluation, with the server using I... merged To ensure the overall implementation of residual compliance verification and weight iterative adjustment, the normal transition period is not included in the residual calculation. This mechanism, through a process of merging, segmenting and classifying, global coordination, and unified evaluation, ensures that adjacent abnormal intervals form a continuous and coordinated load curve after correction.
[0248] Step S500: Multi-dimensional comprehensive evaluation and closed-loop feedback of the restoration effect.
[0249] The correction effect is evaluated from two dimensions: numerical error and curve shape. Closed-loop optimization is performed to trigger adaptive weight adjustment for the non-compliant intervals to ensure the restoration quality.
[0250] The completion of the correction operation does not automatically guarantee the restoration result's compliance. After outputting the correction curve, the server quantitatively evaluates the restoration effect from two dimensions: numerical error and curve shape. This ensures that the corrected load curve is both statistically close to the normal baseline and physically reasonable. For abnormal intervals where the evaluation fails to meet the standards, a local closed-loop feedback is triggered, returning the correction parameters for readjustment.
[0251] During the evaluation, the server can perform numerical error assessment. This assessment uses the virtual predicted load as the theoretically optimal reference to measure the degree to which the corrected full curve deviates from the normal baseline. Evaluation metrics include: calculating the corrected load sequence l. * t Relative to virtual prediction baseline l ~ tOverall Root Mean Square Error (RMSE) and Mean Absolute Percentage Error (MAPE): RMSE=√(1 / N total ∑ t=1 N_total (l * t -l ~ t ) 2 );MAPE=1 / N total ∑ t=1 N_total |(l * t -l ~ t ) / l ~ t |×100%. Wherein, N total is the total number of sampling points on the full curve. For the qualification criterion, the error level of the corrected curve shall be comparable to the natural deviation level under normal operation status, and shall not be significantly higher than the normal benchmark. To this end, the server first calculates the benchmark error RMSE between the virtual predicted load and the actually measured load on the filtered data set of the normal operation time period normal and MAPE normal . The qualification criterion is set as: RMSE≤η RMSE RMSE normal , MAPE≤η MAPE MAPE normal . Wherein, η RMSE and η MAPE are tolerance multiple factors, and the typical values of both are 1.5. The setting of 1.5 times tolerance takes into account both correction adequacy and information retention requirements—the abnormal interval contains real meteorological or regulation disturbances, and the residual error after correction should not be forced to reach the same level as that in the normal state, otherwise effective information will be erased due to excessive smoothing; however, it should not be significantly higher than the upper limit of normal fluctuation, otherwise it indicates that the abnormal disturbance has not been effectively suppressed. Wherein, both RMSE and MAPE indicators shall satisfy the above conditions at the same time, and the server can determine that the numerical error evaluation is qualified.
[0252] The server can also perform curve shape evaluation. Reaching the standard of numerical error only guarantees proximity in a statistical sense, and cannot guarantee the rationality of the corrected curve in terms of physical shape. The server further performs quantitative inspection on the shape characteristics of the corrected curve from the following three dimensions, and all three sub-criteria shall be satisfied at the same time to determine that the curve shape evaluation is qualified.
[0253] Peak-valley consistency: the times of the peak and valley of a load curve are the core structural features of power grid dispatching operation, and the correction operation shall not significantly change their time positions. If the server detects that the deviation between the occurrence times of the peak and valley of the corrected curve and the corresponding peak and valley times of the virtual prediction benchmark does not exceed δ peak sampling points, the morphology is determined to be qualified. δ peak has a typical value of 2 (corresponding to 30 minutes at a 15-minute resolution). If the peak or valley time deviates by more than 2 sampling points, it indicates that the correction operation has changed the basic time-varying law of the load, and it is determined as unqualified.
[0254] Slope deviation in key periods: the slope of the load during the morning and evening climbing / dropping key periods reflects the rate characteristic of load change, which is an important reference for unit ramp capacity check and reserve capacity configuration. If the server detects that the relative deviation between the average slope of the corrected curve in key load climbing periods (such as the rising section of the morning peak from 06:00 to 08:00) and key dropping periods (such as the dropping section of the evening peak from 19:00 to 21:00) and the slope of the virtual benchmark in the corresponding period is within ε slope , it is determined as qualified. ε slope has a typical value of 20%. If the slope deviation exceeds 20%, it indicates that the correction operation has distorted the dynamic change characteristic of the load, and it is determined as unqualified.
[0255] Retention of meteorological response characteristics: for intervals marked as meteorology-driven and corrected by weighted fusion, additional verification is required to ensure that the real meteorological load response has not been excessively smoothed. Meteorology-driven anomalies themselves are important meteorological sensitive load characteristics that should be retained, and improper correction will introduce systematic deviation. If the server detects that the peak-valley difference amplitude A corrected of the corrected interval is not less than 70% of the peak-valley difference amplitude A baseline of the virtual benchmark in this interval: A corrected ≥0.7A baseline , it is determined as qualified.
[0256] Wherein, the peak-valley difference amplitude is defined as the difference between the maximum load and the minimum load within the interval. The basis for setting the 70% threshold is: under normal operation conditions, the fluctuation amplitude of meteorology-driven load is usually within the range of 80% to 120% of that of the virtual benchmark; if it is lower than 70%, it indicates that the correction has eliminated most of the meteorological response, and the physically meaningful meteorological sensitive characteristics are completely lost.
[0257] The evaluation feedback mechanism connects the verification results of step five with the weight adjustment capability of step four, forming a local quality closed loop of evaluation, feedback, re-correction, and re-evaluation. The feedback trigger condition is as follows: if any abnormal interval fails to meet the standards in numerical error evaluation (RMSE or MAPE exceeds limits), or fails to meet the standards in curve morphology evaluation (peak-valley consistency, slope deviation during key periods, or retention of meteorological response characteristics all fail), the server triggers feedback adjustment for that interval. The feedback path includes: marking the non-compliant interval as needing readjustment, returning to the weight adjustment stage of the corresponding type (operational control type or meteorological driven type) for that interval, and re-executing the adaptive weight adjustment within the remaining iteration limit, starting from the current weight coefficient. The server only adjusts the weight coefficient parameters of the interval to be adjusted, without changing the baseline value of the virtual prediction baseline curve or triggering the readjustment of other compliant intervals across the entire curve, thus ensuring the efficiency of the correction operation and the global stability of the reference system.
[0258] The termination and degradation decisions for feedback adjustments are uniformly completed by the termination and degradation conditions of weight adjustments, without setting separate iteration limits or degradation strategies. Specifically: after being triggered by feedback, the target range is adjusted within the remaining iterations, and the system re-enters feedback evaluation; if the target is still not met within the total iteration limit, or if the residual increases instead of decreasing during the adjustment process, the server executes the final degradation strategy according to the anomaly type: for regulatory degradation, a weighted fusion output of w=0.8 is used; for meteorological-driven degradation, an equally weighted fusion output of w=0.5 is used. The server accepts this degradation result and stops iterating.
[0259] Through the above embodiments, based on the load information and virtual reference load information of the power grid system, abnormal intervals in the load information are determined, abnormal characteristics within the abnormal intervals are identified, and the abnormal type corresponding to the abnormal interval is determined according to the priority of preset identification strategies, the abnormal characteristics of numerical changes and time-period abnormalities in the abnormal characteristics. Based on the load restoration strategy corresponding to the abnormal type, the load is restored for the abnormal interval. Compared to the traditional method of restoration using statistical mean replacement, this application, by combining actual load information and virtual reference load information to determine abnormal intervals, determining the abnormal type based on the abnormal characteristics within the abnormal intervals and various preset identification strategies, and performing load restoration based on the load restoration strategy corresponding to the abnormal type, identifies and restores load anomalies in the power grid system from multiple dimensions, improving the accuracy of load restoration. It also has the following beneficial effects:
[0260] An independent virtual predicted load benchmark based on self-selection of pure samples was constructed: This method overcomes the inherent flaw of relying on contaminated measured data as a reference, proposing a method for constructing a pure benchmark using adaptive statistical feature selection and deep neural network generation. An automatic screening logic for normal operation status was defined based on a sliding window and dynamic quantile determination of three indicators (load factor, peak-valley difference rate, and maximum ramp rate). Combined with a Temporal Convolutional Network (TCN)-Bidirectional Long Short-Term Memory (BiLSTM)-Attention deep learning model, a virtual predicted load curve (virtual benchmark load information) completely independent of measured anomalies and reflecting only the intrinsic operating laws of the power grid was generated. This provides a globally unified and physically meaningful stable reference scale for anomaly identification and data reconstruction.
[0261] A comprehensive sensory perception index integrating statistical regularity and model attribution is proposed. This index overcomes the limitations of relying solely on temperature sensitivity to assess meteorological impacts. It organically integrates a single meteorological sensitivity coefficient (statistical dimension) based on piecewise linear fitting with the contribution of multi-factor Shapley Additive exPlanations (SHAP) based on deep models (model attribution dimension), constructing a three-dimensional comprehensive sensory perception index. This index accurately quantifies the synergistic driving force of multiple meteorological elements (temperature, humidity, wind, and rainfall) on load from both statistical and model cognitive dimensions. It also defines the interpretable range and boundary threshold system of meteorological sensitivity, providing a solid objective physical data basis for accurately identifying meteorological-driven anomalies.
[0262] A three-classification and differentiated correction system for anomalies based on five-dimensional features and priority logic was established. This system changes the coarse data processing mode of single-processing and constructs a five-dimensional feature vector system that includes consistency of deviation direction, standard deviation of load change rate, interval recovery characteristics, matching of abnormal periods, and the proportion of average value persistence. Based on a progressive priority judgment logic of prioritizing data acquisition anomalies, followed by manual control anomalies, and finally natural meteorological anomalies, automatic and accurate differentiation of three types of anomalies—data acquisition type, operation control type, and meteorological driven type—is achieved. Furthermore, a weight adaptive adjustment and differentiated correction strategy based on the severity of deviation is proposed. This eliminates distorted data while retaining true physical characteristics such as demand response and meteorologically sensitive loads, improving the accuracy and engineering practicality of load data reconstruction.
[0263] A differentiated correction and multi-dimensional evaluation closed-loop mechanism with adaptive weight adjustment was designed: Addressing the differences in data value due to anomalies of different causes, a differentiated correction and restoration strategy was proposed, incorporating direct substitution based on data collection, weighted fusion of operational control and meteorological-driven factors. An adaptive iterative optimization algorithm for weight coefficients based on residual-driven factors was introduced to achieve a dynamic balance between restoring basic patterns and preserving true physical characteristics. Simultaneously, a multi-dimensional evaluation and closed-loop feedback mechanism covering numerical errors and curve morphology (peak-valley consistency, slope deviation during key periods, and preservation of meteorological response characteristics) was constructed to ensure that the corrected load curve is both statistically close to the normal baseline and maintains complete physical rationality.
[0264] 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 in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.
[0265] Based on the same inventive concept, this application also provides a power grid load restoration device based on virtual benchmark and three-classification of anomalies for implementing the aforementioned power grid load restoration method based on virtual benchmark and three-classification of anomalies. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of one or more embodiments of the power grid load restoration device based on virtual benchmark and three-classification of anomalies provided below can be found in the limitations of the power grid load restoration method based on virtual benchmark and three-classification of anomalies described above, and will not be repeated here.
[0266] In one exemplary embodiment, such as Figure 3 As shown, a power grid load restoration device based on virtual benchmark and three-class anomaly classification is provided, including: a first acquisition module 500, a first determination module 502, a second acquisition module 504, a second determination module 506, and a restoration module 508, wherein:
[0267] The first acquisition module 500 is used to acquire the load information corresponding to the power grid system.
[0268] The first determining module 502 is used to determine the abnormal interval in the load information based on the load information and the virtual reference load information corresponding to the power grid system; the virtual reference load information represents the predicted load information when the power grid system is not operating abnormally.
[0269] The second acquisition module 504 is used to acquire the abnormal features corresponding to the above-mentioned abnormal intervals; the above-mentioned abnormal features include the abnormal features of numerical changes in the abnormal intervals and the abnormal features of time periods.
[0270] The second determining module 506 is used to determine the anomaly type corresponding to the above-mentioned anomaly interval based on the preset identification strategy priority, the numerical change anomaly feature and the time period anomaly feature among the above-mentioned anomaly features.
[0271] The restoration module 508 is used to restore the load in the above-mentioned abnormal interval according to the load restoration strategy corresponding to the above-mentioned abnormal type, and obtain the load restoration result.
[0272] In one embodiment, the first determining module 502 is used to determine candidate abnormal intervals based on the load information and the virtual reference load information corresponding to the power grid system; for each candidate abnormal interval, if the candidate abnormal interval meets the target abnormal conditions, the candidate abnormal interval is determined to be an abnormal interval in the load information; the target abnormal conditions include: the candidate abnormal load information at each time in the candidate abnormal interval is greater than the abnormal load threshold, the deviation direction of the candidate abnormal load information in the candidate abnormal interval is consistent, and the duration of the candidate abnormal interval is greater than or equal to the duration threshold.
[0273] In one embodiment, the second acquisition module 504 is configured to: determine a first abnormal feature based on the load information with consistent and continuous deviation directions in the abnormal interval; determine a second abnormal feature based on the standard deviation of the rate of change of the abnormal load information in the abnormal interval; determine a third abnormal feature based on the rate of change of the abnormal load information from an abnormal state to a non-abnormal state; determine a fourth abnormal feature based on a target time period in the abnormal interval that matches a preset abnormal time period; determine a fifth abnormal feature based on the continuous abnormal load information in the abnormal interval with a rate of change less than a preset rate of change threshold; determine the numerical change abnormal feature based on the first, second, third, and fifth abnormal features; and determine the time period abnormal feature based on the fourth abnormal feature.
[0274] In one embodiment, the second determining module 506 is configured to determine the anomaly type of the abnormal interval as a data acquisition anomaly if the abnormal interval is determined to meet a first anomaly condition according to the first identification strategy; the first anomaly condition includes one or more of the following: the proportion of continuous abnormal load information with a rate of change less than a preset rate of change in the abnormal interval is greater than or equal to a preset proportion threshold; the change rate is greater than or equal to a preset change rate threshold; the proportion of consistent and continuous deviation directions in the abnormal interval is less than a preset deviation direction proportion threshold; if the abnormal interval does not meet the first anomaly condition, and the abnormal interval is determined to meet a second anomaly condition according to the second identification strategy, the anomaly type of the abnormal interval is determined to be an operation control anomaly; the second anomaly condition includes one or more of the following: the proportion of consistent and continuous deviation directions in the abnormal interval is greater than a preset deviation direction proportion threshold; the proportion of continuous and continuous deviation directions in the abnormal interval is greater than a preset deviation direction proportion threshold; the proportion of continuous and continuous deviation directions in the abnormal interval is less ... If the standard deviation of the abnormal load information change rate is less than a preset standard deviation threshold, and the target time period is greater than or equal to a preset time period matching threshold; if the abnormal interval does not meet the first and second abnormal conditions, and the abnormal interval meets the third abnormal condition according to the third identification strategy, then the abnormal type of the abnormal interval is determined to be a meteorological-driven abnormality; the third abnormal condition includes one or more of the following: the correlation of the target somatosensory index sequence of the abnormal load information is greater than or equal to a preset correlation threshold, and the deviation between the abnormal load information and the virtual baseline load information is less than or equal to the load deviation threshold corresponding to the target meteorological sensitivity; the target somatosensory index sequence represents the driving direction and magnitude of all meteorological factors on the load at each moment; the target meteorological sensitivity represents the load change caused by a unit temperature change, and the target meteorological sensitivity is determined based on the temperature corresponding to the collection time of the load information.
[0275] In one embodiment, the restoration module 508 is configured to, if the anomaly type is a data acquisition anomaly, replace the load information at the corresponding time in the virtual reference load information with the anomaly interval according to the first load restoration strategy to obtain a first load restoration result; if the anomaly type is an operation control anomaly and / or a meteorological driving anomaly, perform weighted fusion of each anomaly load information in the anomaly interval with each predicted load information in the virtual reference load information according to the second load restoration strategy to obtain a second load restoration result; the weights of the anomaly load information and the predicted load information are determined based on the magnitude of the deviation between the anomaly load information and the predicted load information.
[0276] In one embodiment, the apparatus further includes: a training module, configured to acquire target unit load utilization rate, target unit peak-valley difference rate, target unit maximum ramp rate, and target unit load information corresponding to the power grid system; the target unit load utilization rate, target unit peak-valley difference rate, target unit maximum ramp rate, and target unit load information respectively characterize the load utilization rate, peak-valley difference rate, maximum ramp rate, and load information of the power grid system during non-abnormal operation within a unit time period; input the target unit load utilization rate, target unit peak-valley difference rate, target unit maximum ramp rate, and corresponding target meteorological information into a recognition model to be trained; the recognition model is configured to determine target unit predicted load information based on the target unit load utilization rate, target unit peak-valley difference rate, target unit maximum ramp rate, and corresponding target meteorological information; adjust the model parameters of the recognition model according to the matching degree between the target unit predicted load information and the target unit load information until a preset training termination condition is met, thereby obtaining a trained recognition model; and determine the virtual reference load information of the collection time corresponding to the load information based on the trained recognition model.
[0277] The modules in the aforementioned power grid load restoration device based on virtual benchmarks and three-class anomalies can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the computer device's memory as software, so that the processor can call and execute the corresponding operations of each module.
[0278] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 4 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs in the non-volatile storage media to run. The database stores power grid load data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network. When executed by the processor, the computer program implements a power grid load restoration method based on a virtual benchmark and three-class classification of anomalies.
[0279] Those skilled in the art will understand that Figure 4 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.
[0280] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described power grid load restoration method based on virtual benchmark and anomaly three-classification.
[0281] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the above-described power grid load restoration method based on virtual benchmarks and three-class anomalies.
[0282] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the above-described power grid load restoration method based on virtual benchmarks and three-class anomalies.
[0283] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0284] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0285] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0286] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A power grid load restoration method based on virtual benchmark and anomaly three-classification, characterized in that, The method includes: Obtain load information corresponding to the power grid system; Based on the load information and the virtual reference load information corresponding to the power grid system, the abnormal interval in the load information is determined; the virtual reference load information represents the predicted load information when the power grid system is operating normally. Obtain the abnormal features corresponding to the abnormal interval; the abnormal features include numerical change abnormal features and time period abnormal features of the abnormal interval; Based on the preset identification strategy priority, the numerical change anomaly features and time period anomaly features in the anomaly features, the anomaly type corresponding to the anomaly interval is determined; Based on the load restoration strategy corresponding to the anomaly type, load restoration is performed on the anomaly interval to obtain the load restoration result.
2. The method according to claim 1, characterized in that, The step of determining the abnormal interval in the load information based on the load information and the virtual reference load information corresponding to the power grid system includes: Based on the load information and the virtual reference load information corresponding to the power grid system, candidate anomaly intervals are determined; For each candidate abnormal interval, if the candidate abnormal interval meets the target abnormal condition, then the candidate abnormal interval is determined to be an abnormal interval in the load information; the target abnormal condition includes: the candidate abnormal load information at each time in the candidate abnormal interval is greater than the abnormal load threshold, the deviation direction of the candidate abnormal load information in the candidate abnormal interval is consistent, and the duration of the candidate abnormal interval is greater than or equal to the duration threshold.
3. The method according to claim 1, characterized in that, The step of obtaining the abnormal features corresponding to the abnormal interval includes: Based on the load information that has a consistent and continuous deviation direction in the abnormal interval, the first abnormal feature is determined; The second abnormal feature is determined based on the standard deviation of the rate of change of abnormal load information in the abnormal interval; The third abnormal feature is determined based on the rate of change of the abnormal load information from an abnormal state to a non-abnormal state. The fourth abnormal feature is determined based on the target time period that matches the preset abnormal time period in the abnormal interval; The fifth abnormal feature is determined based on the abnormal load information that is continuous in the abnormal interval and has a rate of change less than a preset rate of change threshold. The numerical change anomaly is determined based on the first anomaly, the second anomaly, the third anomaly, and the fifth anomaly. Based on the fourth abnormal feature, the abnormal features of the time period are determined.
4. The method according to claim 3, characterized in that, The step of determining the anomaly type corresponding to the anomaly interval based on the preset identification strategy priority, the numerical change anomaly features, and the time period anomaly features includes: If the abnormal interval is determined to meet the first abnormal condition according to the first identification strategy, then the abnormal type of the abnormal interval is determined to be data acquisition abnormality; the first abnormal condition includes one or more of the following: the proportion of abnormal load information that is continuous and has a change rate less than a preset change rate threshold in the abnormal interval is greater than or equal to a preset proportion threshold, the change rate is greater than or equal to a preset change rate threshold, and the proportion of consistent and continuous deviation directions in the abnormal interval is less than a preset deviation direction proportion threshold. If the abnormal interval does not meet the first abnormal condition, and the abnormal interval is determined to meet the second abnormal condition according to the second identification strategy, then the abnormal type of the abnormal interval is determined to be an operation control abnormality; the second abnormal condition includes one or more of the following: the proportion of consistent and continuous deviation directions in the abnormal interval is greater than a preset deviation direction proportion threshold, the standard deviation of the abnormal load information change rate is less than a preset standard deviation threshold, and the target time period is greater than or equal to a preset time period matching threshold. If the abnormal interval does not meet the first and second abnormal conditions, and the abnormal interval is determined to meet the third abnormal condition according to the third identification strategy, then the abnormal type of the abnormal interval is determined to be a meteorological-driven abnormality; the third abnormal condition includes one or more of the following: the correlation of the target somatosensory index sequence of the abnormal load information is greater than or equal to a preset correlation threshold; the deviation between the abnormal load information and the virtual baseline load information is less than or equal to the load deviation threshold corresponding to the target meteorological sensitivity; the target somatosensory index sequence represents the driving direction and magnitude of all meteorological factors on the load at each time; the target meteorological sensitivity represents the load change caused by a unit temperature change, and the target meteorological sensitivity is determined based on the temperature corresponding to the collection time of the load information.
5. The method according to claim 1, characterized in that, The step of performing load restoration on the abnormal interval according to the load restoration strategy corresponding to the abnormal type to obtain the load restoration result includes: If the anomaly type is a data acquisition anomaly, then according to the first load restoration strategy, the load information at the corresponding time in the virtual baseline load information is replaced in the anomaly interval to obtain the first load restoration result; If the anomaly type is an operational control anomaly and / or a meteorological driving anomaly, then according to the second load restoration strategy, each abnormal load information in the abnormal interval and each predicted load information in the virtual baseline load information are weighted and fused to obtain the second load restoration result; the weights of the abnormal load information and the predicted load information are determined based on the magnitude of the deviation between the abnormal load information and the predicted load information.
6. The method according to any one of claims 1 to 5, characterized in that, The method further includes: Obtain the target unit load utilization rate, target unit peak-valley difference rate, target unit maximum ramp rate, and target unit load information corresponding to the power grid system; the target unit load utilization rate, the target unit peak-valley difference rate, the target unit maximum ramp rate, and the target unit load information respectively characterize the load utilization rate, peak-valley difference rate, maximum ramp rate, and load information of the power grid system during non-abnormal operation within a unit time period; The target unit load utilization rate, the target unit peak-valley difference rate, the target unit maximum ramp rate, and the corresponding target meteorological information are input into the recognition model to be trained; the recognition model is used to determine the target unit predicted load information based on the target unit load utilization rate, the target unit peak-valley difference rate, the target unit maximum ramp rate, and the corresponding target meteorological information. Based on the matching degree between the predicted load information of the target unit and the load information of the target unit, the model parameters of the recognition model are adjusted until the preset training end condition is met, and the trained recognition model is obtained. Based on the trained recognition model, the virtual reference load information for the acquisition time corresponding to the load information is determined.
7. A power grid load restoration device based on virtual benchmark and three-class anomaly classification, characterized in that, The device includes: The first acquisition module is used to acquire load information corresponding to the power grid system; The first determining module is used to determine the abnormal interval in the load information based on the load information and the virtual reference load information corresponding to the power grid system; the virtual reference load information represents the predicted load information of the power grid system during non-abnormal operation. The second acquisition module is used to acquire the abnormal features corresponding to the abnormal interval; the abnormal features include numerical change abnormal features and time period abnormal features of the abnormal interval. The second determining module is used to determine the anomaly type corresponding to the anomaly interval based on the priority of the preset identification strategy, the numerical change anomaly feature and the time period anomaly feature in the anomaly feature; The restoration module is used to perform load restoration on the abnormal interval according to the load restoration strategy corresponding to the abnormal type, and obtain the load restoration 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.