Power distribution control equipment fault detection system based on big data analysis

CN122986818APending Publication Date: 2026-10-27HUBEI ETAI ELECTRIC CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611194773.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-07
Publication Date
2026-10-27

AI Technical Summary

Benefits of technology

[0011]本发明提供了基于大数据分析的配电控制设备故障检测系统,通过实时数据采集模块获取馈线端的多相电压电流时序数据,由异常检测判定模块利用预训练的故障检测模型输出异常置信度并结合动态判定阈值进行异常判定;在此基础上,候选样本筛选模块对异常样本进行置信度筛选和聚类提纯以剔除低质量虚警报样本,仅当提纯后样本与原始训练样本集之间的分布偏移量超过预设阈值时才触发模型更新;模型增量更新模块将筛选通过的样本与历史回放样本集合并,结合知识蒸馏损失进行微调训练,有效约束参数更新方向以避免旧知识遗忘,并通过性能验证确保更新后模型在新旧数据上的性能均达标。本发明有效提升了配电控制设备的故障检测准确率,实现了配电控制设备故障检测模型在动态工况下的持续、稳定进化。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122986818A_ABST
    Figure CN122986818A_ABST
Patent Text Reader

Abstract

The application discloses a power distribution control equipment fault detection system based on big data analysis and relates to the technical field of fault prediction and health management. The system comprises the following steps: obtaining a to-be-detected data sequence and inputting the to-be-detected data sequence into a pre-trained power distribution equipment fault detection model to output an abnormal confidence, comparing the abnormal confidence with a dynamic determination threshold, and outputting an abnormal detection result; taking the abnormal to-be-detected data sequence as a candidate new sample and performing confidence screening and clustering purification; calculating a distribution offset between the purified sample and an original training sample set; only when the distribution offset is greater than a preset offset threshold, the purified sample is reserved as a to-be-updated sample set; combining the to-be-updated sample set with a historical playback sample set to construct an incremental training data set, fine-tuning training and performance verification are performed by taking current model parameters as initial values and combining knowledge distillation loss, and updated model parameters are saved. The application effectively improves the fault detection accuracy of power distribution control equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of fault prediction and health management technology, specifically to a fault detection system for power distribution control equipment based on big data analysis. Background Technology

[0002] Currently, fault detection in distribution network feeders typically employs a data-driven approach. This involves collecting voltage and current time-series data from the feeder, using a neural network model to extract features from the data and output anomaly confidence levels. These anomaly confidence levels are then compared to a fixed threshold. If the threshold is exceeded, the system is considered faulty; otherwise, it is considered to be operating normally.

[0003] However, fault samples are extremely scarce in actual distribution network operation, and there is a serious imbalance between normal operation data and fault data, making it difficult for the model to effectively learn the feature boundaries of fault modes and resulting in low detection accuracy. At the same time, the fixed threshold method cannot adapt to the dynamic changes in distribution network operating conditions. When the statistical distribution characteristics of voltage and current time series data drift over time, the fixed threshold cannot accurately distinguish between normal operation fluctuations and real faults, which can easily lead to missed or false alarms. Summary of the Invention

[0004] This invention provides a fault detection system for power distribution control equipment based on big data analysis, aiming to solve the technical problem of insufficient accuracy in fault detection of power distribution control equipment in the prior art.

[0005] In view of the above problems, the present invention provides a fault detection system for power distribution control equipment based on big data analysis, comprising:

[0006] The real-time data acquisition module is used to acquire multi-phase voltage time-series data and multi-phase current time-series data of the power distribution network feeders connected to the power distribution control equipment in real time, and obtain the data sequence to be detected;

[0007] The anomaly detection and judgment module is used to input the data sequence to be detected into the pre-trained power distribution equipment fault detection model. The power distribution equipment fault detection model outputs anomaly confidence, compares the anomaly confidence with the dynamic judgment threshold, and outputs the anomaly detection result based on the comparison result.

[0008] The candidate sample screening module is used to select the data sequence to be detected that is abnormal as candidate new samples, perform confidence screening and cluster purification on the candidate new samples, calculate the distribution offset between the purified sample and the original training sample set, and retain the purified sample as the sample set to be updated only when the distribution offset is greater than the preset offset threshold.

[0009] The incremental model update module is used to combine the sample set to be updated with the historical replay sample set to construct an incremental training dataset. It uses the current model parameters as the initial values ​​and combines them with knowledge distillation loss for fine-tuning training. After the fine-tuning training is completed, the performance is verified. After the verification is successful, the updated model parameters are saved.

[0010] One or more technical solutions provided in this invention have at least the following technical effects or advantages:

[0011] This invention provides a fault detection system for power distribution control equipment based on big data analytics. A real-time data acquisition module acquires multi-phase voltage and current time-series data from the feeder end. An anomaly detection and judgment module uses a pre-trained fault detection model to output anomaly confidence levels and combines this with a dynamic judgment threshold for anomaly determination. Based on this, a candidate sample screening module performs confidence-based screening and clustering purification on anomaly samples to eliminate low-quality false alarm samples. Model updates are triggered only when the distribution offset between the purified sample and the original training sample set exceeds a preset threshold. The model incremental update module merges the selected samples with the historical playback sample set and performs fine-tuning training using knowledge distillation loss to effectively constrain the parameter update direction and prevent the forgetting of old knowledge. Performance verification ensures that the updated model meets performance standards on both new and old data. This invention effectively improves the fault detection accuracy of power distribution control equipment and achieves continuous and stable evolution of the fault detection model under dynamic operating conditions. Attached Figure Description

[0012] Figure 1 A schematic diagram of the structure of a power distribution control equipment fault detection system based on big data analysis provided in an embodiment of the present invention;

[0013] Figure 2 A schematic diagram of the overall logic of a power distribution control equipment fault detection system based on big data analysis provided in an embodiment of the present invention;

[0014] Figure 3 This is a schematic diagram of the structure of the power distribution equipment fault detection model provided in an embodiment of the present invention;

[0015] The components represented by each number in the attached diagram are explained below:

[0016] The system includes a real-time data acquisition module 11, an anomaly detection and judgment module 12, a candidate sample screening module 13, and a model incremental update module 14. Detailed Implementation

[0017] This invention provides a fault detection system for power distribution control equipment based on big data analysis, which is used to address the technical problem of insufficient accuracy in fault detection of power distribution control equipment in the prior art.

[0018] Examples, such as Figure 1 , Figure 2 As shown, this invention provides a fault detection system for power distribution control equipment based on big data analysis, the system comprising:

[0019] The real-time data acquisition module 11 is used to acquire multi-phase voltage time-series data and multi-phase current time-series data of the power distribution network feeder connected to the power distribution control equipment in real time, and obtain the data sequence to be detected.

[0020] During operation, the voltage and current of distribution network feeders are analog signals that change continuously over time. To analyze these analog signals using data-driven fault detection methods, the continuous analog signals need to be converted into discrete digital signals and stored and processed as time-series data. Furthermore, because the voltage and current signals of distribution network feeders have periodic characteristics, the instantaneous value at a single point in time cannot reflect the complete waveform information of the signal. Therefore, it is necessary to extract data segments containing sampled values ​​from multiple consecutive moments as the basic unit of analysis.

[0021] In one embodiment, the real-time data acquisition module 11 is further configured to:

[0022] Real-time acquisition of multi-phase voltage and multi-phase current time sequence data of the power distribution network feeders to which the power distribution control equipment is connected;

[0023] Get the length of the preset time window and the sliding step size, where the sliding step size is less than the length of the preset time window;

[0024] Starting from the initial moment, multiple data segments are sequentially extracted in chronological order, with the sliding step size as the moving interval. Each data segment contains the instantaneous voltage and current values ​​within a preset time window.

[0025] Each data segment is treated as a separate data sequence to be detected.

[0026] First, real-time acquisition of multi-phase voltage and current time-series data from the distribution network feeders to which the distribution control equipment is connected is performed. The distribution network feeders to which the distribution control equipment is connected refer to the feeder lines where the electrical connection points of the distribution control equipment are located within the distribution network. These feeder lines contain voltage and current signals that reflect the operating status of the distribution control equipment. Multi-phase voltage time-series data refers to the set of data formed by arranging the instantaneous voltage values ​​of each phase of the distribution network feeder at different times in chronological order. Multi-phase current time-series data refers to the set of data formed by arranging the instantaneous current values ​​of each phase of the distribution network feeder at different times in chronological order. In a distribution network, multi-phase typically refers to three phases: phase A, phase B, and phase C.

[0027] Specifically, voltage transformers and current transformers are installed on each phase of the power distribution network feeder to which the power distribution control equipment is connected. The voltage transformer converts high-voltage signals into low-voltage signals and outputs them to the analog input channel of the data acquisition card. The current transformer converts large-current signals into small-current signals and outputs them to the analog input channel of the data acquisition card. The data acquisition card samples and performs analog-to-digital conversion on the voltage values ​​of each analog input channel according to a preset sampling frequency, converting the analog signals into digital signals. The data acquisition card arranges the converted digital signals in chronological order according to the sampling time, generating multi-phase voltage timing data and multi-phase current timing data. The preset sampling frequency refers to the number of times the data acquisition card samples the analog signal per second. The value of the preset sampling frequency should be greater than twice the highest frequency component of the acquired signal.

[0028] For example, a power distribution control device is connected to a three-phase AC power distribution network feeder, comprising three phase lines: A, B, and C. Voltage transformers and current transformers are installed on each phase line of this feeder, with the voltage transformers having a transformation ratio of 10kV to 100V and the current transformers having a transformation ratio of 200A to 5A. The preset sampling frequency of the data acquisition card is set to 10kHz, i.e., 10,000 sampling points are collected per second. At each sampling time, the data acquisition card simultaneously samples and performs analog-to-digital conversion on six channels: A-phase voltage, B-phase voltage, C-phase voltage, A-phase current, B-phase current, and C-phase current. After sampling begins, the data acquisition card proceeds according to the sampling time... , , … The sampled values ​​at each sampling time point are output sequentially in chronological order to form multiphase voltage timing data. , , and multiphase current timing data , , ,in This represents the i-th sampling time, where i is a positive integer.

[0029] Secondly, the length of the preset time window and the sliding step size are obtained, with the sliding step size being smaller than the preset time window length. The preset time window length refers to the duration of the time window used when truncating the data sequence to be detected, used to limit the span of time-series data contained in each data segment on the time axis. The sliding step size is the time interval between the start times of two adjacent data segments, used to limit the movement of the data segment on the time axis. A sliding step size smaller than the preset time window length ensures that adjacent data segments overlap on the time axis, thereby guaranteeing that waveform features near the boundaries of data segments can be completely contained by at least one data segment.

[0030] Specifically, the length and sliding step value of a preset time window are pre-stored, and the real-time data acquisition module 11 reads the length and sliding step value of the preset time window from the storage unit. The length and sliding step value of the preset time window are pre-set according to the voltage and current signal characteristics of the distribution network feeder and the time resolution requirements of fault detection. For example, the length of the preset time window is set... This means a time window covers 0.02 seconds of time-series data. Set the sliding step size. This means the time interval between the start times of two adjacent data segments is 0.01 seconds. Sliding step size. Less than the length of the preset time window Therefore, there is a 0.01-second time overlap between two adjacent data segments.

[0031] Secondly, starting from the initial moment, multiple data segments are sequentially extracted in chronological order, using a sliding step size as the movement interval. Each data segment contains instantaneous voltage and current values ​​within a preset time window. The initial moment refers to the starting time point when the first data segment is performed. A data segment is a block of data consisting of instantaneous voltage and current values ​​from all sampling moments within a time period equal to the preset time window length, starting from a certain initial moment on the time axis. The instantaneous voltage and current values ​​in a data segment are the portions of the multiphase voltage and current time series data acquired in real time that fall within that time period. The number of sampling points in a data segment is equal to the preset sampling frequency multiplied by the preset time window length.

[0032] Specifically, from the start time Beginning, starting from the initial time As the starting boundary of the first data segment, the data is truncated from the starting time. At the time + The instantaneous voltage and current values ​​at all sampling moments between the two points are used to form a data segment. After extracting the first data segment, the starting time is... Add a sliding step The start time of the second data segment is obtained. + Extract from time point + At the time + + The instantaneous voltage and current values ​​at all sampling times between each data point are used to form the second data segment. This process is repeated, increasing the starting time of the previous data segment by one sliding step each time. The start time of the next data segment is obtained, and the segments are extracted sequentially in chronological order until the preset end time of data collection is reached.

