AE-KDE-based transformer area phase line loss data anomaly detection method, system and device

By constructing an autoencoder model with an embedded channel attention module based on the AE-KDE method, and combining kernel density estimation and weighted residuals, accurate monitoring and location of phase line loss in stations were achieved. This solved the problem of difficulty in judging abnormal line loss in existing technologies and improved detection accuracy and adaptability.

CN120870740APending Publication Date: 2025-10-31国网新疆电力有限公司营销服务中心 +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511046764.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-29
Publication Date
2025-10-31

AI Technical Summary

Technical Problem

Existing line loss management products are unable to perform detailed analysis and management of three-phase line losses in a distribution area, and cannot accurately determine whether the line loss is abnormal, especially when dealing with high-loss distribution areas, it is difficult to find the specific cause.

Method used

An AE-KDE-based approach is adopted, which involves preprocessing the line loss dataset, constructing an autoencoder model with an embedded channel attention module, using kernel density estimation to determine whether the line loss is abnormal, and combining weighted residuals and dynamic thresholds for anomaly detection.

Benefits of technology

It enables precise monitoring and location of phase line losses in power grids, improves detection accuracy and adaptability, and can adaptively adjust thresholds, avoiding the limitations of traditional fixed threshold methods. This significantly improves the accuracy of anomaly detection and the stable operation capability of the power grid.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120870740A_ABST
    Figure CN120870740A_ABST
Patent Text Reader

Abstract

The invention discloses an AE-KDE-based transformer area phase line loss data anomaly detection method, system and device, and relates to the technical field of intelligent power detection. The method comprises the steps of obtaining a line loss data set of a target station area, performing data preprocessing on the line loss data set to obtain a plurality of sub-data sets, and storing split-phase line loss time sequence data in the sub-data sets; respectively inputting the split-phase line loss time sequence data stored in the sub-data set into a pre-trained prediction model, and outputting a prediction value of each piece of split-phase line loss time sequence data; and calculating a weighted residual error between the predicted value and an actual value of the line loss data set, and judging whether the line loss of each split phase is abnormal or not by utilizing a statistical density estimation method according to a weighted residual error calculation result. The method can achieve the precise monitoring and positioning of the line loss abnormity of each phase, improves the detection precision, and facilitates the stable operation of a power grid and the efficient allocation of resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of intelligent power detection technology, and in particular relates to a method, system and device for detecting abnormal phase line loss data of power distribution stations based on AE-KDE. Background Technology

[0002] Due to factors such as resistance and inductance in transmission lines, electrical energy is lost during transmission. This loss is called line loss, and the percentage of line loss to output power is called the line loss rate. This line loss rate is an important indicator for measuring the healthy economic development of the distribution network. Line loss includes technical line loss and non-technical line loss. Technical line loss is an unavoidable and necessary loss during power transmission. Under unchanged equipment conditions and grid operation modes, technical line loss remains relatively constant. Therefore, changes in the line loss rate mainly depend on non-technical line loss. Non-technical losses refer to the portion of power grid transmission and distribution losses that cannot be explained technically. Abnormal electricity consumption behaviors, including electricity theft, are the main cause of non-technical losses. Abnormal electricity consumption behaviors such as electricity theft not only affect the technical indicators of the grid's line loss rate, causing power grid companies to suffer power losses and economic losses, but also pose serious safety hazards.

[0003] Existing line loss management products are primarily based on traditional line loss calculation and analysis methods, using transformer substations as the unit. They calculate and analyze line loss rates by statistically analyzing the electricity consumption data from the substation's main meter and individual user meters. While these products can achieve line loss statistics and monitoring to a certain extent, they are insufficient in handling phase-specific line losses and providing refined management of high-loss substations. For example, traditional products typically only focus on the overall line loss situation of the substation, failing to provide detailed analysis and management of individual phase line losses, and making it difficult to accurately identify the specific phases and causes of high losses. Summary of the Invention

[0004] The technical problem to be solved by this invention is: how to accurately determine whether the loss of three-phase power lines is abnormal.

[0005] To achieve the above objectives, the technical solution of the present invention is as follows:

