Power distribution terminal fault diagnosis method and system based on lightweight neural network

By deploying a lightweight neural network at the edge computing layer of power distribution terminal equipment and combining it with cloud-based collaborative training, the problem of models not being able to run in real time in existing technologies is solved, enabling high-precision fault diagnosis on computing-limited equipment, especially effective detection of dangerous faults.

CN121965490APending Publication Date: 2026-05-01QUANZHOU YIXING ELECTRICAL ENG CONSTR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
QUANZHOU YIXING ELECTRICAL ENG CONSTR CO LTD
Filing Date
2025-12-30
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing deep learning models cannot run in real time on power distribution terminal equipment with limited computing power, and they suffer significant accuracy loss in power fault diagnosis tasks, especially with a marked decrease in recall rate for dangerous faults.

Method used

A lightweight neural network with fewer than 1M parameters is deployed at the edge computing layer of the power distribution terminal equipment. Combined with three-stage progressive distillation training in the cloud, and utilizing deep separable convolution and parameter-sharing LSTM networks, the power signal feature extraction and fault relationship learning are optimized. The model is updated through collaboration between edge computing and the cloud.

Benefits of technology

It enables real-time fault diagnosis on computing-limited devices while maintaining high accuracy, especially in detecting dangerous faults. It solves the problem that existing technologies cannot run models in real time, and improves the overall accuracy of fault diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121965490A_ABST
    Figure CN121965490A_ABST
Patent Text Reader

Abstract

The invention proposes a power distribution terminal fault diagnosis method and system based on a lightweight neural network, and relates to the technical field of power system automation and artificial intelligence, and the method comprises the steps: deploying an edge calculation layer at each power distribution terminal device, and enabling the edge calculation layer to operate a lightweight neural network with the parameter quantity smaller than 1M; the cloud server trains and updates the lightweight neural network by using three-stage progressive distillation according to the fault sample, and issues trained network parameters to an edge computing layer; and the edge calculation layer collects power signal data in real time and inputs the power signal data into the lightweight neural network updated according to the network parameters issued by the cloud to obtain a fault diagnosis result. According to the method, the problem that an existing deep learning model cannot run on power distribution terminal equipment with limited computing power in real time is solved, and meanwhile high fault diagnosis precision, especially the detection capacity for dangerous faults, is kept.
Need to check novelty before this filing date? Find Prior Art

Description

A method and system for fault diagnosis of distribution terminals based on lightweight neural networks Technical Field

[0001] This invention relates to the fields of power system automation and artificial intelligence technology, and in particular to a method and system for fault diagnosis of distribution terminals based on lightweight neural networks. Background Technology

[0002] With the intelligent development of power systems, deep learning-based fault diagnosis technology has been widely applied in the power sector. Existing technologies mainly include large-scale cloud server solutions, traditional deep learning solutions, and lightweight network solutions. Large-scale cloud server solutions require deployment on cloud servers, leading to network latency and data security issues. Traditional deep learning solutions often use networks such as YOLOv5 and ResNet, resulting in large model parameter counts that require GPU acceleration for real-time operation. Existing lightweight network solutions are primarily designed for drone inspection scenarios and do not consider the specific hardware constraints of distribution terminal equipment. Distribution terminal equipment (DTU, TTU, and FTU) typically uses ARM Cortex-A series processors or DSP chips, with computing power of only 100-500 MFLOPS and memory of only 64-256 MB. Furthermore, existing lightweight network models generally have more than 5M parameters and computational complexity exceeding 1 GFLOPs, making them unsuitable for real-time operation on distribution terminal equipment. Furthermore, existing general-purpose lightweight networks such as MobileNet and ShuffleNet suffer significant accuracy loss due to their use of general compression methods, resulting in a 5-10% accuracy loss in power fault diagnosis tasks, with a particularly noticeable drop in recall for dangerous faults such as short circuits and grounding faults. Moreover, existing lightweight network solutions are not optimized for the time-frequency characteristics of power signals and do not consider safety weights for different fault types, leading to poor model performance in power scenarios. Summary of the Invention