[0033] For example, the length of the preset time window Sliding step size The actual sampling frequency of the data acquisition card is 10kHz, therefore, a time window of 0.02s contains 0.02 × 10000 = 200 sampling points. From the start time... The first data segment is extracted, containing 200 instantaneous voltage and current values ​​at sampling times from t=0s to t=0.02s. After the first data segment is extracted, the starting time is increased by a sliding step of 0.01s, resulting in the second data segment starting at t=0.01s, which extracts 200 instantaneous voltage and current values ​​at sampling times from t=0.01s to t=0.03s. This extraction process is repeated sequentially until the preset end time for data acquisition is reached.

[0034] Finally, each data segment is treated as a separate data sequence to be detected. A data sequence to be detected refers to the data unit used as input to the pre-trained power distribution equipment fault detection model for anomaly detection. Each data segment is a data sequence to be detected, and multiple data segments correspond to multiple data sequences to be detected. Each extracted data segment is treated as an independent data sequence to be detected. These sequences are numbered according to the chronological order in which they were extracted and stored in a data buffer, awaiting retrieval and retrieval by subsequent modules.

[0035] For example, the first data segment is considered as a data sequence to be detected, containing instantaneous values ​​of phase A voltage, phase B voltage, phase C voltage, phase A current, phase B current, and phase C current at 200 sampling times from t=0s to t=0.02s. The second data segment is considered as another data sequence to be detected, containing instantaneous values ​​of the aforementioned six channels at 200 sampling times from t=0.01s to t=0.03s. The data dimension of each data sequence to be detected is six channels multiplied by two hundred sampling points, meaning each data sequence contains 1200 data values.

[0036] In this embodiment of the invention, multi-phase voltage and current time-series data of the distribution network feeders are acquired in real time and truncated using a preset time window and sliding step size. This converts continuous analog signals into discrete data sequences to be detected, providing a standardized input data format for subsequent fault detection models. Setting the sliding step size to be smaller than the preset time window ensures temporal overlap between adjacent data sequences, guaranteeing that waveform features near data segment boundaries are fully captured and preventing feature loss due to boundary truncation. Simultaneously, by sequentially truncating the data sequences with the sliding step size, the data sequences to be detected slide continuously along the time axis, achieving continuous monitoring and seamless coverage of the distribution network feeder operating status, providing a complete and continuous data foundation for subsequent anomaly detection.

[0037] The anomaly detection and judgment module 12 is used to input the data sequence to be detected into the pre-trained power distribution equipment fault detection model, the power distribution equipment fault detection model outputs the anomaly confidence level, compares the anomaly confidence level with the dynamic judgment threshold, and outputs the anomaly detection result based on the comparison result.

[0038] In this embodiment of the invention, in order to extract effective information characterizing the operating state from the data sequence to be detected, a pre-trained power distribution equipment fault detection model is needed to extract and transform features from the data sequence. Simultaneously, the anomaly confidence score output by the model is a value within a preset probability range. This value only indicates the probability of an anomaly and cannot be directly used as the final judgment. A judgment threshold needs to be set, and the anomaly confidence score is compared with the judgment threshold. Based on the comparison result, a clear anomaly detection result is output. Furthermore, the operating conditions of the power distribution network change over time, and a fixed judgment threshold cannot adapt to the dynamic changes in operating conditions. Therefore, a dynamic judgment threshold is required, adaptively adjusting the judgment threshold according to the current operating state.

[0039] In one embodiment, the anomaly detection and determination module 12 is further configured to:

[0040] The pre-training of the power distribution equipment fault detection model includes:

[0041] Acquire sample data of the distribution network feeders during historical operating periods. The sample data includes multi-phase voltage time-series sample data and multi-phase current time-series sample data.

[0042] The sample data is labeled with fault types, including abnormal and normal.

[0043] The labeled sample data is divided into a training set and a validation set;

[0044] An initial power distribution equipment fault detection model is constructed. The initial power distribution equipment fault detection model includes a dual attention mechanism module and a multi-scale convolution module. The dual attention mechanism module includes a time dimension attention layer and a channel dimension attention layer.

[0045] Take a batch of sample data from the training set, input the batch of sample data into the initial power distribution equipment fault detection model, and output the prediction confidence after processing by the dual attention mechanism module and the multi-scale convolution module.

[0046] Calculate the loss function value based on the labeled data and prediction confidence of the batch sample data; calculate the gradient of the model parameters based on the loss function value, and update the model parameters along the gradient descent direction;

[0047] Repeat the step of retrieving a batch of sample data from the training set until all sample data in the training set has been traversed.

[0048] After completing one iteration, the current model is validated using the validation set, and the validation accuracy of the current model on the validation set is calculated.

[0049] If the verification accuracy does not reach the preset accuracy threshold, continue to execute the next round of traversal and parameter update;

[0050] If the verification accuracy reaches the preset accuracy threshold, training is stopped, and a pre-trained power distribution equipment fault detection model is obtained.

[0051] First, sample data of the distribution network feeders during historical operating periods is acquired. This sample data includes multi-phase voltage time-series sample data and multi-phase current time-series sample data. The sample data refers to historical data used to train the fault detection model for distribution equipment. The multi-phase voltage time-series sample data refers to the time-series data of the voltage of each phase of the distribution network feeders collected during historical operating periods. The multi-phase current time-series sample data refers to the time-series data of the current of each phase of the distribution network feeders collected during historical operating periods.

[0052] Specifically, on the power distribution network feeder to which the power distribution control equipment is connected, multi-phase voltage time series data and multi-phase current time series data are continuously collected during the historical operating period through voltage transformers and current transformers in conjunction with a data acquisition card. The data is then extracted according to a preset time window and sliding step size to obtain multiple historical data segments, and each historical data segment is used as a sample data.

[0053] For example, during a historical operating period, the distribution network feeder experienced normal operation and multiple abnormal operating states. Time-series data of phase A voltage, phase B voltage, phase C voltage, phase A current, phase B current, and phase C current were collected during this historical operating period. Data was extracted according to a preset time window of 0.02s and a sliding step of 0.01s, resulting in 10,000 sample data points. Each sample data point contains instantaneous values ​​from six data type channels at 200 sampling times.

[0054] Secondly, the sample data is labeled with fault types, including abnormal and normal. Fault type labeling means assigning a category label to each sample data, indicating whether the operating status of the corresponding distribution network feeder is abnormal or normal. The abnormal label indicates that the operating status corresponding to the sample data is abnormal, including various distribution network faults, such as short circuit faults, ground faults, and overcurrent faults. The normal label indicates that the operating status corresponding to the sample data is normal, that is, the distribution network feeder has not experienced any faults.

[0055] Specifically, the collection time point corresponding to each sample data is obtained, and the actual operating status record of the distribution network feeder at that collection time point is queried. If the collection time point is within the fault occurrence period, the sample data is labeled as abnormal; if the collection time point is not within the fault occurrence period, the sample data is labeled as normal.

[0056] For example, in the aforementioned 10,000 sample data sets, the collection time point corresponding to each sample data set is obtained. According to the distribution network operation log, sample data sets whose collection time points fall within the fault occurrence period are marked as abnormal, while sample data sets whose collection time points do not fall within the fault occurrence period are marked as normal. After the marking is completed, out of the 10,000 sample data sets, 200 sample data sets are marked as abnormal, and 9,800 sample data sets are marked as normal.

[0057] Next, the labeled sample data is divided into training and validation sets. The training set refers to the set of sample data used to train the power distribution equipment fault detection model. The validation set refers to the set of sample data used to verify the performance of the trained power distribution equipment fault detection model. The training and validation sets do not overlap. The labeled sample data is randomly divided into training and validation sets according to a preset ratio. The proportion of the training set to the total sample data is greater than the proportion of the validation set to the total sample data. For example, the above 10,000 labeled sample data are divided into training and validation sets in an 8:2 ratio. The training set contains 8,000 sample data, of which 160 are labeled as abnormal and 7,840 are labeled as normal. The validation set contains 2,000 sample data, of which 40 are labeled as abnormal and 1,960 are labeled as normal.

[0058] Furthermore, an initial power distribution equipment fault detection model is constructed. This model includes a dual attention mechanism module and a multi-scale convolution module. The dual attention mechanism module comprises a temporal attention layer and a channel-level attention layer. The initial power distribution equipment fault detection model refers to a fault detection model with initial parameters that has not yet been trained. The temporal attention layer captures the dependencies between different time points in the encoded feature matrix, outputting temporally enhanced features. The channel-level attention layer captures the dependencies between different feature channels in the encoded feature matrix, outputting channel-level enhanced features. The dual attention mechanism module also includes a fusion layer to fuse the temporal and channel-level enhanced features into dual-enhanced features. The multi-scale convolution module contains multiple convolutional kernels of different sizes, used for multi-scale temporal feature extraction from the dual-enhanced features.

[0059] Specifically, such as Figure 3 As shown, the initial power distribution equipment fault detection model consists of a cascaded input layer, a position encoding layer, a dual attention module, a multi-scale convolution module, a fully connected layer, and an activation function layer.

[0060] The input layer receives a 200-row, 6-column input feature matrix. The rows of the matrix correspond to sampling times, and the columns correspond to six data type channels: A-phase voltage, B-phase voltage, C-phase voltage, A-phase current, B-phase current, and C-phase current. The position encoding layer performs position encoding on the input feature matrix, generating an encoded feature matrix carrying the timing position information for each sampling time. The dimension of the encoded feature matrix is ​​the same as that of the input feature matrix.

[0061] The dual attention module comprises a temporal attention layer, a channel-level attention layer, and a fusion layer. The encoded feature matrix is ​​input to both the temporal and channel-level attention layers. The temporal attention layer uses a multi-head attention mechanism to model the dependencies between different time points in the encoded feature matrix and then weights and aggregates them to output temporally enhanced features. The channel-level attention layer uses a multi-head attention mechanism to model the dependencies between different feature channels in the encoded feature matrix and then weights and aggregates them to output channel-level enhanced features. Both the temporal and channel-level attention layers have a preset number of attention heads. The fusion layer combines the temporal and channel-level enhanced features into a dual-enhanced feature, with the same dimension as the encoded feature matrix.

[0062] The multi-scale convolution module contains three one-dimensional convolutional kernels with sizes of 3, 5, and 7, which perform convolution operations on the dual-enhanced features to extract local detail features, medium-scale waveform features, and overall waveform trend features at different time spans. Each convolutional kernel has 6 input channels and a preset number of output channels. The multi-scale convolution module concatenates the temporal features output by the three convolutional kernels along the channel dimension to form a multi-scale temporal feature vector.

[0063] The fully connected layer consists of two fully connected network layers. The first layer maps multi-scale temporal feature vectors to 64-dimensional features, and the second layer maps the 64-dimensional features to one-dimensional scalar values. A ReLU activation function and a Dropout layer are placed between the two fully connected layers. The activation function layer uses the Sigmoid activation function to map the one-dimensional scalar values ​​to probability values ​​between 0 and 1, which are then used as the anomaly confidence output.

[0064] Subsequently, a batch of sample data is taken from the training set and input into the initial power distribution equipment fault detection model. After processing by the dual attention mechanism module and the multi-scale convolution module, the predicted confidence score is output. The batch of sample data refers to the set of multiple sample data taken from the training set for each parameter update. The number of batches of sample data is called the batch size. The predicted confidence score refers to the anomaly confidence prediction value output by the initial power distribution equipment fault detection model for the input batch of sample data.

[0065] Specifically, a batch of sample data of a random size is selected from the training set to form the batch sample data. Each sample data in the batch sample data is input into the initial power distribution equipment fault detection model. The model performs feature extraction and transformation on each sample data and outputs the prediction confidence corresponding to each sample data.