[0006] In a first aspect, the present invention provides a method for detecting anomalies in phase line loss data of a power station based on AE-KDE, comprising:

[0007] Obtain the line loss dataset of the target transformer area, perform data preprocessing on the line loss dataset to obtain several sub-data sets, and store phase-specific line loss time-series data in the sub-data sets;

[0008] The phase line loss time series data stored in the subset are input into the pre-trained prediction model, and the predicted value of each phase line loss time series data is output.

[0009] Calculate the weighted residual between the predicted value and the actual value of the line loss dataset, and use the kernel density estimation method to determine whether the line loss of each phase is abnormal based on the weighted residual calculation result;

[0010] The prediction model includes:

[0011] An encoder with an embedded channel attention module is used to map the input multidimensional features into a low-dimensional latent representation vector, thereby completing feature compression and information extraction.

[0012] Decoder: Used to expand and activate the low-dimensional latent representation vector, gradually recovering the feature structure to restore the original input dimension.

[0013] The data preprocessing includes one or more combinations of the following processing methods:

[0014] Linear interpolation, outlier removal, and time alignment are employed to address issues such as missing, duplicate, and inconsistent time granularity in the linear loss dataset.

[0015] Construct a multidimensional feature vector for the line loss dataset. The features include: power supply, power consumption, line loss power, line loss rate and its derived ratio, and volatility.

[0016] The mean-variance normalization method is used to eliminate the dimensional differences between different features; based on the phase field of the line loss dataset, the line loss dataset is divided into phase A, phase B and phase C sub-datasets.

[0017] The encoder comprises a first fully connected layer, a channel attention module, a second fully connected layer, and a third fully connected layer connected in sequence; the first fully connected layer is used to perform linear transformation and activation on the input phase-series line loss data; the channel attention module is used to extract channel statistical information to obtain key indicators of interest; the second and third fully connected layers are used to compress features to output a low-dimensional latent representation vector;

[0018] The decoder and encoder share a symmetrical fully connected layer structure, including a fourth fully connected layer, a fifth fully connected layer, and a sixth fully connected layer connected in sequence. The fourth, fifth, and sixth fully connected layers are used to progressively expand the dimension of the low-dimensional latent representation vector and activate it to progressively recover the feature structure.

[0019] The first, second, third, fourth, and fifth fully connected layers all employ ReLU activation and L2 regularization; the sixth fully connected layer employs the Linear activation function.

[0020] In the channel attention module, the extraction of channel statistics to obtain key attention metrics includes:

[0021] Global average pooling is used to compress the spatial dimension of the output feature map of the first fully connected layer into a global statistic in the channel dimension;

[0022] The non-linear dependencies between channels are learned using fully connected layers to generate channel weight vectors;

[0023] The original features are weighted according to the channel weight vector along the channel dimension to obtain the weight coefficients of each feature channel.

[0024] The weight coefficients of each feature channel are regarded as the importance of each feature channel after feature selection. Multiplication operations are used to gradually weight the previous features in the channel dimension, thereby realizing the recalibration operation of the original features in the channel dimension.

[0025] The step of generating channel weight vectors by learning the nonlinear dependencies between channels using fully connected layers includes:

[0026] First, a dimension-reducing fully connected layer and a ReLU activation function are used, then a dimension-upgrading fully connected layer is used to restore the original number of channels, and finally a normalized channel weight vector is generated by the Sigmoid function.

[0027] The method for determining whether the line loss of each phase is abnormal using kernel density estimation includes:

[0028] The weighted residuals are statistically density estimated using a sliding time window method. The density value of each weighted residual is calculated, and all densities are sorted from smallest to largest. The density value corresponding to a pre-specified quantile is selected as a threshold. If the density value of the weighted residuals of the phase line loss time series data is less than the threshold, the phase line loss time series data is considered abnormal sample data, and the phase line loss corresponding to the phase line loss time series data is abnormal. Otherwise, the phase line loss time series data is considered normal sample data, and the corresponding phase line loss is normal.

[0029] The statistical density estimation is a probability density function constructed through kernel density estimation, used to characterize the residual distribution boundary of the phase-series line loss data samples.

