An edge-computing-based power distribution cabinet fault diagnosis method and system

CN122983504APending Publication Date: 2026-10-27ZHONGSHAN MINGYE ELECTRIC APPLIANCES COMPLETE SET CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610888406.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-18
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

配电柜在长期运行过程中,因绝缘老化、接触不良、过载、短路等原因,可能发生单相接地、相间短路、三相短路等多种故障,若不能及时发现并准确定位故障,可能引发停电事故、设备损坏甚至火灾等严重后果

Benefits of technology

[0062]为解决背景技术所述问题,本发明通过构建轻量化故障选型模型及轻量化故障定位模型,本发明通过构建轻量化故障选型模型及轻量化故障定位模型,将原本需要部署于云端GPU服务器的大规模深度学习模型压缩为适合边缘计算设备运行的轻量级模型,降低了模型对计算资源的需求,获取待诊断配电柜,其中,待诊断配电柜包括:边缘网关、电压互感器及电流互感器,其中,边缘网关与电压互感器及电流互感器相连,本发明通过在待诊断配电柜中预先配置边缘网关、电压互感器及电流互感器,并将边缘网关与电压互感器及电流互感器电气连接,实现了配电柜电气量信号的本地采集与传输,为边缘计算提供了硬件基础,避免了对外部采集设备的依赖,降低了系统复杂度,接收配电柜故障诊断指令,根据配电柜故障诊断指令及边缘网关对轻量化故障选型模型及轻量化故障定位模型进行存储,得到已部署边缘网关,本发明通过将轻量化故障选型模型及轻量化故障定位模型预先存储于边缘网关中,使得故障诊断模型在配电柜本地即可完成加载和就绪,无需在诊断发生时再从云端下载模型,避免了网络延迟对诊断启动速度的影响,同时保证了模型在断网环境下仍可正常使用,利用已部署边缘网关对待诊断配电柜进行电压采集,得到相电压集,根据相电压集对待诊断配电柜进行故障诊断操作,得到诊断置信度、初步故障选型结果及初步故障定位结果,本发明通过利用已部署边缘网关对待诊断配电柜进行本地电压采集和故障诊断操作,实现了故障诊断的全过程在配电柜侧完成,无需将原始电压数据传输至云端,降低了网络带宽占用,同时避免了数据传输延迟,使得诊断结果可在毫秒级内获得,满足故障保护的实时性要求,若初步故障选型结果为预设的非正常选型状态,且初步故障定位结果为预设的非正常定位状态,则将所述待诊断配电柜作为真实故障配电柜,本发明通过将故障选型结果和故障定位结果进行双重判定,只有当两个独立训练的模型均输出非正常状态时才确认为真实故障配电柜,有效避免了单一模型误判导致的虚假报警,提高了故障诊断的可信度和准确性,基于真实故障配电柜、故障选型结果及初步故障定位结果生成故障诊断报告,其中,故障诊断报告包括:故障类型、故障位置、故障触发时刻及诊断置信度,本发明通过生成包含故障类型、故障位置、故障触发时刻及诊断置信度的故障诊断报告,为运维人员提供了全面、结构化的故障信息,便于快速定位故障原因和故障位置,缩短了故障排查和恢复时间,提高了配电系统的运维效率,将故障诊断报告上传至预构建的云端监控平台,得到已存储故障诊断报告。因此,本发明可实现低延迟、低带宽依赖和高精度的实时故障诊断。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122983504A_ABST
    Figure CN122983504A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of power distribution cabinet fault diagnosis, and relates to a power distribution cabinet fault diagnosis method and system based on edge computing, which comprises the following steps: constructing a light-weight fault type selection model and a light-weight fault positioning model, obtaining a power distribution cabinet to be diagnosed, storing the light-weight fault type selection model and the light-weight fault positioning model, obtaining a deployed edge gateway, collecting voltage of the power distribution cabinet to be diagnosed to obtain a phase voltage set, performing fault diagnosis operation on the power distribution cabinet to be diagnosed to obtain diagnosis confidence, a preliminary fault type selection result and a preliminary fault positioning result, if the preliminary fault type selection result is an abnormal type selection state and the preliminary fault positioning result is an abnormal positioning state, generating a fault diagnosis report, uploading the fault diagnosis report to a cloud monitoring platform to obtain a stored fault diagnosis report. The application can realize low-delay, low-bandwidth dependence and high-precision real-time fault diagnosis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power distribution cabinet fault diagnosis technology, and in particular to a power distribution cabinet fault diagnosis method and system based on edge computing. Background Technology

[0002] As a key power distribution device directly facing the user side in the power system, the operational reliability of the distribution cabinet directly affects the power supply safety. During long-term operation, due to reasons such as insulation aging, poor contact, overload, and short circuit, the distribution cabinet may experience various faults such as single-phase grounding, phase-to-phase short circuit, and three-phase short circuit. If the fault is not detected and accurately located in time, it may lead to serious consequences such as power outages, equipment damage, or even fires.

[0003] Currently, fault diagnosis of power distribution cabinets mainly relies on two technical solutions: one is the infrared thermal imaging-based diagnostic method, which identifies overheating faults by analyzing infrared images of the distribution cabinet. However, this method has high hardware costs and computationally intensive image processing algorithms, making it difficult to run in real time on low-cost embedded devices. The other is a centralized diagnostic method based on electrical quantity analysis, which uploads the voltage and current signals of the distribution cabinet to a cloud server for analysis and diagnosis. However, this method suffers from poor real-time performance, reliance on stable network communication, and high bandwidth consumption, making it difficult to meet the millisecond-level response requirements of fault protection in scenarios with poor network conditions or at the end of the power distribution network. In recent years, deep learning technology has made significant progress in the field of power equipment fault diagnosis. However, existing models have a large number of parameters and require high inference computing resources, typically needing to be deployed on cloud GPU servers, making it difficult to directly apply to embedded edge devices on the distribution cabinet side.

[0004] Therefore, how to achieve low latency, low bandwidth dependence, and high accuracy in real-time fault diagnosis is an urgent technical problem to be solved. Summary of the Invention

[0005] This invention provides a method for fault diagnosis of power distribution cabinets based on edge computing and a computer-readable storage medium. Its main purpose is to achieve real-time fault diagnosis with low latency, low bandwidth dependence and high accuracy.

[0006] To achieve the above objectives, the present invention provides a fault diagnosis method for power distribution cabinets based on edge computing, comprising:

[0007] Construct a lightweight fault selection model and a lightweight fault location model;

[0008] Obtain the power distribution cabinet to be diagnosed, which includes: an edge gateway, a voltage transformer, and a current transformer, wherein the edge gateway is connected to the voltage transformer and the current transformer;

[0009] Receive the power distribution cabinet fault diagnosis command, and store the lightweight fault selection model and lightweight fault location model according to the power distribution cabinet fault diagnosis command and the edge gateway to obtain the deployed edge gateway.

[0010] The deployed edge gateway is used to collect voltage data from the power distribution cabinet under diagnosis to obtain the phase voltage set. Based on the phase voltage set, the fault diagnosis operation is performed on the power distribution cabinet under diagnosis to obtain the diagnosis confidence, preliminary fault selection results and preliminary fault location results.

[0011] If the preliminary fault selection result is a preset abnormal selection state, and the preliminary fault location result is a preset abnormal location state, then the power distribution cabinet to be diagnosed is regarded as the actual faulty power distribution cabinet.

[0012] A fault diagnosis report is generated based on the actual faulty power distribution cabinet, fault selection results, and preliminary fault location results. The fault diagnosis report includes: fault type, fault location, fault trigger time, and diagnosis confidence level.

[0013] The fault diagnosis report is uploaded to the pre-built cloud monitoring platform to obtain the stored fault diagnosis report.

[0014] Optionally, the construction of the lightweight fault selection model and the lightweight fault location model includes:

[0015] Multiple faulty distribution cabinets were identified. For each of these faulty distribution cabinets, the following operations were performed:

[0016] Based on the faulty power distribution cabinet, a standard training sample set is obtained, and the standard training sample sets are summarized to obtain multiple standard training sample sets.

[0017] A lightweight temporal convolutional residual network model was constructed, and the model was trained using multiple standard training sample sets to obtain a fault selection sub-model and a fault location sub-model.

[0018] The fault selection sub-model and the fault location sub-model are quantized and compressed respectively to obtain a lightweight fault selection model and a lightweight fault location model.

[0019] Optionally, obtaining the standard training sample set based on the faulty distribution cabinet includes:

[0020] Data is collected from the faulty distribution cabinet to obtain a training sample set, which includes multiple training samples, including: a set of instantaneous voltage values ​​and a set of instantaneous current values.

[0021] The training sample set is sorted in chronological order to obtain the training sample sequence. A training sample matrix is ​​constructed based on the training sample sequence. The training sample matrix includes multiple column vectors and multiple row vectors, and the column vectors correspond one-to-one with the training samples. The row vectors include multiple sample values.

[0022] Normalize the training samples in the training sample matrix to obtain the normalized sample matrix;

[0023] Each normalized sample in the normalized sample matrix is ​​labeled to obtain the standard training sample set.

[0024] Optionally, the step of normalizing the training samples in the training sample matrix to obtain a normalized sample matrix includes:

[0025] Perform the following operation on each row vector in the training sample matrix:

[0026] Extract the maximum and minimum sample values ​​from the row vectors, extract sample values ​​sequentially from the row vectors, and normalize the extracted sample values ​​using the maximum and minimum sample values ​​to obtain normalized sample values.

[0027] The normalized sample values ​​are aggregated to obtain a normalized sample value set. The normalized sample value sets are then aggregated to obtain multiple normalized sample value sets. Based on the training sample matrix, a matrix is ​​constructed from the multiple normalized sample value sets to obtain a normalized sample matrix.

[0028] Optionally, the construction of the lightweight temporal convolutional residual network model includes:

[0029] Set the input layer shape parameters, which include: batch quantity, input channel value, and time step.

[0030] An input layer is constructed based on the shape parameters of the input layer, and a temporal convolutional layer is constructed based on the input layer. The temporal convolutional layer, the pre-constructed batch normalization layer, and the pre-constructed ReLU activation function layer are connected to obtain the connected module layer.

[0031] Obtain the residual module, global average pooling layer, and output layer. Connect the connected module layer, residual module, global average pooling layer, and output layer to obtain a lightweight temporal convolutional residual network model.

[0032] Optionally, the step of performing fault diagnosis on the distribution cabinet to be diagnosed based on the phase voltage set to obtain diagnostic confidence, preliminary fault selection results, and preliminary fault location results includes:

[0033] Based on the historical phase voltage set obtained from the distribution cabinet to be diagnosed, the phase voltages are extracted sequentially from the phase voltage set, and the target historical phase voltage is identified from the historical phase voltage set based on the extracted phase voltages.

[0034] The absolute value of the difference between the extracted phase voltage and the target historical phase voltage is calculated to obtain the phase voltage mutation amount. The phase voltage mutation amounts are then summarized to obtain the phase voltage mutation amount set.

[0035] The voltage fluctuation threshold is obtained by multiplying the preset reliability coefficient and the preset maximum voltage fluctuation.

[0036] If there is a phase voltage change greater than the voltage change threshold in the phase voltage change set, the fault triggering time is determined based on the phase voltage change set, and the pre-fault acquisition period and post-fault acquisition period are calculated based on the fault triggering time.

[0037] Based on the data collection periods before and after the fault, a fault sample set is extracted from the deployed edge gateways, and the maximum fault selection probability value and the maximum fault location probability value are obtained based on the fault sample set.

[0038] The fault selection index value and the fault location index value are determined based on the maximum fault selection probability value and the maximum fault location probability value;

[0039] Minimize the maximum fault selection probability value and the maximum fault location probability value to obtain the diagnostic confidence level.

[0040] The preliminary fault selection result and preliminary fault location result are determined based on the fault selection index value and the fault location index value.

[0041] Optionally, the calculation of the pre-fault data collection period and the post-fault data collection period based on the fault trigger time includes:

[0042] The number of samples before the fault, the number of samples after the fault, and the sampling interval are obtained. The sampling duration before the fault is calculated by multiplying the number of samples before the fault and the sampling interval.

[0043] The start time of pre-fault data collection is calculated based on the fault trigger time and the pre-fault sampling duration, and the end time of pre-fault data collection is obtained based on the fault trigger time and the sampling interval.

[0044] The pre-fault data acquisition period is constructed based on the start and end times of pre-fault data acquisition.

[0045] The time when data collection ends after a fault is calculated based on the number of samples collected after the fault, and the time period for data collection after a fault is constructed based on the time when the fault is triggered and the time when data collection ends after the fault.

[0046] Optionally, the formula for calculating the end time of data acquisition after the fault is as follows:

[0047] ;

[0048] in, Indicates the time when data acquisition ended after the fault. Indicates the time when the fault was triggered. Indicates the number of samples taken after the fault. Indicates the sampling interval.

[0049] Optionally, obtaining the maximum fault selection probability value and the maximum fault location probability value based on the fault sample set includes:

[0050] Construct a normalized fault sample matrix based on the fault sample set;

[0051] The normalized fault sample matrix is ​​input into the lightweight fault selection model and the lightweight fault location model respectively to obtain the fault selection vector and the fault location vector. The fault selection vector includes multiple fault selection probability values, and the fault location vector includes multiple fault location probability values.

[0052] The maximum value extraction operation is performed on the fault selection vector and the fault location vector respectively to obtain the maximum fault selection probability value and the maximum fault location probability value.

[0053] To achieve the above objectives, the present invention also provides a power distribution cabinet fault diagnosis system based on edge computing, comprising:

[0054] The diagnostic model building module is used to build lightweight fault selection models and lightweight fault location models.

[0055] The edge gateway deployment module is used to obtain the power distribution cabinet to be diagnosed, which includes: edge gateway, voltage transformer and current transformer. The edge gateway is connected to the voltage transformer and current transformer, receives the power distribution cabinet fault diagnosis command, and stores the lightweight fault selection model and lightweight fault location model according to the power distribution cabinet fault diagnosis command and the edge gateway to obtain the deployed edge gateway.

[0056] The fault diagnosis execution module is used to collect voltage data from the distribution cabinet to be diagnosed using the deployed edge gateway, obtain the phase voltage set, perform fault diagnosis operation on the distribution cabinet to be diagnosed based on the phase voltage set, and obtain the diagnosis confidence, preliminary fault selection result and preliminary fault location result. If the preliminary fault selection result is a preset abnormal selection state and the preliminary fault location result is a preset abnormal location state, then the distribution cabinet to be diagnosed is regarded as the actual faulty distribution cabinet.

[0057] The fault diagnosis report production module is used to generate a fault diagnosis report based on the actual faulty power distribution cabinet, fault selection results, and preliminary fault location results. The fault diagnosis report includes: fault type, fault location, fault trigger time, and diagnosis confidence level. The fault diagnosis report is uploaded to the pre-built cloud monitoring platform to obtain the stored fault diagnosis report.

[0058] To address the above problems, the present invention also provides an electronic device, the electronic device comprising:

[0059] Memory, storing at least one instruction;

[0060] The processor executes the instructions stored in the memory to implement the above-described edge computing-based power distribution cabinet fault diagnosis method.

[0061] To address the aforementioned problems, the present invention also provides a computer-readable storage medium storing at least one instruction, which is executed by a processor in an electronic device to implement the aforementioned edge computing-based power distribution cabinet fault diagnosis method.

[0062] To address the problems described in the background art, this invention constructs a lightweight fault selection model and a lightweight fault location model. By constructing these lightweight fault selection and location models, the invention compresses the large-scale deep learning models that originally required deployment on cloud GPU servers into lightweight models suitable for edge computing devices, reducing the model's computational resource requirements. The invention also acquires the power distribution cabinet to be diagnosed, which includes an edge gateway, voltage transformers, and current transformers. The edge gateway is connected to the voltage transformers and current transformers. This invention achieves power distribution cabinet diagnostics by pre-configuring the edge gateway, voltage transformers, and current transformers in the power distribution cabinet and electrically connecting the edge gateway to the voltage transformers and current transformers. Local acquisition and transmission of electrical signals from the distribution cabinet provides the hardware foundation for edge computing, avoiding dependence on external acquisition devices and reducing system complexity. It receives fault diagnosis commands from the distribution cabinet and stores lightweight fault selection and location models based on these commands and the edge gateway, thus obtaining the deployed edge gateway. This invention, by pre-storing the lightweight fault selection and location models in the edge gateway, allows the fault diagnosis model to be loaded and ready locally in the distribution cabinet, eliminating the need to download the model from the cloud when a diagnosis occurs. This avoids the impact of network latency on the diagnosis startup speed and ensures that the model can still be used normally in a network-off environment. The deployed edge gateway is then used to process the distribution cabinet to be diagnosed. Voltage acquisition is performed to obtain a phase voltage set. Based on this phase voltage set, fault diagnosis is conducted on the distribution cabinet to be diagnosed, yielding diagnostic confidence, preliminary fault selection results, and preliminary fault location results. This invention utilizes a deployed edge gateway to perform local voltage acquisition and fault diagnosis on the distribution cabinet to be diagnosed, enabling the entire fault diagnosis process to be completed at the distribution cabinet side. This eliminates the need to transmit raw voltage data to the cloud, reducing network bandwidth consumption and avoiding data transmission delays. Diagnostic results can be obtained within milliseconds, meeting the real-time requirements of fault protection. If the preliminary fault selection result is a preset abnormal selection state, and the preliminary fault location result is a preset abnormal location state, then the distribution cabinet to be diagnosed is considered the actual faulty distribution cabinet. By dual-judging the fault selection results and fault location results, a faulty distribution cabinet is only confirmed as truly faulty when both independently trained models output abnormal states. This effectively avoids false alarms caused by misjudgment from a single model, improving the reliability and accuracy of fault diagnosis. A fault diagnosis report is generated based on the actual faulty distribution cabinet, fault selection results, and preliminary fault location results. This report includes: fault type, fault location, fault trigger time, and diagnostic confidence level. By generating a fault diagnosis report containing fault type, fault location, fault trigger time, and diagnostic confidence level, this invention provides maintenance personnel with comprehensive and structured fault information, facilitating rapid location of fault causes and locations, and shortening fault investigation and recovery time.This invention improves the operation and maintenance efficiency of power distribution systems by uploading fault diagnosis reports to a pre-built cloud monitoring platform, thus obtaining stored fault diagnosis reports. Therefore, this invention enables low-latency, low-bandwidth-dependency, and high-precision real-time fault diagnosis. Attached Figure Description