[0066] For example, the batch size is set to 32. 32 sample data sets are randomly selected from the training set to form the batch sample data. These 32 sample data sets are then input into the initial power distribution equipment fault detection model. For each sample data set, the model sequentially performs the following steps: arrangement as input feature matrix, positional encoding to generate encoded feature matrix, temporal and channel-dimensional attention to extract enhanced features, fusion to obtain dual-enhanced features, multi-scale convolution to extract temporal features at different scales, concatenation into a multi-scale temporal feature vector, fully connected layer mapping, activation function mapping, and outputs the prediction confidence score corresponding to that sample data set. 32 sample data sets correspond to 32 prediction confidence scores.

[0067] Then, the loss function value is calculated based on the labeled data and prediction confidence scores of the batch sample data; the gradient of the model parameters is calculated based on the loss function value, and the model parameters are updated along the gradient descent direction. The loss function value is a numerical value used to measure the degree of difference between the prediction confidence score and the labeled data. A larger loss function value indicates a greater difference between the prediction confidence score and the labeled data, meaning the model's prediction is less accurate. A smaller loss function value indicates a smaller difference between the prediction confidence score and the labeled data, meaning the model's prediction is more accurate. The gradient is the partial derivative of the loss function value with respect to the model parameters, and the direction of the gradient indicates the direction in which the loss function value increases the fastest. The gradient descent direction is opposite to the gradient direction; updating the model parameters along the gradient descent direction reduces the loss function value.

[0068] Specifically, the binary cross-entropy loss function is used to calculate the loss function value. This function calculates the loss value for each sample in the batch based on its label and prediction confidence. The average loss value across all samples in the batch is then used to obtain the batch loss function value. The gradient of the loss function value with respect to the model parameters is calculated, and the model parameters are updated along the gradient descent direction at a preset learning rate. The preset learning rate refers to the step size for each parameter update.

[0069] For example, the label of the m-th sample data in the batch sample data is: The prediction confidence level is ,in A value of 0 indicates normal, and a value of 1 indicates abnormal. For the m-th sample data, the loss value is calculated using the binary classification cross-entropy loss function. The loss values ​​of 32 sample data to Take the average to obtain the batch loss function value. .calculate The gradient of each parameter is obtained by taking the partial derivatives with respect to each parameter. The values ​​of each parameter are then updated along the gradient descent direction with a preset learning rate of 0.001.

[0070] Furthermore, the step of retrieving a batch of sample data from the training set is repeated until all sample data in the training set has been traversed. Traversal refers to the process of using all sample data in the training set to update the model parameters once. One complete traversal is called a training round. For example, the training set contains 8000 sample data points with a batch size of 32. In each round of traversal, batches of sample data are retrieved from the training set sequentially according to the batch size of 32. For each batch of sample data, model forward propagation, loss calculation, gradient calculation, and parameter update are performed, for a total of 250 parameter update operations, until all 8000 sample data points in the training set have been traversed.

[0071] Furthermore, after one iteration, the current model is validated using the validation set, and the validation accuracy of the current model on the validation set is calculated. Validation accuracy refers to the proportion of correctly predicted samples when the current model infers on the validation set out of the total number of samples in the validation set. Validation accuracy is used to evaluate the generalization performance of the current model on data not used in training.

[0072] Specifically, after completing one training epoch, each sample data point in the validation set is input into the current model, and the current model outputs the prediction confidence score for each sample data point. The prediction confidence score for each sample data point is compared with a decision threshold. If the prediction confidence score is greater than or equal to the decision threshold, it is predicted as an anomaly; if the prediction confidence score is less than the decision threshold, it is predicted as normal. The prediction results are compared with the labeled data, and the number of correctly predicted sample data points is counted. The number of correctly predicted sample data points is divided by the total number of sample data points in the validation set to obtain the validation accuracy. For example, after completing one training epoch, the current model is validated using 2000 sample data points from the validation set. Each of the 2000 sample data points is input into the current model, outputting 2000 prediction confidence scores. A decision threshold of 0.5 is set; predictions with a confidence score greater than or equal to 0.5 are considered anomalies, and predictions with a confidence score less than 0.5 are considered normal. The prediction results are compared with the labeled data, and the number of correctly predicted sample data points is counted as 1920. The validation accuracy = 1920 / 2000 = 0.96, or 96%.

[0073] Finally, if the verification accuracy does not reach the preset accuracy threshold, the next round of traversal and parameter updates continues; if the verification accuracy reaches the preset accuracy threshold, training stops, and a pre-trained power distribution equipment fault detection model is obtained. The preset accuracy threshold refers to a pre-set pass / fail standard for verification accuracy. The preset accuracy threshold is set to 0.98, referencing historical experience in power distribution network feeder fault detection. The specific value of the preset accuracy threshold is pre-set by those skilled in the art based on actual operating conditions and safety requirements. When the verification accuracy does not reach the preset accuracy threshold, it indicates that the generalization performance of the current model has not yet met the requirements, and training needs to continue.

[0074] Specifically, the current validation accuracy is compared with a preset accuracy threshold. If the current validation accuracy is less than the preset accuracy threshold, the process returns to begin the next training epoch and parameter update. When the validation accuracy reaches the preset accuracy threshold, it indicates that the generalization performance of the current model has met the requirements, and training is complete. The pre-trained power distribution equipment fault detection model refers to the model whose validation accuracy has reached the preset accuracy threshold after training.

[0075] For example, the preset accuracy threshold is 0.98, or 98%. After multiple training rounds, a validation set is used to verify the model after a certain training round, and the validation accuracy reaches 0.985, or 98.5%. The current validation accuracy of 0.985 is greater than or equal to the preset accuracy threshold of 0.98, which meets the condition for stopping training. Training is stopped, and the parameters of the current model are saved as the parameters of the pre-trained power distribution equipment fault detection model.

[0076] The process involves inputting the data sequence to be detected into a pre-trained power distribution equipment fault detection model, which then outputs anomaly confidence scores, including:

[0077] Arrange the data sequence to be detected into an input feature matrix in chronological order;

[0078] Position encoding is performed on the input feature matrix to generate an encoded feature matrix carrying temporal position information;

[0079] The encoded feature matrix is ​​input into the time-dimensional attention layer and the channel-dimensional attention layer, respectively;

[0080] In the temporal attention layer, the first attention weight distribution of the encoded feature matrix at each time step is calculated. The encoded feature matrix is ​​then weighted and aggregated according to the first attention weight distribution to obtain the temporal enhanced features.

[0081] In the channel-dimensional attention layer, the second attention weight distribution of the encoded feature matrix among each feature channel is calculated. The encoded feature matrix is ​​then weighted and aggregated according to the second attention weight distribution to obtain the channel-enhanced features.

[0082] By fusing temporal enhancement features and channel enhancement features, dual enhancement features are obtained;

[0083] The dual-enhanced features are input into a multi-scale convolutional layer, which contains multiple convolutional kernels of different sizes to extract temporal features at different scales.

[0084] By concatenating time-series features at multiple different scales, a multi-scale time-series feature vector is obtained.

[0085] Multi-scale temporal feature vectors are input into a fully connected layer for mapping to obtain one-dimensional scalar values;

[0086] The one-dimensional scalar value is mapped to a preset probability interval through an activation function, and the anomaly confidence level is output.

[0087] First, the data sequence to be detected is arranged in chronological order to form an input feature matrix. The input feature matrix is ​​a two-dimensional matrix formed by arranging the instantaneous voltage and current values ​​at each sampling time in the data sequence as matrix elements, in chronological order along the rows and in the columns according to data type. The number of rows in the input feature matrix equals the number of sampling points in the data sequence. The number of columns in the input feature matrix equals the total number of data types collected, including phase voltage and phase current. For a three-phase distribution network feeder, the data types include phase A voltage, phase B voltage, phase C voltage, phase A current, phase B current, and phase C current, a total of six data types, hence six columns. The element in the i-th row and j-th column of the input feature matrix represents the instantaneous value of the j-th data type at the i-th sampling time.

[0088] For example, the data sequence to be detected includes the instantaneous values ​​of phase A voltage, phase B voltage, phase C voltage, phase A current, phase B current, and phase C current at 200 sampling times from t=0s to t=0.02s. This data sequence is arranged in chronological order to form an input feature matrix X, which is a two-dimensional matrix with 200 rows and 6 columns. The i-th row and first column of X represents the instantaneous value of phase A voltage at the i-th sampling time. The value of phase B voltage at the i-th row and second column is the instantaneous value of phase B voltage at the i-th sampling time. The value of the C-phase voltage at the i-th row and 3-th column is the instantaneous value of the C-phase voltage at the i-th sampling time. The value of phase A current at the i-th row and 4-th column is the instantaneous value of phase A current at the i-th sampling time. The value of the B-phase current at the i-th row and 5-th column is the instantaneous value of the B-phase current at the i-th sampling time. The value of the C-phase current at the i-th row and 6-th column is the instantaneous value of the C-phase current at the i-th sampling time. , i=1,2,3,...,200.

[0089] Secondly, positional encoding is performed on the input feature matrix to generate an encoded feature matrix carrying temporal positional information. Positional encoding refers to encoding the relative positional information of each sampling moment on the time axis into a position vector, and then superimposing the position vector with the corresponding feature vector in the input feature matrix. The encoded feature matrix is ​​a new matrix formed by superimposing the feature vector of each row in the input feature matrix with its corresponding position vector. Since the attention mechanism included in the power distribution equipment fault detection model itself does not have the ability to perceive temporal order, that is, the attention mechanism treats the input feature matrix as an unordered set and cannot distinguish the sequential relationship between different sampling moments, it is necessary to inject temporal positional information into the input feature matrix through positional encoding so that the model can utilize the temporal order information of the sampling moments.

[0090] Specifically, for each sampling time in the input feature matrix, a position vector corresponding to that sampling time is generated. The dimension of the position vector is the same as the dimension of each row of the input feature matrix. The feature vector of the i-th row in the input feature matrix is ​​added element-wise to the position vector corresponding to the i-th sampling time to obtain the encoded feature vector of the i-th row in the encoded feature matrix. The encoded feature vectors of all rows are arranged in chronological order to form the encoded feature matrix. The position encoding is calculated using the position encoding formula, which is: For sampling time... The value of the d-th dimension in its position vector is based on The values ​​of and d are calculated to ensure that the position vectors at different times have different directions in the vector space, thus carrying temporal position information. The position vectors are calculated using sine and cosine function encoding.

[0091] For example, the input feature matrix X is a 2D matrix with 200 rows by 6 columns, where each row is a 6-dimensional feature vector. For the i-th sampling time... Generate a 6-dimensional position vector Position vector Even-numbered dimensions are calculated using a sine function, and odd-numbered dimensions are calculated using a cosine function. The 6-dimensional feature vector in the i-th row of the input feature matrix X is then compared with the 6-dimensional position vector corresponding to the i-th sampling time. By adding element by element, the encoded feature matrix is ​​obtained. The 6-dimensional encoded feature vector in the i-th row, i=1,2,3,...,200. After positional encoding, the encoded feature matrix... It is also a two-dimensional matrix with 200 rows and 6 columns, but the encoded feature vector of each row carries the temporal position information of that sampling time relative to other sampling times.

[0092] Next, the encoded feature matrix is ​​input into the temporal attention layer and the channel attention layer, respectively. The encoded feature matrix is ​​then copied twice, one copy used as input to the temporal attention layer and the other as input to the channel attention layer. The temporal and channel attention layers begin computation simultaneously, with the computation processes of the two branches independent of each other.

[0093] In the temporal attention layer, the first attention weight distribution of the encoded feature matrix across all time points is calculated. The encoded feature matrix is ​​then weighted and aggregated based on this first attention weight distribution to obtain the temporally enhanced features. The first attention weight distribution refers to a set of weight values ​​representing the importance of each sampling time point to the current target time point. Each weight value in the first attention weight distribution corresponds to a sampling time point, and the magnitude of this weight value indicates the importance of that sampling time point among all sampling times. Weighted aggregation refers to the operation of summing the feature vectors of each sampling time point in the encoded feature matrix according to the corresponding weight values ​​in the first attention weight distribution. The temporally enhanced features are the feature matrix obtained after temporal attention weighted aggregation, where the feature vector at each time point incorporates information from all other time points.