[0030] The formula for calculating the weighted residual is:

[0031]

[0032] in, This represents the weighted residual of the i-th sample. The importance weight of the j-th feature channel in the channel attention module is represented by d, where d represents the feature dimension. This represents the actual value of the j-th feature channel of the i-th sample. This represents the predicted value of the j-th feature channel of the i-th sample.

[0033] Secondly, the present invention provides a station-level phase line loss data anomaly detection system based on AE-KDE, comprising:

[0034] The data acquisition module is used to acquire the line loss dataset of the target transformer area, perform data preprocessing on the line loss dataset to obtain several sub-data sets, and store phase-specific line loss time-series data in the sub-data sets;

[0035] The model prediction module inputs the phase line loss time series data stored in the subset into the pre-trained prediction model and outputs the predicted value of each phase line loss time series data.

[0036] The anomaly detection module is used to calculate the weighted residual between the predicted value and the actual value of the line loss dataset, and to use the kernel density estimation method to determine whether the line loss of each phase is abnormal based on the weighted residual calculation result.

[0037] The prediction model includes:

[0038] An encoder with an embedded channel attention module is used to map the input multidimensional features into a low-dimensional latent representation vector, thereby completing feature compression and information extraction.

[0039] Decoder: Used to expand and activate the low-dimensional latent representation vector, gradually recovering the feature structure to restore the original input dimension.

[0040] Thirdly, the present invention provides a station phase line loss data anomaly detection device based on AE-KDE, including a processor and a storage medium;

[0041] The storage medium is used to store instructions;

[0042] The processor is used to perform the steps of the above method according to the instructions.

[0043] The beneficial effects of this invention are as follows: Independent AE-KDE-based prediction models are constructed for each phase of line loss time-series data to detect phase-specific line losses, achieving accurate monitoring and location of anomalies in each phase, improving detection accuracy, and providing more detailed and targeted anomaly detection results for power system line loss management, thus helping to promptly identify and resolve phase-specific line loss problems. By embedding a channel attention module in the encoder of the prediction model, the nonlinear reconstruction problem of multi-source features such as phase-specific line loss rate, electricity sales, and electricity consumption is effectively solved. The autoencoder of this invention can automatically extract hidden patterns in line loss time-series data, explore complex relationships between various features, enhance the model's learning ability for complex operating features, and improve the accuracy of anomaly detection. The weighted residual between the predicted value and the true value of the line loss dataset is calculated using the channel attention module. Kernel density estimation is used to estimate the density of the weighted residual, and dynamic thresholds are used for anomaly detection. This method can adaptively adjust the threshold, avoiding the limitations of traditional fixed threshold methods, significantly improving the accuracy and adaptability of anomaly detection, and contributing to stable power grid operation and efficient resource allocation. Attached Figure Description

[0044] Figure 1 This is a flowchart of the method for detecting anomalies in phase line loss data of a substation based on AE-KDE according to the present invention;

[0045] Figure 2 This is a network structure diagram of the autoencoder of the present invention;

[0046] Figure 3 This is a structural diagram of the channel attention module of the present invention;

[0047] Figure 4 This is a schematic diagram of the channel attention mechanism. Detailed Implementation

[0048] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and should not be used to limit the scope of protection of the present invention.

[0049] It should be noted that the AE-KDE (Autoencoder-Kernel Density Estimation) described in this invention is an autoencoder-kernel density estimation method.

[0050] Example 1

[0051] refer to Figure 1 As shown, a method for detecting anomalies in phase line loss data of power stations based on AE-KDE includes the following steps:

[0052] Step 1: Obtain the line loss dataset for the three-phase power supply within the target transformer area;

[0053] The line loss dataset contains raw data on three-phase electrical characteristics such as power supply, power consumption, line loss, line loss rate and its derived ratios, and volatility.

[0054] Step 2: Preprocess the line loss dataset;

[0055] The preprocessing stage includes data cleaning, feature construction, normalization transformation, and phase division, which can fully preserve the intrinsic structure of each phase line loss data and effectively improve the accuracy of modeling and the ability to detect local anomalies.