[0063] Figure 1 This is a flowchart illustrating a fault diagnosis method for power distribution cabinets based on edge computing, provided in an embodiment of the present invention.

[0064] Figure 2 A functional block diagram of a power distribution cabinet fault diagnosis system based on edge computing provided in an embodiment of the present invention;

[0065] Figure 3 This is a schematic diagram of the structure of an electronic device that implements the edge computing-based power distribution cabinet fault diagnosis method according to an embodiment of the present invention.

[0066] Explanation of reference numerals in the attached figures:

[0067] 10. Electronic device; 11. Processor; 12. Memory; 13. Bus.

[0068] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0069] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0070] This application provides a fault diagnosis method for power distribution cabinets based on edge computing. The executing entity of the edge computing-based power distribution cabinet fault diagnosis method includes, but is not limited to, at least one of the following electronic devices that can be configured to execute the method provided in this application: a server, a terminal, etc. In other words, the edge computing-based power distribution cabinet fault diagnosis method can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes, but is not limited to, a single server, a server cluster, a cloud server, or a cloud server cluster.

[0071] Reference Figure 1 The diagram shown is a flowchart illustrating a power distribution cabinet fault diagnosis method based on edge computing according to an embodiment of the present invention. In this embodiment, the power distribution cabinet fault diagnosis method based on edge computing includes:

[0072] S1. Construct a lightweight fault selection model and a lightweight fault location model.

[0073] In detail, the construction of the lightweight fault selection model and the lightweight fault location model includes:

[0074] Multiple faulty distribution cabinets were identified. For each of these faulty distribution cabinets, the following operations were performed:

[0075] Based on the faulty power distribution cabinet, a standard training sample set is obtained, and the standard training sample sets are summarized to obtain multiple standard training sample sets.

[0076] A lightweight temporal convolutional residual network model was constructed, and the model was trained using multiple standard training sample sets to obtain a fault selection sub-model and a fault location sub-model.

[0077] The fault selection sub-model and the fault location sub-model are quantized and compressed respectively to obtain a lightweight fault selection model and a lightweight fault location model.

[0078] It is understandable that the faulty distribution cabinet is a distribution cabinet that has been known to have experienced a known type of fault and is used to collect standard training samples. The detailed steps of obtaining the standard training sample set based on the faulty distribution cabinet and constructing the lightweight temporal convolutional residual network model will be given later and will not be repeated here. The steps of quantizing and compressing the fault selection sub-model and the fault location sub-model to obtain the lightweight fault selection model and the lightweight fault location model are as follows: Load the trained fault selection sub-model and the fault location sub-model. The parameters of both models are in 32-bit floating-point format. Compress the 32-bit floating-point parameters into 8-bit integer format. Select 500 samples from the standard training sample set as a calibration dataset. Input the calibration dataset into the floating-point model (i.e., the fault selection sub-model or the fault location sub-model). Statistically analyze the distribution range of activation values ​​of each layer and determine the scaling factor and zero-point offset (zero point) of the integer quantization. Offset (a parameter introduced during integer quantization to map floating-point numbers to an integer range) converts the weight and bias parameters of the floating-point model to INT8 integer format using scaling factors and zero-point offsets, resulting in quantized model parameters. The quantized model is then tested on a validation subset, and the accuracy difference before and after quantization is calculated. If the accuracy decreases by more than 1% after quantization, the calibration dataset or quantization parameters are adjusted, and quantization calibration is performed again. After quantization, the quantized and compressed model parameters are stored in a preset format, resulting in a lightweight fault selection model and a lightweight fault location model. The fault selection sub-model is a deep learning model used to identify the fault type of the distribution cabinet. The fault location sub-model is a deep learning model used to identify the location of the fault in the distribution cabinet. The lightweight fault selection model is a lightweight model suitable for edge computing gateway deployment, obtained by quantizing and compressing the fault selection sub-model. The lightweight fault location model is a lightweight model suitable for edge computing gateway deployment, obtained by quantizing and compressing the fault location sub-model. The steps of training the lightweight temporal convolutional residual network model using the standard training sample set and the steps of quantizing and compressing the fault selection sub-model and the fault location sub-model respectively can both be implemented using existing technologies, and will not be elaborated here.

[0079] It should be explained that the steps of training the lightweight temporal convolutional residual network model using multiple standard training sample sets to obtain the fault selection sub-model and fault localization sub-model are as follows: Construct a lightweight temporal convolutional residual network model with 11 output layer neurons and a Softmax activation function as the fault selection model to be trained. Randomly divide the multiple standard training sample sets into a training subset and a validation subset in an 8:2 ratio. The training subset is used for learning and optimizing model parameters, while the validation subset is used to evaluate the model's generalization performance. The Adam optimizer is then set. As a parameter update algorithm, the classification cross-entropy loss function is set as the objective function for model optimization. The initial learning rate is set to 0.001, and the batch size is set to 64, meaning 64 samples are randomly selected from the training subset for each iteration. The training epochs are set to 100, meaning the training subset is completely traversed 100 times. In each batch, the batch samples are input into the fault selection model to be trained. The model performs forward propagation layer by layer in the order of input layer, temporal convolutional layer, residual module, global pooling layer, and output layer, outputting an 11-dimensional prediction probability vector. This prediction probability is then directed to... The fault type labels corresponding to the samples (each label is a vector of 11 numbers, where only one number is 1 indicating a correct answer and the other 10 numbers are 0) are input into the classification cross-entropy loss function (the classification cross-entropy loss function is used to measure the difference between the model's prediction and the true label; the smaller the loss value, the more accurate the model's prediction) to calculate the loss value. Based on the loss value, the gradient of the loss function with respect to each trainable parameter in the model is calculated layer by layer through the backpropagation algorithm. The Adam optimizer updates the model parameters according to the calculated gradient values ​​and the current learning rate, so that the loss value gradually decreases. After each training epoch, the validation subset is input into the current model for forward propagation calculation to calculate the model's classification accuracy and loss value on the validation subset, which is used to monitor whether the model has overfitted. The above forward propagation, loss calculation, backpropagation and parameter update steps are repeated. Training is terminated when the training epoch reaches a preset 100 times, or when the model's loss value on the validation subset no longer decreases for 10 consecutive training epochs to prevent overfitting. After training is completed, the saved model parameters are used as the fault selection sub-model.A lightweight temporal convolutional residual network model with 13 output layer neurons and Softmax activation function is constructed as the fault localization model to be trained. The standard training sample set is randomly divided into a training subset and a validation subset in an 8:2 ratio. The Adam optimizer, classification cross-entropy loss function, initial learning rate of 0.001, batch size of 64, and training epochs of 100 are set as in the first step. In each batch, the batch samples are input into the fault localization model to be trained. The model is computed layer by layer in the order of input layer, temporal convolutional layer, residual module, global pooling layer, and output layer, and outputs a 13-dimensional prediction probability vector. The prediction probability vector and the fault location label (13-dimensional one-hot encoded vector) corresponding to the sample are input into the classification cross-entropy loss function to calculate the loss value. The model parameters are updated through backpropagation algorithm and Adam optimizer. After each training epoch, the model performance is evaluated on the validation subset. The iteration is repeated until training is completed. After training, the saved model parameters are used as the fault localization sub-model.

[0080] It should be noted that in the above steps of this invention, since deep learning models require a large amount of labeled fault data to learn effective features, and the number and types of fault samples that can be collected from a single distribution cabinet are very limited, this invention collects data from multiple distribution cabinets that have experienced known faults. This allows the collected samples to cover more different fault types, fault locations, and operating conditions, enabling the trained model to make accurate judgments when faced with new data that has never been seen before. Furthermore, considering that the computing power and memory capacity of edge gateways are relatively limited and cannot directly run large-scale deep learning models, this invention quantizes and compresses the trained model, converting 32-bit floating-point parameters into 8-bit integer parameters. This reduces the size of the fault selection sub-model and the fault location sub-model, while also reducing the computational load and memory usage during model inference, allowing the model to run smoothly on the edge gateway while maintaining high diagnostic accuracy.

[0081] Specifically, the acquisition of the standard training sample set based on the faulty distribution cabinet includes:

[0082] Data is collected from the faulty distribution cabinet to obtain a training sample set, which includes multiple training samples, including: a set of instantaneous voltage values ​​and a set of instantaneous current values.

[0083] The training sample set is sorted in chronological order to obtain the training sample sequence. A training sample matrix is ​​constructed based on the training sample sequence. The training sample matrix includes multiple column vectors and multiple row vectors, and the column vectors correspond one-to-one with the training samples. The row vectors include multiple sample values.

[0084] Normalize the training samples in the training sample matrix to obtain the normalized sample matrix;

[0085] Each normalized sample in the normalized sample matrix is ​​labeled to obtain the standard training sample set.