[0094] Specifically, in the temporal attention layer, for each sampling moment in the encoded feature matrix, a query vector, a key vector, and a value vector are generated. The query vector represents the content that needs attention at the current moment, the key vector represents the content that can be provided at the current moment, and the value vector represents the actual feature value at the current moment. For any two sampling moments a and b, the query vector of sampling moment a and the key vector of sampling moment b are multiplied by a dot product to obtain the attention score of sampling moment a to sampling moment b. The attention scores of all sampling moments are normalized so that the sum of all attention scores is 1, resulting in the first attention weight distribution. The value vectors of each sampling moment are weighted and summed according to the corresponding weight values ​​in the first attention weight distribution to obtain the fused feature vector of sampling moment a. The above calculation is performed for each sampling moment in the encoded feature matrix to obtain the fused feature vector of all sampling moments, which is arranged in chronological order to form the temporal enhancement feature.

[0095] For example, encoding feature matrix The system contains feature vectors representing 200 sampling times. For the i-th sampling time, the temporal attention layer generates the query vector, key vector, and value vector for that sampling time. For the i-th and k-th sampling times, the query vector of the i-th sampling time is multiplied by the key vector of the k-th sampling time to obtain the attention score from the i-th sampling time to the k-th sampling time. The attention scores for all 200 sampling times are normalized to obtain 200 weight values ​​corresponding to the i-th sampling time, which constitute the first attention weight distribution. The value vectors from the 1st to the 200th sampling times are multiplied by their corresponding weight values ​​and then summed to obtain the weighted aggregated feature vector for the i-th sampling time. This calculation is performed for all 200 sampling times to obtain 200 weighted aggregated feature vectors, which are arranged in chronological order to form the temporal enhancement features. , It is a two-dimensional matrix with 200 rows by 6 columns.

[0096] In the channel-dimensional attention layer, the second attention weight distribution of the encoded feature matrix across each feature channel is calculated. The encoded feature matrix is ​​then weighted and aggregated according to this second attention weight distribution to obtain the channel-enhanced features. The second attention weight distribution refers to a set of weight values ​​representing the importance of each data type channel to the current target channel along the feature channel dimension. Each weight value in the second attention weight distribution corresponds to a data type channel, and the magnitude of this weight value indicates the importance of that data type channel among all data type channels. Weighted aggregation refers to the operation of summing the feature vectors of each data type channel in the encoded feature matrix according to the corresponding weight values ​​in the second attention weight distribution. The channel-enhanced features are the feature matrix obtained after channel-dimensional attention weighted aggregation, where the feature vector of each channel incorporates information from all other channels.

[0097] Specifically, in the channel-dimensional attention layer, the encoded feature matrix undergoes a dimensionality transformation, arranging the feature vectors at each sampling time along the feature channel dimension, making the feature channel dimension a computational dimension. For each data type channel, a query vector, key vector, and value vector are generated. For any two data type channels p and q, the query vector of data type channel p and the key vector of data type channel q are multiplied by a dot product to obtain the attention score of data type channel p for data type channel q. The attention scores of all data type channels are normalized so that the sum of all attention scores is 1, resulting in the second attention weight distribution. The value vectors of each data type channel are weighted and summed according to the corresponding weight values ​​in the second attention weight distribution to obtain the fused feature vector of data type channel p. The above calculation is performed on all data type channels to obtain the fused feature vector of all data type channels, which is then arranged according to data type to form the channel-enhanced features.

[0098] For example, encoding feature matrix It includes six data type channels: Phase A voltage channel, Phase B voltage channel, Phase C voltage channel, Phase A current channel, Phase B current channel, and Phase C current channel. For the j-th data type channel, the channel-dimensional attention layer generates a query vector, key vector, and value vector for the j-th data type channel. For the j-th and l-th data type channels, the query vector of the j-th data type channel is multiplied by the key vector of the l-th data type channel to obtain the attention score of the j-th data type channel on the l-th data type channel. The attention scores of all six data type channels are normalized to obtain six weight values ​​corresponding to the j-th data type channel, which constitute the second attention weight distribution. The value vectors of the 1st to 6th data type channels are multiplied by their corresponding weight values ​​and then summed to obtain the weighted aggregated feature vector of the j-th data type channel. The above calculation is performed on all six data type channels to obtain six weighted aggregated feature vectors, which are arranged according to data type to form the channel enhancement features. , It is a two-dimensional matrix with 200 rows by 6 columns.

[0099] Furthermore, the temporal enhancement features and channel enhancement features are fused to obtain dual-enhanced features. Fusion refers to the operation of combining the temporal enhancement features output by the temporal dimension attention layer with the channel enhancement features output by the channel dimension attention layer. Dual-enhanced features are fused feature matrices that simultaneously contain enhancement information from both the temporal and channel dimensions. The temporal enhancement features and channel enhancement features are then concatenated along the feature dimension.

[0100] Specifically, the temporal enhancement feature is a two-dimensional matrix with M rows and N columns, and the channel enhancement feature is also a two-dimensional matrix with M rows and N columns, where M is the number of sampling points and N is the number of data type channels. Concatenating the temporal and channel enhancement features along the column direction yields a two-dimensional matrix with M rows and 2N columns; this matrix is ​​the double enhancement feature. A linear transformation is then performed on the double enhancement feature, changing the 2N columns back to N columns, so that the dimension of the double enhancement feature matches the dimension of the input feature matrix. For example, the temporal enhancement feature... It is a 2D matrix with 200 rows by 6 columns, channel enhancement feature. It is a two-dimensional matrix with 200 rows and 6 columns. and Concatenating along the column direction yields a 200-row by 12-column two-dimensional matrix. This matrix is ​​then fed into a linear transformation layer. The layer transforms the 12-dimensional feature vectors of each row into 6-dimensional feature vectors, outputting a 200-row by 6-column two-dimensional matrix, which is the dual-enhanced feature. .

[0101] Subsequently, the dual-enhanced features are input into a multi-scale convolutional layer, which contains multiple convolutional kernels of different sizes to extract temporal features at different scales. A multi-scale convolutional layer refers to a convolutional layer containing multiple convolutional kernels of different sizes. The convolutional kernel is a weight matrix that performs a sliding window operation on the input feature matrix, covering a local region of the input feature matrix each time. The elements of this local region are then summed with the weights of the convolutional kernel to obtain an element in the output feature matrix. The size of the convolutional kernel refers to the range of time steps it covers. Different sized convolutional kernels can capture waveform patterns over different time spans. Small-sized convolutional kernels capture local waveform changes within a short time period, while large-sized convolutional kernels capture the overall waveform change trend over a long time period. Temporal features at different scales refer to the multiple feature outputs obtained after performing convolution operations on the dual-enhanced features using convolutional kernels of different sizes.

[0102] Specifically, multiple one-dimensional convolutional kernels of different sizes are set, with the size of each kernel measured in units of sampling points. Each kernel performs a sliding window operation on the time dimension of the dual-enhanced features, weighting and summing the sampling points within the window to extract temporal features at that scale. Each kernel outputs a feature vector. All kernels perform convolution operations in parallel. For example, a multi-scale convolutional layer contains three one-dimensional convolutional kernels of different sizes: the first kernel has 3 sampling points, the second has 5 sampling points, and the third has 7 sampling points. The dual-enhanced features are then processed. Input a multi-scale convolutional layer. A convolutional kernel of size 3 performs a weighted summation every 3 consecutive sampling points along the time dimension to extract local detail features, and outputs the feature. A convolutional kernel of size 5 performs a weighted summation every 5 consecutive sampling points along the time dimension to extract medium-scale waveform features and output the features. A convolutional kernel of size 7 performs a weighted summation every 7 consecutive sampling points along the time dimension to extract overall waveform trend features and output the features. . , and These represent temporal features at different scales.

[0103] Then, the temporal features at multiple different scales are concatenated to obtain a multi-scale temporal feature vector. Concatenation refers to the operation of merging temporal features at multiple different scales along the feature dimension. The multi-scale temporal feature vector is a comprehensive feature vector obtained by merging the temporal features extracted by different convolutional kernels. This vector integrates multi-level waveform information from local details to overall trends. The temporal features output by each convolutional kernel are merged along the feature dimension to form a complete feature vector. This feature vector is the multi-scale temporal feature vector. For example, ... , and By concatenating along the feature dimensions, a multi-scale temporal feature vector is obtained. . It integrates local waveform details from 3 sampling points, medium-scale waveform features from 5 sampling points, and overall waveform trends from 7 sampling points.

[0104] Furthermore, the multi-scale temporal feature vector is input into a fully connected layer for mapping, resulting in a one-dimensional scalar value. A fully connected layer is a neural network layer that establishes a fully connected relationship between each dimension of the input feature vector and each dimension of the output vector. Mapping refers to the process of transforming the input multi-scale temporal feature vector into an output vector of a specified dimension through a linear transformation of the fully connected layer. The one-dimensional scalar value is a single numerical value obtained after mapping by the fully connected layer; this value is the original score value before activation function transformation. The multi-scale temporal feature vector is input into the fully connected layer, which performs a weighted sum of the weights between each dimension of the multi-scale temporal feature vector and the output scalar, and adds a bias to obtain a one-dimensional scalar value. For example, the input dimension of the fully connected layer and... The dimensions are the same, and the output dimension of a fully connected layer is 1. Input fully connected layer, fully connected layer to We sum all the dimensions with weights and add a bias to output a one-dimensional scalar value s.

[0105] Finally, the one-dimensional scalar value is mapped to a preset probability interval using an activation function, outputting the anomaly confidence score. The activation function is a monotonic function that transforms the input one-dimensional scalar value to a value within the preset probability interval. The preset probability interval refers to the range of values ​​for the anomaly confidence score, with a lower limit of 0 and an upper limit of 1. The anomaly confidence score is the value obtained after mapping by the activation function, falling within the preset probability interval. This value represents the probability that the operating state of the distribution network feeder corresponding to the data sequence to be detected belongs to the anomaly category. The one-dimensional scalar value output from the fully connected layer is input into the activation function. The activation function maps the one-dimensional scalar value to a probability value between 0 and 1. This probability value is the anomaly confidence score. For example, the anomaly confidence score is 0.82.

[0106] The process involves comparing the anomaly confidence level with a dynamic decision threshold, and outputting the anomaly detection result based on the comparison. This includes:

[0107] Obtain the dynamic judgment threshold corresponding to the current moment;

[0108] Compare the anomaly confidence level with the dynamic judgment threshold;

[0109] If the anomaly confidence level is greater than or equal to the dynamic judgment threshold, the distribution network feeder is judged to be abnormal, an alarm signal is generated, and the alarm signal is sent to the distribution network monitoring terminal.

[0110] If the anomaly confidence level is less than the dynamic judgment threshold, the distribution network feeder is judged to be normal, and the judgment result is recorded to the log file.

[0111] First, obtain the dynamic judgment threshold corresponding to the current moment, including:

[0112] Acquire multiple sets of historical data sequences to be detected for distribution network feeders under normal operating conditions;

[0113] Multiple sets of historical data sequences to be detected are input into the power distribution equipment fault detection model to obtain the historical anomaly confidence level corresponding to each historical data sequence to be detected.

[0114] Calculate the mean confidence level of historical anomalies;

[0115] Calculate the standard deviation of the confidence level for historical anomalies;

[0116] The sum of the preset multiples of the mean and standard deviation is used as the initial value of the dynamic judgment threshold;

[0117] During real-time detection, the abnormal confidence scores corresponding to the data sequences to be detected that are judged to be normal within a preset time period are continuously collected to form a recent set of normal confidence scores.

[0118] Calculate the recent mean and recent standard deviation of the recent normal confidence set;

[0119] The dynamic judgment threshold is updated based on the recent mean and recent standard deviation.

[0120] First, multiple sets of historical data sequences to be detected are acquired from the distribution network feeders under normal operating conditions. These historical data sequences refer to historical data segments collected during the normal operation of the distribution network feeders. Multiple sets of historical data sequences are used to establish a baseline distribution of anomaly confidence under normal operating conditions. During a period when the distribution network feeders are in a known normal operating state, the real-time data acquisition module 11 collects multiple data sequences to be detected according to a preset time window and sliding step size, and these multiple data sequences are used as multiple sets of historical data sequences to be detected. For example, during a continuous 24-hour period when the distribution network feeders are in normal operating conditions, the real-time data acquisition module 11 collects 864,000 sets of data sequences to be detected according to a preset time window of 0.02s and a sliding step size of 0.01s. 1,000 sets are randomly selected from these as historical data sequences to be detected.

