Discharge map generation method and device and electronic device
By preprocessing and model training on local discharge spectrum samples, multiple types of discharge spectrum data are generated, which solves the problem of insufficient data samples in local discharge research, improves sample quality and diversity, and improves the training effect of fault detection and prediction models.
Patent Information
- Application Number
- CN202411561522.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2025-02-25
AI Technical Summary
Because local discharge events are random and difficult to capture, the actual local discharge spectrum samples collected are often limited. The insufficient data samples seriously affect the development of automated analysis technologies based on deep learning and pattern recognition in local discharge research.
By obtaining the first discharge spectrum sample with the label, pre-processing is performed to generate the second discharge spectrum sample, the initial discharge spectrum model is trained based on the second discharge spectrum sample, the target discharge spectrum model is generated, and various types of discharge spectrum data are generated through the target model.
The quality and diversity of sample generation are improved, allowing researchers to expand the data set under the conditions of limited samples, improve the training effect of fault detection and prediction models, provide reliable data support, and solve the problem of insufficient data samples in local discharge research.
Smart Images

Figure CN119514656A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of power equipment fault detection and diagnosis, focusing on partial discharge detection technology, and specifically, to a discharge spectrum generation method, device and electronic device. Background Art
[0002] Partial discharge (PD) is a discharge phenomenon caused by local defects in the insulation system of power equipment (such as transformers, cables, switchgear, etc.). Partial discharge will cause the degradation of insulation materials over time, which will cause equipment failure or damage. Therefore, the monitoring and early diagnosis of partial discharge are crucial to ensure the safe operation of electrical equipment.
[0003] Partial discharge phenomena are usually recorded in the form of graphs. By analyzing partial discharge graphs, different types of discharge patterns can be identified and further used to judge the health of the insulation system. However, due to the randomness and difficulty of partial discharge events, the actual partial discharge graph samples collected are often limited. This lack of data samples has seriously affected the development of automated analysis technology based on deep learning and pattern recognition in partial discharge research. Summary of the invention
[0004] The embodiments of the present invention provide a method, device and electronic device for generating a discharge spectrum, so as to at least solve the technical problem in the related art that, due to the randomness and difficulty in capturing of local discharge events, the local discharge spectrum samples actually collected are often limited, and the shortage of such data samples seriously affects the development of automated analysis technology based on deep learning and pattern recognition in local discharge research.
[0005] According to one embodiment of the present invention, a method for generating a discharge spectrum is provided, the method comprising: obtaining a first discharge spectrum sample, wherein the first discharge spectrum sample carries a label, and the label is used to identify the discharge form of the discharge spectrum sample; preprocessing the first discharge spectrum sample to obtain a second discharge spectrum sample; training an initial discharge spectrum model based on the second discharge spectrum sample to generate a target discharge spectrum model; and generating multiple types of discharge spectrum data through the target discharge spectrum model.
[0006] Optionally, labels include: bubble discharge, suspended potential discharge, insulating surface discharge, interlayer discharge, and sharp corner discharge.
[0007] Optionally, preprocessing the first discharge spectrum sample to obtain the second discharge spectrum sample includes: graying the first discharge spectrum sample to obtain a third discharge spectrum sample; normalizing the third discharge spectrum sample to obtain a fourth discharge spectrum sample; and performing noise processing on the fourth discharge spectrum sample to obtain the second discharge spectrum sample.
[0008] Optionally, performing grayscale processing on the first discharge spectrum sample to obtain the third discharge spectrum sample includes: performing grayscale processing on the first discharge spectrum sample based on an average grayscale algorithm to obtain the third discharge spectrum sample.
[0009] Optionally, performing noise processing on the fourth discharge spectrum sample to obtain the second discharge spectrum sample includes: performing noise processing on the fourth discharge spectrum sample based on a median filtering strategy to obtain the second discharge spectrum sample.
[0010] Optionally, the discharge map generation method also includes: constructing an initial discharge map model based on a gradient penalty function and a target generative adversarial network model, wherein the initial discharge map model is composed of a generator and a discriminator, the generator is composed of a deconvolution layer, a batch normalization layer and a rectified linear unit layer, and the discriminator is composed of multiple convolution blocks.
[0011] Optionally, the discharge map generation method also includes: determining a first loss function of the generator based on a preset expectation function and discriminant data; determining a second loss function of the discriminator based on the preset expectation function, the discriminant data, a penalty factor and a gradient of the discriminator; training an initial generative adversarial network model based on the first loss function and the second loss function to generate a target generative adversarial network model.
[0012] Optionally, the discharge spectrum generating method further includes: determining a gradient penalty function based on a preset expectation function, a penalty factor and a gradient of a discriminator.
[0013] According to one embodiment of the present invention, a discharge spectrum generating device is also provided, including: an acquisition module, used to acquire a first discharge spectrum sample, wherein the first discharge spectrum sample carries a label, and the label is used to identify the discharge form of the discharge spectrum sample; a processing module, used to pre-process the first discharge spectrum sample to obtain a second discharge spectrum sample; a training module, used to train an initial discharge spectrum model based on the second discharge spectrum sample to generate a target discharge spectrum model; a generation module, used to generate multiple types of discharge spectrum data through the target discharge spectrum model.
[0014] Optionally, the acquisition module is also used to acquire tags including: bubble discharge, suspended potential discharge, insulating surface discharge, interlayer discharge, and sharp corner discharge.
[0015] Optionally, the processing module is further used to perform grayscale processing on the first discharge spectrum sample to obtain a third discharge spectrum sample; perform normalization processing on the third discharge spectrum sample to obtain a fourth discharge spectrum sample; and perform noise processing on the fourth discharge spectrum sample to obtain a second discharge spectrum sample.
[0016] Optionally, the processing module is further configured to perform grayscale processing on the first discharge spectrum sample based on an average grayscale algorithm to obtain a third discharge spectrum sample.
[0017] Optionally, the processing module is further configured to perform noise processing on the fourth discharge spectrum sample based on a median filtering strategy to obtain a second discharge spectrum sample.
[0018] Optionally, the training module is also used to construct an initial discharge map model based on a gradient penalty function and a target generative adversarial network model, wherein the initial discharge map model consists of a generator and a discriminator, the generator consists of a deconvolution layer, a batch normalization layer, and a rectified linear unit layer, and the discriminator consists of multiple convolution blocks.
[0019] Optionally, the training module is also used to determine the first loss function of the generator based on a preset expectation function and discriminant data; determine the second loss function of the discriminator based on the preset expectation function, discriminant data, a penalty factor and the gradient of the discriminator; train the initial generative adversarial network model based on the first loss function and the second loss function to generate a target generative adversarial network model.
[0020] Optionally, the training module is further used to determine a gradient penalty function based on a preset expectation function, a penalty factor and a gradient of the discriminator.
[0021] According to one embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute any of the above-mentioned discharge spectrum generation methods when running on a computer or a processor.
[0022] According to one embodiment of the present invention, there is also provided an electronic device, comprising a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute any of the above-mentioned methods for generating a discharge spectrum.
[0023] According to one embodiment of the present invention, a computer program product is also provided, including a computer program, and when the computer program is executed by a processor, the discharge spectrum generating method in any one of the above items is implemented.
[0024] In an embodiment of the present invention, a first discharge spectrum sample is obtained, wherein the first discharge spectrum sample carries a label, and the label is used to identify the discharge form of the discharge spectrum sample; the first discharge spectrum sample is preprocessed to obtain a second discharge spectrum sample; the initial discharge spectrum model is trained based on the second discharge spectrum sample to generate a target discharge spectrum model; and various types of discharge spectrum data are generated through the target discharge spectrum model, thereby achieving the purpose of solving the problem of insufficient transformer local discharge spectrum samples, thereby achieving the improvement of the quality and diversity of sample generation, enabling researchers to expand the data set under the condition of limited samples, and improve the training effect of fault detection and prediction models, thereby providing reliable data support in the research, fault detection, fault identification and related model training of transformer local discharge, and further solving the technical problem that in the related technology, due to the randomness and difficulty in capturing of local discharge events, the local discharge spectrum samples actually collected are often limited, and the lack of such data samples seriously affects the development of automated analysis technology based on deep learning and pattern recognition in local discharge research. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0026] Figure 1 is a flow chart of a method for generating a discharge spectrum according to one embodiment of the present invention;
[0027] Figure 2 is a flow chart of a method for generating partial discharge spectrum samples based on a WGAN-GP model according to one embodiment of the present invention;
[0028] Figure 3 is a schematic diagram of the structure of a generator of a discharge spectrum generating method according to one embodiment of the present invention;
[0029] Figure 4 is a schematic diagram of a discriminator structure of a method for generating a discharge spectrum according to one embodiment of the present invention;
[0030] Figure 5 4 is a structural block diagram of a discharge spectrum generating device according to one embodiment of the present invention. DETAILED DESCRIPTION
[0031] To facilitate understanding, some descriptions of concepts related to the embodiments of the present invention are exemplarily provided for reference.
[0032] As shown below:
[0033] Partial Discharge (PD): refers to the phenomenon that discharge occurs in a local area in the insulating material of an electrical device due to the local electric field strength exceeding the breakdown strength of the material, but does not cause the entire insulating material to completely break down. This phenomenon usually occurs in the insulating material of high-voltage electrical equipment, such as transformers, cables, switchgear, etc.
[0034] Wasserstein Generative Adversarial Network with Gradient Penalty (WGAN-GP): An improved version of Generative Adversarial Network (GAN) that aims to solve some stability and convergence issues in the traditional GAN training process. WGAN-GP combines the Wasserstein GAN (WGAN) and Gradient Penalty (GP) techniques.
[0035] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme 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 only 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 should fall within the scope of protection of the present invention.
[0036] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In the description of this embodiment, unless otherwise specified, the meaning of "multiple" is two or more. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0037] According to one embodiment of the present invention, an embodiment of a method for generating a discharge spectrum is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0038] The method embodiment can be executed in an electronic device including a memory and a processor, a similar control device or a system. Taking an electronic device as an example, the electronic device may include one or more processors and a memory for storing data. Optionally, the electronic device may also include a communication device and a display device for communication functions. It can be understood by a person of ordinary skill in the art that the above structural description is only illustrative and does not limit the structure of the above electronic device. For example, the electronic device may also include more or fewer components than the above structural description, or have a configuration different from the above structural description.
[0039] The processor may include one or more processing units. For example, the processor may include a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processing (DSP) chip, a microcontroller unit (MCU), a field-programmable gate array (FPGA), a neural network processor (NPU), a tensor processing unit (TPU), an artificial intelligence (AI) type processor, and the like. Among them, different processing units may be independent components or integrated into one or more processors. In some instances, the electronic device may also include one or more processors.
[0040] The memory can be used to store computer programs, such as storing a computer program corresponding to the discharge spectrum generation method in the embodiment of the present invention, and the processor implements the above-mentioned discharge spectrum generation method by running the computer program stored in the memory. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories can be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0041] The communication device is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the communication device includes a network adapter (network interface controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the communication device can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0042] The display device may be, for example, a touch screen type liquid crystal display (LCD) and a touch display (also referred to as a "touch screen" or "touch display screen"). The liquid crystal display may enable a user to interact with a user interface of a mobile terminal. In some embodiments, the mobile terminal has a graphical user interface (GUI), and a user may interact with the GUI by finger contact and / or gestures on a touch-sensitive surface, wherein the human-computer interaction functions here may optionally include the following interactions: creating web pages, drawing, word processing, making electronic documents, games, video conferencing, instant messaging, sending and receiving emails, call interfaces, playing digital videos, playing digital music and / or web browsing, etc. The executable instructions for executing the above human-computer interaction functions are configured / stored in a computer program product or a readable storage medium executable by one or more processors.
[0043] In this embodiment, a method for generating a discharge spectrum running on an electronic device is provided. Figure 1 is a flow chart of a method for generating a discharge spectrum according to one embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0044] Step S10, obtaining a first discharge spectrum sample, wherein the first discharge spectrum sample carries a label, and the label is used to identify the discharge form of the discharge spectrum sample;
[0045] In the embodiment of the present invention, the first discharge spectrum sample can be understood as an unprocessed transformer partial discharge spectrum with a label.
[0046] The label can be understood as a mark on the transformer partial discharge spectrum of different discharge forms. For example, the label can be in the form of bubble discharge, suspended potential discharge, insulation surface discharge, interlayer discharge, sharp corner discharge, etc., which are not limited here.
[0047] Acquiring the first discharge spectrum sample can be understood as acquiring original transformer partial discharge spectra of different discharge forms.
[0048] In the embodiment of the present invention, by obtaining the first discharge spectrum sample, wherein the first discharge spectrum sample carries a label, and the label is used to identify the discharge form of the discharge spectrum sample, it can help the user to understand the discharge form more intuitively and quickly find the discharge spectrum sample of interest. At the same time, the label can also help establish the association between the discharge form and the discharge spectrum sample, which is convenient for subsequent data management and analysis.
[0049] Step S11, preprocessing the first discharge spectrum sample to obtain a second discharge spectrum sample;
[0050] In the embodiment of the present invention, preprocessing can be understood as a preliminary operation performed on the first discharge spectrum sample in order to extract more accurate sample features. Exemplarily, the preprocessing operation includes grayscale processing, normalization processing, and noise removal, which are not limited here.
[0051] The second discharge spectrum sample can be understood as the first discharge spectrum sample preprocessed and recorded as the second discharge spectrum sample.
[0052] Preprocessing the first discharge spectrum sample to obtain the second discharge spectrum sample can be understood as performing preprocessing operations on the first discharge spectrum sample including grayscale processing, normalization processing, and noise removal to obtain the second discharge spectrum sample, which is not limited here.
[0053] In an embodiment of the present invention, by preprocessing the first discharge spectrum sample to obtain the second discharge spectrum sample, noise can be removed and data can be smoothed, interference factors in the data can be reduced, and the accuracy and reliability of the data can be improved. Preprocessing the first discharge spectrum sample can help extract effective features in the sample, thereby better understanding the sample and performing subsequent analysis and modeling.
[0054] Step S12, training the initial discharge spectrum model based on the second discharge spectrum sample to generate a target discharge spectrum model;
[0055] In the embodiment of the present invention, the initial discharge spectrum model can be understood as an untrained model for generating discharge spectrum data. Exemplarily, the initial discharge spectrum model can be a WGAN-GP model, and the WGAN-GP model consists of two parts: a generator and a discriminator, which is not limited here.
[0056] The target discharge spectrum model can be understood as a discharge spectrum model obtained after some training process of the initial discharge spectrum model. Exemplarily, the target discharge spectrum model can be obtained after the WGAN-GP model is trained, which is not limited here.
[0057] Training the initial discharge spectrum model based on the second discharge spectrum sample to generate the target discharge spectrum model can be understood as obtaining the target discharge spectrum model after a series of training processes are performed on the initial discharge spectrum model using the second discharge spectrum sample. Exemplarily, the target WGAN-GP model can be obtained after the initial WGAN-GP model is trained using the second discharge spectrum sample, which is not limited here.
[0058] In an embodiment of the present invention, by training the initial discharge spectrum model based on the second discharge spectrum sample to generate a target discharge spectrum model, the model can be helped to better understand the correlation and regularity between different discharge spectra, thereby improving the generalization ability of the model, and can also save a lot of time and cost, avoiding duplication of work and waste of resources.
[0059] Step S13, generating various types of discharge spectrum data through the target discharge spectrum model.
[0060] In the embodiment of the present invention, the multiple types can be understood as multiple discharge forms, including bubble discharge, suspended potential discharge, insulating surface discharge, interlayer discharge, sharp corner discharge, etc., which are not limited here.
[0061] Generating multiple types of discharge spectrum data through the target discharge spectrum model can be understood as generating discharge spectrum data of different discharge forms through the trained discharge spectrum model. For example, the trained WGAN-GP model generates discharge spectrum data of bubble discharge, discharge spectrum data of suspended potential discharge, discharge spectrum data of insulating surface discharge, discharge spectrum data of interlayer discharge, discharge spectrum data of sharp corner discharge, etc., which are not limited here.
[0062] In the embodiment of the present invention, various types of discharge spectrum data are generated through a target discharge spectrum model, thereby meeting the needs of different application scenarios and facilitating the study of partial discharge phenomena and fault diagnosis.
[0063] By obtaining a first discharge spectrum sample, wherein the first discharge spectrum sample carries a label, and the label is used to identify the discharge form of the discharge spectrum sample, it can help users understand the discharge form more intuitively and quickly find the discharge spectrum sample of interest. At the same time, the label can also help establish the association between the discharge form and the discharge spectrum sample, which is convenient for subsequent data management and analysis. By preprocessing the first discharge spectrum sample to obtain the second discharge spectrum sample, noise and smooth data can be removed, interference factors in the data can be reduced, and the accuracy and reliability of the data can be improved. Preprocessing the first discharge spectrum sample can help extract effective features in the sample, so as to better understand the sample and perform subsequent analysis and modeling. By training the initial discharge spectrum model based on the second discharge spectrum sample to generate a target discharge spectrum model, it can help the model better understand the correlation and regularity between different discharge spectra, thereby improving the generalization ability of the model, and can also save a lot of time and cost, avoid duplication of labor and waste of resources. Generate various types of discharge spectrum data through the target discharge spectrum model, so as to meet the needs of different application scenarios, which is helpful for the study of local discharge phenomena and fault diagnosis.
[0064] Through the above steps, a first discharge spectrum sample is obtained, wherein the first discharge spectrum sample carries a label, and the label is used to identify the discharge form of the discharge spectrum sample; the first discharge spectrum sample is preprocessed to obtain a second discharge spectrum sample; the initial discharge spectrum model is trained based on the second discharge spectrum sample to generate a target discharge spectrum model; and various types of discharge spectrum data are generated through the target discharge spectrum model, thereby achieving the purpose of solving the problem of insufficient transformer local discharge spectrum samples, thereby achieving the improvement of the quality and diversity of sample generation, enabling researchers to expand the data set under the condition of limited samples, and improve the training effect of fault detection and prediction models, thereby providing reliable data support in the research, fault detection, fault identification and related model training of transformer local discharge, and further solving the technical problem that the local discharge events in the related technology are random and difficult to capture, and the local discharge spectrum samples actually collected are often limited. This lack of data samples seriously affects the development of automated analysis technology based on deep learning and pattern recognition in local discharge research.
[0065] Optionally, in step S10, the tags include: bubble discharge, suspended potential discharge, insulating surface discharge, interlayer discharge, and sharp corner discharge.
[0066] In the embodiment of the present invention, bubble discharge can be understood as the generation of a discharge phenomenon due to an increase in local electric field intensity when bubbles or holes exist in a medium, which is not limited here.
[0067] The floating potential discharge can be understood as the discharge phenomenon that occurs when there is a local potential difference on the surface of a conductor or an insulator, which is not limited here.
[0068] Insulation surface discharge can be understood as the occurrence of local discharge on the surface of insulating materials due to the influence of electric field strength, which is not limited here.
[0069] Interlayer discharge can be understood as the generation of discharge phenomenon in the interlayer inside the insulating material due to the increase of local electric field intensity, which is not limited here.
[0070] Sharp corner discharge can be understood as the discharge phenomenon caused by the presence of local electric field concentration at the sharp corner of a conductor or insulator, which is not limited here.
[0071] In the embodiment of the present invention, the discharge types of the discharge spectrum sample may include bubble discharge, suspended potential discharge, insulating surface discharge, interlayer discharge, and sharp corner discharge.
[0072] Optionally, in step S11, preprocessing the first discharge spectrum sample to obtain the second discharge spectrum sample may include the following execution steps:
[0073] Step S111, graying the first discharge spectrum sample to obtain a third discharge spectrum sample;
[0074] Step S112, normalizing the third discharge spectrum sample to obtain a fourth discharge spectrum sample;
[0075] Step S113, performing noise processing on the fourth discharge spectrum sample to obtain a second discharge spectrum sample.
[0076] In the embodiment of the present invention, grayscale processing can be understood as converting a color image into a grayscale image, that is, converting the pixel values of the three channels of red, green and blue (RGB) of the image into grayscale values through a certain algorithm so that the image presents a black, white and gray effect, which is not limited here.
[0077] The third discharge spectrum sample can be understood as a sample obtained after grayscale processing is performed on the first discharge spectrum sample, and recorded as the third discharge spectrum sample.
[0078] Normalization can be understood as scaling the data to a certain range according to a certain ratio, usually scaling the data to between 0 and 1 or between -1 and 1. This processing can make the data more accurate when compared in different dimensions, and also help improve the convergence speed and performance of the model, which is not limited here.
[0079] The fourth discharge spectrum sample can be understood as a sample obtained after normalization processing is performed on the third discharge spectrum sample, and the sample is recorded as the fourth discharge spectrum sample.
[0080] Noise processing can be understood as filtering or reducing the noise in the signal or data through a series of algorithms or technologies to improve the quality and accuracy of the data. When performing noise processing on the fourth discharge spectrum sample, filtering, noise reduction algorithms and other methods may be used to eliminate background noise or other interference, so as to more accurately analyze and interpret the information in the spectrum, which is not limited here.
[0081] The first discharge spectrum sample is grayed to obtain the third discharge spectrum sample. For example, it can be understood that the purpose of graying is to simplify the matrix and improve the operation speed. The graying is performed by using the average graying method shown in formula (1):
[0082]
[0083] Wherein: F represents the grayscale image matrix; R, G, and B represent the components of the labeled transformer partial discharge map respectively; i and j represent the dimensions of the labeled transformer partial discharge map respectively, which are not restricted here.
[0084] The third discharge spectrum sample is normalized to obtain a fourth discharge spectrum sample. By way of example, it can be understood that in order to further improve the training speed of the combined model, the local discharge spectrum data needs to be normalized by formula (2):
[0085]
[0086] Where x represents the original image pixel value; x′ represents the normalized value of the original image; x min Indicates the minimum pixel intensity in the spectrum; x max Indicates the maximum pixel intensity in the spectrum, and is not limited here.
[0087] The fourth discharge spectrum sample is subjected to noise processing to obtain the second discharge spectrum sample. This can be understood as removing the interference noise (such as salt and pepper noise, pulse noise, etc.) in the image to make the spectrum data clearer. This method adopts the median filtering method, which is not limited here. Among them, the median filtering steps are: using a moving window with an odd number of points, and coinciding the center of the template with a certain pixel position in the image; reading the grayscale values of each corresponding pixel under the template (from small to large, from large to small); selecting the grayscale value of a middle pixel in the grayscale sequence; assigning the middle value to the pixel at the center of the template.
[0088] In an embodiment of the present invention, by graying the first discharge spectrum sample to obtain a third discharge spectrum sample, then normalizing the third discharge spectrum sample to obtain a fourth discharge spectrum sample, and finally performing noise processing on the fourth discharge spectrum sample to obtain a second discharge spectrum sample, the quality and reliability of the sample data can be effectively improved, providing more reliable data support for the subsequent training of the initial discharge spectrum model.
[0089] Optionally, in step S111, graying the first discharge spectrum sample to obtain the third discharge spectrum sample may include the following steps:
[0090] The first discharge spectrum sample is gray-scaled based on an average gray-scale algorithm to obtain a third discharge spectrum sample.
[0091] In the embodiment of the present invention, the average grayscale algorithm can be understood as a simple grayscale processing method, the basic principle of which is to calculate the average grayscale value of all pixels in the image, and then replace the grayscale value of all pixels with the average grayscale value. This can make the overall grayscale value of the image more uniform and reduce noise and details in the image, which is not limited here.
[0092] Graying the first discharge map sample based on the average grayscale algorithm to obtain the third discharge map sample can be understood as using the average grayscale algorithm to process the first discharge map sample, converting the image into a grayscale map sample, and obtaining the third discharge map sample, which is not limited here.
[0093] In an embodiment of the present invention, the first discharge spectrum sample is grayed based on the average grayscale algorithm to obtain the third discharge spectrum sample, which can highlight the key features in the discharge spectrum and help to more accurately identify the discharge type and abnormal conditions. In addition, the graying process can reduce the amount of data in the spectrum and reduce storage and transmission costs.
[0094] Optionally, in step S113, performing noise processing on the fourth discharge spectrum sample to obtain the second discharge spectrum sample may include the following execution steps:
[0095] The fourth discharge spectrum sample is subjected to noise processing based on a median filtering strategy to obtain a second discharge spectrum sample.
[0096] In the embodiment of the present invention, the median filtering strategy can be understood as a commonly used signal processing method, which is a method for smoothing a signal by sorting a set of data by size and selecting the middle value as the output value. The median filter has a good effect on removing salt and pepper noise, impulse noise, etc., which is not limited here.
[0097] Performing noise processing on the fourth discharge spectrum sample based on the median filtering strategy to obtain the second discharge spectrum sample can be understood as adopting the median filtering strategy when performing noise processing on the fourth discharge spectrum sample, and finally obtaining the processed second discharge spectrum sample, which is not limited here.
[0098] In an embodiment of the present invention, noise processing is performed on the fourth discharge spectrum sample based on the median filtering strategy to obtain a cleaner and smoother second discharge spectrum sample, and the second discharge spectrum sample after noise removal can improve the accuracy and reliability of subsequent processing and analysis, providing a better data basis for further research and application.
[0099] Optionally, the discharge spectrum generating method further includes:
[0100] An initial discharge map model is constructed based on the gradient penalty function and the target generative adversarial network model, wherein the initial discharge map model consists of a generator and a discriminator. The generator consists of a deconvolution layer, a batch normalization layer, and a rectified linear unit layer, and the discriminator consists of multiple convolution blocks.
[0101] In the embodiment of the present invention, the gradient penalty function (GP) can be understood as a function used to penalize the gradient of the discriminator in the generative adversarial network, which is usually used to improve the stability and generation quality of GAN, and is not limited here.
[0102] The Generator can be understood as a part of the GAN model, which is responsible for generating fake data samples. Its structure is usually composed of a deconvolution layer, a batch normalization layer, and a rectified linear unit layer, which is not limited here.
[0103] The discriminator can be understood as another part of the GAN model, which is used to distinguish between real data samples and fake data samples generated by the generator. Its structure is usually composed of multiple convolution blocks, which is not limited here.
[0104] The deconvolution layer can be understood as a neural network layer for upsampling. Upsampling is achieved by performing a deconvolution operation on the input feature map, which is not limited here.
[0105] The batch normalization layer (Batch Normalization Layer, BN layer) can be understood as a technology used to accelerate the training of deep neural networks and improve the generalization ability of the model. It eliminates internal covariate drift by standardizing the input data of each batch, which is not restricted here.
[0106] The Rectified Linear Unit Layer (ReLU layer) can be understood as a commonly used activation function, which is usually used in the hidden layer of a neural network. Its form is f(x)=max(0,x), which can help the network learn nonlinear relationships and accelerate convergence. It is not restricted here.
[0107] Constructing an initial discharge map model based on a gradient penalty function and a target generative adversarial network model can be understood as constructing a model for generating an initial discharge map by using a gradient penalty function and a target generative adversarial network model. For example, the WGAN-GP model consists of two parts: a generator and a discriminator. Deconvolution layers, BN layers, and ReLU layers are used in the generator. The deconvolution layer is represented as a reverse process of convolution, and the image size before convolution can be restored according to the size of the convolution kernel and the size of the output. The BN layer normalizes the weights of the output of the deconvolution layer and then inputs them into the activation layer, which can improve the model training speed and accelerate the convergence process. The ReLU activation function is to return the gradient of the negative semi-axis to zero, solve the gradient vanishing problem, and keep the convergence speed of the model in a stable state. The deconvolution layer, BN layer, and ReLU layer are used as a deconvolution module, and 4 deconvolution modules are stacked. The last module contains only one deconvolution layer and one activation function Tanh layer. The network structure of the discriminator consists of 5 convolutional blocks. The first 4 convolutional blocks contain a convolutional layer, a normalization layer (InstanceNormalization, IN layer) and a LeakReLU layer. The normalization operation in BN may destroy the Lipschitz continuity of the discriminant model, so the IN layer is used instead of the BN layer. The LeakyReLU activation function can generate output values with zero mean distribution compared to the ReLU activation function, reducing the impact on Lipschitz continuity. The convolutional block of the last layer contains a convolutional layer and a Flatten layer. The convolution kernel size of the entire model is set to 4.
[0108] In an embodiment of the present invention, an initial discharge map model is constructed based on a gradient penalty function and a target generative adversarial network model. In this model, the generator is responsible for generating the initial discharge map, which is composed of a deconvolution layer, a batch normalization layer, and a rectified linear unit layer, and is used to generate an image similar to a real discharge map. The discriminator is used to distinguish the difference between the generated discharge map and the real discharge map, and it is composed of multiple convolution blocks. The generator and the discriminator learn together. Through adversarial training, the generator can gradually improve the quality of the generated discharge map, and the discriminator can also continuously improve the accuracy of distinguishing between real and generated images. The gradient penalty function can effectively constrain the learning process of the generator and the discriminator, ensuring that the generated discharge map is as close to the real discharge map as possible. The target generative adversarial network model can effectively generate realistic discharge maps, which is helpful for the generation and analysis of discharge maps in practical applications.
[0109] Optionally, the discharge spectrum generating method further includes:
[0110] Determine a first loss function of the generator based on a preset expectation function and the discriminant data;
[0111] Determine a second loss function of the discriminator based on a preset expectation function, the discriminant data, the penalty factor, and the gradient of the discriminator;
[0112] An initial generative adversarial network model is trained based on the first loss function and the second loss function to generate a target generative adversarial network model.
[0113] In the embodiment of the present invention, the preset expectation function can be understood as representing the output expectation obtained after the input that conforms to a certain distribution is processed by the function. Exemplarily, the preset expectation function can be expressed as E, which is not limited here.
[0114] The discriminant data can be understood as representing the discriminant of the real samples. For example, the function D(x) can be used to discriminate the real samples, which is not limited here.
[0115] The first loss function can be understood as the loss function of the generator. Exemplarily, the first loss function can be represented by L(G), which is not limited here.
[0116] The second loss function can be understood as the loss function of the discriminator. Exemplarily, the second loss function can be represented by L(D), which is not limited here.
[0117] The penalty factor can be understood as a parameter in the second loss function. For example, the penalty factor can be represented by λ, which is not limited here.
[0118] The first loss function of the generator determined based on the preset expectation function and the discriminant data can be understood as follows. For example, the loss function of the WGAN-GP generator is configured as shown in formula (3):
[0119]
[0120] Where L(G) represents the loss function of the generator, P g Represents the data distribution of samples generated by the generator, E represents the expected output after the input that conforms to a certain distribution is processed by the function, and D(x) represents the discrimination of real samples; the goal of the generator is to minimize the loss through back propagation, so as to generate pseudo samples that are closer to real samples.
[0121] The second loss function of the discriminator is determined based on the preset expectation function, the discriminant data, the penalty factor and the gradient of the discriminator. It can be understood that, for example, the loss function of the WGAN-GP discriminator is configured as shown in formula (4):
[0122]
[0123] Where L(D) represents the loss function of the discriminator, P r represents the data distribution of real samples, P g represents the data distribution of samples generated by the generator, E represents the expected output after the input that conforms to a certain distribution is processed by the function, λ represents the penalty factor, represents the gradient of the discriminator D(x), D(x) represents the discrimination of the real sample, P x P r With P g Linear sampling between .
[0124] The gradient penalty is shown in formula (5):
[0125]
[0126] In formula (5),
[0127]
[0128] in,
[0129]
[0130] M is the sample size of sample i, N is the sample size of sample j, y(i,j) is the actual observed value, and y'(i,j) is the predicted estimated value.
[0131] The Wasserstein distance is shown in formula (8):
[0132]
[0133] P r is the distribution of real data, Pg To generate the data distribution, y∈∏(Pr,Pg) is P r and P g The joint distribution of .
[0134] The discriminator evaluates the pseudo samples generated by the generator and gives a score (i.e., the difference between the real sample and the generated sample, based on the Wasserstein distance).
[0135] Based on the training of the first loss function and the second loss function, generating the target generative adversarial network model can be understood as, for example, training the initial generative adversarial network model based on the loss function of the generator and the loss function of the discriminator, and the generator will adjust its internal parameters according to the feedback of the discriminator, so that the difference between the generated pseudo samples and the real samples gradually decreases, and finally the target generative adversarial network model is obtained, which is not limited here.
[0136] In the embodiment of the present invention, the training process of the generator and the discriminator is guided by the preset expectation function and discriminant data, so that the generator can generate samples that are more in line with the expectations, and the discriminator can better distinguish between real samples and generated samples. By introducing penalty factors and gradient information, the performance of the discriminator can be further improved, so that the generator can continuously optimize the quality of generated samples. The generative adversarial network model finally trained can better generate samples that meet the expectations and improve the quality and diversity of generated samples.
[0137] Optionally, the discharge spectrum generating method further includes: determining a gradient penalty function based on a preset expectation function, a penalty factor and a gradient of a discriminator.
[0138] In an embodiment of the present invention, a gradient penalty function is determined based on a preset expectation function, a penalty factor, and the gradient of a discriminator, which can help the optimizer train the model more effectively and improve the performance and generalization ability of the model.
[0139] Figure 2 FIG. 1 is a flow chart of a method for generating a partial discharge spectrum sample based on a WGAN-GP model according to one embodiment of the present invention. Figure 2As shown, the method includes the following steps: Step 1, collecting and arranging the labeled transformer partial discharge maps as the input sample set; Step 2, preprocessing the collected labeled transformer partial discharge maps; Step 3, constructing a Wasserstein Generative Adversarial Network with Gradient Penalty (WGAN-GP) model; Step 4, setting Gaussian random noise as the input noise, and configuring the loss function of the WGAN-GP generator. The random noise is input into the generator, and the generator is optimized through the feedback of the discriminator to generate pseudo samples similar to the real partial discharge map; Step 5, setting the loss function of the WGAN-GP discriminator, and introducing the gradient penalty to ensure that the 1-Lipschitz continuity is satisfied. The generated pseudo samples and the original partial discharge maps are input into the discriminator, and the discriminator evaluates the difference between the generated samples and the real samples through the Wasserstein distance, and constrains the update of the model through the gradient penalty, thereby optimizing the performance of the generator and the discriminator; Step 6, after the parameters are determined, the discriminator evaluates the pseudo samples. If the discriminator output value is close to 1, the generated partial discharge map is output; if the output value is close to 0, the pseudo sample is discarded. This method can accurately generate the high-quality partial discharge maps required by researchers and effectively alleviate the problem of insufficient samples. The pseudo samples generated by the WGAN-GP model can greatly expand the data set of partial discharge maps, improve the training effect and generalization ability of the model, and are suitable for transformer partial discharge research and the development of related deep learning models.
[0140] Figure 3 FIG. 1 is a schematic diagram of a generator structure of a method for generating a discharge spectrum according to one embodiment of the present invention. Figure 3 As shown in the figure, the generator network structure mainly includes Gaussian noise, fully connected layer, first deconvolution layer, second deconvolution layer, third deconvolution layer, and fourth deconvolution layer. Through the input Gaussian noise vector, after being processed by multiple layers of fully connected layers and deconvolution layers, the noise vector is gradually converted into image data similar to the training data. In this process, the generator network learns the distribution characteristics of the training data, so that it can generate new images with similar characteristics. By continuously adjusting the network parameters, the generator network can continuously optimize the quality of the generated images, making the generated images more realistic and consistent with the distribution characteristics of the real data.
[0141] Figure 4 is a schematic diagram of a discriminator structure of a method for generating a discharge spectrum according to one embodiment of the present invention, such as Figure 4As shown in the figure, the discriminator network structure mainly includes atlas data, the first convolution layer, the second convolution layer, the third convolution layer, the fourth convolution layer, and the fifth convolution layer. By extracting and classifying the input data, it is determined whether the input data is real data or generated data. Specifically, the discriminator network extracts features from the input data through a series of convolution layers and activation functions, and finally outputs a probability value, which indicates the probability that the input data is real data. If the input data is real data, the probability value output by the discriminator network is close to 1; if the input data is generated data, the output probability value is close to 0. By continuously optimizing the network parameters, the discriminator network can gradually improve its ability to distinguish between real data and generated data. Ultimately, the goal of the discriminator network is to classify the input data as accurately as possible to help the generator network generate more realistic data.
[0142] Traditional GAN has many challenges and problems in practical applications, mainly including mode collapse, unstable training, gradient disappearance or explosion, and complex hyperparameter adjustment. The use of gradient clipping in the WGAN model may cause the weights to tend to the two extremes within the clipping range, resulting in gradient explosion or gradient vanishing, thereby generating unreasonable samples and other side effects. The present invention adopts the WGAN-GP model, and introduces gradient penalties, that is, constrains the gradient of the discriminator, so that the discriminant model learns a smoother decision boundary, thereby solving the above problems. The present invention uses the Wasserstein distance and gradient penalty by using the WGAN-GP model, so that the generator can generate more realistic pseudo samples that are highly similar to the real partial discharge map during the training process, thereby improving the quality of the generated samples; the introduction of the gradient penalty term can avoid the problem of gradient disappearance and explosion, making the WGAN-GP model more stable during the training process, and the discriminator and generator can update parameters more efficiently; the method of the present invention can generate samples of different discharge forms (such as bubble discharge, suspended potential discharge, etc.), meet the needs of different application scenarios, and contribute to the study of partial discharge phenomena and fault diagnosis.
[0143] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0144] In this embodiment, a discharge spectrum generating device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0145] Figure 5 is a structural block diagram of a discharge spectrum generating device according to one embodiment of the present invention. Figure 5 As shown, a discharge spectrum generating device 500 is used as an example, and the device includes: an acquisition module 501, used to acquire a first discharge spectrum sample, wherein the first discharge spectrum sample carries a label, and the label is used to identify the discharge form of the discharge spectrum sample; a processing module 502, used to pre-process the first discharge spectrum sample to obtain a second discharge spectrum sample; a training module 503, used to train an initial discharge spectrum model based on the second discharge spectrum sample to generate a target discharge spectrum model; a generation module 504, used to generate multiple types of discharge spectrum data through the target discharge spectrum model.
[0146] Optionally, the acquisition module 501 is further used to acquire tags including: bubble discharge, suspended potential discharge, insulating surface discharge, interlayer discharge, and sharp corner discharge.
[0147] Optionally, the processing module 502 is further configured to grayscale the first discharge spectrum sample to obtain a third discharge spectrum sample; normalize the third discharge spectrum sample to obtain a fourth discharge spectrum sample; and perform noise processing on the fourth discharge spectrum sample to obtain a second discharge spectrum sample.
[0148] Optionally, the processing module 502 is further configured to perform grayscale processing on the first discharge spectrum sample based on an average grayscale algorithm to obtain a third discharge spectrum sample.
[0149] Optionally, the processing module 502 is further configured to perform noise processing on the fourth discharge spectrum sample based on a median filtering strategy to obtain a second discharge spectrum sample.
[0150] Optionally, the training module 503 is also used to construct an initial discharge map model based on the gradient penalty function and the target generative adversarial network model, wherein the initial discharge map model is composed of a generator and a discriminator, the generator is composed of a deconvolution layer, a batch normalization layer and a rectified linear unit layer, and the discriminator is composed of multiple convolution blocks.
[0151] Optionally, the training module 503 is also used to determine the first loss function of the generator based on a preset expected function and discriminant data; determine the second loss function of the discriminator based on the preset expected function, discriminant data, a penalty factor and the gradient of the discriminator; train the initial generative adversarial network model based on the first loss function and the second loss function to generate a target generative adversarial network model.
[0152] Optionally, the training module 503 is further configured to determine a gradient penalty function based on a preset expectation function, a penalty factor and a gradient of the discriminator.
[0153] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0154] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any of the above method embodiments when running on a computer or a processor.
[0155] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:
[0156] Step S10, obtaining a first discharge spectrum sample, wherein the first discharge spectrum sample carries a label, and the label is used to identify the discharge form of the discharge spectrum sample;
[0157] Step S11, preprocessing the first discharge spectrum sample to obtain a second discharge spectrum sample;
[0158] Step S12, training the initial discharge spectrum model based on the second discharge spectrum sample to generate a target discharge spectrum model;
[0159] Step S13, generating various types of discharge spectrum data through the target discharge spectrum model.
[0160] Optionally, in this embodiment, the above-mentioned computer-readable storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
[0161] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0162] Optionally, in this embodiment, the processor in the electronic device may be configured to run a computer program to perform the following steps:
[0163] Step S10, obtaining a first discharge spectrum sample, wherein the first discharge spectrum sample carries a label, and the label is used to identify the discharge form of the discharge spectrum sample;
[0164] Step S11, preprocessing the first discharge spectrum sample to obtain a second discharge spectrum sample;
[0165] Step S12, training the initial discharge spectrum model based on the second discharge spectrum sample to generate a target discharge spectrum model;
[0166] Step S13, generating various types of discharge spectrum data through the target discharge spectrum model.
[0167] An embodiment of the present invention further provides a computer program product, including a computer program, which implements the steps in any of the above method embodiments when executed by a processor.
[0168] Optionally, in this embodiment, the computer program in the above computer program product may be configured to perform the following steps when executed by a processor:
[0169] Step S10, obtaining a first discharge spectrum sample, wherein the first discharge spectrum sample carries a label, and the label is used to identify the discharge form of the discharge spectrum sample;
[0170] Step S11, preprocessing the first discharge spectrum sample to obtain a second discharge spectrum sample;
[0171] Step S12, training the initial discharge spectrum model based on the second discharge spectrum sample to generate a target discharge spectrum model;
[0172] Step S13, generating various types of discharge spectrum data through the target discharge spectrum model.
[0173] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0174] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0175] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0176] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0177] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0178] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0179] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM), random access memory (RAM), mobile hard disk, magnetic disk or optical disk, etc., various media that can store program codes.
[0180] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for generating a discharge spectrum, characterized in that: The method comprises: Acquire a first discharge spectrum sample, wherein the first discharge spectrum sample carries a label, and the label is used to identify the discharge form of the discharge spectrum sample; Preprocessing the first discharge spectrum sample to obtain a second discharge spectrum sample; Training the initial discharge spectrum model based on the second discharge spectrum sample to generate a target discharge spectrum model; Various types of discharge spectrum data are generated through the target discharge spectrum model.
2. The method according to claim 1, characterized in that The labels include: bubble discharge, suspended potential discharge, insulating surface discharge, interlayer discharge, and sharp corner discharge.
3. The method according to claim 1, characterized in that The preprocessing of the first discharge spectrum sample to obtain the second discharge spectrum sample comprises: Performing grayscale processing on the first discharge spectrum sample to obtain a third discharge spectrum sample; Normalizing the third discharge spectrum sample to obtain a fourth discharge spectrum sample; Noise processing is performed on the fourth discharge spectrum sample to obtain the second discharge spectrum sample.
4. The method according to claim 3, characterized in that The grayscale processing is performed on the first discharge spectrum sample to obtain a third discharge spectrum sample, comprising: The first discharge spectrum sample is gray-scaled based on an average gray-scale algorithm to obtain the third discharge spectrum sample.
5. The method according to claim 3, characterized in that: The performing noise processing on the fourth discharge spectrum sample to obtain the second discharge spectrum sample comprises: The fourth discharge spectrum sample is subjected to noise processing based on a median filtering strategy to obtain the second discharge spectrum sample.
6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: The initial discharge map model is constructed based on a gradient penalty function and a target generative adversarial network model, wherein the initial discharge map model consists of a generator and a discriminator, the generator consists of a deconvolution layer, a batch normalization layer, and a rectified linear unit layer, and the discriminator consists of multiple convolution blocks.
7. The method according to claim 6, characterized in that The method further comprises: Determine a first loss function of the generator based on a preset expectation function and discriminant data; Determine a second loss function of the discriminator based on the preset expected function, the discriminant data, a penalty factor, and a gradient of the discriminator; An initial generative adversarial network model is trained based on the first loss function and the second loss function to generate the target generative adversarial network model.
8. The method according to claim 7, characterized in that The method further comprises: The gradient penalty function is determined based on the preset expectation function, the penalty factor, and the gradient of the discriminator.
9. A discharge spectrum generating device, characterized in that: The device comprises: An acquisition module, used for acquiring a first discharge spectrum sample, wherein the first discharge spectrum sample carries a label, and the label is used for identifying a discharge form of the discharge spectrum sample; A processing module, used for preprocessing the first discharge spectrum sample to obtain a second discharge spectrum sample; A training module, used for training an initial discharge spectrum model based on the second discharge spectrum sample to generate a target discharge spectrum model; A generation module is used to generate various types of discharge spectrum data through the target discharge spectrum model.
10. An electronic device comprising a memory and a processor, characterized in that: The memory stores a computer program, and the processor is configured to run the computer program to execute the discharge spectrum generating method described in any one of claims 1 to 8.