[0003] The main objective of this invention is to propose a fault diagnosis method and system for power distribution terminals based on lightweight neural networks, which solves the problem that existing deep learning models cannot run in real time on power distribution terminal equipment with limited computing power, while maintaining high fault diagnosis accuracy, especially the ability to detect dangerous faults.

[0004] This invention is achieved through the following technical solution:

[0005] The fault diagnosis method for power distribution terminal equipment based on lightweight neural networks includes the following steps:

[0006] Step S1: Deploy an edge computing layer in each power distribution terminal device. The edge computing layer runs a lightweight neural network with less than 1M parameters. The lightweight neural network includes a feature extraction module, a temporal modeling module, an attention module, and a classification module connected in sequence. The feature extraction module is implemented by a depthwise separable convolution, the temporal modeling module is implemented by a parameter-sharing LSTM network, and the classification module is implemented by a global average pooling classifier.

[0007] Step S2: The edge computing layer obtains the power signal data when the power distribution terminal equipment fails, uploads the fault type and the corresponding power signal data as fault samples to the cloud server, and the cloud server trains and updates the lightweight neural network based on the fault samples using a three-stage progressive distillation method, and sends the trained network parameters to the edge computing layer.

[0008] Step S3: The edge computing layer collects power signal data in real time and inputs it into a lightweight neural network updated according to the network parameters sent from the cloud to obtain fault diagnosis results.

[0009] Furthermore, in step S1, the input channel of the depthwise separable convolution is divided into a fundamental component group and a harmonic component group according to the frequency characteristics of the power signal data. The fundamental component group uses a larger convolution kernel, and the harmonic component group uses a smaller convolution kernel. In the depthwise convolution stage, an asymmetric dual-branch structure is adopted, in which one branch is a 1×k depthwise convolution to capture local temporal features, and the other branch is a 1×1 pointwise convolution to capture instantaneous amplitude features. After the two branches are scaled by dynamically adjusting the scaling factor of the convolution output according to the amplitude of the power signal data, they are weighted and summed to obtain the output of the depthwise separable convolution.

[0010] Furthermore, in step S1, the input gate and forget gate of the LSTM network are designed to be complementary to reduce the number of gating parameters, and the weight matrix of the LSTM network is decomposed into the product of two low-rank matrices to reduce the number of parameters.

[0011] Furthermore, the three-stage progressive distillation includes feature distillation, relation distillation, and response distillation; feature distillation is used to learn the intermediate feature representations of the teacher model, and the corresponding loss function is... , As a learnable feature projection layer, it maps student feature dimensions to teacher feature dimensions. For student model features, Features for the teacher model; relation distillation is used to learn the relationship structure between faulty samples, and the corresponding loss function is... For the faulty sample pair (i,j), Let be the cosine similarity of the teacher model features corresponding to faulty samples i and j. Let be the cosine similarity of the student model features corresponding to faulty samples i and j. The temperature parameter is used; response distillation is used to learn the output distribution of the teacher model, and the corresponding loss function is... , For soft label loss, For hard label loss, The intensity gradually decreases during training.

[0012] Furthermore, in step S2, the total loss function used by the cloud server when training the lightweight neural network is: ,in, , The safety weight is assigned to the type c fault; the higher the hazard level of the type c fault, the higher the safety weight it receives. For the true label of type c fault, Let c be the predicted probability of the type c fault. , As weight and .

[0013] Furthermore, in step S2, the edge computing layer updates the lightweight neural network according to the network parameters issued by the cloud server, and uses a validation set formed by fault samples to verify the accuracy. If the accuracy drops beyond a threshold, it automatically rolls back.

[0014] Furthermore, in step S2, the edge computing layer verification accuracy specifically includes: creating a lightweight neural network replica, performing INT8 quantization on each layer of the lightweight neural network replica separately, and evaluating the overall accuracy and critical fault recall rate on the validation set to obtain the sensitivity score of each layer. Based on the sensitivity score, each layer is distinguished as a high-sensitivity layer or a low-sensitivity layer. FP16 or INT8 quantization is used for high-sensitivity layers, and INT4 or INT2 quantization is used for low-sensitivity layers.