[0121] Secondly, multiple sets of historical data sequences to be detected are input into the power distribution equipment fault detection model to obtain the historical anomaly confidence score corresponding to each historical data sequence. The historical anomaly confidence score refers to the anomaly confidence score value output by the power distribution equipment fault detection model after each set of historical data sequences is input. Each acquired set of historical data sequences to be detected is then input into the pre-trained power distribution equipment fault detection model, and the anomaly confidence score corresponding to each set of historical data sequences is output. For example, inputting 1000 sets of historical data sequences to be detected into the pre-trained power distribution equipment fault detection model yields 1000 historical anomaly confidence score values.

[0122] Next, calculate the mean of historical anomaly confidence levels; then calculate the standard deviation of historical anomaly confidence levels. The mean reflects the central location of anomaly confidence levels under normal operating conditions. The standard deviation is a measure of the dispersion of historical anomaly confidence levels relative to the mean. A larger standard deviation indicates a more dispersed distribution of historical anomaly confidence levels, while a smaller standard deviation indicates a more concentrated distribution of historical anomaly confidence levels.

[0123] For example, the confidence scores of 1000 historical anomalies are distributed between 0.1 and 0.4. The sum of all 1000 historical anomaly confidence scores is 250.0. Dividing the sum of 250.0 by 1000 yields the mean of the historical anomaly confidence scores. Based on the confidence level and mean of 1000 historical anomalies. Calculate the square of the difference between each historical outlier confidence level and 0.25, sum all the squared values, and divide by 1000 to obtain the variance. Take the square root of the variance to obtain the standard deviation. .

[0124] Furthermore, the sum of preset multiples of the mean and standard deviation is used as the initial value of the dynamic judgment threshold. The preset multiple refers to a pre-set multiplier used to calculate the initial value of the dynamic judgment threshold. The preset multiple is a positive number 3, based on the 3σ principle of normal distribution in statistics. The initial value of the dynamic judgment threshold refers to the initial value of the dynamic judgment threshold when the system starts. The initial value of the dynamic judgment threshold is obtained by multiplying the mean and standard deviation by the preset multiple, and then adding the product to the mean. For example, the preset multiple is 3. (Meaning) Standard deviation The initial value of the dynamic threshold. .

[0125] During real-time detection, the abnormal confidence scores corresponding to data sequences deemed normal within a preset time period are continuously collected, forming a recent normal confidence score set. The recent normal confidence score set refers to the set of abnormal confidence scores corresponding to data sequences deemed normal within a preset time period during real-time detection. The preset time period refers to the time span for collecting recent normal confidence scores.

[0126] Specifically, during real-time detection, the abnormal confidence levels corresponding to the data sequences to be detected that are judged as normal and whose abnormal confidence levels are less than the dynamic judgment threshold are continuously collected. The abnormal confidence levels corresponding to all the data sequences to be detected that are judged as normal within a preset time period are stored as a set, which is the recent normal confidence level set.

[0127] For example, a preset duration of 10 minutes is set. During real-time detection, the anomaly detection judgment module 12 continuously collects the anomaly confidence scores corresponding to all data sequences to be detected that have been judged as normal within the past 10 minutes. A total of 600 data sequences to be detected were judged as normal within the past 10 minutes, and the anomaly confidence scores corresponding to these 600 data sequences are collected to form a recent normal confidence score set.

[0128] Next, the recent mean and recent standard deviation of the recent normal confidence score set are calculated. The recent mean is the average of all outlier confidence scores in the recent normal confidence score set. The recent standard deviation is a measure of the dispersion of all outlier confidence scores in the recent normal confidence score set relative to the recent mean. For example, the recent mean... Recent standard deviation .

[0129] Finally, the dynamic judgment threshold is updated based on the recent mean and recent standard deviation. Updating the dynamic judgment threshold means recalculating its value based on the distribution characteristics of recent normal confidence levels. The recent mean is multiplied by a preset multiple of the recent standard deviation, and the product is added back to the recent mean to obtain the updated dynamic judgment threshold. This updated dynamic judgment threshold replaces the current dynamic judgment threshold and is used for anomaly detection in subsequent data sequences. For example, the preset multiple is 3. (Recent mean) Recent standard deviation Updated dynamic threshold The dynamic judgment threshold was updated from 0.49 to 0.57, and 0.57 will be used as the comparison benchmark for anomaly judgment in subsequent data sequences to be detected.

[0130] Then, the anomaly confidence level is compared with the dynamic judgment threshold. For example, the current value of the dynamic judgment threshold at the current moment is 0.57. The anomaly confidence level is 0.82, and 0.82 is greater than 0.57.

[0131] Furthermore, if the anomaly confidence level is greater than or equal to the dynamic judgment threshold, the distribution network feeder is determined to be abnormal, an alarm signal is generated, and the alarm signal is sent to the distribution network monitoring terminal; if the anomaly confidence level is less than the dynamic judgment threshold, the distribution network feeder is determined to be normal, and the judgment result is recorded in the log file.

[0132] For example, if the anomaly confidence level of 0.82 is greater than or equal to the dynamic judgment threshold of 0.57, the distribution network feeder is judged to be abnormal. An alarm signal is generated, which includes the anomaly judgment result and the acquisition time information of the data sequence to be detected. The alarm signal is sent to the distribution network monitoring terminal, which displays the alarm information and records the anomaly event. If the distribution network feeder is judged to be normal, a normal judgment result is generated, which includes normal judgment information and the acquisition time information of the data sequence to be detected.

[0133] In this embodiment of the invention, a pre-trained power distribution equipment fault detection model extracts and transforms features from the data sequence to be detected, converting the original sampled value sequence into anomaly confidence levels within a preset probability range. This achieves effective compression and mapping from high-dimensional raw data to low-dimensional discriminative information. The channel-dimensional attention layer captures the correlation between different data types, and the dual attention mechanism enables the model to fully utilize the complete information of time-series and multi-phase data. The multi-scale convolutional layer extracts multi-level waveform features from local details to overall trends using convolutional kernels of different sizes, enhancing the model's ability to identify fault modes across different time spans. The dynamic judgment threshold is set based on the statistical distribution characteristics of anomaly confidence levels under normal operating conditions and is adaptively updated according to recent changes in the distribution of normal confidence levels, allowing the judgment threshold to track the slow drift of the power distribution network's operating conditions. When the anomaly confidence level exceeds the dynamic judgment threshold, an alarm is triggered; when the anomaly confidence level is below the dynamic judgment threshold, it is judged as normal, and the judgment result is recorded in a log file, achieving accurate and adaptive judgment of the operating status of power distribution network feeders.

[0134] The candidate sample screening module 13 is used to select the data sequence to be detected that has an abnormal detection result as a candidate new sample, perform confidence screening and cluster purification on the candidate new sample, calculate the distribution offset between the purified sample and the original training sample set, and retain the purified sample as the sample set to be updated only when the distribution offset is greater than the preset offset threshold.

[0135] In this embodiment of the invention, the abnormal data sequences identified as abnormal in the anomaly detection results include two types of samples: one type is abnormal samples caused by real faults, which have high learning value for incremental training; the other type is false alarm samples caused by non-fault factors such as transient disturbances and measurement noise, which are low-quality samples and will introduce noise interference if directly used for incremental training. Furthermore, even if all samples are high-quality after screening, if their data distribution is similar to the original training sample set, there is no need to update the model; only when the distribution deviates significantly does it indicate a substantial change in the operating conditions, requiring a model update.

[0136] In one embodiment, the candidate sample screening module 13 is further configured to:

[0137] The data sequence to be detected that is found to be abnormal is stored in the candidate abnormal sample cache area;

[0138] When the number of samples in the candidate anomaly sample cache reaches a preset threshold, the incremental optimization process is triggered.

[0139] All candidate anomaly samples are retrieved from the candidate anomaly sample cache to form a candidate anomaly sample set;

[0140] The candidate abnormal sample set is screened for quality, and low-quality samples are removed to obtain the initial new sample set;

[0141] Perform data distribution conflict detection on the newly added sample set in the initial screening to determine whether the distribution offset between the newly added sample set in the initial screening and the original training sample set is greater than the preset offset threshold.

[0142] If the offset exceeds the preset threshold, the newly added sample set from the initial screening will be retained as the sample set to be updated.

[0143] If the new sample set is less than or equal to the preset offset threshold, the newly added sample set will be discarded and the incremental optimization process will be terminated.

[0144] First, the data sequences to be detected that are deemed anomalous are stored in the candidate anomaly sample cache. The candidate anomaly sample cache is a storage area used to temporarily store data sequences to be detected that have been determined to be anomalous. Candidate anomaly samples are data sequences to be detected that have been determined to be anomalous; these samples are qualified as candidate training samples but have not yet undergone quality screening and distribution conflict detection, and are therefore temporarily stored in the candidate anomaly sample cache awaiting processing. For example, the data sequence to be detected... The data sequence to be detected is collected at t=0s and input into the pre-trained power distribution equipment fault detection model. The anomaly detection judgment module 12 determines the result as an anomaly. The candidate sample screening module 13 selects the data sequence to be detected. The data is written to the candidate anomaly sample buffer and the timestamp of the entry is recorded as t=0s. This process is repeated for each subsequent data sequence identified as an anomaly and stored in the candidate anomaly sample buffer.

[0145] Secondly, when the number of samples in the candidate anomaly sample buffer reaches a preset threshold, the incremental optimization process is triggered. The preset threshold refers to the minimum number of candidate anomaly samples required to trigger the incremental optimization process. The value of the preset threshold should ensure that a sufficient number of candidate anomaly samples accumulate in the buffer so that subsequent quality screening and distribution conflict detection can obtain statistically significant analytical results. The preset threshold is expressed in units of sample count. The incremental optimization process refers to the complete workflow of quality screening and distribution conflict detection of candidate anomaly samples, and based on this, deciding whether to perform incremental model updates.

[0146] For example, a preset threshold of 100 samples is set. The candidate anomaly sample buffer is initially empty, with 0 samples. As the real-time detection process progresses, the candidate anomaly sample buffer gradually stores the data sequences to be detected that are determined to be anomalies, and the number of samples gradually increases. When the 100th candidate anomaly sample is stored in the candidate anomaly sample buffer, the current number of samples in the buffer reaches 100, which is greater than or equal to the preset threshold of 100, triggering the incremental optimization process.

[0147] Next, all candidate anomaly samples are retrieved from the candidate anomaly sample cache to form a candidate anomaly sample set. The candidate anomaly sample set is the collection of all candidate anomaly samples retrieved from the candidate anomaly sample cache; this set serves as the input data for subsequent quality screening. For example, if the candidate anomaly sample cache stores 100 candidate anomaly samples, denoted as... , , … The candidate sample screening module 13 reads sequentially from the candidate abnormal sample cache. to All candidate anomaly samples are combined into a candidate anomaly sample set. After reading is complete, clear the candidate abnormal sample cache.

[0148] Then, the candidate abnormal sample set is subjected to quality screening. After removing low-quality samples, a preliminary new sample set is obtained, including:

[0149] Each candidate anomaly sample in the candidate anomaly sample set is input into the power distribution equipment fault detection model to obtain the anomaly confidence level corresponding to each candidate anomaly sample.

[0150] Candidate anomaly samples with an anomaly confidence level lower than a preset confidence threshold are removed;

[0151] Calculate the feature similarity among the remaining candidate anomaly samples;

[0152] The remaining candidate anomaly samples are clustered based on feature similarity to obtain multiple sample clusters;

[0153] From each sample cluster, the candidate anomaly sample closest to the cluster center is selected as the representative sample;

[0154] The representative samples were combined to form a preliminary new sample set.

[0155] First, each candidate anomaly sample in the candidate anomaly sample set is input into the power distribution equipment fault detection model to obtain the anomaly confidence level corresponding to each candidate anomaly sample. Then, each candidate anomaly sample is extracted from the candidate anomaly sample set and input into the pre-trained power distribution equipment fault detection model. Following the forward propagation process described in the anomaly detection and judgment module 12, feature extraction and transformation are performed on the candidate anomaly sample, and the anomaly confidence level corresponding to that candidate anomaly sample is output.