[0086] It should be explained that the data acquisition of the faulty distribution cabinet is performed using voltage transformers and current transformers installed at the incoming and outgoing ends of the faulty distribution cabinet. The instantaneous voltage value set refers to the set of instantaneous values ​​of phase A, phase B, and phase C voltages obtained at the sampling time during data acquisition of the faulty distribution cabinet. The instantaneous current value set is the set of instantaneous values ​​of phase A, phase B, and phase C currents obtained at the sampling time during data acquisition of the faulty distribution cabinet. The training sample sequence is an ordered sequence obtained by arranging multiple acquired training samples in chronological order. The step of constructing a training sample matrix based on the training sample sequence is as follows: each training sample in the training sample sequence is constructed as a two-dimensional submatrix, where each column of the two-dimensional submatrix corresponds to a sampling time, and each column contains the instantaneous voltage and current values ​​at that sampling time. The column vector is a vector composed of the values ​​of a certain column at the same sampling time in the training sample matrix. A row vector is a vector formed by the values ​​of the same electrical quantity channel (such as phase A voltage, phase B voltage, phase C voltage, phase A current, phase B current, or phase C current) at all sampling times in the training sample matrix. A sampled value is the value collected by a specific electrical quantity channel at a specific sampling time.

[0087] Understandably, the detailed steps for normalizing the training samples in the training sample matrix to obtain the normalized sample matrix will be given later and will not be repeated here. The step of identifying each normalized sample in the normalized sample matrix is ​​as follows: determine the fault type identifier and fault location identifier for each normalized sample. The fault type identifier is converted into an 11-dimensional one-hot encoded vector (a one-hot encoded vector is a vector that uses 0 and 1 to represent the classification result) based on the fault type recorded when the sample was collected. If the sample is in a normal state, the fault type identifier is [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; if the sample is an AG fault, the fault type identifier is [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0]; if the sample is a BG fault, the fault type identifier is [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0], and so on, covering a total of 1 normal state and 10 fault types. The fault type and fault location identifier are converted into a 13-dimensional one-hot encoded vector based on the fault location recorded when the sample was collected. If the sample is in a normal state, the fault location identifier is [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]. If the fault occurs in branch 1, the fault location identifier is [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]. If the fault occurs in branch 2, the fault location identifier is [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]. This process continues, covering one normal state and 12 branch fault locations. The fault type identifier and fault location identifier are associated and stored with the corresponding normalized samples to complete the identification of each normalized sample in the normalized sample matrix, resulting in the standard training sample set. The standard training sample set is a collection of training samples that have undergone normalization and identification association.

[0088] It should be noted that in the above steps of this invention, since the time-series waveforms of voltage and current directly reflect the transient process of fault occurrence, and the lightweight time-series convolutional residual network model to be trained requires a large amount of paired data to learn the correspondence between input waveforms and fault types, this invention converts the collected time-series data into a structured input format that the lightweight time-series convolutional residual network model can directly process. Furthermore, to preserve the dependencies between time-series data and the correlations between electrical quantity channels, each sample is organized into a matrix. In addition, since different electrical quantity channels have different dimensions and numerical ranges, without normalization, electrical quantity channels with larger values ​​will dominate the learning process of the lightweight time-series convolutional residual network model, causing it to ignore electrical quantity channels with smaller values ​​but containing important fault information. Therefore, this invention performs independent normalization on each electrical quantity channel, ensuring that all electrical quantity channels are within the same numerical range, thus enabling the lightweight time-series convolutional residual network model to learn the characteristics of each electrical quantity channel equally. After the data is prepared, since the training of the lightweight temporal convolutional residual network model requires knowing the correct answer for each sample, a fault type label and a fault location label are added to each normalized sample, both using one-hot encoding. Thus, the lightweight temporal convolutional residual network model can gradually adjust its internal parameters by comparing its prediction results with the true labels during supervised learning, and finally learn to identify the fault type and fault location from the input waveform.

[0089] Specifically, the normalization operation on the training samples in the training sample matrix to obtain the normalized sample matrix includes:

[0090] Perform the following operation on each row vector in the training sample matrix:

[0091] Extract the maximum and minimum sample values ​​from the row vectors, extract sample values ​​sequentially from the row vectors, and normalize the extracted sample values ​​using the maximum and minimum sample values ​​to obtain normalized sample values.

[0092] The normalized sample values ​​are aggregated to obtain a normalized sample value set. The normalized sample value sets are then aggregated to obtain multiple normalized sample value sets. Based on the training sample matrix, a matrix is ​​constructed from the multiple normalized sample value sets to obtain a normalized sample matrix.

[0093] It should be explained that the maximum sample value is the maximum value among all sample values ​​within a specific row vector of the training sample matrix. The minimum sample value is the minimum value among all sample values ​​within a specific row vector of the training sample matrix. Normalizing the extracted sample values ​​using the maximum and minimum sample values ​​involves applying the max-min normalization formula. This max-min normalization formula is an existing formula and will not be elaborated upon here. A normalized sample value is the value obtained after normalizing the original sample values. The set of normalized sample values ​​is a collection of normalized sample values. The steps for constructing a normalized sample matrix from multiple normalized sample value sets based on the training sample matrix are as follows: the number of rows in the normalized sample matrix is ​​the same as the number of rows in the original training sample matrix, and the number of columns is the same as the number of columns in the original training sample matrix. The normalized sample values ​​from the first normalized sample value set are filled into the first row of the normalized sample matrix in the original chronological order. The normalized sample values ​​from the second normalized sample value set are filled into the second row of the normalized sample matrix in the original chronological order, and so on. After filling all rows, a two-dimensional matrix is ​​obtained, which is the normalized sample matrix corresponding to the current training sample.

[0094] In detail, the construction of the lightweight temporal convolutional residual network model includes:

[0095] Set the input layer shape parameters, which include: batch quantity, input channel value, and time step.

[0096] An input layer is constructed based on the shape parameters of the input layer, and a temporal convolutional layer is constructed based on the input layer. The temporal convolutional layer, the pre-constructed batch normalization layer, and the pre-constructed ReLU activation function layer are connected to obtain the connected module layer.

[0097] Obtain the residual module, global average pooling layer, and output layer. Connect the connected module layer, residual module, global average pooling layer, and output layer to obtain a lightweight temporal convolutional residual network model.

[0098] It should be explained that the batch size refers to the number of samples input to the model each time during model training or inference. The input channel value refers to the number of electrical quantity channels in the input layer. The time step is the number of sampling points contained in each input channel. The steps for constructing the input layer based on the input layer shape parameters are as follows: set the shape of the input layer according to the input layer shape parameters, specify the data type as 32-bit floating-point number, and use the constructed input layer as the data entry point of the model. The steps for constructing a temporal convolutional layer based on the input layer are as follows: The data output from the input layer (shaped as batch size × 6 channels × 150 time points) is fed into the temporal convolutional layer for processing. The temporal convolutional layer uses a one-dimensional temporal convolutional kernel. The width of the kernel is set to 6 (covering all 6 channels at once), the height is set to 1 (considering only 1 time point at a time), the number of kernels is set to 32 (generating 32 output channels), the stride is set to 1 (sliding 1 time point to the right each time), and the padding method is set to "same" (ensuring that the number of output time points remains 150). At each time point, the convolutional kernel performs a weighted summation of the values ​​of the 6 channels to generate one output value. Since there are 32 convolutional kernels, 32 output values ​​are generated at each time point. The convolutional kernels traverse all 150 time points, and the final output data shape becomes batch size × 32 channels × 150 time points, thus completing the construction from the input layer to the temporal convolutional layer. The steps for constructing the input layer based on the shape parameters of the input layer can be implemented using existing technologies and will not be elaborated here. Batch normalization layers are used to accelerate neural network training and improve model stability. Their function is to normalize the output data of the previous layer to a standard distribution with a mean of 0 and a variance of 1, thus solving the problem of internal covariate shift during neural network training. ReLU activation function layers are non-linear activation function layers used to introduce non-linear transformation capabilities into the neural network. Connected module layers are modules formed by sequentially connecting temporal convolutional layers, batch normalization layers, and ReLU activation function layers. Residual modules are components of the lightweight temporal convolutional residual network model, used for deep feature extraction and solving the gradient vanishing problem in deep neural networks. Global average pooling layers are layers in the lightweight temporal convolutional residual network model used to average all sampled values ​​in each channel, compressing the feature data into a single value for each channel. The output layer is the last layer of the lightweight temporal convolutional residual network model, used to output the classification probability vector. The lightweight temporal convolutional residual network model employs lightweight designs such as temporal convolutional kernels, residual connections, and global average pooling, making it suitable for deep learning models deployed on edge computing gateways.

[0099] S2. Obtain the distribution cabinet to be diagnosed, which includes: an edge gateway, a voltage transformer, and a current transformer, wherein the edge gateway is connected to the voltage transformer and the current transformer.

[0100] It should be explained that the distribution cabinet to be diagnosed is a currently operating distribution cabinet that requires fault diagnosis. An edge gateway is an embedded computing device installed inside or on the side of the distribution cabinet, used for data acquisition, model inference, fault diagnosis, and result reporting. A voltage transformer is an electrical device used to measure voltage, installed at the incoming or outgoing terminal of the distribution cabinet to be diagnosed. A current transformer is an electrical device used to measure current, installed at the incoming or outgoing terminal of the distribution cabinet to be diagnosed.

[0101] S3. Receive the power distribution cabinet fault diagnosis command, and store the lightweight fault selection model and lightweight fault location model according to the power distribution cabinet fault diagnosis command and the edge gateway to obtain the deployed edge gateway.

[0102] It should be explained that the power distribution cabinet fault diagnosis command is sent from the cloud monitoring platform to the edge gateway via the communication network to initiate the diagnosis. The storage of the lightweight fault selection model and lightweight fault location model based on the power distribution cabinet fault diagnosis command and the edge gateway refers to storing these models in the edge gateway according to the power distribution cabinet fault diagnosis command. The deployed edge gateway is one that has completed the storage and loading of the lightweight fault selection model and lightweight fault location model, possessing real-time fault diagnosis capabilities.

[0103] S4. Use the deployed edge gateway to collect voltage data from the distribution cabinet under diagnosis to obtain the phase voltage set. Based on the phase voltage set, perform fault diagnosis on the distribution cabinet under diagnosis to obtain the diagnosis confidence, preliminary fault selection results, and preliminary fault location results.

[0104] In detail, the fault diagnosis operation performed on the distribution cabinet to be diagnosed based on the phase voltage set to obtain the diagnostic confidence level, preliminary fault selection results, and preliminary fault location results includes:

[0105] Based on the historical phase voltage set obtained from the distribution cabinet to be diagnosed, the phase voltages are extracted sequentially from the phase voltage set, and the target historical phase voltage is identified from the historical phase voltage set based on the extracted phase voltages.

[0106] The absolute value of the difference between the extracted phase voltage and the target historical phase voltage is calculated to obtain the phase voltage mutation amount. The phase voltage mutation amounts are then summarized to obtain the phase voltage mutation amount set.

[0107] The voltage fluctuation threshold is obtained by multiplying the preset reliability coefficient and the preset maximum voltage fluctuation.

[0108] If there is a phase voltage change greater than the voltage change threshold in the phase voltage change set, the fault triggering time is determined based on the phase voltage change set, and the pre-fault acquisition period and post-fault acquisition period are calculated based on the fault triggering time.

[0109] Based on the data collection periods before and after the fault, a fault sample set is extracted from the deployed edge gateways, and the maximum fault selection probability value and the maximum fault location probability value are obtained based on the fault sample set.

[0110] The fault selection index value and the fault location index value are determined based on the maximum fault selection probability value and the maximum fault location probability value;

[0111] Minimize the maximum fault selection probability value and the maximum fault location probability value to obtain the diagnostic confidence level.

[0112] The preliminary fault selection result and preliminary fault location result are determined based on the fault selection index value and the fault location index value.

[0113] It should be explained that the phase voltage set is the collection of instantaneous three-phase voltage values ​​obtained at the current moment when the voltage of the distribution cabinet under diagnosis is collected using the deployed edge gateway. The historical phase voltage set is the collection of instantaneous three-phase voltage values ​​at the previous moment when the voltage of the distribution cabinet under diagnosis is collected using the deployed edge gateway. The target historical phase voltage is a historical voltage value from the historical phase voltage set that is in the same phase as the currently extracted phase voltage and differs from the current phase voltage by one power frequency cycle. The phase voltage mutation is the absolute value of the difference between the current phase voltage and the target historical phase voltage, which is used to measure the degree of voltage change within one power frequency cycle. The phase voltage mutation set is a collection composed of phase voltage mutations. The reliability coefficient is a pre-set coefficient used to calculate the voltage mutation threshold, with the aim of preventing false triggering caused by noise interference. The maximum voltage fluctuation is obtained as follows: Under normal operating conditions of the distribution cabinet, three-phase voltage data is continuously collected for 24 hours. The voltage fluctuation at each sampling moment is calculated at intervals of power frequency cycles (e.g., 0.02 seconds), which is the absolute value of the difference between the current voltage value and the voltage value one power frequency cycle ago. The maximum voltage fluctuation is taken as the maximum voltage fluctuation, which reflects the maximum voltage fluctuation amplitude that the distribution cabinet may experience during normal operation. The reliability coefficient is set as follows: It is obtained through statistical analysis of a large amount of experimental data. Experiments show that there is a significant difference between the maximum voltage fluctuation during normal operation and the voltage fluctuation during a fault. Setting the reliability coefficient to 3 ensures that normal fluctuations do not trigger diagnosis, while fault fluctuations can trigger diagnosis. In specific settings, the reliability coefficient is not fixed but is adjusted according to the actual operating environment of the distribution cabinet: for sites with large electromagnetic interference or frequent voltage fluctuations, the reliability coefficient is increased to 3.5; for situations requiring high fault sensitivity, the reliability coefficient is decreased to 2.5.

[0114] Understandably, the voltage surge threshold is the product of the reliability coefficient and the maximum voltage surge, and it is used to determine the critical value for fault initiation. If there is a phase voltage surge greater than the voltage surge threshold in the phase voltage surge set, it indicates that the voltage at the current moment has changed significantly compared to one power frequency cycle ago, and a fault is suspected. The fault triggering time confirmed based on the phase voltage surge set is the time when the phase voltage surge set is acquired. The detailed steps for calculating the pre-fault acquisition period and post-fault acquisition period based on the fault triggering time will be given later and will not be repeated here. The steps for extracting the fault sample set from the deployed edge gateway based on the pre-fault acquisition period and post-fault acquisition period are as follows: extract the electrical quantity data of each sampling moment in the sampling points within the pre-fault acquisition period and the sampling points within the post-fault acquisition period from the deployed edge gateway. Take the instantaneous values ​​of phase A current, phase B current, phase C current, phase A voltage, phase B voltage, and phase C voltage collected at each sampling moment as a sampling data point. Summarize all sampling data points in chronological order to form the fault sample set.

[0115] Importantly, the detailed steps for obtaining the maximum fault selection probability value and the maximum fault location probability value based on the fault sample set will be given later and will not be repeated here. The fault selection index value is the position number corresponding to the maximum probability value from the 11-dimensional probability vector output by the fault selection model. The fault location index value is the position number corresponding to the maximum probability value from the 13-dimensional probability vector output by the fault location model. The steps for determining the preliminary fault selection result and the preliminary fault location result based on the fault selection index value and the fault location index value are as follows: The preset mapping relationship between index values ​​and fault types is: index 1 corresponds to normal state, index 2 corresponds to AG fault, index 3 corresponds to BG fault, index 4 corresponds to CG fault, index 5 corresponds to AB fault, index 6 corresponds to AC fault, index 7 corresponds to BC fault, index 8 corresponds to ABG fault, index 9 corresponds to ACG fault, index 10 corresponds to BCG fault, and index 11 corresponds to ABCG fault. The preset mapping relationship between index values ​​and fault locations is: index 1 corresponds to normal state, index 2 corresponds to branch 1 fault, and so on. Index 3 corresponds to branch 2 fault, index 4 corresponds to branch 3 fault, index 5 corresponds to branch 4 fault, index 6 corresponds to branch 5 fault, index 7 corresponds to branch 6 fault, index 8 corresponds to branch 7 fault, index 9 corresponds to branch 8 fault, index 10 corresponds to branch 9 fault, index 11 corresponds to branch 10 fault, index 12 corresponds to branch 11 fault, and index 13 corresponds to branch 12 fault. The calculated fault selection index value is used to find the corresponding fault type in the above fault type mapping table as the preliminary fault selection result. The calculated fault location index value is used to find the corresponding fault location in the above fault location mapping table as the preliminary fault location result.

[0116] It should be noted that in the above steps of this invention, since the voltage of the fault phase will drop or rise significantly when a short circuit or ground fault occurs, the voltage fluctuation reflects the magnitude of the change in voltage relative to the normal cycle. The larger the voltage fluctuation, the more drastic the voltage change. Since voltage also fluctuates and there is measurement noise during normal operation, a voltage fluctuation threshold higher than the normal fluctuation range needs to be set to avoid false triggering caused by these normal fluctuations. This threshold is obtained by multiplying the maximum voltage fluctuation obtained during normal operation by the reliability coefficient. Only when the fluctuation exceeds this threshold is a fault considered possible. Since each value in the probability vector output by the model represents the probability that the sample belongs to a certain state, this invention takes the maximum value in the probability vector as the model's confidence level for that state. The index position corresponding to this maximum value can be used to determine the preliminary fault type or fault location by looking up a table. Since the fault selection probability and fault location probability reflect the confidence levels of the lightweight fault selection model and the lightweight fault location model respectively in the diagnostic results, and the overall diagnosis is reliable when both models have high confidence in their results, the smaller value is taken as the diagnostic confidence level. Thus, if one model has low confidence, the overall reliability will decrease accordingly. Through the above steps, the edge gateway can complete the entire process from voltage monitoring to fault diagnosis locally, thus eliminating the need to upload the raw data to the cloud.

[0117] Specifically, the calculation of the pre-fault data collection period and the post-fault data collection period based on the fault trigger time includes:

[0118] The number of samples before the fault, the number of samples after the fault, and the sampling interval are obtained. The sampling duration before the fault is calculated by multiplying the number of samples before the fault and the sampling interval.

[0119] The start time of pre-fault data collection is calculated based on the fault trigger time and the pre-fault sampling duration, and the end time of pre-fault data collection is obtained based on the fault trigger time and the sampling interval.

[0120] The pre-fault data acquisition period is constructed based on the start and end times of pre-fault data acquisition.

[0121] The time when data collection ends after a fault is calculated based on the number of samples collected after the fault, and the time period for data collection after a fault is constructed based on the time when the fault is triggered and the time when data collection ends after the fault.

[0122] It should be explained that the pre-fault sampling quantity is the number of sampling points to be collected before the fault triggering time. The post-fault sampling quantity is the number of sampling points to be collected after the fault triggering time. The sampling interval is the time interval between two adjacent sampling points. The pre-fault sampling duration is the length of the continuous time period used for data collection before the fault triggering time. The pre-fault collection start time is the time obtained by subtracting the pre-fault sampling duration from the fault triggering time. The pre-fault collection end time is the time corresponding to one sampling interval minus the fault triggering time. The pre-fault collection end period is the time interval used for collecting pre-fault sample data before the fault triggering time. The detailed steps for calculating the post-fault collection end time based on the post-fault sampling quantity will be given later and will not be repeated here. The post-fault collection period is the time interval used for collecting post-fault sample data after the fault triggering time.

[0123] In detail, the calculation formula for the end time of data acquisition after the fault is as follows:

[0124] ;

[0125] in, Indicates the time when data acquisition ended after the fault. Indicates the time when the fault was triggered. Indicates the number of samples taken after the fault. Indicates the sampling interval.

[0126] It should be noted that the calculation formula for the end time of data collection after a fault in this invention takes the fault triggering time as the starting point and the sampling interval as the step size, collecting one sampling point after each sampling interval. The time corresponding to the completion of collecting all sampling points for the required number of fault-related samples is the end time of data collection after the fault. The purpose of this formula is to determine the termination boundary of the data collection period after the fault, ensuring accurate data collection from the fault triggering time onwards. Each sampling point, i.e., coverage Data at sampling intervals are collected to fully cover the transient process of the fault, providing a standardized post-fault data window for the construction of subsequent fault samples.

[0127] Specifically, obtaining the maximum fault selection probability value and the maximum fault location probability value based on the fault sample set includes:

[0128] Construct a normalized fault sample matrix based on the fault sample set;

[0129] The normalized fault sample matrix is ​​input into the lightweight fault selection model and the lightweight fault location model respectively to obtain the fault selection vector and the fault location vector. The fault selection vector includes multiple fault selection probability values, and the fault location vector includes multiple fault location probability values.

[0130] The maximum value extraction operation is performed on the fault selection vector and the fault location vector respectively to obtain the maximum fault selection probability value and the maximum fault location probability value.

[0131] It should be explained that the method for constructing a normalized fault sample matrix based on the fault sample set is the same as the method for obtaining a normalized sample matrix based on the training sample set, and will not be repeated here. The normalized fault sample matrix is ​​a matrix organized according to a specific dimension (i.e., the same dimension as the normalized sample matrix) after normalizing the original sampled data in the fault sample set. This matrix is ​​used as input to the lightweight fault selection model and the lightweight fault location model for inference. The fault selection vector is the 11-dimensional probability distribution vector output by the lightweight fault selection model after inputting the normalized fault sample matrix into it. The fault location vector is the 13-dimensional probability distribution vector output by the lightweight fault location model after inputting the normalized fault sample matrix into it. The fault selection probability value is an element in the fault selection vector. The fault location probability value is an element in the fault location vector. The maximum value extraction operation performed on the fault selection vector and the fault location vector respectively extracts the largest probability value from the fault selection vector and the fault location vector respectively. The maximum fault selection probability value is the largest probability value obtained after performing the maximum value extraction operation on the fault selection vector. The maximum fault location probability value is the highest probability value obtained after performing a maximum value extraction operation on the fault location vector.

[0132] S5. If the preliminary fault selection result is a preset abnormal selection state, and the preliminary fault location result is a preset abnormal location state, then the power distribution cabinet to be diagnosed is regarded as the actual fault power distribution cabinet.

[0133] It should be explained that an abnormal fault selection state means that the preliminary fault selection result output by the fault selection sub-model is any one of the 10 fault types. An abnormal fault location state means that the preliminary fault location result output by the fault location sub-model is any one of the 12 branch fault locations. If the preliminary fault selection result is a preset abnormal fault selection state, and the preliminary fault location result is a preset abnormal fault location state, it means that the fault selection sub-model determines that the electrical waveform of the current distribution cabinet conforms to one of the 10 fault types (i.e., it does not belong to the normal state), and at the same time, the fault location sub-model determines that the fault waveform characteristics point to a specific branch among the 12 branches (i.e., it does not belong to the fault-free location). Both independently trained models output fault judgment results, which corroborate and verify each other, indicating that the current distribution cabinet has indeed experienced a real fault rather than noise interference or model misjudgment. At this time, the distribution cabinet to be diagnosed is confirmed as a real faulty distribution cabinet. A real faulty distribution cabinet is a distribution cabinet to be diagnosed that has indeed experienced a fault after being judged by both the fault selection sub-model and the fault location sub-model (both outputting abnormal states).

[0134] S6. Generate a fault diagnosis report based on the actual faulty distribution cabinet, fault selection results and preliminary fault location results. The fault diagnosis report includes: fault type, fault location, fault trigger time and diagnosis confidence level.

[0135] It should be explained that the fault type is the specific classification result of the fault selection sub-model for the actual faulty distribution cabinet. The fault location is the specific branch location of the fault in the actual faulty distribution cabinet as determined by the fault location sub-model. The diagnostic confidence is the smaller of the maximum probability values ​​output by the fault selection sub-model and the maximum probability values ​​output by the fault location sub-model.

[0136] S7. Upload the fault diagnosis report to the pre-built cloud monitoring platform to obtain the stored fault diagnosis report.

[0137] It should be explained that the cloud monitoring platform is a monitoring system deployed on a cloud server, used to receive, store, display, and manage fault diagnosis reports uploaded by the edge gateways of each power distribution cabinet. Stored fault diagnosis reports are those successfully uploaded to the cloud monitoring platform. This invention, by uploading and storing fault diagnosis reports to the cloud monitoring platform, achieves centralized management and long-term archiving of fault information from multiple power distribution cabinets, facilitating subsequent fault statistical analysis, trend prediction, and model iteration optimization. It also provides data support for remote operation and maintenance and unattended operation scenarios.

[0138] It should be noted that this invention pre-deploys the lightweight fault selection model and the lightweight fault location model in the edge gateway on the distribution cabinet side, enabling the entire fault diagnosis process to be completed locally without uploading the original voltage and current data to the cloud. This avoids network transmission delays and keeps the total delay from voltage surge triggering to diagnostic result output within milliseconds, meeting the real-time requirements of fault protection. Furthermore, since the edge gateway only uploads diagnostic results (fault type, fault location, fault trigger time, and diagnostic confidence level) rather than the original waveform data when a fault is detected, the amount of data reported at one time is less than 1KB, reducing network bandwidth usage. Even in the event of a network interruption, the edge gateway can still complete the diagnosis independently. In addition, this invention uses a temporal convolutional residual network to extract the temporal features of the voltage and current signals and reduces the size of both the fault selection sub-model and the fault location sub-model through quantization compression technology. This allows the lightweight fault selection model and the lightweight fault location model to run smoothly on edge gateways with limited computing power, thus balancing the requirements of low latency, low bandwidth dependence, and high-precision real-time fault diagnosis.

[0139] To address the problems described in the background art, this invention constructs a lightweight fault selection model and a lightweight fault location model. By constructing these lightweight fault selection and location models, the invention compresses the large-scale deep learning models that originally required deployment on cloud GPU servers into lightweight models suitable for edge computing devices, reducing the model's computational resource requirements. The invention also acquires the power distribution cabinet to be diagnosed, which includes an edge gateway, voltage transformers, and current transformers. The edge gateway is connected to the voltage transformers and current transformers. This invention achieves power distribution cabinet diagnostics by pre-configuring the edge gateway, voltage transformers, and current transformers in the power distribution cabinet and electrically connecting the edge gateway to the voltage transformers and current transformers. Local acquisition and transmission of electrical signals from the distribution cabinet provides the hardware foundation for edge computing, avoiding dependence on external acquisition devices and reducing system complexity. It receives fault diagnosis commands from the distribution cabinet and stores lightweight fault selection and location models based on these commands and the edge gateway, thus obtaining the deployed edge gateway. This invention, by pre-storing the lightweight fault selection and location models in the edge gateway, allows the fault diagnosis model to be loaded and ready locally in the distribution cabinet, eliminating the need to download the model from the cloud when a diagnosis occurs. This avoids the impact of network latency on the diagnosis startup speed and ensures that the model can still be used normally in a network-off environment. The deployed edge gateway is then used to process the distribution cabinet to be diagnosed. Voltage acquisition is performed to obtain a phase voltage set. Based on this phase voltage set, fault diagnosis is conducted on the distribution cabinet to be diagnosed, yielding diagnostic confidence, preliminary fault selection results, and preliminary fault location results. This invention utilizes a deployed edge gateway to perform local voltage acquisition and fault diagnosis on the distribution cabinet to be diagnosed, enabling the entire fault diagnosis process to be completed at the distribution cabinet side. This eliminates the need to transmit raw voltage data to the cloud, reducing network bandwidth consumption and avoiding data transmission delays. Diagnostic results can be obtained within milliseconds, meeting the real-time requirements of fault protection. If the preliminary fault selection result is a preset abnormal selection state, and the preliminary fault location result is a preset abnormal location state, then the distribution cabinet to be diagnosed is considered the actual faulty distribution cabinet. By dual-judging the fault selection results and fault location results, a faulty distribution cabinet is only confirmed as truly faulty when both independently trained models output abnormal states. This effectively avoids false alarms caused by misjudgment from a single model, improving the reliability and accuracy of fault diagnosis. A fault diagnosis report is generated based on the actual faulty distribution cabinet, fault selection results, and preliminary fault location results. This report includes: fault type, fault location, fault trigger time, and diagnostic confidence level. By generating a fault diagnosis report containing fault type, fault location, fault trigger time, and diagnostic confidence level, this invention provides maintenance personnel with comprehensive and structured fault information, facilitating rapid location of fault causes and locations, and shortening fault investigation and recovery time.This invention improves the operation and maintenance efficiency of power distribution systems by uploading fault diagnosis reports to a pre-built cloud monitoring platform, thus obtaining stored fault diagnosis reports. Therefore, this invention enables low-latency, low-bandwidth-dependency, and high-precision real-time fault diagnosis.

[0140] like Figure 2 The diagram shown is a functional block diagram of a power distribution cabinet fault diagnosis system based on edge computing provided in an embodiment of the present invention.

[0141] The edge computing-based power distribution cabinet fault diagnosis system 100 of this invention can be installed in electronic devices. Depending on the functions implemented, the edge computing-based power distribution cabinet fault diagnosis system 100 may include a diagnostic model construction module 101, an edge gateway deployment module 102, a fault diagnosis execution module 103, and a fault diagnosis report production module 104. The module described in this invention can also be called a unit, which refers to a series of computer program segments that can be executed by the processor of an electronic device and can perform a fixed function, and which are stored in the memory of the electronic device.

[0142] The diagnostic model construction module 101 is used to construct a lightweight fault selection model and a lightweight fault location model.

[0143] The edge gateway deployment module 102 is used to acquire the power distribution cabinet to be diagnosed, wherein the power distribution cabinet to be diagnosed includes: an edge gateway, a voltage transformer and a current transformer, wherein the edge gateway is connected to the voltage transformer and the current transformer, receives the power distribution cabinet fault diagnosis instruction, and stores the lightweight fault selection model and the lightweight fault location model according to the power distribution cabinet fault diagnosis instruction and the edge gateway to obtain the deployed edge gateway.

[0144] The fault diagnosis execution module 103 is used to collect voltage data from the distribution cabinet to be diagnosed using the deployed edge gateway, obtain a phase voltage set, perform fault diagnosis operation on the distribution cabinet to be diagnosed based on the phase voltage set, and obtain diagnosis confidence, preliminary fault selection result and preliminary fault location result. If the preliminary fault selection result is a preset abnormal selection state and the preliminary fault location result is a preset abnormal location state, then the distribution cabinet to be diagnosed is regarded as the actual faulty distribution cabinet.

[0145] The fault diagnosis report production module 104 is used to generate a fault diagnosis report based on the actual faulty power distribution cabinet, fault selection results and preliminary fault location results. The fault diagnosis report includes: fault type, fault location, fault trigger time and diagnosis confidence level. The fault diagnosis report is uploaded to the pre-built cloud monitoring platform to obtain the stored fault diagnosis report.

[0146] In detail, the modules in the edge computing-based power distribution cabinet fault diagnosis system 100 described in this embodiment of the invention employ the same methods as described above. Figure 1 The method used is the same as the edge computing-based power distribution cabinet fault diagnosis method described in the article, and can produce the same technical effect, so it will not be repeated here.

[0147] like Figure 3 The diagram shown is a structural schematic of an electronic device for implementing a fault diagnosis method for power distribution cabinets based on edge computing, according to an embodiment of the present invention.

[0148] The electronic device 1 may include a processor 10, a memory 11 and a bus 12, and may also include a computer program stored in the memory 11 and capable of running on the processor 10, such as a fault diagnosis method program for power distribution cabinets based on edge computing.

[0149] The memory 11 includes at least one type of readable storage medium, such as flash memory, portable hard drive, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of the electronic device 1, such as a portable hard drive. In other embodiments, the memory 11 can be an external storage device of the electronic device 1, such as a plug-in portable hard drive, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on the electronic device 1. Furthermore, the memory 11 includes both internal storage units and external storage devices of the electronic device 1. The memory 11 can be used not only to store application software and various types of data installed on the electronic device 1, such as the code of a power distribution cabinet fault diagnosis method program based on edge computing, but also to temporarily store data that has been output or will be output.

[0150] In some embodiments, the processor 10 may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 10 is the control unit of the electronic device, connecting various components of the entire electronic device through various interfaces and lines. It executes programs or modules stored in the memory 11 (e.g., a fault diagnosis method program for a power distribution cabinet based on edge computing) and calls data stored in the memory 11 to perform various functions of the electronic device 1 and process data.

[0151] The bus 12 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus 12 can be divided into an address bus, a data bus, a control bus, etc. The bus 12 is configured to realize the connection and communication between the memory 11 and at least one processor 10, etc.

[0152] Figure 3 Only electronic devices with components are shown; it will be understood by those skilled in the art that... Figure 3 The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown, or combine certain components, or have different component arrangements.

[0153] For example, although not shown, the electronic device 1 may also include a power supply (such as a battery) to power the various components. Preferably, the power supply can be logically connected to the at least one processor 10 through a power management device, thereby enabling functions such as charging management, discharging management, and power consumption management. The power supply may also include one or more DC or AC power supplies, recharging devices, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device 1 may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.

[0154] Furthermore, the electronic device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a Wi-Fi interface, a Bluetooth interface, etc.), which is typically used to establish communication connections between the electronic device 1 and other electronic devices.