[0056] More specifically, data cleaning, through linear interpolation, outlier removal, and time alignment, addresses issues such as missing sample data, duplication, and inconsistent time granularity in line loss datasets.

[0057] Feature construction involves building multi-dimensional feature vectors, including power supply, power consumption, line loss, line loss rate and its derived ratios, volatility, etc., to enhance the information representation capability of the model input.

[0058] Normalization transformation, in order to eliminate the dimensional differences between different features in a multidimensional feature vector and to unify the value range of different feature data, this embodiment uses the mean-variance normalization method to map each dimension feature to a zero-mean-unit-variance space. The calculation formula is as follows: ,

[0059] in, For the normalized data, The original data, These are the mean and standard deviation of the original data, respectively.

[0060] Phase division: Based on the phase fields (phase A, phase B, phase C) of the line loss dataset, the line loss dataset is divided into three sub-datasets (phase A sub-dataset, phase B sub-dataset, and phase C sub-dataset). The phase-specific line loss time series data of each sub-dataset will be used as independent inputs for the subsequent autoencoder model. The phase-specific line loss time series data are stored in the sub-dataset.

[0061] Step 3: Input the phase line loss time series data stored in the subset into the pre-trained prediction model, and output the predicted value of each phase line loss time series data.

[0062] A prediction model based on an autoencoder (AE) and channel attention (CA) mechanism is constructed. This model uses an autoencoder structure for feature compression and reconstruction, and integrates a channel attention module into the encoder of the autoencoder to adaptively enhance the expressive power of different feature dimensions. By minimizing the mean squared error loss function between the predicted and true values, the model gradually converges to learn the power supply and consumption behavior patterns under normal conditions, providing a high-quality fitting benchmark for subsequent anomaly detection. To prevent overfitting, L2 regularization constraints are applied to all fully connected layers in the model, enabling multi-angle and complementary anomaly pattern learning. Preprocessed historical phase line loss time-series data are input into the model for training.

[0063] The autoencoder, as the key feature learning and reconstruction component of this invention, undertakes the task of learning key representations in line loss data and reconstructing them. Each phase subset is used as the training input to the autoencoder model to capture the normal operating mode of that phase. This structure, while compressing the input line loss features, embeds a channel attention module to enhance feature weight perception and combines the nonlinear mapping capability of dense fully connected layers to improve the ability to learn and reconstruct abnormal patterns.

[0064] like Figure 2 As shown, in this embodiment, the prediction model is an AE model, which includes an encoder and a decoder, wherein the encoder embeds a channel attention module.

[0065] The encoder consists of several stacked fully connected layers (Dense) and channel attention modules, aiming to map the multidimensional features of the station area into a low-dimensional latent representation vector, thus completing feature compression and information extraction. The input layer data is first linearly transformed and activated by the first fully connected layer, and then channel statistical information is extracted by the channel attention module, focusing on key indicators. Subsequently, the features are further compressed by the second and third fully connected layers, finally generating a low-dimensional latent representation vector.

[0066] The decoder consists of a fourth fully connected layer, a fifth fully connected layer, and a sixth fully connected layer connected in sequence, but does not contain a channel attention module. The low-dimensional latent representation vector generated by the encoder is sequentially expanded and activated through the three fully connected layers of the decoder to gradually restore the feature structure and restore it to the original input dimension, ensuring numerical consistency.

[0067] By sharing a symmetrical fully connected layer structure with the encoder, the decoder makes the reconstruction process more stable and effectively constrains the distribution of the latent space. Through the decoder's reverse reconstruction capability, the AE model can not only accurately reconstruct the typical operating state of the line loss system, but also reveal potential anomalies in the system's operation when the reconstruction error is abnormally significant, thereby achieving the goal of unsupervised anomaly detection.