[0156] For example, the candidate anomaly sample set contains 100 candidate anomaly samples. to .Will The input power distribution equipment fault detection model outputs an anomaly confidence level of 0.92. The input model outputs an anomaly confidence score of 0.88. Process these parameters sequentially in the same manner. to We obtained the anomaly confidence scores corresponding to 100 candidate anomaly samples.

[0157] Secondly, candidate anomaly samples with anomaly confidence levels below a preset confidence threshold are removed. The preset confidence threshold is the lowest anomaly confidence value pre-defined to determine whether a candidate anomaly sample's confidence level is acceptable. This threshold falls within a preset probability range. Candidate anomaly samples with anomaly confidence levels below the preset threshold indicate a low probability that the model will classify them as anomaly; these samples may be misclassified or borderline cases, and removing them reduces noise interference in subsequent incremental training.

[0158] The specific value of the preset reliability threshold is set according to the tolerance requirement for false alarm samples. The lower the tolerance, the higher the threshold is set. The value range is between the dynamic judgment threshold and the upper limit of the preset probability interval.

[0159] For example, a preset confidence threshold is set to 0.80. Candidate outlier samples. The corresponding anomaly confidence level is 0.92. Since 0.92 is greater than 0.80, it is retained. Candidate anomaly samples The corresponding anomaly confidence level is 0.88. Since 0.88 is greater than 0.80, it is retained. All 100 candidate anomalous samples were compared in the manner described above, and samples with anomaly confidence levels below 0.80 were removed, while samples with anomaly confidence levels greater than or equal to 0.80 were retained.

[0160] Next, the feature similarity between the remaining candidate anomaly samples is calculated. Feature similarity refers to the degree of similarity between the representation vectors of two candidate anomaly samples in the feature space. The numerical range of feature similarity is between 0 and 1; a larger value indicates that the features of the two candidate anomaly samples are more similar, and a smaller value indicates that the features of the two candidate anomaly samples are more different. The feature similarity is calculated using the cosine similarity formula, which calculates the cosine value of the angle between two feature vectors as a similarity measure.

[0161] Specifically, each candidate anomaly sample retained after confidence screening is input into the dual attention module and multi-scale convolution module of the power distribution equipment fault detection model. The multi-scale temporal feature vector corresponding to the candidate anomaly sample is extracted from the output of the multi-scale convolution module, and this multi-scale temporal feature vector is used as the representation vector of the candidate anomaly sample in the feature space. For any two candidate anomaly samples, the cosine similarity between their representation vectors is calculated, and the result is used as the feature similarity between the two candidate anomaly samples.

[0162] For example, after confidence level filtering, 80 candidate anomaly samples are retained. The candidate sample filtering module 13 inputs these 80 candidate anomaly samples into the power distribution equipment fault detection model, and extracts the multi-scale temporal feature vector corresponding to each candidate anomaly sample from the output of the multi-scale convolution module. For the a-th and b-th candidate anomaly samples, their feature vectors are respectively... and The cosine similarity formula is used to calculate and The cosine similarity value between them is calculated. The feature similarity between all sample pairs is then calculated in the manner described above, resulting in an 80×80 feature similarity matrix.

[0163] Then, the remaining candidate anomaly samples are clustered based on feature similarity to obtain multiple sample clusters. Clustering refers to the process of dividing candidate anomaly samples into multiple groups according to the magnitude of feature similarity. A sample cluster is a set of candidate anomaly samples that have similar features after clustering. Candidate anomaly samples within the same sample cluster have high feature similarity, while candidate anomaly samples between different sample clusters have low feature similarity. The clustering uses a density-based clustering algorithm, which can automatically determine the number and shape of sample clusters based on the distribution density of samples in the feature space, without needing to pre-specify the number of sample clusters.

[0164] Specifically, the candidate anomaly samples are clustered using their feature vectors as input and their feature similarity as a distance metric. For any two candidate anomaly samples, if their feature similarity is greater than a preset similarity threshold, they are considered neighboring samples. The local density of each candidate anomaly sample is determined by the number of its neighboring samples. The clustering process follows these rules: the sample with the highest local density among the candidate anomaly samples that are not currently assigned to any cluster is selected as the initial sample, a new cluster is created, and the initial sample is assigned to this cluster; then, starting from the initial sample, the cluster expands outward layer by layer according to proximity, assigning all unassigned candidate anomaly samples with a similarity greater than a preset similarity threshold to existing samples in the current cluster to the current cluster; this expansion process is repeated until the current cluster can no longer accommodate new candidate anomaly samples.

[0165] Subsequently, among the remaining unclassified candidate anomaly samples, the sample with the highest local density is selected again as the initial sample for the next sample cluster, and the same expansion operation is performed until all candidate anomaly samples are classified into their corresponding sample clusters. Based on this clustering rule, candidate anomaly samples with high feature similarity are classified into the same sample cluster, while candidate anomaly samples with low feature similarity are classified into different sample clusters. The feature similarity between candidate anomaly samples within the same sample cluster is greater than a preset similarity threshold, while the feature similarity between candidate anomaly samples in different sample clusters is less than or equal to the preset similarity threshold.

[0166] For example, after confidence level screening, 80 candidate anomaly samples were retained, and the feature vectors of each candidate anomaly sample were as follows: to .by to Using the cosine similarity between any two feature vectors as input, and after clustering, the 80 candidate anomaly samples are divided into 5 sample clusters, denoted as . , , , and . Contains 20 samples, Contains 18 samples, Contains 15 samples, Contains 14 samples, It contains 13 samples.

[0167] Subsequently, the candidate anomaly sample closest to the cluster center is selected as the representative sample from each sample cluster. The cluster center refers to the average position of all candidate anomaly samples in the feature space, i.e., the centroid of the sample cluster. The representative sample refers to one or more candidate anomaly samples selected from the sample cluster that can represent the overall feature distribution of the sample cluster. The candidate anomaly sample closest to the cluster center is the most representative sample in the sample cluster that is closest to the average position, and this sample can reflect the overall characteristics of the sample cluster well.

[0168] Specifically, for each sample cluster, the average of the feature vectors of all candidate anomaly samples in the cluster is calculated to obtain the cluster center. The Euclidean distance between the feature vector of each candidate anomaly sample and the cluster center is calculated. The candidate anomaly sample closest to the cluster center is selected as the representative sample of the cluster. For example, for... This sample cluster contains 20 candidate anomaly samples, with feature vectors as follows: to .calculate to The average value is used to obtain the cluster center. .calculate to Each eigenvector and cluster center The Euclidean distance between the cluster centers is used to determine the candidate anomaly sample with the smallest distance value. This sample is then considered the closest to the cluster center. Representative sample. Following the same method, from... , , and Five representative samples were selected from the candidate anomaly samples that were closest to the cluster center in each cluster.

[0169] Finally, the representative samples are combined to form the initial new sample set. The representative samples selected from each sample cluster are grouped together, and all representative samples are combined into a new dataset; this set is the initial new sample set. For example, from... , , , and The representative samples selected from each are denoted as , , , and These are combined into a single dataset, which constitutes the initial screening set of new samples. .

[0170] Furthermore, a new and old data distribution conflict detection is performed on the newly added sample set after initial screening to determine whether the distribution offset between the newly added sample set and the original training sample set exceeds a preset offset threshold. New and old data distribution conflict detection refers to the operation of determining whether there are significant differences between the data distribution characteristics of the newly added sample set and the data distribution characteristics of the original training sample set. Distribution offset is a quantitative measure of the degree of difference between the data distribution of the newly added sample set and the data distribution of the original training sample set. A larger distribution offset value indicates a greater difference between the data distribution of the newly added sample set and the original training sample set, while a smaller value indicates that the data distributions of the two are closer.

[0171] The preset offset threshold is a pre-set critical value used to determine whether the distribution offset reaches the condition for triggering a model update. The preset offset threshold is set based on the statistical distribution characteristics of the Mahalanobis distance determined by the covariance matrix of the original training sample set. It is set to a preset quantile of the Mahalanobis distance between any two samples in the original training sample set, such that the probability of the distribution offset being greater than this threshold corresponds to the statistical confidence level of a significant change in the operating conditions of the distribution network.

[0172] Specifically, obtain the statistical distribution parameters of the feature vectors of all sample data in the original training sample set, including the mean vector and covariance matrix of the original training sample set. Calculate the mean vector of the feature vectors of all representative samples in the newly added sample set. Use the Mahalanobis distance formula to calculate the Mahalanobis distance between the mean vector of the newly added sample set and the mean vector of the original training sample set, and use the calculation result as the distribution offset. Compare the calculated distribution offset with a preset offset threshold to determine whether the distribution offset is greater than the preset offset threshold.

[0173] For example, the original training sample set contains 8000 sample data points, and its mean vector is... The covariance matrix is Initial screening of newly added sample sets Includes 5 representative samples to ,calculate to The mean value is obtained by taking the average of the eigenvectors. The Mahalanobis distance formula is used for calculation. and The Mahalanobis distance between them yields the distribution offset. The preset offset threshold is set to 2.5. Candidate sample screening module 13 compares... The result is 3.2, which is greater than the preset offset threshold of 2.5.

[0174] Finally, if the offset exceeds a preset threshold, the newly added sample set is retained as the sample set to be updated; if it is less than or equal to the preset offset threshold, the newly added sample set is discarded, and the incremental optimization process is terminated. The sample set to be updated refers to the set of new samples that, after confidence screening, clustering purification, and distribution conflict detection, are confirmed to have high learning value and exhibit significant distributional differences from the original training sample set, and can be used for incremental training. Discarding means removing the newly added sample set from the cache and ceasing further processing. Terminating the incremental optimization process means ending all subsequent operations of the currently triggered incremental optimization process and not performing incremental model updates.

[0175] Specifically, in response to the judgment result that the distribution offset is less than or equal to a preset offset threshold, the newly added sample set is deleted from the cache, all intermediate data involved in this incremental optimization process is cleared, the newly added sample set is not retained as the sample set to be updated, and the incremental optimization process ends. In response to the judgment result that the distribution offset is greater than the preset offset threshold, the newly added sample set is marked as the sample set to be updated, and the sample set to be updated is stored in the cache to be updated, waiting for subsequent modules to read and call it.

[0176] For example, distribution offset If the offset exceeds the preset threshold of 2.5, the candidate sample screening module 13 will initially screen the newly added sample set. Marked as sample set to be updated and will Store in the cache to be updated. In another scenario, initially screen newly added sample sets. mean vector The mean vector of the original training sample set Mahalanobis distance between The preset offset threshold is 2.5. If 1.8 is less than or equal to 2.5, then... Remove it from the cache and do not retain it as a sample set to be updated, thus terminating this incremental optimization process.

[0177] In this embodiment of the invention, incremental optimization is triggered in batches after candidate abnormal samples have accumulated to a preset threshold, avoiding the computational overhead caused by frequent updates. False alarm samples with low anomaly confidence are eliminated through confidence screening, reducing noise interference in the incremental training data. Clustering purification selects the sample closest to the cluster center from each cluster as the representative sample, maximizing feature diversity with a limited number of samples. Detection of conflicts between old and new data distributions ensures that the sample set to be updated is retained only when the distribution offset exceeds a preset offset threshold, guaranteeing that model updates are triggered only when the operating conditions of the distribution network change significantly, thus improving the execution efficiency of the incremental optimization process.

[0178] The incremental model update module 14 is used to combine the sample set to be updated with the historical replay sample set to construct an incremental training dataset. It uses the current model parameters as the initial values ​​and combines them with knowledge distillation loss for fine-tuning training. After the fine-tuning training is completed, the performance is verified. After the verification is successful, the updated model parameters are saved.

[0179] In this embodiment of the invention, the number of samples in the sample set to be updated is limited. If only the sample set to be updated is used for training, the model will overfit on the limited number of new samples, resulting in insufficient generalization ability on new data distributions. If the sample set to be updated is merged with the original training sample set and then retrained, it requires a large amount of computing resources and training time, which cannot meet the needs of rapid model updates in real-time detection scenarios. If the model is directly fine-tuned and trained with the sample set to be updated without constraints, the model will gradually forget the old knowledge learned in the original training sample set during the process of adapting to the new data distribution, resulting in a decrease in the model's detection performance on the old data distribution. For the above reasons, it is necessary to merge the sample set to be updated with the historical replay sample set to construct an incremental training dataset, use the current model parameters as the initial values ​​and combine them with knowledge distillation loss for fine-tuning training, perform performance verification after fine-tuning training, and save the updated model parameters after successful verification.