[0015] Furthermore, in step S2, the fault types include short-circuit faults with an extremely high hazard level, grounding faults with a high hazard level, overloads with a medium to high hazard level, harmonic pollution with a medium hazard level, voltage anomalies with a medium hazard level, and normal states with a low hazard level.

[0016] Furthermore, the power signal data includes three-phase voltage signals and three-phase current signals.

[0017] This invention is also achieved through the following technical solutions:

[0018] A power distribution terminal fault diagnosis system based on a lightweight neural network is used to implement the fault diagnosis method described above. It includes an edge computing layer and a cloud server deployed on each power distribution terminal device. The edge computing layer includes a data acquisition module, an embedded processing unit, and a communication unit. The embedded processing unit runs a lightweight neural network with fewer than 1M parameters. This lightweight neural network includes a feature extraction module, a temporal modeling module, an attention module, and a classification module connected in sequence. The feature extraction module is implemented using depthwise separable convolution, the temporal modeling module is implemented using a parameter-sharing LSTM network, and the classification module is implemented using a global average pooling classifier. The data acquisition module is used to collect power signal data from the power distribution terminal devices. The communication unit is used by the edge computing layer to upload fault types and corresponding power signal data as fault samples to the cloud. The cloud uses a three-stage progressive distillation method to train and update the lightweight neural network based on the fault samples, and sends the trained network parameters to the edge computing layer through the communication unit. The edge computing layer inputs the real-time collected power signal data into the lightweight neural network updated according to the network parameters sent from the cloud to obtain the fault diagnosis result.

[0019] As can be seen from the above description of the present invention, compared with the prior art, the present invention has the following beneficial effects:

[0020] This invention deploys an edge computing layer in each power distribution terminal device. The edge computing layer runs a lightweight neural network with fewer than 1M parameters. This lightweight neural network includes a feature extraction module, a temporal modeling module, an attention module, and a classification module connected in sequence. The feature extraction module is implemented using depthwise separable convolution, the temporal modeling module is implemented using a parameter-sharing LSTM network, and the classification module is implemented using a global average pooling classifier. The edge computing layer acquires power signal data when the power distribution terminal device malfunctions, uploads the fault type and the corresponding power signal data as fault samples to a cloud server, and the cloud server trains and updates the lightweight neural network using a three-stage progressive distillation based on the fault samples, and then sends the trained network parameters back to the edge computing layer. The edge computing layer collects power signal data in real time and inputs it into the lightweight neural network updated according to the network parameters sent from the cloud to obtain the fault diagnosis result. A lightweight neural network with fewer than 1M operating parameters was designed. The cloud and edge collaboration mechanism was used to train the lightweight neural network in the cloud using a three-stage progressive distillation method. This solves the problem that existing deep learning models cannot run in real time on power distribution terminal equipment with limited computing power, while maintaining high fault diagnosis accuracy, especially the ability to detect dangerous faults. Attached Figure Description

[0021] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0022] Figure 1 is a flowchart of the method of the present invention.

[0023] Figure 2 is an architecture diagram of the lightweight neural network of the present invention.

[0024] Figure 3 is a structural diagram of the depth-separable convolution of the present invention.

[0025] Figure 4 is an overall architecture diagram of the system of the present invention.

[0026] Figure 5 is a schematic diagram of the dynamic model deployment system of the present invention. Detailed Implementation

[0027] The present invention will be further described below through specific embodiments.

[0028] As shown in Figure 1, the fault diagnosis method for power distribution terminal equipment based on lightweight neural networks includes the following steps:

[0029] Step S1: Deploy an edge computing layer in each power distribution terminal device. The edge computing layer runs a lightweight neural network with less than 1M parameters. The lightweight neural network includes a feature extraction module, a temporal modeling module, an attention module, and a classification module connected in sequence. The feature extraction module is implemented by a depthwise separable convolution, the temporal modeling module is implemented by a parameter-sharing LSTM network, and the classification module is implemented by a global average pooling classifier.

[0030] Figure 2 shows the architecture of a lightweight neural network. This lightweight neural network also includes an input layer connected to the input of the feature extraction module and an output layer connected to the output of the classification module. The output layer outputs the fault type plus a confidence score.

[0031] The feature extraction module consists of three depthwise separable convolutional layers, each followed by a BatchNorm layer, a ReLU layer, and a MaxPool layer. Since the power signal data is a one-dimensional time-series signal, using a 1×k one-dimensional convolutional kernel is more efficient. As shown in Figure 3, the input channels of the depthwise separable convolution are divided into a fundamental component group (50Hz) and harmonic component groups (100Hz, 150Hz,...) according to the frequency characteristics of the power signal data. The fundamental component group uses a larger convolutional kernel to capture low-frequency features, while the harmonic component group uses a smaller convolutional kernel to capture high-frequency features.

[0032] Unlike standard depthwise separable convolution, the depthwise separable convolution of this invention employs an asymmetric dual-branch structure in the depthwise convolution stage. One branch is a 1×k depthwise convolution used to capture local temporal features, and the other branch is a 1×1 pointwise convolution used to capture instantaneous amplitude features. The two branches dynamically adjust the scaling factor of the convolution output based on the amplitude of the power signal data, and then perform a weighted sum to obtain the output of the depthwise separable convolution. The scaling factor is... , ,in, These are learnable parameters. This mechanism enables the model to adaptively handle power signals with different amplitude ranges (normal operation, fault state, transient process).

[0033] The power signal data specifically consists of three-phase voltage signals and three-phase current signals. Preprocessing of the power signal data yields the input characteristics. The preprocessing process is existing technology.

[0034] A standard LSTM contains four gated units (input gate, forget gate, output gate, and candidate unit), with a parameter count of 4 × (input gate, forget gate, output gate, and candidate unit). size ×hidden size +hidden size ×hidden size +hidden size The LSTM network of this invention reduces the number of parameters by employing a complementary design for the input gate (i) and forget gate (f), with f=1-i, to halve the number of gating parameters, and by decomposing the weight matrix W of the LSTM network into the product of two low-rank matrices to further reduce the number of parameters. .in, , .

[0035] Table 1 shows a comparison of the parameters of the standard LSTM network and the LSTM network of this invention.

[0036] Table 1

[0037]

[0038] The attention module includes a lightweight SE-Block with reduction=8. This module can be implemented using existing techniques. The classification module includes a global average pooling layer and a 1×1 convolutional layer.

[0039] The parameters of the lightweight neural network are summarized in Table 2:

[0040] Table 2

[0041]

[0042] Step S2: The edge computing layer obtains the power signal data when the power distribution terminal equipment fails, uploads the fault type and the corresponding power signal data as fault samples to the cloud server, and the cloud server trains and updates the lightweight neural network based on the fault samples using a three-stage progressive distillation method, and sends the trained network parameters to the edge computing layer.

[0043] The three-stage progressive distillation includes feature distillation, relation distillation, and response distillation. Feature distillation is used to learn the intermediate feature representations of the teacher model, and the corresponding loss function is... , As a learnable feature projection layer, it maps student feature dimensions to teacher feature dimensions. For student model features, The teacher model features are defined by MSE, which represents the mean squared error. The training epochs are 20, and the learning rate is 1e-3.

[0044] Relation distillation is used to learn the relationship structure between faulty samples, and the corresponding loss function is: For the faulty sample pair (i,j) within the batch, Let be the cosine similarity of the teacher model features corresponding to faulty samples i and j. , Let be the cosine similarity of the student model features corresponding to faulty samples i and j. , Let be the temperature parameter, and KL be the divergence. The training epochs are 10, and the learning rate is 5e-4.