[0068] In this embodiment, Table 1 shows the structural design and parameter configuration of each layer of the AE model. The entire network adopts a symmetrical encoder-decoder structure. The model input is a 4-dimensional linear loss feature, which is compressed into a 4-dimensional latent space through three fully connected layers. The first, second, and third fully connected layers of the encoder all employ L2 regularization to enhance the model's generalization ability. During the encoding process, a channel attention module is introduced between the first and second fully connected layers to enhance the expressive power of key dimensions through feature weighting, which helps in the extraction of abnormal features. The decoder is used to reverse the feature dimension to 4 dimensions, ensuring that the reconstructed data is consistent with the original input. Each of its fully connected layers also employs L2 regularization. Regarding activation functions, the ReLU function is used in each fully connected layer during the encoding stage to improve nonlinear expressive power. During the decoding stage, the fourth and fifth fully connected layers use the ReLU function, and the sixth fully connected layer uses the Linear function to adapt to regression scenarios. This structural design not only strengthens the model's feature extraction and reconstruction capabilities but also lays a solid foundation for subsequent anomaly detection.

[0069]

[0070] More specifically, the channel attention module focuses on the weight ratio of each channel in the input feature layer. By dynamically adjusting the importance weights of feature channels, it enhances the model's ability to express key features.

[0071] The principle of channel attention mechanism is as follows: Figure 4 As shown, X is the input matrix. Let W be the width of the input matrix, H be the height of the input matrix, and C be the number of channels in the input matrix. It is the number of channels in the output matrix. Indicates a transformation operation. This indicates a compression operation. Indicates the excitation operation. The design concept of the product operation can be summarized as follows:

[0072] Compression: Global average pooling is used to compress the spatial dimension of the feature map into a global statistic based on the channel dimension. For the input feature map... Compression operation generates channel description vectors The formula for calculating the c-th element is:

[0073]

[0074] Representative feature map The i-th row and j-th column pixels; this step compresses the global spatial information of each channel into a scalar, providing a basis for subsequent modeling of inter-channel dependencies.

[0075] Incentive: The non-linear dependencies between channels are learned using a fully connected layer to generate channel weight vectors. First, a dimensionality-reduced fully connected layer (reducing the dimension to...) is used. The compression ratio is calculated using the ReLU activation function, and then the original number of channels C is restored through a fully connected layer. Finally, the weights are normalized using the Sigmoid function. The calculation formula is:

[0076]

[0077] in, For learnable parameters, It is the ReLU activation function. This is the Sigmoid function.

[0078] Recalibration: The weights of the excitation outputs are considered as the importance of each feature channel after feature selection. Then, multiplication operations are used to progressively weight the previous features along the channel dimension, thereby achieving the recalibration operation of the original features along the channel dimension, as shown in the formula.

[0079]

[0080] Among them, It is an indicator quantity and feature mapping Channel multiplication between them.

[0081] In this embodiment, the channel attention module based on the channel attention mechanism is used, such as... Figure 3 As shown, the weight distribution among feature channels is dynamically adjusted through a "compression-excitation" operation, guiding the model to focus on the importance of key variables such as electricity consumption, power loss, and line loss rate under different operating conditions, thereby improving the quality of feature reconstruction and anomaly sensitivity. Global average pooling and fully connected layers are used with the ReLU activation function to introduce nonlinear transformations, uncovering complex relationships between features and enhancing the ability to distinguish feature importance. The output is constrained to the range (0, 1) using the Sigmoid activation function, generating the weight coefficients for each feature channel. The Sigmoid activation function expression is:

[0082]

[0083] The channel attention module is closely integrated with the encoder to enhance the selective response capability of deep features, effectively improve the overall model's representation accuracy of different station operating states, and provide more accurate basic feature representation for subsequent anomaly detection.

[0084] The phase loss time series data stored in the subset are input into the pre-trained AE model, and the predicted value of each phase loss time series data is output.

[0085] Step 4: Determine the anomaly of phase line loss based on the weighted residual and kernel density estimation method.

[0086] In the study of anomaly detection in phase-by-phase line loss, accurate and stable identification of anomalies is crucial for power grid operation and maintenance. The anomaly determination section is the key to the entire detection process; its purpose is to identify potential line loss anomalies based on residuals and dynamically set thresholds after model prediction. Considering that line losses in power systems are affected by many factors, such as load fluctuations, measurement errors, and external interference, relying solely on the magnitude of prediction errors for anomaly determination may lead to misjudgments or missed detections. This invention proposes a multi-stage anomaly determination strategy based on a weighted residual and dynamic threshold mechanism to improve the overall accuracy, robustness, and adaptability of the detection.