[0180] In one embodiment, the model incremental update module 14 is further configured to:

[0181] This involves combining the sample set to be updated with the historical replay sample set to construct an incremental training dataset, using the current model parameters as initial values ​​and incorporating knowledge distillation loss for fine-tuning training, including:

[0182] Obtain the current model parameters of the power distribution equipment fault detection model;

[0183] Extract original samples of the same size as the sample set to be updated from the original training sample set and use them as the historical playback sample set.

[0184] Merge the set of samples to be updated and the set of historical replay samples to construct an incremental training dataset;

[0185] The incremental training dataset is divided into an incremental training subset and an incremental validation subset;

[0186] The power distribution equipment fault detection model is fine-tuned using an incremental training subset. During the fine-tuning process, the current model parameters are used as initial parameters, and the parameter update direction is constrained by knowledge distillation loss to obtain the model to be verified.

[0187] First, obtain the current model parameters of the power distribution equipment fault detection model. The current model parameters refer to the set of all learnable parameters used by the power distribution equipment fault detection model at the current moment. The current model parameters include the weight matrices and bias vectors of each layer in the model. The current model parameters determine the model's feature extraction method and decision boundaries for the input data. Fine-tuning training begins with the current model parameters as initial values, rather than randomly initializing the parameters from scratch.

[0188] Specifically, the current model parameter file of the power distribution equipment fault detection model is read from the model parameter storage area, and the read parameter values ​​are loaded into the model to be trained as the initial parameters for fine-tuning training. For example, the candidate sample screening module 13 outputs the sample set to be updated. Read all model parameters of the current power distribution equipment fault detection model from the model parameter storage area, including the parameters of the location encoding layer, the weight matrices and bias vectors of each attention layer in the dual attention module, the weight parameters of each convolution kernel in the multi-scale convolution module, and the weight matrices and bias vectors of the fully connected layers. Load all the above parameters into a new model with the exact same structure as the current model as the initial parameters for fine-tuning training.

[0189] Secondly, a set of original samples of the same size as the sample set to be updated is extracted from the original training sample set and used as the history replay sample set. The history replay sample set is a collection of samples extracted from the original training sample set for replaying old knowledge during incremental training. The size of the history replay sample set is the same as the size of the sample set to be updated to ensure a balance between the number of new and old samples in the incremental training dataset. The history replay sample set is used to maintain the model's ability to discriminate the distribution of old data during fine-tuning training, preventing the model from forgetting old knowledge when learning new knowledge.

[0190] Specifically, the number of samples in the sample set to be updated is obtained by uniformly random sampling from the original training sample set, and the same number of original samples as the sample set to be updated are drawn. These drawn original samples constitute the historical playback sample set. For example, the sample set to be updated... The dataset contains 5 samples, and the size of the sample set to be updated is determined to be 5. Five original samples are randomly selected from the original training sample set using a uniform random sampling method, denoted as . , , , , These 5 original samples constitute the historical playback sample set. .

[0191] Next, the sample set to be updated and the historical replay sample set are merged to construct the incremental training dataset. The incremental training dataset refers to the complete dataset used for fine-tuning training, which is formed by merging the sample set to be updated and the historical replay sample set. The incremental training dataset contains samples from both the new and old data distributions, allowing the model to learn new distribution features and consolidate old distribution features simultaneously during the fine-tuning training process.

[0192] For example, the sample set to be updated Contains 5 samples, historical playback sample set It contains 5 samples. and Merge to obtain the incremental training dataset It contains a total of 10 samples.

[0193] Furthermore, the incremental training dataset is divided into an incremental training subset and an incremental validation subset. The incremental training subset refers to the sample data used to update model parameters during fine-tuning training. The incremental validation subset refers to the sample data used to verify model performance after fine-tuning training. The incremental training subset and the incremental validation subset do not overlap. The incremental training dataset is divided into these two subsets according to a preset ratio. The proportion of the incremental training subset to the total incremental training dataset is greater than the proportion of the incremental validation subset to the total incremental training dataset. For example, the incremental training dataset... It contains 10 samples. They will be distributed in an 8:2 ratio. The dataset is divided into an incremental training subset and an incremental validation subset. The incremental training subset contains 8 samples, and the incremental validation subset contains 2 samples.

[0194] Finally, the power distribution equipment fault detection model was fine-tuned using an incremental training subset. During fine-tuning, the current model parameters were used as initial parameters, and the parameter update direction was constrained by knowledge distillation loss to obtain the model to be validated. Fine-tuning training refers to a training method that uses a small amount of new data to make minor adjustments to the model parameters based on a pre-trained model. Compared to training from scratch, fine-tuning training requires less data and fewer training epochs to update the model parameters. Knowledge distillation loss is a training constraint method that uses the current model as the teacher model and the model to be trained as the student model, calculating the difference between the output of the teacher model and the output of the student model as the loss function value. This difference is calculated using the KL divergence formula. The model to be validated refers to the model obtained after fine-tuning training, which is then used for performance verification.

[0195] The principle behind the knowledge distillation loss constraint on the parameter update direction is as follows: During fine-tuning training, for the same input sample, the current model and the model to be trained output their respective predicted probability distributions. The knowledge distillation loss minimizes the difference between the two probability distributions, so that the parameter update direction of the model to be trained is constrained by the output distribution of the current model, thereby preventing the model to be trained from deviating too far from the old knowledge distribution represented by the current model during the update process.

[0196] Specifically, using the model loaded with the current model parameters as the initial model, fine-tuning training is performed on the initial model using sample data from the incremental training subset. In each round of parameter updates during fine-tuning, the total loss function is calculated, which consists of two parts: classification loss and knowledge distillation loss. The classification loss is calculated based on the prediction confidence of the model outputs from the labeled samples in the incremental training subset. The knowledge distillation loss is calculated based on the KL divergence between the output probability distribution of the current model for samples in the incremental training subset and the output probability distribution of the model to be trained for the same batch of samples. The classification loss and knowledge distillation loss are weighted and summed to obtain the total loss function. The gradient of the model parameters is calculated based on the total loss function value, and the model parameters are updated along the gradient descent direction. Fine-tuning training continues for a preset number of training rounds before stopping, resulting in the model to be validated.

[0197] For example, using the model loaded with the current model parameters as the initial model, fine-tuning training is performed using 8 samples from the incremental training subset. The fine-tuning training is set to 10 epochs. In each epoch of parameter updates, for each sample in the incremental training subset, the model outputs a prediction confidence score, and the classification loss is calculated based on the prediction confidence score and the labeled value. Simultaneously, each sample from the incremental training subset is input into the current model (i.e., the model before the update) to obtain the output probability distribution of the current model; the same sample is input into the model to be trained to obtain the output probability distribution of the model to be trained; the KL divergence between the two probability distributions is calculated as the knowledge distillation loss. The classification loss and the knowledge distillation loss are weighted and summed to obtain the total loss. The gradient is calculated based on the total loss, and the model parameters are updated. After 10 epochs of fine-tuning training, the model to be validated is obtained. .

[0198] After fine-tuning the training, performance verification is performed. Once verification is successful, the updated model parameters are saved, including:

[0199] Input the incremental validation subset into the model to be validated, and calculate the first evaluation metric of the model to be validated on the incremental validation subset.

[0200] Input a portion of the original training sample set into the model to be validated, and calculate the second evaluation metric of the model to be validated on the original training sample set.

[0201] Determine whether the first evaluation indicator is greater than the first indicator threshold and whether the second evaluation indicator is greater than the second indicator threshold;

[0202] If the first evaluation index is greater than the first index threshold and the second evaluation index is greater than the second index threshold, then the parameters of the model to be verified will be saved as the updated power distribution equipment fault detection model parameters.

[0203] If the first evaluation index is less than or equal to the first index threshold or the second evaluation index is less than or equal to the second index threshold, then the model to be validated is discarded and the current model parameters are retained.

[0204] First, the incremental validation subset is input into the model to be validated, and the first evaluation metric of the model on the incremental validation subset is calculated. The first evaluation metric is the performance measure of the model on the incremental validation subset. The first evaluation metric is classification accuracy, which is the proportion of samples correctly predicted by the model on the incremental validation subset out of the total number of samples in the incremental validation subset.

[0205] Specifically, each sample data point in the incremental validation subset is input into the model to be validated, and the model outputs the prediction confidence score for each sample data point. The prediction confidence score is compared with a dynamic decision threshold; predictions with a confidence score greater than or equal to the dynamic decision threshold are considered anomalous, while predictions with a confidence score less than the dynamic decision threshold are considered normal. The prediction result for each sample is compared with its labeled value, and the number of correctly predicted samples is counted. The number of correctly predicted samples is divided by the total number of samples in the incremental validation subset to obtain the first evaluation metric.

[0206] For example, the incremental validation subset contains two samples. These two samples are then input into the model to be validated. The model outputs the prediction confidence scores for two samples. A dynamic judgment threshold of 0.57 is set; predictions with a confidence score greater than or equal to 0.57 are considered abnormal, while those less than 0.57 are considered normal. The prediction results are compared with the labeled values, and the number of correctly predicted samples is found to be 2. The first evaluation metric = 2 / 2 = 1.0, or 100%.

[0207] Secondly, a portion of the original training sample set is input into the model to be validated, and a second evaluation metric is calculated for the model on the original training sample set. The second evaluation metric is the performance measure of the model on a portion of the original training sample set. The second evaluation metric is classification accuracy, which is the proportion of correctly predicted samples by the model on a portion of the original training sample set out to the total number of samples in that portion.

[0208] Specifically, a predetermined proportion of samples are extracted from the original training sample set to serve as the old data validation sample set. Each sample in the old data validation sample set is input into the model to be validated, and the model outputs the prediction confidence score for each sample. The prediction confidence score is compared with a dynamic decision threshold, and the number of correctly predicted samples is counted. The number of correctly predicted samples is divided by the total number of samples in the old data validation sample set to obtain the second evaluation metric.

[0209] For example, the original training sample set contains 8000 sample data points, with a preset proportion of 10%. 800 samples are extracted from the original training sample set as the old data validation sample set. These 800 samples are then input into the model to be validated. The model outputs 800 prediction confidence scores. A dynamic decision threshold of 0.57 is set, and the prediction result for each sample is compared with the labeled value. The number of correctly predicted samples is 760. The second evaluation metric is 760 / 800 = 0.95, or 95%.

[0210] Next, determine whether the first evaluation metric is greater than the first metric threshold and whether the second evaluation metric is greater than the second metric threshold. The first metric threshold is a pre-set minimum accuracy standard used to determine whether the model to be validated meets the performance requirements on the new data distribution. The second metric threshold is a pre-set minimum accuracy standard used to determine whether the model to be validated maintains its performance level on the old data distribution.

[0211] The first threshold is set based on the minimum accuracy requirement for identifying new samples in the application scenario of power distribution network fault detection. It is a high-order value within a preset probability range, with the specific value determined by the tolerance for false negatives; the lower the tolerance, the higher the threshold. The second threshold is set based on the maximum tolerance for model performance degradation on older data distributions. It is calculated as the original accuracy of the current model on the validation set multiplied by a preset decay coefficient. The specific value is determined by the tolerance for forgetting phenomena; the lower the tolerance, the closer the decay coefficient is to 1.

[0212] Specifically, the first evaluation metric is compared with a first threshold, and the second evaluation metric is compared with a second threshold. If both the first and second evaluation metric are greater than the first threshold, the verification is considered successful. Otherwise, the verification is considered unsuccessful. For example, let's set the first threshold to 0.90 and the second threshold to 0.93. If the first evaluation metric is 1.0, which is greater than the first threshold of 0.90, and the second evaluation metric is 0.95, which is greater than the second threshold of 0.93, then both conditions are met, and the verification is considered successful.

[0213] Finally, if the first evaluation index is greater than the first index threshold and the second evaluation index is greater than the second index threshold, the parameters of the model to be verified are saved as the updated parameters of the power distribution equipment fault detection model; if the first evaluation index is less than or equal to the first index threshold or the second evaluation index is less than or equal to the second index threshold, the model to be verified is discarded and the current model parameters are retained.

