Fault diagnosis method, system and equipment for power equipment and storage medium
By employing a pruning and quantized federated learning system in the intelligent power distribution system to diagnose faults in power equipment, the limitations of computing and communication resources in traditional methods are solved, achieving efficient and accurate fault diagnosis and ensuring the stable operation of the power distribution system.
Patent Information
- Application Number
- CN202410903204.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-10-30
- Filing Date
- 2024-07-08
- Publication Date
- 2024-11-01
AI Technical Summary
Traditional centralized fault diagnosis methods in smart distribution networks suffer from problems such as difficulty in centralized data processing and insufficient privacy protection. Federated learning is computationally inefficient and resource-constrained in distributed environments, resulting in inadequate fault diagnosis efficiency.
A federated learning system based on pruning and quantization is adopted. By pruning model parameters and performing vector quantization on the client side, the model size and data transmission volume are reduced, thus optimizing the model training process.
Without compromising model accuracy, the computational and communication burden was reduced, fault diagnosis efficiency was improved, and the safety and stability of the power distribution system were ensured.
Smart Images

Figure CN118884074A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of fault diagnosis of power distribution systems, and in particular to a fault diagnosis method, device, equipment and storage medium for power equipment. Background Art
[0002] In the field of power systems, with the development of smart distribution networks, efficient and accurate fault diagnosis technology has become particularly important. Fault diagnosis of smart distribution systems is not only related to the stable operation of the power grid, but also directly affects the quality of power supply to consumers. However, in the face of a large and decentralized power grid system, traditional centralized fault diagnosis methods have gradually shown their limitations due to the difficulty of centralized data processing and insufficient privacy protection.
[0003] As an emerging machine learning paradigm, federated learning allows data to remain local by collaboratively training models on multiple distributed nodes, thereby protecting personal privacy and enhancing data security. However, when federated learning is applied to the field of fault diagnosis of intelligent distribution systems, due to the distributed distribution environment, there are certain limitations in the implementation of federated learning, including low model efficiency, insufficient performance, and limitations on computing and communication resources. Summary of the invention
[0004] In order to solve the above-mentioned technical problems, the present invention provides a fault diagnosis method, device, equipment and storage medium for power equipment, so as to solve the limitations of computational burden and communication overhead in the existing model training process, thereby achieving the technical effect of reducing the cost of storage space and data transmission and improving fault diagnosis efficiency.
[0005] In a first aspect, the present invention provides a method for diagnosing a fault of an electric device, the method comprising:
[0006] Acquiring operation data of the power equipment and preprocessing the operation data, wherein the operation data includes data of gas dissolved in oil of the transformer;
[0007] Inputting the pre-processed operation data into a preset fault diagnosis model to obtain a fault diagnosis result, wherein the fault diagnosis model is constructed based on a neural network model and trained based on a pruning and quantization federated learning system;
[0008] The specific steps of model training based on the pruning and quantization federated learning system include:
[0009] Each client receives the global model parameters sent by the server, initializes and trains the local model according to the global model parameters, and obtains the local model parameters;
[0010] The client prunes the local model parameters according to the L1 norm of the weights, vector quantizes the pruned local model parameters, and uploads the vector quantized local model parameters to the server;
[0011] The server receives local model parameters from each client, updates the global model parameters according to the local model parameters, and determines whether the updated global model parameters meet the iteration stop condition. If so, the updated global model parameters are used as the optimal model parameters and the iterative training is stopped. Otherwise, the updated global model parameters are sent to each client to continue the iterative training until the iteration stop condition is met.
[0012] Furthermore, each client receives the global model parameters sent by the server, and initializes and trains the local model according to the global model parameters. The step of obtaining the local model parameters includes:
[0013] Each client initializes the corresponding local model according to the global model parameters sent by the server, uses the local data set and trains the initialized local model based on the stochastic gradient descent algorithm to obtain the local model parameters.
[0014] Furthermore, the step of pruning the local model parameters according to the L1 norm of the weights by the client includes:
[0015] The client corresponds each layer parameter of the local model to a mask matrix, and determines whether to prune the weight of the local model parameter according to the L1 norm of the weight. If the weight is pruned, the corresponding component in the mask matrix is set to 0, otherwise, the corresponding component in the mask matrix is set to 1;
[0016] According to the generated mask matrix, the weight matrix of the local model is processed to obtain the pruned local model parameters.
[0017] Furthermore, the step of vector quantizing the pruned local model parameters includes:
[0018] Normalizing the pruned local model parameters according to the scaling factor, and dividing the normalized pruned local model parameters into a plurality of different sub-vectors;
[0019] Dither is added to each sub-vector, and the sub-vector to which the dither is added is discretely quantized.
[0020] Furthermore, the step of updating the global model parameters according to the local model parameters on the server side includes:
[0021] The server de-jitters and de-normalizes the received local model parameters, and aggregates the de-normalized local model parameters through a federated average aggregation algorithm to obtain updated global model parameters.
[0022] Furthermore, the step of adding jitter to each sub-vector and performing discrete quantization on the sub-vector to which the jitter is added comprises:
[0023] Generate a plurality of first jitter vectors by sharing a common seed, wherein the number of the first jitter vectors is consistent with the number of the sub-vectors;
[0024] Each first jitter vector is added to a corresponding sub-vector, and lattice quantization is performed on the sub-vector to which the jitter is added.
[0025] Furthermore, the step of the server de-jittering and de-normalizing the received local model parameters includes:
[0026] The server accesses the shared public seed and generates a second jitter vector according to the shared public seed, wherein the second jitter vector is the same as the first jitter vector;
[0027] The second jitter vector is subtracted from the received local model parameters, and the local model parameters from which the jitter is subtracted are denormalized.
[0028] In a second aspect, the present invention provides a fault diagnosis system for electric power equipment, the system comprising:
[0029] A data acquisition module, used to acquire operating data of the power equipment and pre-process the operating data, wherein the operating data includes data of gas dissolved in oil of the transformer;
[0030] A fault diagnosis module, used for inputting the pre-processed operation data into a preset fault diagnosis model to obtain a fault diagnosis result, wherein the fault diagnosis model is constructed based on a neural network model and is trained based on a pruning and quantization federated learning system;
[0031] The specific steps of model training based on the pruning and quantization federated learning system include:
[0032] Each client receives the global model parameters sent by the server, initializes and trains the local model according to the global model parameters, and obtains the local model parameters;
[0033] The client prunes the local model parameters according to the L1 norm of the weights, vector quantizes the pruned local model parameters, and uploads the vector quantized local model parameters to the server;
[0034] The server receives local model parameters from each client, updates the global model parameters according to the local model parameters, and determines whether the updated global model parameters meet the iteration stop condition. If so, the updated global model parameters are used as the optimal model parameters and the iterative training is stopped. Otherwise, the updated global model parameters are sent to each client to continue the iterative training until the iteration stop condition is met.
[0035] In a third aspect, an embodiment of the present invention further provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.
[0036] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the above method when executed by a processor.
[0037] The present invention provides a fault diagnosis method, apparatus, device and storage medium for electric power equipment. The model lightweight operation of the present invention for quantizing and pruning model parameters during the federated learning training process can overcome the limitations of edge devices in computing and communication resources. Through model pruning, the number of model parameters can be reduced, and through vector quantization, a large number of data points can be mapped to a set of smaller representative vectors, which can achieve compression of model data, thereby reducing the communication requirements and computational complexity of the model without reducing the accuracy of the model, improving the efficiency of model training, and ensuring the accuracy of fault diagnosis. The present invention can be applied to distributed power distribution system environments, and through accurate and efficient fault diagnosis of power equipment, the safety and stability of the operation of the distribution system are ensured. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 is a flow chart of a method for diagnosing a fault of an electric power device according to an embodiment of the present invention;
[0039] Figure 2 is a schematic diagram of model pruning in an embodiment of the present invention;
[0040] Figure 3 is a schematic diagram of the quantization of the model lattice in an embodiment of the present invention;
[0041] Figure 4 is a graph showing changes in Acc and FLOPs of the fault diagnosis model at different pruning ratios in an embodiment of the present invention;
[0042] Figure 5 is a graph showing the Acc changes of the fault diagnosis model before and after quantization in an embodiment of the present invention;
[0043] Figure 6is a schematic diagram of the structure of a fault diagnosis system for electric power equipment in an embodiment of the present invention;
[0044] Figure 7 It is a diagram of the internal structure of a computer device in an embodiment of the present invention. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0046] See also Figure 1 The first embodiment of the present invention provides a method for diagnosing a fault of an electric power device, which includes steps S10 to S20:
[0047] Step S10, obtaining operation data of the power equipment and preprocessing the operation data, wherein the operation data includes data of gas dissolved in oil of the transformer;
[0048] Step S20, inputting the pre-processed operation data into a preset fault diagnosis model to obtain a fault diagnosis result, wherein the fault diagnosis model is constructed based on a neural network model and trained based on a pruning and quantization federated learning system;
[0049] The specific steps of model training based on the pruning and quantization federated learning system include:
[0050] Each client receives the global model parameters sent by the server, initializes and trains the local model according to the global model parameters, and obtains the local model parameters;
[0051] The client prunes the local model parameters according to the L1 norm of the weights, vector quantizes the pruned local model parameters, and uploads the vector quantized local model parameters to the server;
[0052] The server receives local model parameters from each client, updates the global model parameters according to the local model parameters, and determines whether the updated global model parameters meet the iteration stop condition. If so, the updated global model parameters are used as the optimal model parameters and the iterative training is stopped. Otherwise, the updated global model parameters are sent to each client to continue the iterative training until the iteration stop condition is met.
[0053] In the present invention, the operating data of the power equipment in each intelligent distribution system site is collected and the operating data is processed through a fault diagnosis model to achieve fault diagnosis of the power equipment in the distribution system. Specifically, the operating data used in the present invention is the dissolved gas data in the oil of each transformer in the intelligent distribution system site.
[0054] Power transformers are the core equipment of the power grid, and their operational reliability affects the safety and stability of the power grid. Most transformer failures are caused by the gradual evolution of small local internal defects. The transformer is a fully sealed box with a complex structure. Its internal defects are difficult to monitor through external measurement methods, but the discharge or overheating caused by it will cause a series of chemical reactions in solid insulating materials such as transformer insulating oil and insulating paper to varying degrees, generating different types of fault characteristic gases, which are dissolved in the transformer oil. Therefore, by detecting or monitoring the concentration and proportion of characteristic gases dissolved in the oil, most of the internal hidden dangers and defects of the transformer can be discovered in time. Commonly used fault characteristic gases dissolved in transformer oil are mainly hydrogen (H2), methane (CH4), ethane (C2H6), ethylene (C2H4), acetylene (C2H2), carbon monoxide (CO), and carbon dioxide (CO2). The gases generated by the transformer under different fault types are shown in Table 1 below:
[0055]
[0056]
[0057] Table 1 Fault gas composition table
[0058] Based on the above Table 1, in this embodiment, the dissolved gas data in the oil of the transformer is obtained in real time by using a sensor, and the data is preprocessed, including removing noise and outliers, etc., to ensure the accuracy and reliability of the data. The preprocessed dissolved gas data in the oil is input as input data into a pre-established fault diagnosis model to realize fault diagnosis of power equipment, wherein the fault diagnosis model is constructed using a neural network model, for example, a fault diagnosis model can be constructed based on an RBF neural network (radial basis function neural network) or a BP neural network (multilayer feedforward neural network), and the fault types outputted by it, in addition to the classification in the above Table 1, can also include low temperature overheating, medium temperature overheating, high temperature overheating, partial discharge and other fault types, and the specific fault type setting and model construction can be determined according to the actual situation, which will not be repeated here.
[0059] Since the power distribution system is large and decentralized, during the training process of the fault diagnosis model, there will be problems such as difficulty in centralized data processing and insufficient data privacy protection. Although the traditional federated learning algorithm can solve these problems, there are still problems such as excessive computing burden and communication overhead for the distributed intelligent power distribution environment. To this end, the present invention provides a method for training a fault diagnosis model based on a federated learning system based on pruning and quantization.
[0060] In this embodiment, the federated learning system includes multiple clients and a server, each client corresponds to a smart distribution system site, and the dissolved gas in oil data of multiple transformer sites are recorded locally on the client. The steps of each round of model update in conventional federated learning include: 1) the server broadcasts the current global model parameters to the client; 2) the client uses its own data to train the local model according to the received global model parameters to obtain local model parameters; 3) the client uploads the local model parameters to the server; 4) the server updates the global model parameters according to all received local model parameters. Based on the above-mentioned federated learning model training, this embodiment adds the steps of parameter pruning and quantization to reduce the computational load and communication overhead during the model training process. The training method provided in this embodiment is described below using one iteration step as an example.
[0061] After receiving the global model parameters and model gradients sent by the server, the client initializes the local model according to the global model parameters and model gradients, and trains the local model using the local data set. Specifically, the initialization content includes model parameters w, learning rate η, local batch size, local iteration number T, and loss function F. k (w), and then use the local data set to train the local model based on the stochastic gradient descent algorithm to update the local model parameters. In this embodiment, the client uses the stochastic gradient descent (SGD) algorithm to minimize the loss function of the local model:
[0062]
[0063] In the formula, and They represent the local model parameters updated by the k-th client in the t-th and t+1-th iteration training respectively. Indicates the function used to update local model parameters. The local dataset, η t is the learning rate of the tth iteration, is the model loss function about gradient.
[0064] The difference between the present invention and conventional federated learning is that before uploading the local model parameters to the server side, the steps of parameter pruning and quantization are added. Model pruning is a technique to reduce the size of the model by removing redundant and unnecessary neurons, connections or weights. It can selectively prune neurons or connections according to the structure of the model and the importance of the weights to achieve the purpose of model compression. In addition, vector quantization technology can map a large number of model parameters into a set of smaller representative vectors, thereby achieving data compression, saving storage space and reducing the cost of data transmission. Therefore, by pruning and quantizing the model on each client, the size of the local model can be significantly reduced, thereby reducing the transmission cost. At the same time, since the lightweight model still maintains high performance, good model performance can be maintained in federated learning tasks.
[0065] Specifically, the parameter pruning of the fault diagnosis model in this embodiment is as follows: Figure 2 As shown, this embodiment adopts a global unstructured pruning strategy, which does not consider the relationship between weights, but prunes based on the L1 norm of weights, and parameter pruning is implemented by masking, that is, each layer parameter of the model corresponds to a mask matrix, which is equal to the weight matrix. If the weight is pruned, the corresponding component in the mask matrix is set to zero, otherwise it is set to one. Therefore, the pruned local model parameters can be updated as follows:
[0066] w′(k)=w(k)☉m(k)
[0067] Where w`(k) represents the weight matrix of the model parameters after pruning the k-th client, w(k) represents the weight matrix of the model parameters before pruning the k-th client, ⊙ represents the XOR operation, and m(k) represents the mask matrix of the model parameters of the k-th client.
[0068] Taking the t+1th iteration training of the kth client as an example, according to the pruned weight matrix above, the pruned local model parameter w of the kth client after the t+1th iteration training can be obtained: k t+1 In this embodiment, the local model parameters uploaded by the client to the server refer to the difference between the local model parameters generated by the current round of training and the local model parameters generated by the previous round of training, that is, the parameter change value. Therefore, based on the pruned local model parameters, the parameter change value of the local model that the client needs to upload to the server can be calculated:
[0069]
[0070] In the formula, h k t+1 represents the parameter change of the local model of the kth client after the t+1th iteration training, w kt+1 and w k t They represent the pruned local model parameters generated by the k-th client in the t+1-th and t-th iteration training respectively.
[0071] After the local model parameter pruning is completed, the next step is to quantize the local parameter model. In this embodiment, the parameter quantization refers to the parameter change value h k t+1 The quantization is performed by using a jitter lattice quantization method, and the specific steps include:
[0072] Normalizing the pruned local model parameters according to the scaling factor, and dividing the normalized pruned local model parameters into a plurality of different sub-vectors;
[0073] Dither is added to each sub-vector, and the sub-vector to which the dither is added is discretely quantized.
[0074] In this embodiment, by scaling the factor For parameter changes Normalize it and divide it into multiple different sub-vectors, where the number of sub-vectors is determined by the total amount of local model parameters. Assume that the normalized parameter change value is divided into M different L×1 sub-vectors h k i , then M is determined by the following formula:
[0075]
[0076] In the formula, d represents the total number of local model parameters, L represents the dimension, and in this embodiment, the preferred L is 2.
[0077] Before quantizing each sub-vector, dithering is added to it to produce a distortion term. The specific steps are as follows:
[0078] Generate a plurality of first jitter vectors by sharing a common seed, wherein the number of the first jitter vectors is consistent with the number of the sub-vectors;
[0079] Each first jitter vector is added to a corresponding sub-vector, and lattice quantization is performed on the sub-vector to which the jitter is added.
[0080] In this embodiment, by sharing the public seed s k Generate a set of L×1 jitter vectors These jitter vectors are randomized in an independent and identically distributed manner, with independent.
[0081] Add each sub-vector to the corresponding first jitter vector, that is:
[0082]
[0083] Then, the sub-vector after adding the jitter vector is discretely quantized. The lattice quantization method is used here, as shown in Figure 3. Each grid point in the lattice corresponds to a sub-vector, and its quantization formula is as follows:
[0084]
[0085] Among them, Q L Represents a quantization function. The quantized parameter change value is uploaded from the client to the server. The server updates the global model parameters according to the parameter change values received from each client. The specific steps include:
[0086] The server de-jitters and de-normalizes the received local model parameters, and aggregates the de-normalized local model parameters through a federated average aggregation algorithm to obtain updated global model parameters.
[0087] In this embodiment, when the server receives the local model parameters, that is, the quantized parameter change values, from each client, it first performs parameter de-jittering and de-normalization, and the steps include:
[0088] The server accesses the shared public seed and generates a second jitter vector according to the shared public seed, wherein the second jitter vector is the same as the first jitter vector;
[0089] The second jitter vector is subtracted from the received local model parameters, and the local model parameters from which the jitter is subtracted are denormalized.
[0090] In this embodiment, the server accesses the shared public seed s used to generate the first jitter vector k , and generates a second jitter vector with uniform distribution. Since the same public seed is used, the second jitter vector generated by the server is the same as the first jitter vector generated by the client.
[0091] After generating the second jitter vector, the server subtracts the corresponding second jitter vector from each corresponding grid point, that is, subtracts the corresponding second jitter vector from each quantized sub-vector:
[0092]
[0093] Then, the sub-vector after subtracting the jitter vector is subjected to the inverse operation of normalization, that is, anti-normalization, to obtain the anti-normalized sub-vector:
[0094]
[0095] And for the M anti-normalized sub-vectors Merge to get a d×1 vector Actually That is, the parameter change value uploaded by the kth client after the t+1th round of training
[0096]
[0097] Finally, the server aggregates the global model parameters of the tth round through the federated average aggregation method to obtain the global model parameters of the t+1th round:
[0098]
[0099] In the formula, k represents the kth client, K represents the total number of clients, n represents the total amount of local sample data, and n k Indicates the amount of local sample data of the kth client.
[0100] The server updates the global model parameters by aggregating the parameter change values of each client to obtain the global model parameters of the t+1th round. Then, it is determined whether the updated global model parameters meet the conditions for stopping the iterative training. The conditions for stopping the iterative training here can be reaching the preset number of iterations or the model accuracy reaching the preset requirements. When the iterative stop conditions are met, it is considered that the training of the fault diagnosis model is completed. If the iterative stop conditions are not met, the updated global model parameters are sent to each client as the local model parameters for the next round of training, and the next iterative training is continued until the iterative stop conditions are met and the model training is completed.
[0101] After multiple cycles of iterative training in the above iterative steps, the fault diagnosis model of the intelligent power distribution system is finally trained and used to monitor and diagnose the real-time faults of the intelligent power distribution system, thereby accurately diagnosing the fault type of the power distribution system. Through timely fault diagnosis, operation and maintenance personnel can take quick measures to reduce system downtime and maintenance costs, and improve the safety and stability of power system operation.
[0102] In order to more intuitively reflect the impact of model pruning and quantization on model performance, the following compares the model accuracy (Acc) and complexity (FLOPs) under different pruning ratios, as well as the model accuracy (Acc) before and after quantization. Figure 4 As shown in the figure, the horizontal axis is the different pruning ratios, the vertical axis on the left is the Acc of the corresponding model, and the vertical axis on the right is the FLOPs of the corresponding model. Figure 4It can be seen that there is a trade-off between the model’s Acc and FLOPs. When the pruning ratio is 0.4, both the model’s Acc and FLOPs are within an acceptable range, indicating that the performance of the intelligent distribution system fault diagnosis model can be guaranteed while reducing the difficulty of deploying the model on micro-terminal devices in a distributed environment. Figure 5 As shown in the figure, the horizontal axis is the number of iterations of model training, and the vertical axis is the Acc of the corresponding model. Figure 5 It can be seen that the Acc of the quantified model is basically the same as that of the original model, which means that while protecting privacy, an ideal intelligent distribution system fault diagnosis effect has been achieved.
[0103] The present invention provides a method for fault diagnosis of electric power equipment, which reduces the number of model parameters through model pruning, and maps a large number of data points into a set of smaller representative vectors through vector quantization, thereby realizing compression of model data. The present invention reduces the storage requirement of the model without reducing the accuracy of the model, reduces the computational cost of model transmission and reasoning, and maintains the high performance of the model, thereby ensuring the accuracy and timeliness of fault diagnosis, and further improving the safety and stability of the operation of the distribution system.
[0104] See also Figure 6 Based on the same inventive concept, a fault diagnosis system for electric power equipment proposed in the second embodiment of the present invention includes:
[0105] The data acquisition module 10 is used to acquire the operation data of the power equipment and pre-process the operation data, wherein the operation data includes the data of gas dissolved in oil of the transformer;
[0106] A fault diagnosis module 20, used for inputting the pre-processed operation data into a preset fault diagnosis model to obtain a fault diagnosis result, wherein the fault diagnosis model is constructed based on a neural network model and is trained based on a pruning and quantization federated learning system;
[0107] The specific steps of model training based on the pruning and quantization federated learning system include:
[0108] Each client receives the global model parameters sent by the server, initializes and trains the local model according to the global model parameters, and obtains the local model parameters;
[0109] The client prunes the local model parameters according to the L1 norm of the weights, vector quantizes the pruned local model parameters, and uploads the vector quantized local model parameters to the server;
[0110] The server receives local model parameters from each client, updates the global model parameters according to the local model parameters, and determines whether the updated global model parameters meet the iteration stop condition. If so, the updated global model parameters are used as the optimal model parameters and the iterative training is stopped. Otherwise, the updated global model parameters are sent to each client to continue the iterative training until the iteration stop condition is met.
[0111] The technical features and technical effects of the fault diagnosis system of the electric power equipment proposed in the embodiment of the present invention are the same as those of the method proposed in the embodiment of the present invention, and are not described in detail here. Each module in the fault diagnosis system of the above-mentioned electric power equipment can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0112] In addition, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.
[0113] See also Figure 7 , an internal structure diagram of a computer device in an embodiment, the computer device can specifically be a terminal or a server. The computer device includes a processor, a memory, a network interface, a display and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a fault diagnosis method for power equipment is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0114] It can be understood by those skilled in the art that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computing device may include more or fewer components than shown in the figure, or combine certain components, or have the same component arrangement.
[0115] In addition, an embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the above method are implemented.
[0116] In summary, an embodiment of the present invention proposes a method, apparatus, device and storage medium for fault diagnosis of electric power equipment. The method obtains operating data of the electric power equipment and preprocesses the operating data, wherein the operating data includes data of dissolved gas in oil of the transformer; the preprocessed operating data is input into a preset fault diagnosis model to obtain a fault diagnosis result, wherein the fault diagnosis model is constructed based on a neural network model and is trained by a federated learning system based on pruning and quantization; wherein the specific steps of model training by the federated learning system based on pruning and quantization include: each client receives the global model parameters sent by the server, and trains the local model according to the global model parameters; The model is initialized and trained to obtain local model parameters; the client prunes the local model parameters according to the L1 norm of the weight, vector quantizes the pruned local model parameters, and uploads the vector quantized local model parameters to the server; the server receives the local model parameters from each client, updates the global model parameters according to the local model parameters, and determines whether the updated global model parameters meet the iteration stop condition. If so, the updated global model parameters are used as the optimal model parameters and the iteration training is stopped. Otherwise, the updated global model parameters are sent to each client to continue the iteration training until the iteration stop condition is met. The present invention reduces the number of model parameters through model pruning, and maps a large number of data points to a set of smaller representative vectors through vector quantization, thereby realizing the compression of model data. The present invention reduces the storage requirements of the model without reducing the model accuracy, reduces the computational cost of model transmission and reasoning, and maintains the high performance of the model, ensuring the accuracy and timeliness of fault diagnosis, and further improving the safety and stability of the distribution system operation.
[0117] Each embodiment in this specification is described in a progressive manner, and the same or similar parts of each embodiment can be directly referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. It should be noted that the technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above-mentioned embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0118] The above-mentioned embodiments only express several preferred implementation modes of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in the technical field, several improvements and substitutions can be made without departing from the technical principles of the present invention, and these improvements and substitutions should also be regarded as the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be based on the protection scope of the claims.
Claims
1. A method for diagnosing a fault of an electric power device, characterized in that: include: Acquiring operation data of the power equipment and preprocessing the operation data, wherein the operation data includes data of gas dissolved in oil of the transformer; Inputting the pre-processed operation data into a preset fault diagnosis model to obtain a fault diagnosis result, wherein the fault diagnosis model is constructed based on a neural network model and trained based on a pruning and quantization federated learning system; The specific steps of model training based on the pruning and quantization federated learning system include: Each client receives the global model parameters sent by the server, initializes and trains the local model according to the global model parameters, and obtains the local model parameters; The client prunes the local model parameters according to the L1 norm of the weights, vector quantizes the pruned local model parameters, and uploads the vector quantized local model parameters to the server; The server receives local model parameters from each client, updates the global model parameters according to the local model parameters, and determines whether the updated global model parameters meet the iteration stop condition. If so, the updated global model parameters are used as the optimal model parameters and the iterative training is stopped. Otherwise, the updated global model parameters are sent to each client to continue the iterative training until the iteration stop condition is met.
2. The fault diagnosis method of electric power equipment according to claim 1, characterized in that: Each client receives the global model parameters sent by the server, and initializes and trains the local model according to the global model parameters. The step of obtaining the local model parameters includes: Each client initializes the corresponding local model according to the global model parameters sent by the server, uses the local data set and trains the initialized local model based on the stochastic gradient descent algorithm to obtain the local model parameters.
3. The fault diagnosis method of electric power equipment according to claim 1, characterized in that: The step of pruning the local model parameters according to the L1 norm of the weights by the client includes: The client corresponds each layer parameter of the local model to a mask matrix, and determines whether to prune the weight of the local model parameter according to the L1 norm of the weight. If the weight is pruned, the corresponding component in the mask matrix is set to 0, otherwise, the corresponding component in the mask matrix is set to 1; According to the generated mask matrix, the weight matrix of the local model is processed to obtain the pruned local model parameters.
4. The fault diagnosis method of electric power equipment according to claim 1, characterized in that: The step of vector quantizing the pruned local model parameters comprises: Normalizing the pruned local model parameters according to the scaling factor, and dividing the normalized pruned local model parameters into a plurality of different sub-vectors; Dither is added to each sub-vector, and the sub-vector to which the dither is added is discretely quantized.
5. The fault diagnosis method of electric power equipment according to claim 1, characterized in that: The step of updating the global model parameters according to the local model parameters on the server side comprises: The server de-jitters and de-normalizes the received local model parameters, and aggregates the de-normalized local model parameters through a federated average aggregation algorithm to obtain updated global model parameters.
6. The fault diagnosis method of electric power equipment according to claim 4, characterized in that: The step of adding jitter to each sub-vector and performing discrete quantization on the sub-vector to which the jitter is added comprises: Generate a plurality of first jitter vectors by sharing a common seed, wherein the number of the first jitter vectors is consistent with the number of the sub-vectors; Each first jitter vector is added to a corresponding sub-vector, and lattice quantization is performed on the sub-vector to which the jitter is added.
7. The fault diagnosis method of electric power equipment according to claim 6, characterized in that: The step of the server de-jittering and de-normalizing the received local model parameters comprises: The server accesses the shared public seed and generates a second jitter vector according to the shared public seed, wherein the second jitter vector is the same as the first jitter vector; The second jitter vector is subtracted from the received local model parameters, and the local model parameters from which the jitter is subtracted are denormalized.
8. A fault diagnosis system for electric power equipment, characterized in that: include: A data acquisition module, used to acquire operating data of the power equipment and pre-process the operating data, wherein the operating data includes data of gas dissolved in oil of the transformer; A fault diagnosis module, used for inputting the pre-processed operation data into a preset fault diagnosis model to obtain a fault diagnosis result, wherein the fault diagnosis model is constructed based on a neural network model and is trained based on a pruning and quantization federated learning system; The specific steps of model training based on the pruning and quantization federated learning system include: Each client receives the global model parameters sent by the server, initializes and trains the local model according to the global model parameters, and obtains the local model parameters; The client prunes the local model parameters according to the L1 norm of the weights, vector quantizes the pruned local model parameters, and uploads the vector quantized local model parameters to the server; The server receives local model parameters from each client, updates the global model parameters according to the local model parameters, and determines whether the updated global model parameters meet the iteration stop condition. If so, the updated global model parameters are used as the optimal model parameters and the iterative training is stopped. Otherwise, the updated global model parameters are sent to each client to continue the iterative training until the iteration stop condition is met.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