[0087] For each phase loss time-series data sample (hereinafter referred to as the sample), the AE model outputs a predicted value, representing the expected value at the current time and under the current feature combination. The absolute deviation between the actual value and the predicted value of the sample is the residual, which can be formally expressed as:

[0088]

[0089] in, Let i be the residual of the i-th sample. This is the actual value. The residual value represents the model's predicted value. A larger residual value indicates a higher degree of deviation from the "normal pattern" learned by the model, suggesting a potential for anomalies. However, in actual power grid operation, a small amount of residual fluctuation is permissible, and the residual distribution of different types of samples under natural fluctuations is not consistent. Therefore, if a fixed threshold is used for judgment, a large number of normal samples will be misidentified as anomalies. To overcome this problem, this invention introduces a weighted residual mechanism.

[0090] The weighted residual mechanism captures the importance of feature channels dynamically by the channel attention module and assigns this importance as weights to the corresponding residuals, thus weighting the residuals. Channels with higher weights have their corresponding residuals amplified, meaning that the prediction errors on these channels have a greater impact on the overall anomaly detection results; conversely, the residuals of channels with lower weights have a relatively smaller impact on the overall results. This weighting method allows the anomaly detection process for phase-segment line loss to focus more on the prediction errors of key feature channels, thereby more accurately identifying potential anomalies.

[0091] The formula for calculating the weighted residual is:

[0092]

[0093] in, This represents the weighted residual of the i-th sample. The importance weight of the j-th feature channel in the channel attention module is represented by d, where d represents the feature dimension. This represents the actual value of the j-th feature channel of the i-th sample. This represents the predicted value of the j-th feature channel of the i-th sample, and the weighted residual. It can more realistically reflect the impact of "key feature offset" on overall behavior.

[0094] To further capture the statistical regularity of historical residuals, this embodiment uses the sliding time window method to estimate the statistical density of the weighted residuals of normal samples. The probability density function (PDF) is constructed by kernel density estimation (KDE) to characterize the distribution boundary of the residuals of normal samples.

[0095] The KDE calculation process is as follows: For each data point x, a kernel density function is constructed using a kernel function centered at that point. By calculating the kernel density function value for each data point and then taking a weighted average, the overall probability density function estimate is obtained. The kernel function used in KDE is the Gaussian kernel function, and its calculation formula is:

[0096]

[0097] Where x is the input value, Represents the value of the Gaussian kernel function, probability density function The calculation formula is:

[0098]

[0099] Where n is the sample size and h is the bandwidth.

[0100] Calculate the density value for each residual to obtain a set of density values. Sort all elements in the set according to their density in ascending order, and select the density value corresponding to the pre-specified quantile as the threshold. In this embodiment, the pre-specified quantile is the 5th quantile;

[0101] like Then determine If the sample data is abnormal, the corresponding phase line loss is abnormal; otherwise, if the sample data is normal, the corresponding phase line loss is normal.

[0102] Example 2

[0103] An anomaly detection system for phase line loss data in substations based on AE-KDE includes:

[0104] The data acquisition module is used to acquire the line loss dataset of the target transformer area, perform data preprocessing on the line loss dataset to obtain several sub-data sets, and store phase-specific line loss time-series data in the sub-data sets;

[0105] The model prediction module inputs the phase line loss time series data stored in the subset into the pre-trained prediction model and outputs the predicted value of each phase line loss time series data.

[0106] The anomaly detection module is used to calculate the weighted residual between the predicted value and the actual value of the line loss dataset, and to use the kernel density estimation method to determine whether the line loss of each phase is abnormal based on the weighted residual calculation result.

[0107] The prediction model includes:

[0108] An encoder with an embedded channel attention module is used to map the input multidimensional features into a low-dimensional latent representation vector, thereby completing feature compression and information extraction.

[0109] Decoder: Used to expand and activate the low-dimensional latent representation vector, gradually recovering the feature structure to restore the original input dimension.

[0110] Example 3

