Method, device and equipment for establishing fault type detection model and medium
By constructing a fault type detection model that includes a generator and a classifier, and training it with simulated sample data, the problem of inaccurate fault location in the existing technology for power distribution networks is solved, and fast and efficient fault type detection is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGDONG POWER GRID CO LTD
- Filing Date
- 2023-07-28
- Publication Date
- 2026-07-07
Smart Images

Figure CN116956042B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power distribution network technology, and in particular to a method, apparatus, equipment and medium for establishing a fault type detection model. Background Technology
[0002] Electricity, as one of the basic necessities of modern industry and life, has become an indispensable energy source in people's daily lives. During the transmission and distribution of electricity, any faults can cause not only short-term power outages or even accidents, but also significant difficulties in the maintenance and management of the power system. This is especially true in rural areas, where power grid faults are more frequent and complex due to factors such as remoteness, harsh natural environments, and aging power lines.
[0003] Currently, model-based methods for fault location in distribution networks require a large amount of prior knowledge and the collection of a large amount of experimental data, and cannot quickly and accurately locate faults in distribution networks. Summary of the Invention
[0004] This invention provides a method, apparatus, equipment, and medium for establishing a fault type detection model to improve the accuracy and efficiency of fault location in power distribution networks.
[0005] According to one aspect of the present invention, a method for establishing a fault type detection model is provided, the method comprising:
[0006] Acquire switch status data within the power distribution network detection area;
[0007] Based on the switch status data, a sample dataset is constructed; the sample dataset includes at least one switch sample data with a standard fault category label;
[0008] The pre-built detection network model is trained using the switch sample data until the preset model training termination condition is met.
[0009] The detection network model includes a generator model and a classifier model; the generator model is used to generate simulated sample data; the classifier model is used to train itself based on the simulated sample data and the switch sample data to obtain the output fault categories corresponding to the switch sample data respectively.
[0010] The trained detection network model is used as a fault type detection model.
[0011] According to another aspect of the present invention, a fault type detection method is provided, comprising:
[0012] Acquire the status data of the switches to be tested within the area to be tested in the power distribution network;
[0013] The state data of the switch to be detected is input into the fault type detection model to obtain the fault type detection result.
[0014] According to another aspect of the present invention, an apparatus for establishing a fault type detection model is provided, comprising:
[0015] The switch status acquisition module is used to acquire switch status data within the power distribution network detection area;
[0016] A sample data construction module is used to construct a sample dataset based on the switch status data; the sample dataset includes at least one switch sample data with a standard fault category label;
[0017] The model training module is used to train a pre-built detection network model using the switch sample data until a preset model training termination condition is met; wherein, the detection network model includes a generator model and a classifier model; the generator model is used to generate simulated sample data; the classifier model is used to train its own model based on the simulated sample data and the switch sample data to obtain the output fault categories corresponding to the switch sample data respectively;
[0018] The model determination module is used to use the trained detection network model as the fault type detection model.
[0019] According to another aspect of the present invention, a fault type detection device is provided, comprising:
[0020] The data acquisition module is used to acquire the status data of the switches to be tested within the testing area of the power distribution network.
[0021] The fault type determination module is used to input the state data of the switch to be detected into the fault type detection model to obtain the fault type detection result.
[0022] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0023] At least one processor; and
[0024] A memory communicatively connected to the at least one processor; wherein,
[0025] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to execute the fault type detection model establishment method or fault type detection method according to any embodiment of the present invention.
[0026] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions, the computer instructions being configured to cause a processor to execute and implement the method for establishing a fault type detection model or the fault type detection method according to any embodiment of the present invention.
[0027] The technical solution of this invention involves constructing a sample dataset based on the switch status data acquired within the distribution network detection area, generating simulated sample data through a generator model in the detection network model, and training the classifier model in the detection network model based on the simulated sample data and switch sample data. The trained detection network model is then used as a fault type detection model. By introducing simulated sample data into the model training, the feature information content of the detection network model for feature extraction from sample data is enriched, while the time spent collecting switch sample data is reduced, improving the training efficiency and effect of the model training, and enhancing the detection accuracy of fault detection in the distribution network using the fault type detection model.
[0028] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0029] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0030] Figure 1 This is a flowchart of a method for establishing a fault type detection model according to Embodiment 1 of the present invention;
[0031] Figure 2A This is a flowchart of a method for establishing a fault type detection model according to Embodiment 2 of the present invention;
[0032] Figure 2B This is a schematic diagram of the structure of a generator model provided in Embodiment 2 of the present invention;
[0033] Figure 3 This is a flowchart of a fault type detection method provided in Embodiment 3 of the present invention;
[0034] Figure 4 This is a schematic diagram of a fault type detection model establishment device provided in Embodiment 4 of the present invention;
[0035] Figure 5 This is a schematic diagram of a fault type detection device according to Embodiment 5 of the present invention;
[0036] Figure 6 This is a schematic diagram of the structure of an electronic device that implements the fault type detection model establishment method or fault type detection method of the embodiments of the present invention. Detailed Implementation
[0037] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0038] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0039] Example 1
[0040] Figure 1 This is a flowchart of a method for establishing a fault type detection model according to Embodiment 1 of the present invention. This embodiment is applicable to the situation of fault location when a fault occurs in a distribution network. This method can be executed by a fault type detection model establishment device, which can be implemented in hardware and / or software and can be configured in electronic equipment. Figure 1 As shown, the method includes:
[0041] S110. Obtain switch status data within the power distribution network detection area.
[0042] The distribution network detection area can refer to a pre-defined distribution network area within the distribution network. Optionally, multiple distribution network areas can exist in the distribution network, and each distribution network area can contain at least one smart switch.
[0043] Switch status data can represent the switching status of smart switches in the distribution network monitoring area; for example, the switch status can be on or off. Optionally, the switch status data can be represented in matrix or vector form, and this embodiment does not limit this.
[0044] Specifically, the switch status of the distribution network detection area when a fault occurs within a historical period can be determined as the switch status data of the distribution network detection area.
[0045] S120. Construct a sample dataset based on the switch status data.
[0046] The sample dataset may include at least one switch sample data with a standard fault category label. Optionally, the fault category may refer to the type of fault occurring in the distribution network detection area corresponding to the switch status data when the switch status data is acquired, such as surge arrester explosion, distribution transformer overload, and capacitor bank fault. The standard fault category label may refer to the accurate fault category corresponding to the switch sample data.
[0047] Specifically, a sample dataset can be constructed based on switch status data obtained from at least one distribution network monitoring area in the distribution network. Optionally, the switch sample data in the sample dataset can be divided into training sample data and test sample data. For example, 70% of the switch sample data in the sample dataset can be used as training sample data, and 30% of the switch sample data in the sample dataset can be used as test sample data.
[0048] Optionally, a sample dataset is constructed based on the switch status data, including: obtaining switch structure topology data corresponding to the distribution network detection area; determining switch sample data based on the switch structure topology data and switch status data; determining the standard fault category for each switch sample data; and generating a sample dataset including at least one switch sample data with a standard fault category label.
[0049] The switch topology data can represent the topological relationships of smart switches in the distribution network detection area. Optionally, the switch topology data and switch sample data can be represented in matrix or vector form; this embodiment does not limit this.
[0050] Specifically, based on the topological relationship of at least one smart switch when a fault occurred in the distribution network detection area in the past, the switch structure topology data corresponding to the distribution network detection area can be determined. Based on the switch structure topology data corresponding to the distribution network detection area and the switch status data in the distribution network detection area, a switch sample data is determined, and a corresponding standard fault category is determined for each switch sample data, that is, the fault type of the fault that occurred in the distribution network detection area in the past. A sample dataset including at least one switch sample data with a standard fault category label is generated.
[0051] Optionally, the switch sample data can be determined using the following formula:
[0052] P = G × D;
[0053] Where P is a matrix representing switch sample data, G is a matrix representing switch state data, and D is a matrix representing switch structure topology data.
[0054] S130. Use switch sample data to train the pre-built detection network model until the preset model training termination condition is met.
[0055] The detection network model can be a neural network model pre-defined by relevant technical personnel. For example, the detection network model can be a generative adversarial network (GAN) model. For instance, the generative adversarial network model can be trained using switch sample data until a preset model training termination condition is met.
[0056] The detection network model can also be a network model pre-built by relevant technical personnel according to actual needs.
[0057] For example, the detection network model may include a generator model and a classifier model; the generator model can be used to generate simulated sample data; the classifier model can be used to train its own model based on the simulated sample data and the switch sample data to obtain the output fault categories corresponding to the switch sample data respectively.
[0058] Optionally, the generator model and classifier model can be neural network models. Optionally, the simulated sample data differs from the switch sample data. The simulated sample data is not generated from historical switch state data and switch structure topology data during faults in the distribution network detection area, but rather from simulated sample data generated by the generator model. Both participate in the training process of the classifier model, completing the training of the classifier model. By generating simulated sample data, the feature information content of the detection network model for feature extraction from sample data is enriched, achieving better training results without increasing the amount of switch sample data, while reducing the time spent collecting switch sample data and improving the training efficiency of the model.
[0059] The preset model training termination condition can refer to the number of model training iterations reaching a preset iteration threshold; optionally, the iteration threshold can be adaptively set by those skilled in the art, for example, the iteration threshold can be 50 times.
[0060] Specifically, a pre-built detection network model can be trained based on the acquired switch sample data until the training process of the detection network model meets the preset model training termination conditions.
[0061] S140. Use the trained detection network model as the fault type detection model.
[0062] Specifically, a detection network model that meets the preset model training termination conditions can be used as a fault type detection model to detect fault types in the distribution network area to be detected.
[0063] The technical solution of this invention involves constructing a sample dataset based on the switch status data acquired within the distribution network detection area, generating simulated sample data through a generator model in the detection network model, and training the classifier model in the detection network model based on the simulated sample data and switch sample data. The trained detection network model is then used as a fault type detection model. By introducing simulated sample data into the model training, the feature information content of the detection network model for feature extraction from sample data is enriched, while the time spent collecting switch sample data is reduced, improving the training efficiency and effect of the model training, and enhancing the detection accuracy of fault detection in the distribution network using the fault type detection model.
[0064] Example 2
[0065] Figure 2AThis is a flowchart illustrating a method for establishing a fault type detection model according to Embodiment 2 of the present invention. This embodiment further refines the above embodiment, providing specific steps for training a pre-built detection network model using switch sample data until a preset model training termination condition is met. It should be noted that for parts not detailed in this embodiment, please refer to the relevant descriptions in other embodiments, which will not be repeated here. Figure 2A As shown, the method includes:
[0066] S210. Obtain switch status data within the distribution network detection area.
[0067] S220. Construct a sample dataset based on the switch status data.
[0068] S230. Input the pre-constructed random noise data into the generator model in the detection network model to obtain the simulated sample data output by the generator model.
[0069] The random noise data can be white noise or other types of noise data; this implementation does not impose any restrictions on this.
[0070] Specifically, pre-built random noise data can be input into the generator model in the detection network model, and the generator model will output simulated sample data based on the input random noise data.
[0071] Optionally, in this embodiment of the invention, the structural diagram of the generator model can be as follows: Figure 2B As shown, the classifier model may include four deconvolutional layers, a first convolutional layer, and an attention feature extraction layer; the attention feature extraction layer includes a cascaded channel attention feature extraction layer and a spatial attention feature extraction layer. Correspondingly, pre-constructed random noise data is input into the generator model in the detection network model to obtain simulated sample data output by the generator model. This includes: inputting the random noise data into the deconvolutional layer of the generator model for feature extraction to obtain the first extracted feature parameters output by the deconvolutional layer; inputting the first extracted feature parameters into the channel attention feature extraction layer for feature extraction to obtain channel attention feature parameters; inputting the channel attention feature parameters into the spatial attention feature extraction layer for feature extraction to obtain spatial attention feature parameters; and inputting the spatial attention feature parameters into the first convolutional layer for feature extraction to obtain the simulated sample data output by the first convolutional layer. Optionally, the simulated sample data may be represented in matrix or vector form; this embodiment does not limit this representation.
[0072] Specifically, by inputting pre-constructed random noise data into the deconvolution layer of the generator model, the random noise data is subjected to four layers of deconvolution to perform dimensionality-upgrading feature extraction, and the first extracted feature parameter is output. Then, the output first extracted feature parameter is input into the channel attention feature extraction layer to perform feature extraction, and the channel attention feature parameter is output. Next, the channel attention parameter is input into the spatial attention feature extraction layer to perform feature extraction, and the spatial attention parameter is output. Finally, the spatial attention parameter is input into the first convolution layer to perform dimensionality-reducing feature extraction, and the simulated sample data is output.
[0073] By introducing an attention feature extraction layer into the generator model, the generator model can achieve better data generation performance without increasing the model parameters, thus improving the efficiency of the generator model in generating data.
[0074] Optionally, the channel attention extraction layer includes a first max pooling layer, a first average pooling layer, and a shared network layer; the shared network layer includes at least one perceptron; the spatial attention feature extraction layer includes a second max pooling layer, a second average pooling layer, and a second convolutional layer. Accordingly, the first extracted feature parameters are input to the channel attention feature extraction layer for feature extraction to obtain channel attention feature parameters, and the channel attention feature parameters are input to the spatial attention feature extraction layer for feature extraction to obtain spatial attention feature parameters. This includes: inputting the first extracted feature parameters to the first max pooling layer for feature extraction to obtain first max pooling feature parameters, and inputting the first extracted feature parameters to the first average pooling layer for feature extraction to obtain first average pooling feature parameters; inputting the first max pooling feature parameters and the first average pooling feature parameters to the shared network layer respectively, where each perceptron performs feature extraction to obtain channel attention feature parameters; inputting the channel attention feature parameters to the second max pooling layer of the spatial attention feature extraction layer for feature extraction to obtain second max pooling feature parameters; inputting the second max pooling feature parameters to the second average pooling layer for feature extraction to obtain second average pooling feature parameters; and inputting the second average pooling feature parameters to the second convolutional layer for feature extraction to obtain spatial attention feature parameters.
[0075] Specifically, the first extracted feature parameters are input into the first max pooling layer in the channel attention extraction layer for feature extraction, and then the first max pooling feature parameters are output. Similarly, the first extracted feature parameters are input into the first average pooling layer in the channel attention extraction layer for feature extraction, and then the first average pooling maximum parameter is output. The first max pooling feature parameters and the first average pooling maximum parameter are then input into a shared network layer in the channel attention extraction layer. A multilayer perceptron (MLP) in the shared network layer performs feature extraction on the first max pooling feature parameters and the first average pooling maximum parameter, thereby obtaining the channel attention feature parameters. The number of perceptrons can be at least one; for example, there can be two perceptrons, namely a first perceptron and a second perceptron. The first perceptron is connected to the output of the first max pooling layer, and the second perceptron is connected to the output of the first average pooling layer.
[0076] After obtaining the channel attention parameters, the channel attention feature parameters are input into the spatial attention feature extraction layer. The second max pooling layer in the spatial attention extraction layer performs feature extraction on the channel attention feature parameters and outputs the second max pooling feature parameters. The second max pooling feature parameters are then input into the second average pooling layer for feature extraction and output the second average pooling feature parameters. Finally, the second average pooling parameters are input into the second convolutional layer for feature extraction, thus obtaining the spatial attention feature parameters.
[0077] Optionally, the channel attention feature parameters can be determined using the following formula:
[0078]
[0079] Among them, M c (F) represents the channel attention feature parameter. Represents the first average pooling feature parameter. denoted by , MLP() represents the perceptron feature extraction function, and σ represents the sigmoid function.
[0080] Optionally, the spatial attention feature parameters can be determined using the following formula:
[0081]
[0082] Among them, M s (F) represents the spatial attention feature parameters, indicating... This represents the second average pooling feature parameter. Denotes the second max-pooling feature parameter, σ represents the sigmoid function, and f m×nThe feature extraction function for convolutional layers with a kernel size of m×n is optimized to have a kernel size of 7×7.
[0083] S240. Input the simulated sample data and switch sample data into the classifier model in the detection network model to obtain the output fault categories corresponding to the switch sample data output by the classifier model.
[0084] The classifier model includes a third convolutional layer, an attention learning module, a temporal pooling layer, and a fully connected layer.
[0085] Specifically, by using switch sample data and simulated sample data generated by the generator model in the detection network model as input data, the data is fed into the classifier model in the detection network model. After processing by the classifier model, the output fault category corresponding to the output switch sample data is obtained.
[0086] Optionally, the simulated sample data and switch sample data are input into the classifier model in the detection network model to obtain the output fault categories corresponding to the switch sample data output by the classifier model. This includes: inputting the simulated sample data and switch sample data into the third convolutional layer for feature extraction to obtain sample extracted feature parameters; inputting the sample extracted feature parameters into the attention learning module for feature sequence information extraction to obtain feature information sequence parameters; inputting the feature information sequence parameters into the temporal pooling layer for feature extraction to obtain sequence feature parameters; and inputting the sequence feature parameters into the fully connected layer for feature integration to obtain the output fault categories corresponding to the switch sample data output by the classifier model.
[0087] Specifically, simulated sample data and switch sample data are input into the third convolutional layer of the classifier model for feature extraction, and the extracted sample feature parameters are output. The extracted sample feature parameters output from the third convolutional layer are used as input to the attention learning module in the classifier model, and feature sequence information extraction is performed on the extracted sample feature parameters to output feature information sequence parameters. The feature information sequence parameters are input into the temporal pooling layer in the classifier model for feature extraction, and the sequence feature parameters are output. Finally, the sequence feature parameters output from the temporal pooling layer are input into the fully connected layer in the classifier model for feature integration, and the output fault category corresponding to each switch sample data is output.
[0088] Optionally, the feature parameters for sample extraction can be determined using the following formula:
[0089] F=MaxPooling(ReLU(Conv2d(x));
[0090] Where x represents simulated sample data and switch sample data, F represents the sample extraction feature parameters, Conv2d() is the convolution function, ReLU() is the activation function, and MaxPooling() is the dimensionality reduction operation function.
[0091] S250. Based on the standard fault category and output fault category of the switch sample data, perform iterative training on the classifier model until the preset model training termination condition is met.
[0092] Specifically, the classifier model can be iteratively trained based on the standard fault categories in the switch sample data and the output fault categories of the switch sample data output by the classifier model, until the training process meets a preset model training termination condition. Optionally, based on the standard fault categories in the switch sample data and the output fault categories of the switch sample data output by the classifier model, using the standard fault categories in the switch sample data as the criterion, when the output fault categories of the switch sample data output by the classifier model can meet a preset category accuracy, the classifier model is determined to have met the preset model training termination condition. Alternatively, a preset number of iterations can be set, and when the training process of the classifier model reaches the preset number of iterations, it indicates that the output fault categories of the switch sample data output by the classifier model can meet the preset category accuracy. Optionally, the preset category accuracy can be adaptively set by those skilled in the art.
[0093] Optionally, the model accuracy can be determined by determining whether the output sample category and the standard sample category of any switch sample data are consistent, based on the output sample category and the standard sample category of the switch sample data, obtaining the first data quantity of switch sample data with consistent categories, and determining the model accuracy as the ratio between the first data quantity and the total number of switch sample data.
[0094] S260. Use the trained detection network model as the fault type detection model.
[0095] The technical solution of this invention uses a generator model in a detection network model to generate simulated sample data and switch sample data to train a classifier model in the detection network model, thereby obtaining a trained detection network model as a fault type detection model. By introducing simulated sample data into the model training, the feature information content of the detection network model for feature extraction from sample data is enriched, while the time spent collecting switch sample data is reduced, improving the training efficiency and effect of the model training, and improving the detection accuracy of fault detection in the distribution network using the fault type detection model.
[0096] Example 3
[0097] Figure 3This is a flowchart of a fault type detection method provided in Embodiment 3 of the present invention. This embodiment can be applied to the situation of locating faults when faults occur in the distribution network. The method can be executed by a fault type detection device, which can be implemented in hardware and / or software. The fault type detection model establishment device can be configured in an electronic device.
[0098] S310. Obtain the status data of the switch to be tested within the area to be tested in the power distribution network.
[0099] The area to be detected can refer to the area in the power distribution network where a fault has occurred; the switch status data to be detected can be the switching status of the smart switches in the area to be detected when a fault occurs, for example, the switch status can be on or off. Optionally, the switch status data to be detected can be represented in matrix or vector form, and this embodiment does not limit this.
[0100] Specifically, the switch status data of the area to be tested in the distribution network is collected, and the collected switch status data is used as the switch status data to be tested.
[0101] S320. Input the status data of the switch to be tested into the fault type detection model to obtain the fault type detection result.
[0102] If the fault type detection model uses the state data of the switch to be detected during training, the state data of the switch to be detected can be directly input into the fault type detection model. If the fault type detection model uses data that has been preprocessed from the state data of the detected switch during training, the preprocessed data will be determined as the state data of the area to be detected, and the state data of the area to be detected will be input into the fault type detection model.
[0103] The state data of the area to be detected can be determined through the state data of the switch to be detected and the topological data of the switch structure. The topological data of the switch structure can refer to the topological relationship of the smart switches in the area to be detected. Optionally, the topological data of the switch structure can be represented in matrix or vector form, and this embodiment does not limit this.
[0104] The fault type detection model can refer to a trained detection network model. For example, the detection network model can include a generator model and a classifier model. The generator model can be used to generate simulated sample data. The classifier model can be used to train itself based on the simulated sample data and switch sample data to obtain the output fault categories corresponding to the switch sample data. Optionally, the generator model and classifier model can be neural network models. Optionally, the simulated sample data differs from the switch sample data. The simulated sample data is not generated from the switch state data and switch structure topology data of historical faults in the distribution network detection area, but rather from the simulated sample data generated by the generator model. Both participate in the training process of the classifier model to complete the training of the classifier model. The switch state data can represent the status data of whether the smart switches in the distribution network detection area are turned on or off. The switch structure topology data can represent the topological relationship of the smart switches in the distribution network detection area. The distribution network detection area can refer to a pre-defined distribution network area in the distribution network. Optionally, multiple distribution network areas can exist in the distribution network, and each distribution network area can contain at least one smart switch.
[0105] The fault type detection result can refer to the fault type corresponding to the state data of the area to be detected, as output by the fault detection model. For example, fault types such as surge arrester explosion, distribution voltage overload, and capacitor failure.
[0106] Specifically, by inputting the state data of the switch to be detected into the fault type detection model to detect the state data of the switch to be detected, the fault type corresponding to the state data of the switch to be detected output by the fault type detection model can be obtained.
[0107] The technical effect of this invention is that by inputting the state data of the switch to be detected into a pre-built fault type detection model, the fault type detection result can be obtained, which can quickly locate the fault in the area of the distribution network and determine the fault type information of the area to be detected in a timely manner, thus ensuring the stable operation of the power grid.
[0108] Example 4
[0109] Figure 4 This is a schematic diagram of a fault type detection model establishment device provided in Embodiment 4 of the present invention. This device can be implemented in hardware and / or software, and can execute the fault type detection model establishment method provided in any embodiment of the present invention, possessing the corresponding functional modules and beneficial effects of the method execution. Figure 4 As shown, the device includes:
[0110] The switch status acquisition module 410 is used to acquire switch status data within the power distribution network detection area;
[0111] The sample data construction module 420 is used to construct a sample dataset based on the switch status data; wherein the sample dataset includes at least one switch sample data with a standard fault category label;
[0112] The model training module 430 is used to train a pre-built detection network model using switch sample data until a preset model training termination condition is met. The detection network model includes a generator model and a classifier model. The generator model is used to generate simulated sample data. The classifier model is used to train its own model based on the simulated sample data and the switch sample data to obtain the output fault categories corresponding to the switch sample data.
[0113] The model determination module 440 is used to use the trained detection network model as the fault type detection model.
[0114] The technical solution of this invention involves constructing a sample dataset based on the switch status data acquired within the distribution network detection area, generating simulated sample data through a generator model in the detection network model, and training the classifier model in the detection network model based on the simulated sample data and switch sample data. The trained detection network model is then used as a fault type detection model. By introducing simulated sample data into the model training, the feature information content of the detection network model for feature extraction from sample data is enriched, while the time spent collecting switch sample data is reduced, improving the training efficiency and effect of the model training, and enhancing the detection accuracy of fault detection in the distribution network using the fault type detection model.
[0115] Optionally, the model training module 430 includes:
[0116] The simulated sample generation unit is used to input pre-built random noise data into the generator model in the detection network model to obtain simulated sample data output by the generator model.
[0117] The fault category output unit is used to input simulated sample data and switch sample data into the classifier model in the detection network model to obtain the output fault categories corresponding to the switch sample data output by the classifier model.
[0118] The model training unit is used to iteratively train the classifier model based on the standard fault categories of the switch sample data and the output fault categories until the preset model training termination condition is met.
[0119] Optionally, the generator model includes a deconvolutional layer, a first convolutional layer, and an attention feature extraction layer; the attention feature extraction layer includes a channel attention feature extraction layer and a spatial attention feature extraction layer.
[0120] Optionally, the simulated sample generation unit includes:
[0121] The first feature extraction subunit is used to input random noise data into the deconvolution layer of the generator model for feature extraction, and obtain the first extracted feature parameters output by the deconvolution layer.
[0122] The spatial attention feature subunit is used to input the first extracted feature parameters into the channel attention feature extraction layer for feature extraction to obtain channel attention feature parameters, and input the channel attention feature parameters into the spatial attention feature extraction layer for feature extraction to obtain spatial attention feature parameters.
[0123] The simulated sample sub-unit is used to input spatial attention feature parameters into the first convolutional layer for feature extraction, and obtain simulated sample data output by the first convolutional layer.
[0124] Optionally, the channel attention extraction layer includes a first max pooling layer, a first average pooling layer, and a shared network layer; the shared network layer includes at least one perceptron; the spatial attention feature extraction layer includes a second max pooling layer, a second average pooling layer, and a second convolutional layer.
[0125] Optionally, the spatial attention feature subunit is specifically used for: inputting the first extracted feature parameters into a first max pooling layer for feature extraction to obtain first max pooling feature parameters; inputting the first extracted feature parameters into a first average pooling layer for feature extraction to obtain first average pooling feature parameters; inputting the first max pooling feature parameters and the first average pooling feature parameters into a shared network layer, where each perceptron performs feature extraction to obtain channel attention feature parameters; inputting the channel attention feature parameters into a second max pooling layer of the spatial attention feature extraction layer for feature extraction to obtain second max pooling feature parameters; inputting the second max pooling feature parameters into a second average pooling layer for feature extraction to obtain second average pooling feature parameters; and inputting the second average pooling feature parameters into a second convolutional layer for feature extraction to obtain spatial attention feature parameters.
[0126] Optionally, the classifier model includes a third convolutional layer, an attention learning module, a temporal pooling layer, and a fully connected layer.
[0127] Optional fault category output unit, including:
[0128] The sample feature subunit is used to input simulated sample data and switch sample data into the third convolutional layer for feature extraction to obtain sample extracted feature parameters.
[0129] The feature information sequence subunit is used to input the sample extracted feature parameters into the attention learning module to perform feature sequence information extraction operations and obtain the feature information sequence parameters.
[0130] The sequence feature subunit is used to input the feature information sequence parameters into the temporal pooling layer for feature extraction to obtain the sequence feature parameters.
[0131] The fault category output subunit is used to input the sequence feature parameters into the fully connected layer for feature integration to obtain the output fault categories corresponding to the switch sample data output by the classifier model.
[0132] The fault type detection model establishment device provided in the embodiments of the present invention can execute the fault type detection model establishment method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0133] Example 5
[0134] Figure 5 This is a schematic diagram of a fault type detection device provided in Embodiment 5 of the present invention. This device can be implemented in hardware and / or software, and can execute the fault type detection method provided in any embodiment of the present invention, possessing the corresponding functional modules and beneficial effects of the method. Figure 5 As shown, the device includes:
[0135] The data acquisition module 510 is used to acquire the status data of the switch to be tested within the area to be tested in the power distribution network.
[0136] The fault type determination module 520 is used to input the status data of the switch to be detected into the fault type detection model to obtain the fault type detection result.
[0137] The fault type detection model can be generated using any of the fault type detection model establishment methods described in the above embodiments.
[0138] The technical effect of this invention is that by inputting the state data of the switch to be detected into a pre-built fault type detection model, the fault type detection result can be obtained, which can quickly locate the fault in the area of the distribution network and determine the fault type information of the area to be detected in a timely manner, thus ensuring the stable operation of the power grid.
[0139] The fault type detection model establishment device provided in the embodiments of the present invention can execute the fault type detection model establishment method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0140] Example 6
[0141] Figure 6A schematic diagram of an electronic device 610 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0142] like Figure 6 As shown, the electronic device 610 includes at least one processor 611 and a memory, such as a read-only memory (ROM) 612 or a random access memory (RAM) 613, communicatively connected to the at least one processor 611. The memory stores computer programs executable by the at least one processor. The processor 611 can perform various appropriate actions and processes based on the computer program stored in the ROM 612 or loaded from storage unit 618 into the RAM 613. The RAM 613 may also store various programs and data required for the operation of the electronic device 610. The processor 611, ROM 612, and RAM 613 are interconnected via a bus 614. An input / output (I / O) interface 615 is also connected to the bus 614.
[0143] Multiple components in electronic device 610 are connected to I / O interface 615, including: input unit 616, such as keyboard, mouse, etc.; output unit 617, such as various types of displays, speakers, etc.; storage unit 618, such as disk, optical disk, etc.; and communication unit 619, such as network card, modem, wireless transceiver, etc. Communication unit 619 allows electronic device 610 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0144] Processor 611 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 611 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 611 performs the various methods and processes described above, such as methods for establishing fault type detection models or fault type detection methods.
[0145] In some embodiments, the method for establishing a fault type detection model or the fault type detection method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 618. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 610 via ROM 612 and / or communication unit 619. When the computer program is loaded into RAM 613 and executed by processor 11, one or more steps of the method for establishing a fault type detection model or the fault type detection method described above may be performed. Alternatively, in other embodiments, processor 611 may be configured to perform the method for establishing a fault type detection model or the fault type detection method by any other suitable means (e.g., by means of firmware).
[0146] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0147] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0148] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0149] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0150] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0151] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through a communication network. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0152] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0153] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for establishing a fault type detection model, characterized in that, include: Acquire switch status data within the power distribution network detection area; wherein, the switch status data represents the switch status of the smart switches within the power distribution network detection area, and the switch status is either on or off; Based on the switch status data, a sample dataset is constructed; the sample dataset includes at least one switch sample data with a standard fault category label; The pre-built detection network model is trained using the switch sample data until the preset model training termination condition is met. The detection network model includes a generator model and a classifier model. The generator model generates simulated sample data. The classifier model trains itself based on the simulated sample data and the switch sample data to obtain the output fault categories corresponding to the switch sample data. The generator model includes a deconvolution layer, a first convolution layer, and an attention feature extraction layer. The attention feature extraction layer includes a channel attention feature extraction layer and a spatial attention feature extraction layer. The channel attention feature extraction layer includes a first max pooling layer, a first average pooling layer, and a shared network layer. The shared network layer includes at least one perceptron. The spatial attention feature extraction layer includes a second max pooling layer, a second average pooling layer, and a second convolutional layer. The trained detection network model is used as the fault type detection model; The step of training a pre-built detection network model using the switch sample data until a preset model training termination condition is met includes: Pre-constructed random noise data is input into the deconvolution layer of the generator model for feature extraction, and the first extracted feature parameters output by the deconvolution layer are obtained. The first extracted feature parameters are input into the first max pooling layer for feature extraction to obtain the first max pooling feature parameters, and the first extracted feature parameters are input into the first average pooling layer for feature extraction to obtain the first average pooling feature parameters. The first max pooling feature parameter and the first average pooling feature parameter are respectively input to the shared network layer, and each of the perceptrons performs feature extraction operations to obtain the channel attention feature parameter. The channel attention feature parameters are input into the second max pooling layer of the spatial attention feature extraction layer for feature extraction to obtain the second max pooling feature parameters; The second max pooling feature parameter is input into the second average pooling layer for feature extraction to obtain the second average pooling feature parameter. The second average pooling feature parameters are input into the second convolutional layer for feature extraction to obtain spatial attention feature parameters. The spatial attention feature parameters are input into the first convolutional layer for feature extraction to obtain simulated sample data output by the first convolutional layer. The simulated sample data and the switch sample data are input into the classifier model in the detection network model to obtain the output fault categories corresponding to the switch sample data output by the classifier model. Based on the standard fault category and the output fault category of the switch sample data, the classifier model is iteratively trained until the preset model training termination condition is met. The step of constructing a sample dataset based on the switch state data includes: Obtain the switch structure topology data corresponding to the power distribution network detection area; Based on the switch structure topology data and the switch state data, determine the switch sample data; Determine the standard fault category for each of the switch sample data; Generate a sample dataset that includes at least one switch sample data with a standard fault category label.
2. The method according to claim 1, characterized in that, The classifier model includes a third convolutional layer, an attention learning module, a temporal pooling layer, and a fully connected layer; The step of inputting the simulated sample data and the switch sample data into the classifier model in the detection network model to obtain the output fault categories corresponding to the switch sample data output by the classifier model includes: The simulated sample data and the switch sample data are input into the third convolutional layer for feature extraction to obtain sample extraction feature parameters. The sample extraction feature parameters are input into the attention learning module to perform feature sequence information extraction to obtain feature information sequence parameters. The feature information sequence parameters are input into the temporal pooling layer for feature extraction to obtain sequence feature parameters. The sequence feature parameters are input into the fully connected layer for feature integration to obtain the output fault categories corresponding to the switch sample data output by the classifier model.
3. A fault type detection method, characterized in that, include: Acquire the status data of the switches to be tested within the area to be tested in the power distribution network; The state data of the switch to be detected is input into the fault type detection model to obtain the fault type detection result; wherein, the fault type detection model is generated by the method described in any one of claims 1-2.
4. A device for establishing a fault type detection model, characterized in that, include: A switch status acquisition module is used to acquire switch status data within the power distribution network detection area; wherein, the switch status data represents the switch status of the smart switches in the power distribution network detection area, and the switch status is either on or off; A sample data construction module is used to construct a sample dataset based on the switch status data; wherein the sample dataset includes at least one switch sample data with a standard fault category label; The model training module is used to train a pre-built detection network model using the switch sample data until a preset model training termination condition is met. The detection network model includes a generator model and a classifier model. The generator model generates simulated sample data. The classifier model trains itself based on the simulated sample data and the switch sample data to obtain the output fault categories corresponding to the switch sample data. The generator model includes a deconvolution layer, a first convolutional layer, and an attention feature extraction layer. The attention feature extraction layer includes a channel attention feature extraction layer and a spatial attention feature extraction layer. The channel attention feature extraction layer includes a first max pooling layer, a first average pooling layer, and a shared network layer. The shared network layer includes at least one perceptron. The spatial attention feature extraction layer includes a second max pooling layer, a second average pooling layer, and a second convolutional layer. The model determination module is used to use the trained detection network model as the fault type detection model; The model training module includes: The simulated sample generation unit is used to input pre-constructed random noise data into the generator model in the detection network model to obtain simulated sample data output by the generator model. The fault category output unit is used to input the simulated sample data and the switch sample data into the classifier model in the detection network model to obtain the output fault categories corresponding to the switch sample data output by the classifier model. The model training unit is used to perform iterative training of the classifier model based on the standard fault category and the output fault category of the switch sample data until the preset model training termination condition is met. The simulated sample generation unit includes: The first feature extraction parameter subunit is used to input the random noise data into the deconvolution layer of the generator model to perform feature extraction operations, and obtain the first extracted feature parameters output by the deconvolution layer; The spatial attention feature subunit is used to input the first extracted feature parameters into the channel attention feature extraction layer for feature extraction to obtain channel attention feature parameters, and input the channel attention feature parameters into the spatial attention feature extraction layer for feature extraction to obtain spatial attention feature parameters. The simulated sample subunit is used to input the spatial attention feature parameters into the first convolutional layer for feature extraction to obtain the simulated sample data output by the first convolutional layer. Specifically, the spatial attention feature subunit is used for: inputting the first extracted feature parameters into the first max pooling layer for feature extraction to obtain first max pooling feature parameters; inputting the first extracted feature parameters into the first average pooling layer for feature extraction to obtain first average pooling feature parameters; inputting the first max pooling feature parameters and the first average pooling feature parameters into the shared network layer, where each of the perceptrons performs feature extraction to obtain channel attention feature parameters; inputting the channel attention feature parameters into the second max pooling layer of the spatial attention feature extraction layer for feature extraction to obtain second max pooling feature parameters; inputting the second max pooling feature parameters into the second average pooling layer for feature extraction to obtain second average pooling feature parameters; and inputting the second average pooling feature parameters into the second convolutional layer for feature extraction to obtain spatial attention feature parameters. Specifically, the sample data construction module is used to acquire switch structure topology data corresponding to the distribution network detection area; determine switch sample data based on the switch structure topology data and the switch status data; determine the standard fault category of each switch sample data; and generate a sample dataset including at least one switch sample data with a standard fault category label.
5. A fault type detection device, characterized in that, include: The data acquisition module is used to acquire the status data of the switches to be tested within the testing area of the power distribution network. The fault type determination module is used to input the state data of the switch to be detected into the fault type detection model to obtain the fault type detection result; wherein, the fault type detection model is generated by the method described in any one of claims 1-2.
6. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the method for establishing a fault type detection model according to any one of claims 1-2, or the fault type detection method according to claim 3.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the method for establishing a fault type detection model as described in any one of claims 1-2, or the fault type detection method as described in claim 3.