[0045] Response distillation is used to learn the output distribution of the teacher model, and the corresponding loss function is: , For soft label loss, For hard label loss, Output for the teacher model, Output for the student model. The cross-entropy loss is gradually reduced during training (from 0.9 to 0.5), where CE is the cross-entropy loss. For fault type labels, Here, T represents the safety weights corresponding to the fault types, and T is the distillation temperature (default 4.0). The training rounds are 30, and the learning rate is 1e-4→1e-5 (cosine annealing).

[0046] Fault types include short-circuit faults (extremely high hazard level), ground faults (high hazard level), overloads (medium-high hazard level), harmonic pollution (medium hazard level), voltage anomalies (medium hazard level), and normal conditions (low hazard level). The corresponding safety weights are shown in Table 3.

[0047] Table 3

[0048]

[0049] The total loss function used by the cloud server when training the lightweight neural network is: ,in, , The safety weights for type c faults in Table 3 are as follows: the higher the hazard level of a type c fault, the higher its safety weight. For the true label of type c fault, Let c be the predicted probability of the type c fault. , As weight and In this embodiment, , , , .

[0050] The edge computing layer updates the lightweight neural network based on the network parameters sent by the cloud server and verifies the accuracy using a validation set formed by fault samples. If the accuracy drops by more than the threshold (3%), it automatically rolls back and reports the update results.

[0051] The edge computing layer accuracy verification specifically includes: creating a lightweight neural network replica, performing INT8 quantization on each layer of the lightweight neural network replica individually, and evaluating the overall accuracy on a validation set. and dangerous fault recall rate To obtain the sensitivity scores of each layer. , Benchmark accuracy Based on the baseline recall rate, obtain the overall precision rate. Critical fault recall rate Benchmark accuracy Benchmark recall The process is based on existing technology.

[0052] Based on the sensitivity score, each layer is distinguished as a high-sensitivity layer or a low-sensitivity layer. High-sensitivity layers are quantized using FP16 or INT8, while low-sensitivity layers are quantized using INT4 or INT2, in order to maximize the compression effect while maintaining the ability to detect dangerous faults.

[0053] In this embodiment, the sensitivity scores of each layer and the corresponding bit widths are shown in Table 4:

[0054] Table 4

[0055]

[0056] The constructed validation dataset is shown in Table 5:

[0057] Table 5

[0058]

[0059] Step S3: The edge computing layer collects power signal data in real time and inputs it into the lightweight neural network updated according to the network parameters sent from the cloud to obtain the fault diagnosis result, and the diagnosis result is reported to the main station system.

[0060] As shown in Figure 4, the system for implementing the above fault diagnosis method includes an edge computing layer deployed on each power distribution terminal device, a cloud server, and a main station system. The edge computing layer includes a data acquisition module, an embedded processing unit, and a communication unit. The embedded processing unit runs a lightweight neural network with fewer than 1M parameters. This lightweight neural network includes a feature extraction module, a temporal modeling module, an attention module, and a classification module connected in sequence. The feature extraction module is implemented using depthwise separable convolution, the temporal modeling module is implemented using a parameter-sharing LSTM network, and the classification module is implemented using a global average pooling classifier. The data acquisition module is used to collect power signal data from the power distribution terminal devices. The communication unit is used by the edge computing layer to upload the fault type and the corresponding power signal data as fault samples to the cloud. Based on the fault samples, the cloud uses a three-stage progressive distillation method to train and update the lightweight neural network, and sends the trained network parameters back to the edge computing layer through the communication unit. The edge computing layer inputs the real-time collected power signal data into the lightweight neural network updated according to the network parameters sent from the cloud to obtain the fault diagnosis result.

[0061] As shown in Figure 5, to achieve on-demand loading and hot switching of multiple models and optimize the resource utilization of edge devices, the edge computing layer maintains a model library containing models with multiple accuracy levels. The optimal model is selected based on the current system state and power grid operating state, and a double-buffering mechanism is used to achieve seamless hot switching of models. First, the current system state is obtained: the highest accuracy model is selected for power grid fault states, a high accuracy model for power grid early warning states, a lightweight neural network for resource-constrained states, and a lightweight neural network for low-latency requirements; the balanced model is selected by default. The highest accuracy model, high accuracy model, and balanced model can all be implemented using existing technologies.