[0155] Optionally, the electronic device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), and optionally, a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen, etc. The display may also be appropriately referred to as a screen or display unit, used to display information processed in the electronic device 1 and to display a visual user interface.

[0156] The edge computing-based power distribution cabinet fault diagnosis method program stored in the memory 11 of the electronic device 1 is a combination of multiple instructions. When run in the processor 10, it can achieve the following:

[0157] Construct a lightweight fault selection model and a lightweight fault location model;

[0158] Obtain the power distribution cabinet to be diagnosed, which includes: an edge gateway, a voltage transformer, and a current transformer, wherein the edge gateway is connected to the voltage transformer and the current transformer;

[0159] Receive the power distribution cabinet fault diagnosis command, and store the lightweight fault selection model and lightweight fault location model according to the power distribution cabinet fault diagnosis command and the edge gateway to obtain the deployed edge gateway.

[0160] The deployed edge gateway is used to collect voltage data from the power distribution cabinet under diagnosis to obtain the phase voltage set. Based on the phase voltage set, the fault diagnosis operation is performed on the power distribution cabinet under diagnosis to obtain the diagnosis confidence, preliminary fault selection results and preliminary fault location results.

[0161] If the preliminary fault selection result is a preset abnormal selection state, and the preliminary fault location result is a preset abnormal location state, then the power distribution cabinet to be diagnosed is regarded as the actual faulty power distribution cabinet.