[0111] A station phase line loss data anomaly detection device based on AE-KDE includes a processor and a storage medium;

[0112] The storage medium is used to store instructions;

[0113] The processor is configured to operate according to the instructions to execute the steps of the method in the above embodiments.

[0114] In summary, this invention constructs independent AE-KDE-based prediction models for different phases of line loss time-series data to detect phase-specific line losses. This enables precise monitoring and location of anomalies in each phase of line loss, improving detection accuracy and providing more detailed and targeted anomaly detection results for power system line loss management, thus facilitating the timely discovery and resolution of phase-specific line loss problems. By embedding a channel attention module into the encoder of the prediction model, the nonlinear reconstruction problem of multi-source features such as phase-specific line loss rate, electricity sales, and electricity consumption is effectively solved. The autoencoder of this invention can automatically extract hidden patterns in line loss time-series data, uncover complex relationships between various features, enhance the model's learning ability for complex operating features, and improve the accuracy of anomaly detection. By combining the channel attention module to calculate the weighted residual between the predicted value and the true value of the line loss dataset, kernel density estimation is used to estimate the density of the weighted residual, and dynamic thresholds are used for anomaly detection. This method can adaptively adjust the threshold, avoiding the limitations of traditional fixed threshold methods, significantly improving the accuracy and adaptability of anomaly detection, and contributing to stable power grid operation and efficient resource allocation.

[0115] Line loss data is influenced by various factors, such as user electricity consumption behavior, seasonal changes, and weather conditions, resulting in complex non-stationary and periodic fluctuations. By dividing the time-series line loss data into multiple time windows and applying a dynamic threshold strategy within each sliding window interval, abnormal data in different time periods can be identified more accurately. The core idea of ​​this method is to dynamically adjust the sensitivity of anomaly detection based on the temporal characteristics and load variation features of the line loss data, thereby improving the accuracy and adaptability of detection.

[0116] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for detecting anomalies in phase line loss data of a distribution station based on AE-KDE, characterized in that, Includes the following steps: Obtain the line loss dataset of the target transformer area, perform data preprocessing on the line loss dataset to obtain several sub-data sets, and store phase-specific line loss time-series data in the sub-data sets; The phase line loss time series data stored in the subset are input into the pre-trained prediction model, and the predicted value of each phase line loss time series data is output. Calculate the weighted residual between the predicted value and the actual value of the line loss dataset, and use the kernel density estimation method to determine whether the line loss of each phase is abnormal based on the weighted residual calculation result; The prediction model includes: An encoder with an embedded channel attention module is used to map the input multidimensional features into a low-dimensional latent representation vector, thereby completing feature compression and information extraction. Decoder: Used to expand and activate the low-dimensional latent representation vector, gradually recovering the feature structure to restore the original input dimension.

2. The method for detecting anomalies in phase line loss data of a distribution station based on AE-KDE according to claim 1, characterized in that, The data preprocessing includes one or more combinations of the following processing methods: Linear interpolation, outlier removal, and time alignment are employed to address issues such as missing, duplicate, and inconsistent time granularity in the linear loss dataset. Construct a multidimensional feature vector for the line loss dataset. The features in the multidimensional feature vector include: power supply, power consumption, line loss power, line loss rate and its derived ratio, and volatility. The mean-variance normalization method is used to eliminate the dimensional differences between different features in the multidimensional feature vector; Based on the phase field of the line loss dataset, the line loss dataset is divided into phase A, phase B, and phase C sub-datasets.

3. The method for detecting anomalies in phase line loss data of a distribution station based on AE-KDE according to claim 1, characterized in that, The encoder comprises a first fully connected layer, a channel attention module, a second fully connected layer, and a third fully connected layer connected in sequence; the first fully connected layer is used to perform linear transformation and activation on the input phase-series line loss data; the channel attention module is used to extract channel statistical information to obtain key indicators of interest; the second and third fully connected layers are used to compress features to output a low-dimensional latent representation vector; The decoder and encoder share a symmetrical fully connected layer structure, including a fourth fully connected layer, a fifth fully connected layer, and a sixth fully connected layer connected in sequence. The fourth, fifth, and sixth fully connected layers are used to progressively expand the dimension of the low-dimensional latent representation vector and activate it to progressively recover the feature structure.