[0062] This invention was applied to a 10kV distribution network DTU terminal. The terminal's hardware configuration is as follows: processor: ARM Cortex-A53@1.2GHz, memory: 256MB DDR3, storage: 16GB eMMC, operating system: Linux 4.19. Performance test results are shown in Table 6.

[0063] Table 6

[0064] The results of the knowledge distillation training are shown in Table 7:

[0065] Table 7

[0066]

[0067] The quantitative deployment results of the present invention and the comparative scheme are compared in Table 8:

[0068] Table 8

[0069]

[0070] The performance comparison between the present invention and the comparative scheme is shown in Table 9:

[0071] Table 9

[0072]

[0073] In summary, the present invention reduces the number of parameters, model size, and computational complexity, making it suitable for power scenarios and easy to expand.

[0074] In this invention, the terms "first," "second," and "third," etc., are used only to distinguish similar objects and are not necessarily used to describe a specific order or sequence, nor should they be construed as indicating or implying relative importance. The use of terms such as "upper," "lower," "left," "right," "front," and "rear" to indicate orientation or positional relationships is based on the orientation or positional relationships shown in the accompanying drawings and is only for the convenience of describing the invention, not to indicate or imply that the device referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, it should not be construed as a limitation on the scope of protection of this invention. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.

[0075] Furthermore, in the description of this application, unless otherwise stated, "multiple" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0076] The above are merely specific embodiments of the present invention, but the design concept of the present invention is not limited thereto. Any non-substantial modifications made to the present invention using this concept shall be considered as infringing upon the protection scope of the present invention.

Claims

1. A fault diagnosis method for power distribution terminal equipment based on lightweight neural networks, characterized in that: The process includes the following steps: Step S1: Deploy an edge computing layer on each power distribution terminal device. The edge computing layer runs a lightweight neural network with fewer than 1M parameters. This lightweight neural network includes a feature extraction module, a temporal modeling module, an attention module, and a classification module connected in sequence. The feature extraction module is implemented using depthwise separable convolution, the temporal modeling module is implemented using a parameter-sharing LSTM network, and the classification module is implemented using a global average pooling classifier. Step S2: The edge computing layer acquires power signal data when the power distribution terminal device malfunctions, uploads the fault type and the corresponding power signal data as fault samples to the cloud server, and the cloud server trains and updates the lightweight neural network using a three-stage progressive distillation method based on the fault samples, and then sends the trained network parameters to the edge computing layer. Step S3: The edge computing layer collects power signal data in real time and inputs it into the lightweight neural network updated according to the network parameters sent from the cloud to obtain the fault diagnosis result.

2. The fault diagnosis method for power distribution terminal equipment based on lightweight neural networks according to claim 1, characterized in that: In step S1, the input channel of the depthwise separable convolution is divided into a fundamental component group and a harmonic component group according to the frequency characteristics of the power signal data. The fundamental component group uses a larger convolution kernel, and the harmonic component group uses a smaller convolution kernel. In the depthwise convolution stage, an asymmetric dual-branch structure is adopted, in which one branch is a 1×k depthwise convolution to capture local temporal features, and the other branch is a 1×1 pointwise convolution to capture instantaneous amplitude features. The two branches are scaled according to the amplitude of the power signal data by dynamically adjusting the scaling factor of the convolution output, and then weighted and summed to obtain the output of the depthwise separable convolution.

3. The fault diagnosis method for power distribution terminal equipment based on lightweight neural networks according to claim 1, characterized in that: In step S1, the input gate and forget gate of the LSTM network are designed to be complementary to reduce the number of gating parameters, and the weight matrix of the LSTM network is decomposed into the product of two low-rank matrices to reduce the number of parameters.