[0162] A fault diagnosis report is generated based on the actual faulty power distribution cabinet, fault selection results, and preliminary fault location results. The fault diagnosis report includes: fault type, fault location, fault trigger time, and diagnosis confidence level.

[0163] The fault diagnosis report is uploaded to the pre-built cloud monitoring platform to obtain the stored fault diagnosis report.

[0164] Specifically, the processor 10's implementation method for the above instructions can be found in [reference needed]. Figures 1 to 3 The descriptions of the relevant steps in the corresponding embodiments are not repeated here.

[0165] Furthermore, if the modules / units integrated in the electronic device 1 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, or a read-only memory (ROM).

[0166] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor of an electronic device, can perform the following:

[0167] Construct a lightweight fault selection model and a lightweight fault location model;

[0168] Obtain the power distribution cabinet to be diagnosed, which includes: an edge gateway, a voltage transformer, and a current transformer, wherein the edge gateway is connected to the voltage transformer and the current transformer;

[0169] Receive the power distribution cabinet fault diagnosis command, and store the lightweight fault selection model and lightweight fault location model according to the power distribution cabinet fault diagnosis command and the edge gateway to obtain the deployed edge gateway.

[0170] The deployed edge gateway is used to collect voltage data from the power distribution cabinet under diagnosis to obtain the phase voltage set. Based on the phase voltage set, the fault diagnosis operation is performed on the power distribution cabinet under diagnosis to obtain the diagnosis confidence, preliminary fault selection results and preliminary fault location results.