4. The method for detecting anomalies in phase line loss data of a distribution station based on AE-KDE according to claim 3, characterized in that, The first, second, third, fourth, and fifth fully connected layers all employ ReLU activation and L2 regularization; the sixth fully connected layer employs the Linear activation function.

5. The method for detecting anomalies in phase line loss data of a distribution station based on AE-KDE according to claim 3, characterized in that, In the channel attention module, the extraction of channel statistics to obtain key attention indicators includes: Global average pooling is used to compress the spatial dimension of the output feature map of the first fully connected layer into a global statistic in the channel dimension; The non-linear dependencies between channels are learned using fully connected layers to generate channel weight vectors; The original features are weighted according to the channel weight vector along the channel dimension to obtain the weight coefficients of each feature channel. The weight coefficients of each feature channel are regarded as the importance of each feature channel after feature selection. Multiplication operations are used to gradually weight the previous features in the channel dimension, thereby realizing the recalibration operation of the original features in the channel dimension.

6. The method for detecting anomalies in phase line loss data of a distribution station based on AE-KDE according to claim 5, characterized in that, The step of generating channel weight vectors by learning the nonlinear dependencies between channels using fully connected layers includes: First, a dimension-reducing fully connected layer and a ReLU activation function are used, then a dimension-upgrading fully connected layer is used to restore the original number of channels, and finally a normalized channel weight vector is generated by the Sigmoid function.

7. The method for detecting anomalies in phase line loss data of a distribution station based on AE-KDE according to claim 1, characterized in that, The method for determining whether the line loss of each phase is abnormal using kernel density estimation includes: The weighted residuals are statistically density estimated using a sliding time window method. The density value of each weighted residual is calculated, and all densities are sorted from smallest to largest. The density value corresponding to a pre-specified quantile is selected as a threshold. If the density value of the weighted residuals of the phase line loss time series data is less than the threshold, the phase line loss time series data is considered abnormal sample data, and the phase line loss corresponding to the phase line loss time series data is abnormal. Otherwise, the phase line loss time series data is considered normal sample data, and the corresponding phase line loss is normal. The statistical density estimation is a probability density function constructed through kernel density estimation, used to characterize the residual distribution boundary of the phase-series line loss data samples.

8. The method for detecting anomalies in phase line loss data of a distribution station based on AE-KDE according to claim 1, characterized in that, The formula for calculating the weighted residual is: in, This represents the weighted residual of the i-th sample. The importance weight of the j-th feature channel in the channel attention module is represented by d, where d represents the feature dimension. This represents the actual value of the j-th feature channel of the i-th sample. This represents the predicted value of the j-th feature channel of the i-th sample.

9. A station-level phase line loss data anomaly detection system based on AE-KDE, characterized in that, include: The data acquisition module is used to acquire the line loss dataset of the target transformer area, perform data preprocessing on the line loss dataset to obtain several sub-data sets, and store phase-specific line loss time-series data in the sub-data sets; The model prediction module inputs the phase line loss time series data stored in the subset into the pre-trained prediction model and outputs the predicted value of each phase line loss time series data. The anomaly detection module is used to calculate the weighted residual between the predicted value and the actual value of the line loss dataset, and to use the kernel density estimation method to determine whether the line loss of each phase is abnormal based on the weighted residual calculation result. The prediction model includes: An encoder with an embedded channel attention module is used to map the input multidimensional features into a low-dimensional latent representation vector, thereby completing feature compression and information extraction. Decoder: Used to expand and activate the low-dimensional latent representation vector, gradually recovering the feature structure to restore the original input dimension.

10. A device for detecting abnormal phase line loss data in a distribution station based on AE-KDE, characterized in that, Including processor and storage media; The storage medium is used to store instructions; The processor is configured to operate according to the instructions to perform the steps of the method according to any one of claims 1 to 8.

Citation Information

Cited By

  • Rail transit station power distribution and transformation electric energy quality comprehensive evaluation method and system

    CN121189654A