4. The fault diagnosis method for power distribution terminal equipment based on lightweight neural networks according to claim 1, 2, or 3, characterized in that: The three-stage progressive distillation includes feature distillation, relation distillation, and response distillation; feature distillation is used to learn the intermediate feature representations of the teacher model, and the corresponding loss function is... , As a learnable feature projection layer, it maps student feature dimensions to teacher feature dimensions. For student model features, Features for the teacher model; relation distillation is used to learn the relationship structure between faulty samples, and the corresponding loss function is... For the faulty sample pair (i,j), Let be the cosine similarity of the teacher model features corresponding to faulty samples i and j. Let be the cosine similarity of the student model features corresponding to faulty samples i and j. The temperature parameter is used; response distillation is used to learn the output distribution of the teacher model, and the corresponding loss function is... , For soft label loss, For hard label loss, The intensity gradually decreases during training.

5. The fault diagnosis method for power distribution terminal equipment based on lightweight neural networks according to claim 4, characterized in that: In step S2, the total loss function used by the cloud server when training the lightweight neural network is: ,in, , The safety weight is assigned to the type c fault; the higher the hazard level of the type c fault, the higher the safety weight it receives. For the true label of type c fault, Let c be the predicted probability of the type c fault. 、 As weight and 。 6. The fault diagnosis method for power distribution terminal equipment based on lightweight neural networks according to claim 1, 2, or 3, characterized in that: In step S2, the edge computing layer updates the lightweight neural network according to the network parameters issued by the cloud server, and uses the verification set formed by the fault samples to verify the accuracy. If the accuracy drops beyond the threshold, it will automatically roll back.

7. The fault diagnosis method for power distribution terminal equipment based on lightweight neural networks according to claim 6, characterized in that: In step S2, the edge computing layer verification accuracy specifically includes: creating a lightweight neural network replica, performing INT8 quantization on each layer of the lightweight neural network replica separately, and evaluating the overall accuracy and critical fault recall rate on the validation set to obtain the sensitivity score of each layer. Based on the sensitivity score, each layer is distinguished as a high-sensitivity layer or a low-sensitivity layer. FP16 or INT8 quantization is used for high-sensitivity layers, and INT4 or INT2 quantization is used for low-sensitivity layers.

8. The fault diagnosis method for power distribution terminal equipment based on lightweight neural networks according to claim 5, characterized in that: In step S2, the fault types include short-circuit faults with extremely high hazard level, ground faults with high hazard level, overloads with medium to high hazard level, harmonic pollution with medium hazard level, voltage anomalies with medium hazard level, and normal states with low hazard level.

9. The fault diagnosis method for power distribution terminal equipment based on lightweight neural networks according to claim 1, 2, or 3, characterized in that: The power signal data includes three-phase voltage signals and three-phase current signals.

10. A power distribution terminal fault diagnosis system based on a lightweight neural network, used to implement the fault diagnosis method according to any one of claims 1 to 9, characterized in that: The system includes an edge computing layer deployed on various power distribution terminal devices and a cloud server. The edge computing layer comprises a data acquisition module, an embedded processing unit, and a communication unit. The embedded processing unit runs a lightweight neural network with fewer than 1M parameters. This lightweight neural network includes a feature extraction module, a temporal modeling module, an attention module, and a classification module connected in sequence. The feature extraction module is implemented using depthwise separable convolution, the temporal modeling module is implemented using a parameter-sharing LSTM network, and the classification module is implemented using a global average pooling classifier. The data acquisition module is used to collect power signal data from the power distribution terminal devices. The communication unit is used by the edge computing layer to upload fault types and corresponding power signal data as fault samples to the cloud. Based on the fault samples, the cloud uses a three-stage progressive distillation method to train and update the lightweight neural network, and sends the trained network parameters back to the edge computing layer through the communication unit. The edge computing layer inputs the real-time collected power signal data into the lightweight neural network updated according to the network parameters sent from the cloud to obtain the fault diagnosis result.