[0171] If the preliminary fault selection result is a preset abnormal selection state, and the preliminary fault location result is a preset abnormal location state, then the power distribution cabinet to be diagnosed is regarded as the actual faulty power distribution cabinet.

[0172] A fault diagnosis report is generated based on the actual faulty power distribution cabinet, fault selection results, and preliminary fault location results. The fault diagnosis report includes: fault type, fault location, fault trigger time, and diagnosis confidence level.

[0173] The fault diagnosis report is uploaded to the pre-built cloud monitoring platform to obtain the stored fault diagnosis report.

[0174] In the embodiments provided by this invention, it should be understood that the disclosed devices, systems, and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative, and actual implementations may have other classification methods.

[0175] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0176] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.

[0177] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0178] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. A method for fault diagnosis of power distribution cabinets based on edge computing, characterized in that, The method includes: Construct a lightweight fault selection model and a lightweight fault location model; Obtain the power distribution cabinet to be diagnosed, which includes: an edge gateway, a voltage transformer, and a current transformer, wherein the edge gateway is connected to the voltage transformer and the current transformer; Receive the power distribution cabinet fault diagnosis command, and store the lightweight fault selection model and lightweight fault location model according to the power distribution cabinet fault diagnosis command and the edge gateway to obtain the deployed edge gateway. The deployed edge gateway is used to collect voltage data from the power distribution cabinet under diagnosis to obtain the phase voltage set. Based on the phase voltage set, the fault diagnosis operation is performed on the power distribution cabinet under diagnosis to obtain the diagnosis confidence, preliminary fault selection results and preliminary fault location results. If the preliminary fault selection result is a preset abnormal selection state, and the preliminary fault location result is a preset abnormal location state, then the power distribution cabinet to be diagnosed is regarded as the actual faulty power distribution cabinet. A fault diagnosis report is generated based on the actual faulty power distribution cabinet, fault selection results, and preliminary fault location results. The fault diagnosis report includes: fault type, fault location, fault trigger time, and diagnosis confidence level. The fault diagnosis report is uploaded to the pre-built cloud monitoring platform to obtain the stored fault diagnosis report.