[0214] Specifically, for a successful verification result, all parameters of the model to be verified are written to the model parameter storage area, replacing the original current model parameters, and used as the updated power distribution equipment fault detection model parameters. For a failed verification result, all parameters of the model to be verified are deleted, and the parameters of the model to be verified are not written to the model parameter storage area; the original current model parameters are retained unchanged in the model parameter storage area.

[0215] For example, after successful verification, the model to be verified is... All parameters are saved to the model parameter storage area, replacing the original current model parameters. Subsequent data sequences to be detected will use the updated model to output anomaly confidence. In another scenario, the first evaluation metric is 0.95, which is greater than the first metric threshold of 0.90; the second evaluation metric is 0.88, which is less than the second metric threshold of 0.93. Since the second evaluation metric is less than or equal to the second metric threshold, the validation fails, and the model to be validated is deleted. All parameters are not saved to the model parameter storage area; the current detection model maintains its original parameters unchanged.

[0216] In this embodiment of the invention, fine-tuning training with the current model parameters as initial values ​​constrains the parameter update magnitude, avoiding overfitting due to insufficient training data. By extracting historical replay samples from the original training sample set and combining them with the set to be updated to construct an incremental training dataset, both the old and new data distributions participate in parameter updates during fine-tuning training, effectively mitigating the catastrophic forgetting problem. Knowledge distillation loss constrains the parameter update direction, limiting the deviation of the model from the old data distribution during parameter updates, further ensuring the preservation of old knowledge. By calculating the first evaluation metric of the model to be validated on the incremental validation subset and the second evaluation metric on the original training sample set, and determining whether both metrics are greater than their respective thresholds, the model's retention decision simultaneously considers the performance improvement requirements on the new data distribution and the performance preservation requirements on the old data distribution, ensuring the reliability of model updates.

[0217] Through the specific implementation methods described above, the embodiments of the present invention achieve the following technical effects:

[0218] This invention provides a fault detection system for power distribution control equipment based on big data analysis. By acquiring multi-phase voltage and current time-series data of the power distribution network feeders to which the power distribution control equipment is connected, standardized data input is provided for subsequent detection. A pre-trained fault detection model is used to extract multi-scale features from the time-series data and output anomaly confidence scores. Adaptive judgment is then performed using a dynamic threshold, which is automatically adjusted based on the statistical distribution of recent normal confidence scores to adapt to changes in power distribution network operating conditions. Anomaly samples are filtered by confidence score and clustered for purification, eliminating false alarm samples and extracting high-value representative samples. Model updates are triggered only when the sample distribution deviates significantly from the original training set, avoiding computational overhead from invalid updates. Fine-tuning training is performed through historical playback and knowledge distillation constraints, and dual performance verification is conducted on incremental and original data. Model parameters are only saved after successful verification, ensuring that the model adapts to new operating conditions without forgetting old knowledge. This invention achieves continuous and stable evolution of the power distribution network fault detection model under dynamic operating conditions, effectively improving the fault detection accuracy of power distribution control equipment.

[0219] It should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A fault detection system for power distribution control equipment based on big data analysis, characterized in that, include: The real-time data acquisition module is used to acquire multi-phase voltage time-series data and multi-phase current time-series data of the power distribution network feeders connected to the power distribution control equipment in real time, and obtain the data sequence to be detected; An anomaly detection and judgment module is used to input the data sequence to be detected into a pre-trained power distribution equipment fault detection model, the power distribution equipment fault detection model outputs anomaly confidence, the anomaly confidence is compared with a dynamic judgment threshold, and anomaly detection result is output based on the comparison result; The candidate sample screening module is used to take the data sequence to be detected that has an abnormal detection result as a candidate new sample, perform confidence screening and cluster purification on the candidate new sample, calculate the distribution offset between the purified sample and the original training sample set, and retain the purified sample as the sample set to be updated only when the distribution offset is greater than a preset offset threshold. The model incremental update module is used to construct an incremental training dataset by combining the sample set to be updated with the historical replay sample set, fine-tuning the training with the current model parameters as the initial values ​​and combining them with knowledge distillation loss, and performing performance verification after the fine-tuning training is completed. After the verification is successful, the updated model parameters are saved.

2. The power distribution control equipment fault detection system based on big data analysis as described in claim 1, characterized in that, The real-time data acquisition module is also used for: Real-time acquisition of multi-phase voltage and multi-phase current time sequence data of the power distribution network feeders to which the power distribution control equipment is connected; Obtain the length of the preset time window and the sliding step size, wherein the sliding step size is less than the length of the preset time window; Starting from the initial moment, multiple data segments are sequentially extracted in chronological order, with the sliding step size as the moving interval. The data segments include the instantaneous voltage and instantaneous current values ​​within the preset time window. Each of the data segments is treated as a separate data sequence to be detected.

3. The power distribution control equipment fault detection system based on big data analysis as described in claim 1, characterized in that, The pre-training of the power distribution equipment fault detection model includes: Acquire sample data of the distribution network feeder during historical operating periods, including multi-phase voltage time-series sample data and multi-phase current time-series sample data; The sample data is labeled with fault types, including abnormal and normal. The labeled sample data is divided into a training set and a validation set; An initial power distribution equipment fault detection model is constructed, which includes a dual attention mechanism module and a multi-scale convolution module. The dual attention mechanism module includes a time-dimensional attention layer and a channel-dimensional attention layer. A batch of sample data is taken from the training set and input into the initial power distribution equipment fault detection model. After processing by the dual attention mechanism module and the multi-scale convolution module, the prediction confidence is output. Calculate the loss function value based on the labeled data of the batch sample data and the prediction confidence; calculate the gradient of the model parameters based on the loss function value, and update the model parameters along the gradient descent direction; Repeat the step of retrieving a batch of sample data from the training set until all sample data in the training set has been traversed. After completing one iteration, the current model is validated using the validation set, and the validation accuracy of the current model on the validation set is calculated. If the verification accuracy does not reach the preset accuracy threshold, then continue to execute the next round of traversal and parameter update; If the verification accuracy reaches the preset accuracy threshold, training is stopped, and a pre-trained power distribution equipment fault detection model is obtained.

4. The power distribution control equipment fault detection system based on big data analysis as described in claim 1, characterized in that, The anomaly detection and determination module is also used for: The data sequence to be detected is arranged in chronological order to form an input feature matrix; The input feature matrix is ​​position-encoded to generate an encoded feature matrix carrying temporal position information; The encoded feature matrix is ​​input into the time-dimensional attention layer and the channel-dimensional attention layer, respectively. In the time-dimensional attention layer, the first attention weight distribution of the encoded feature matrix at each time step in the time dimension is calculated, and the encoded feature matrix is ​​weighted and aggregated according to the first attention weight distribution to obtain the time-enhanced features; In the channel-dimensional attention layer, the second attention weight distribution of the encoded feature matrix among each feature channel is calculated, and the encoded feature matrix is ​​weighted and aggregated according to the second attention weight distribution to obtain the channel-enhanced features; The temporal enhancement feature and the channel enhancement feature are fused to obtain a dual enhancement feature; The dual-enhanced features are input into a multi-scale convolutional layer, which contains multiple convolutional kernels of different sizes to extract temporal features at different scales. By concatenating time-series features at multiple different scales, a multi-scale time-series feature vector is obtained. The multi-scale temporal feature vector is input into a fully connected layer for mapping to obtain a one-dimensional scalar value. The one-dimensional scalar value is mapped to a preset probability interval through an activation function, and the anomaly confidence level is output.

5. The power distribution control equipment fault detection system based on big data analysis as described in claim 1, characterized in that, The anomaly detection and determination module is also used for: Obtain the dynamic judgment threshold corresponding to the current moment; Compare the anomaly confidence level with the dynamic judgment threshold; If the anomaly confidence level is greater than or equal to the dynamic judgment threshold, the distribution network feeder is determined to be abnormal, an alarm signal is generated, and the alarm signal is sent to the distribution network monitoring terminal. If the anomaly confidence level is less than the dynamic judgment threshold, the distribution network feeder is determined to be normal, and the judgment result is recorded in the log file.

6. The power distribution control equipment fault detection system based on big data analysis as described in claim 5, characterized in that, Obtain the dynamic judgment threshold corresponding to the current moment, including: Acquire multiple sets of historical data sequences to be detected for distribution network feeders under normal operating conditions; The multiple sets of historical data sequences to be detected are respectively input into the power distribution equipment fault detection model to obtain the historical anomaly confidence level corresponding to each historical data sequence to be detected. Calculate the mean of the historical anomaly confidence scores; Calculate the standard deviation of the confidence level of the historical anomalies; The sum of the mean and the standard deviation by a preset multiple is used as the initial value of the dynamic judgment threshold; During real-time detection, the abnormal confidence scores corresponding to the data sequences to be detected that are judged to be normal within a preset time period are continuously collected to form a recent set of normal confidence scores. Calculate the recent mean and recent standard deviation of the recent normal confidence set; The dynamic judgment threshold is updated based on the recent mean and the recent standard deviation.

7. The power distribution control equipment fault detection system based on big data analysis as described in claim 1, characterized in that, The candidate sample screening module is also used for: The data sequence to be detected that is found to be abnormal is stored in the candidate abnormal sample cache area; When the number of samples in the candidate abnormal sample cache reaches a preset threshold, the incremental optimization process is triggered. All candidate anomaly samples are retrieved from the candidate anomaly sample buffer to form a candidate anomaly sample set; The candidate abnormal sample set is subjected to quality screening, and low-quality samples are removed to obtain the initial new sample set; The newly added sample set is subjected to new and old data distribution conflict detection to determine whether the distribution offset between the newly added sample set and the original training sample set is greater than a preset offset threshold. If the offset exceeds the preset threshold, the newly added sample set from the initial screening will be retained as the sample set to be updated. If the new sample set is less than or equal to the preset offset threshold, the initial screening of new samples is discarded, and the incremental optimization process is terminated.

8. The power distribution control equipment fault detection system based on big data analysis as described in claim 7, characterized in that, The candidate abnormal sample set is subjected to quality screening, and low-quality samples are removed to obtain a preliminary new sample set, including: Each candidate anomaly sample in the candidate anomaly sample set is input into the power distribution equipment fault detection model to obtain the anomaly confidence level corresponding to each candidate anomaly sample. Candidate anomaly samples with an anomaly confidence level lower than a preset confidence threshold are removed; Calculate the feature similarity among the remaining candidate anomaly samples; The remaining candidate anomaly samples are clustered based on the feature similarity to obtain multiple sample clusters; From each of the sample clusters, the candidate anomaly sample closest to the cluster center is selected as the representative sample; The representative samples mentioned above are used to form a preliminary new sample set.

9. The power distribution control equipment fault detection system based on big data analysis as described in claim 1, characterized in that, The model incremental update module is also used for: Obtain the current model parameters of the power distribution equipment fault detection model; Extract original samples of the same size as the sample set to be updated from the original training sample set, and use them as the historical playback sample set. The set of samples to be updated and the set of historical replay samples are merged to construct an incremental training dataset; The incremental training dataset is divided into an incremental training subset and an incremental validation subset; The power distribution equipment fault detection model is fine-tuned using the incremental training subset. During the fine-tuning process, the current model parameters are used as initial parameters, and the parameter update direction is constrained by knowledge distillation loss to obtain the model to be verified.

10. The power distribution control equipment fault detection system based on big data analysis as described in claim 9, characterized in that, The model incremental update module is also used for: Input the incremental validation subset into the model to be validated, and calculate the first evaluation index of the model to be validated on the incremental validation subset; Input a portion of the original training sample set into the model to be validated, and calculate the second evaluation index of the model to be validated on the original training sample set; Determine whether the first evaluation indicator is greater than the first indicator threshold and whether the second evaluation indicator is greater than the second indicator threshold; If the first evaluation index is greater than the first index threshold and the second evaluation index is greater than the second index threshold, then the parameters of the model to be verified are saved as the updated power distribution equipment fault detection model parameters. If the first evaluation index is less than or equal to the first index threshold or the second evaluation index is less than or equal to the second index threshold, then the model to be verified is discarded, and the current model parameters are retained.