2. The edge computing-based power distribution cabinet fault diagnosis method as described in claim 1, characterized in that, The construction of the lightweight fault selection model and the lightweight fault location model includes: Multiple faulty distribution cabinets were identified. For each of these faulty distribution cabinets, the following operations were performed: Based on the faulty power distribution cabinet, a standard training sample set is obtained, and the standard training sample sets are summarized to obtain multiple standard training sample sets. A lightweight temporal convolutional residual network model was constructed, and the model was trained using multiple standard training sample sets to obtain a fault selection sub-model and a fault location sub-model. The fault selection sub-model and the fault location sub-model are quantized and compressed respectively to obtain a lightweight fault selection model and a lightweight fault location model.

3. The edge computing-based power distribution cabinet fault diagnosis method as described in claim 2, characterized in that, The standard training sample set obtained based on the faulty distribution cabinet includes: Data is collected from the faulty distribution cabinet to obtain a training sample set, which includes multiple training samples, including: a set of instantaneous voltage values ​​and a set of instantaneous current values. The training sample set is sorted in chronological order to obtain the training sample sequence. A training sample matrix is ​​constructed based on the training sample sequence. The training sample matrix includes multiple column vectors and multiple row vectors, and the column vectors correspond one-to-one with the training samples. The row vectors include multiple sample values. Normalize the training samples in the training sample matrix to obtain the normalized sample matrix; Each normalized sample in the normalized sample matrix is ​​labeled to obtain the standard training sample set.

4. The edge computing-based power distribution cabinet fault diagnosis method as described in claim 3, characterized in that, The step of normalizing the training samples in the training sample matrix to obtain a normalized sample matrix includes: Perform the following operation on each row vector in the training sample matrix: Extract the maximum and minimum sample values ​​from the row vectors, extract sample values ​​sequentially from the row vectors, and normalize the extracted sample values ​​using the maximum and minimum sample values ​​to obtain normalized sample values. The normalized sample values ​​are aggregated to obtain a normalized sample value set. The normalized sample value sets are then aggregated to obtain multiple normalized sample value sets. Based on the training sample matrix, a matrix is ​​constructed from the multiple normalized sample value sets to obtain a normalized sample matrix.

5. The edge computing-based power distribution cabinet fault diagnosis method as described in claim 4, characterized in that, The construction of the lightweight temporal convolutional residual network model includes: Set the input layer shape parameters, which include: batch quantity, input channel value, and time step. An input layer is constructed based on the shape parameters of the input layer, and a temporal convolutional layer is constructed based on the input layer. The temporal convolutional layer, the pre-constructed batch normalization layer, and the pre-constructed ReLU activation function layer are connected to obtain the connected module layer. Obtain the residual module, global average pooling layer, and output layer. Connect the connected module layer, residual module, global average pooling layer, and output layer to obtain a lightweight temporal convolutional residual network model.

6. The edge computing-based power distribution cabinet fault diagnosis method as described in claim 5, characterized in that, The fault diagnosis operation of the distribution cabinet to be diagnosed is performed based on the phase voltage set to obtain the diagnostic confidence level, preliminary fault selection results, and preliminary fault location results, including: Based on the historical phase voltage set obtained from the distribution cabinet to be diagnosed, the phase voltages are extracted sequentially from the phase voltage set, and the target historical phase voltage is identified from the historical phase voltage set based on the extracted phase voltages. The absolute value of the difference between the extracted phase voltage and the target historical phase voltage is calculated to obtain the phase voltage mutation amount. The phase voltage mutation amounts are then summarized to obtain the phase voltage mutation amount set. The voltage fluctuation threshold is obtained by multiplying the preset reliability coefficient and the preset maximum voltage fluctuation. If there is a phase voltage change greater than the voltage change threshold in the phase voltage change set, the fault triggering time is determined based on the phase voltage change set, and the pre-fault acquisition period and post-fault acquisition period are calculated based on the fault triggering time. Based on the data collection periods before and after the fault, a fault sample set is extracted from the deployed edge gateways, and the maximum fault selection probability value and the maximum fault location probability value are obtained based on the fault sample set. The fault selection index value and the fault location index value are determined based on the maximum fault selection probability value and the maximum fault location probability value; Minimize the maximum fault selection probability value and the maximum fault location probability value to obtain the diagnostic confidence level. The preliminary fault selection result and preliminary fault location result are determined based on the fault selection index value and the fault location index value.

7. The edge computing-based power distribution cabinet fault diagnosis method as described in claim 6, characterized in that, The calculation of the pre-fault data collection period and the post-fault data collection period based on the fault trigger time includes: The number of samples before the fault, the number of samples after the fault, and the sampling interval are obtained. The sampling duration before the fault is calculated by multiplying the number of samples before the fault and the sampling interval. The start time of pre-fault data collection is calculated based on the fault trigger time and the pre-fault sampling duration, and the end time of pre-fault data collection is obtained based on the fault trigger time and the sampling interval. The pre-fault data acquisition period is constructed based on the start and end times of pre-fault data acquisition. The time when data collection ends after a fault is calculated based on the number of samples collected after the fault, and the time period for data collection after a fault is constructed based on the time when the fault is triggered and the time when data collection ends after the fault.

8. The edge computing-based power distribution cabinet fault diagnosis method as described in claim 7, characterized in that, The formula for calculating the end time of data acquisition after the fault is as follows: ; in, Indicates the time when data acquisition ended after the fault. Indicates the time when the fault was triggered. Indicates the number of samples taken after the fault. Indicates the sampling interval.

9. The edge computing-based power distribution cabinet fault diagnosis method as described in claim 8, characterized in that, The process of obtaining the maximum fault selection probability value and the maximum fault location probability value based on the fault sample set includes: Construct a normalized fault sample matrix based on the fault sample set; The normalized fault sample matrix is ​​input into the lightweight fault selection model and the lightweight fault location model respectively to obtain the fault selection vector and the fault location vector. The fault selection vector includes multiple fault selection probability values, and the fault location vector includes multiple fault location probability values. The maximum value extraction operation is performed on the fault selection vector and the fault location vector respectively to obtain the maximum fault selection probability value and the maximum fault location probability value.

10. A power distribution cabinet fault diagnosis system based on edge computing, characterized in that, The system includes: The diagnostic model building module is used to build lightweight fault selection models and lightweight fault location models. The edge gateway deployment module is used to obtain the power distribution cabinet to be diagnosed, which includes: edge gateway, voltage transformer and current transformer. The edge gateway is connected to the voltage transformer and current transformer, receives the power distribution cabinet fault diagnosis command, and stores the lightweight fault selection model and lightweight fault location model according to the power distribution cabinet fault diagnosis command and the edge gateway to obtain the deployed edge gateway. The fault diagnosis execution module is used to collect voltage data from the distribution cabinet to be diagnosed using the deployed edge gateway, obtain the phase voltage set, perform fault diagnosis operation on the distribution cabinet to be diagnosed based on the phase voltage set, and obtain the diagnosis confidence, preliminary fault selection result and preliminary fault location result. If the preliminary fault selection result is a preset abnormal selection state and the preliminary fault location result is a preset abnormal location state, then the distribution cabinet to be diagnosed is regarded as the actual faulty distribution cabinet. The fault diagnosis report production module is used to generate a fault diagnosis report based on the actual faulty power distribution cabinet, fault selection results, and preliminary fault location results. The fault diagnosis report includes: fault type, fault location, fault trigger time, and diagnosis confidence level. The fault diagnosis report is uploaded to the pre-built cloud monitoring platform to obtain the stored fault diagnosis report.