A fault diagnosis model training method and a fault diagnosis method for a reactor
By constructing and training a reactor fault diagnosis model and utilizing generative adversarial training technology, the problem of inaccurate neural network diagnosis results was solved, and higher-precision fault identification was achieved.
Patent Information
- Application Number
- CN202410989266.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2044-07-23
AI Technical Summary
Existing neural network-based reactor fault diagnosis methods suffer from inaccurate fault diagnosis results.
By acquiring the initial sample dataset, constructing a subsample set and training the initial diagnostic model, generating a batch sample set for joint training, and combining it with a discriminator for generative adversarial training, the target diagnostic model is obtained, thereby improving the accuracy of fault diagnosis.
The accuracy of the reactor fault diagnosis model has been improved, enabling more accurate fault type identification.
Smart Images

Figure CN118940034B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of reactor fault diagnosis, and particularly relates to a reactor fault diagnosis model training method and a reactor fault diagnosis method. BACKGROUND
[0002] The reactor plays a dual role of control and protection in the power distribution network system, and its operation condition directly determines the operation of the entire power system. Therefore, it is of great significance to diagnose the fault of the reactor.
[0003] At present, various diagnosis methods have been proposed, which involve various artificial intelligence algorithms, such as neural networks. However, the reactor fault diagnosis method based on neural networks has the problem of inaccurate fault diagnosis results. SUMMARY
[0004] The present application provides a reactor fault diagnosis model training method and a reactor fault diagnosis method to improve the accuracy of fault diagnosis of the fault diagnosis model.
[0005] According to an aspect of the present application, a reactor fault diagnosis model training method is provided, comprising:
[0006] Obtaining an initial sample data set, wherein the initial sample data set includes sample data corresponding to W fault types of the reactor respectively;
[0007] Based on the initial sample data set, a sub-sample set corresponding to each fault type is constructed respectively;
[0008] W initial diagnosis models are constructed, and the W initial diagnosis models are trained based on the sub-sample set corresponding to each fault type respectively to obtain first diagnosis models corresponding to the W fault types respectively;
[0009] Based on the initial sample data set, a plurality of batches of sample sets are generated, and the number of sample data corresponding to any fault type in each batch of sample sets is at least one;
[0010] The W fault types respectively correspond to the first diagnostic models are jointly trained based on a plurality of batch sample sets, and the W fault types respectively correspond to the second diagnostic models are obtained: in each training batch, sample data of each fault type in the batch sample set is input into the first diagnostic model corresponding to the fault type, the output result of each fault type first diagnostic model is converted into vector form data, and the comprehensive output result corresponding to each fault type first diagnostic model is determined based on a plurality of vector form data corresponding to each fault type first diagnostic model; the first loss function of the batch is determined based on the comprehensive output result respectively corresponding to the W fault type first diagnostic models and the preset vector, and the W first diagnostic models of the batch are respectively subjected to model parameter adjustment based on the first loss function of the batch;
[0011] The discriminator is constructed, the second diagnostic model respectively corresponding to the W fault types and the discriminator are subjected to generative adversarial training based on the initial sample data set, and the target diagnostic model respectively corresponding to the W fault types is obtained in the case of meeting the training end condition, wherein the target diagnostic model of any fault type is used to determine the probability that the electric reactor associated data belongs to the fault type.
[0012] According to another aspect of the present application, a fault diagnosis method of an electric reactor is provided, comprising:
[0013] Obtaining electric reactor associated data of an electric reactor to be diagnosed;
[0014] The electric reactor associated data is respectively input into the target diagnostic model respectively corresponding to the W fault types to perform fault diagnosis, and the fault diagnosis result of the W fault types is obtained; the fault diagnosis result of the electric reactor to be diagnosed is determined based on the fault diagnosis result of the W fault types; wherein the target diagnostic model is trained based on the electric reactor fault diagnosis model training method of any embodiment of the present application.
[0015] According to another aspect of the present application, an electric reactor fault diagnosis model training device is provided, comprising:
[0016] An initial sample data set acquisition module is configured to acquire an initial sample data set, wherein the initial sample data set includes sample data respectively corresponding to W fault types of an electric reactor;
[0017] A sub-sample set construction module is configured to construct a sub-sample set respectively corresponding to each fault type based on the initial sample data set;
[0018] An initial diagnosis model training module is configured to construct W initial diagnosis models, train the W initial diagnosis models based on a sub-sample set corresponding to each fault type, and obtain first diagnosis models corresponding to the W fault types, respectively;
[0019] A batch sample set generation module is configured to generate a plurality of batch sample sets based on the initial sample data set, and the number of sample data corresponding to any fault type in each batch sample set is at least one.
[0020] A first diagnosis model training module is configured to jointly train first diagnosis models corresponding to the W fault types based on a plurality of batch sample sets, and obtain second diagnosis models corresponding to the W fault types, respectively. In each training batch, sample data of each fault type in the batch sample set is input into the first diagnosis model of the corresponding fault type, the output result of each fault type first diagnosis model is converted into vector form data, and the comprehensive output result corresponding to each fault type first diagnosis model is determined based on a plurality of vector form data corresponding to each fault type first diagnosis model. The first loss function of the batch is determined based on the comprehensive output result of the first diagnosis model corresponding to the W fault types and a preset vector, and the model parameter of the W first diagnosis models of the batch is adjusted based on the first loss function of the batch.
[0021] A target diagnosis model determination module is configured to construct a discriminator, perform generative adversarial training on the second diagnosis model corresponding to the W fault types and the discriminator based on the initial sample data set, and obtain target diagnosis models corresponding to the W fault types in the case of meeting a training end condition, wherein the target diagnosis model of any fault type is used to determine the probability that the electric reactor associated data belongs to the fault type.
[0022] According to another aspect of the present application, an electronic device is provided, which comprises:
[0023] at least one processor; and
[0024] a memory connected to the at least one processor in communication; wherein,
[0025] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the electric reactor fault diagnosis model training method according to any one of the embodiments of the present application, and / or the electric reactor fault diagnosis method according to any one of the embodiments of the present application.
[0026] According to another aspect of the present application, there is provided a computer readable storage medium storing computer instructions for causing a processor to implement the fault diagnosis model training method of the reactor according to any of the embodiments of the present application and / or the reactor fault diagnosis method according to any of the embodiments of the present application when executed.
[0027] The technical solution of the embodiments of the present application comprises the following steps: obtaining an initial sample data set, wherein the initial sample data set comprises sample data corresponding to W fault types of the reactor; constructing a sub-sample set corresponding to each fault type based on the initial sample data set; constructing W initial diagnosis models, training the W initial diagnosis models based on the sub-sample set corresponding to each fault type, and obtaining first diagnosis models corresponding to the W fault types; generating a plurality of batch sample sets based on the sample data set, wherein the number of sample data corresponding to any fault type in each batch sample set is at least one; jointly training the first diagnosis models corresponding to the W fault types based on the plurality of batch sample sets, and obtaining second diagnosis models corresponding to the W fault types; in each training batch, inputting sample data of each fault type in the batch sample set into the first diagnosis model corresponding to the fault type, converting the output result of each fault type first diagnosis model into vector form data, and determining a comprehensive output result corresponding to each fault type first diagnosis model based on a plurality of vector form data corresponding to each fault type first diagnosis model; determining a first loss function of the batch based on the comprehensive output results corresponding to the first diagnosis models of the W fault types and a preset vector, and adjusting the model parameters of the W first diagnosis models of the batch based on the first loss function of the batch; constructing a discriminator, and performing generative adversarial training on the second diagnosis models corresponding to the W fault types and the discriminator based on the initial sample data set, and obtaining target diagnosis models corresponding to the W fault types under the condition that a training end condition is met, wherein the target diagnosis model of any fault type is used to determine the probability that the reactor associated data belongs to the fault type. Through multi-stage training, the target diagnosis model is obtained, and the accuracy of fault diagnosis of the fault diagnosis model is improved.
[0028] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present application, nor to limit the scope of the present application. Other features of the present application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed in the embodiment description. Obviously, the drawings in the following description only show some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative effort based on these drawings.
[0030] Figure 1 is a flow chart of a fault diagnosis model training method of a reactor provided by an embodiment of the present application;
[0031] Figure 2 is a flow chart of a reactor fault diagnosis method provided by an embodiment of the present application;
[0032] Figure 3 is a structural schematic diagram of a fault diagnosis model training device of a reactor provided by an embodiment of the present application;
[0033] Figure 4 is a structural schematic diagram of a reactor fault diagnosis device provided by an embodiment of the present application;
[0034] Figure 5 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0035] In order to make the person skilled in the art better understand the present application, the following will combine the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort should be within the scope of protection of the present application.
[0036] It should be noted that the terms "first diagnosis model", "second diagnosis model" and the like in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not necessarily limit to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0037] Embodiment one
[0038] Figure 1 is a flowchart of a method for training a fault diagnosis model of a reactor according to an embodiment of the present application. The embodiment can be applied to the training of a fault diagnosis model of a reactor. The method can be executed by a fault diagnosis model training device of a reactor. The fault diagnosis model training device of a reactor can be implemented in the form of hardware and / or software. The fault diagnosis model training device of a reactor can be configured in a computer, a server, or other electronic device for training a fault diagnosis model of a reactor. As shown in Figure 1 , the method comprises:
[0039] S110, obtaining an initial sample data set, wherein the initial sample data set comprises sample data corresponding to W fault types of a reactor.
[0040] The sample data refers to the reactor associated data corresponding to the W fault types of the reactor. Specifically, the sample data comprises at least one of the current data, the voltage data, the temperature data, and the vibration data of the reactor corresponding to each fault type. In this embodiment, within a preset time range, an edge voltage sensing device is used to collect voltage based on a preset time interval, and each collected voltage value is taken as a feature. Within the preset time range, an edge current sensing device is used to collect current based on a preset time interval, and each collected current value is taken as a feature. Within the preset time range, an edge temperature sensing device is used to collect temperature based on a preset time interval, and each collected temperature value is taken as a feature. Within the preset time range, an acceleration vibration sensor is used to collect real-time vibration data, and a wavelet packet decomposition method is used to process the original vibration signal of the reactor, and each value in the obtained wavelet packet time-frequency energy matrix is taken as a feature. It can be understood that for the acceleration vibration sensor, the signals generated by the mechanical vibration of the core and winding structure of the reactor during operation contain rich device state information, and accurate monitoring and analysis of the vibration signal can realize intelligent diagnosis of mechanical faults of the reactor. In addition, the acceleration vibration sensor does not need to be in direct contact with the reactor, and is flexible, convenient, and easy to implement non-stop power detection.
[0041] It should be noted that the preset time intervals for collecting voltage, current, and temperature can be the same or different, which can be set by a person skilled in the art according to requirements, and is not limited herein.
[0042] S120, constructing a sub-sample set corresponding to each fault type based on the initial sample data set.
[0043] In this embodiment, for each fault type, a sub-sample set corresponding to the fault type is constructed based on the initial sample data set.
[0044] On the basis of the above embodiment, optionally, the construction manner of the sub-sample set of the i-th fault type comprises: for any sample data in the initial sample data set, if the sample data corresponds to the i-th fault type, setting the label of the sample data as a first label; if the sample data corresponds to a fault type other than the i-th fault type, setting the label of the sample data as a second label.
[0045] Wherein, the first label is used to represent that the sample data is the sample data of the i-th fault type, and the second label is used to represent that the sample data is not the sample data of the i-th fault type; specifically, the first label can be 1, and the second label can be 0; for example, the sub-sample set of the first fault type is: The sub-sample set of the second fault type is: By analogy, W sub-sample sets corresponding to W fault types can be obtained. It can be understood that the number of sample data in each sub-sample set is W.
[0046] It can be understood that for each sub-sample set of each fault type, the label of each sample data in the initial sample data set needs to be set, and therefore the number of sample data in each sub-sample set corresponding to each fault type is the same as the number of sample data in the initial sample data set.
[0047] S130, constructing W initial diagnosis models, training the W initial diagnosis models based on each sub-sample set corresponding to each fault type, to obtain first diagnosis models corresponding to the W fault types respectively.
[0048] Wherein, the initial diagnosis model is a generator, and the initial diagnosis model can be a neural network model, such as a BP neural network model, a convolutional neural network model, a fully connected neural network model, etc. In this embodiment, for each fault type, an initial diagnosis model in the W initial diagnosis models is trained based on the sub-sample set corresponding to the fault type, to obtain the first diagnosis model of the fault type. Wherein, the first diagnosis model is used to judge whether it is the fault type corresponding to the first diagnosis model, if it is the fault type corresponding to the first diagnosis model, the first diagnosis model outputs 1, if it is not the fault type corresponding to the first diagnosis model, the first diagnosis model outputs 0.
[0049] S140, generating a plurality of batches of sample sets based on the initial sample data set, and the number of sample data corresponding to any fault type in each batch of sample sets is at least one.
[0050] It can be understood that for sample data corresponding to any fault type, at least one sample data corresponding to the fault type is included in each batch of sample sets; that is, the number of sample data in each batch of sample sets is at least W, and in the case that the number of sample data in the batch of sample sets is W, the number of sample data corresponding to each fault type in the batch of sample sets is 1.
[0051] Exemplarily, in each batch of sample sets:
[0052] The sample data of the first fault type can be represented as:
[0053] The sample data of the second fault type can be represented as:
[0054] By analogy…
[0055] The sample data of the Wth fault type can be represented as:
[0056] Wherein, n1, n2, …, nw≥1.
[0057] On the basis of the above embodiment, optionally, the generating a plurality of batches of sample sets based on the initial sample data set comprises: setting a one-hot code label of each sample data in the initial sample data set based on a fault type of each sample data; sampling in sample data corresponding to W fault types respectively, and sample data obtained by sampling and the one-hot code label corresponding to the sample data form the batch of sample sets, wherein the sum of the number of sample data corresponding to the W fault types respectively in each batch of sample sets is a preset batch sample number.
[0058] In this embodiment, the fault types of each sample data in the sample data set are numbered in the form of one-hot code, and the one-hot code label of each sample data is set; sample data corresponding to W fault types respectively are sampled by sampling, and sample data obtained by sampling and the one-hot code label corresponding to the sample data form the batch of sample sets, wherein the sum of the number of sample data corresponding to the W fault types respectively in each batch of sample sets is a preset batch sample number. The preset batch sample number refers to the number of sample data in the batch of sample sets, that is, the number of samples in the sample data corresponding to the W fault types respectively.
[0059] Exemplarily, in the batch of sample sets:
[0060] The sample data vector of the first fault type can be represented as:
[0061] The sample data vector of the second fault type can be represented as:
[0062] and so on…
[0063] The sample data vector of the Wth fault type can be expressed as:
[0064] wherein, is the ith sample data vector of the Wth fault type, including sample data and one-hot code label It can be understood that the one-hot code label of the sample data vector of each fault type is the same.
[0065] S150, based on the plurality of batches of sample sets, respectively train the first diagnostic models corresponding to the W fault types to obtain the second diagnostic models corresponding to the W fault types: in each training batch, input the sample data of each fault type in the batch sample set into the first diagnostic model corresponding to the fault type, convert the output result of each fault type first diagnostic model into vector form data, and determine the comprehensive output result corresponding to each fault type first diagnostic model based on the plurality of vector form data corresponding to each fault type first diagnostic model; determine the first loss function of the batch based on the comprehensive output results respectively corresponding to the first diagnostic models of the W fault types and the preset vector, and adjust the model parameters of the W first diagnostic models of the batch respectively based on the first loss function of the batch.
[0066] In this embodiment, the training process of the second diagnostic model in each batch is as follows:
[0067] Step 1) input the sample data of each fault type in the batch sample set into the first diagnostic model corresponding to the fault type, convert the output result of each fault type first diagnostic model into vector form data, and determine the comprehensive output result corresponding to each fault type first diagnostic model based on the plurality of vector form data corresponding to each fault type first diagnostic model.
[0068] On the basis of the above-mentioned embodiment, optionally, the output result of each first diagnosis model of the fault type is converted into vector form data, and the comprehensive output result corresponding to each first diagnosis model of the fault type is determined based on the plurality of vector form data corresponding to each first diagnosis model of the fault type, comprising: converting the output result of the first diagnosis model of the i-th fault type into vector form data based on a first function, wherein the vector form data includes w data, the i-th data of the vector form data is the output result of the first diagnosis model of the i-th fault type, other data except the i-th data of the vector form data is set as a random number, and the sum of the w data is one; converting the vector form data into a first intermediate vector based on a second function, wherein the second function is used to set the maximum value in the vector form data to one and set the non-maximum value in the vector form data to zero; performing mean value processing on the plurality of intermediate vectors corresponding to the first diagnosis model of the i-th fault type to obtain a second intermediate vector; and converting the second intermediate vector into the comprehensive output result corresponding to the first diagnosis model of the i-th fault type based on a third function, wherein the third function is used to set the non-maximum value in the second intermediate vector to zero and retain the maximum value in the second intermediate vector.
[0069] In the embodiment, the output result of the first diagnosis model of the i-th fault type is converted into vector form data based on a first function; wherein the first function can be:
[0070] Gi represents the output result of the first diagnosis model of the i-th fault type; x1, x2,..., xi, xi+1,..., xw represent random values in [0, 1], and the sum of x1, x2,..., xi, xi+1,..., xw and Gi is one. w-2 w-1 w-2 w-1
[0071] In the embodiment, the vector form data is converted into a first intermediate vector based on a second function. Wherein the second function can be:
[0072] Exemplarily, it is assumed that
[0073] It should be noted that if there are two maximum values in the vector form data, one maximum value is randomly selected to be set to 1.
[0074] In the embodiment, the plurality of intermediate vectors corresponding to the first diagnosis model of the i-th fault type are subjected to mean value processing to obtain a second intermediate vector.
[0075] Exemplary, taking the output result of the first diagnostic model of the first fault type as an example
[0076] The calculation formula of the second intermediate vector is:
[0077]
[0078] wherein, Z represents the second intermediate vector, Batch1 represents the data volume of the sample data of the first fault type in the batch sample set, represents the i-th sample data in the sample data of the first fault type in the batch sample set The output after inputting the first diagnostic model.
[0079] In this embodiment, the second intermediate vector is converted into the comprehensive output result corresponding to the first diagnostic model of the i-th fault type based on the third function. The third function can be:
[0080]
[0081] wherein, represents the second intermediate vector, x i represents the maximum value in the second intermediate vector, x i = MAX(x1, x2,..., x w-1 , x w ); represents the comprehensive output result corresponding to the first diagnostic model.
[0082] Step 2) determining the first loss function of the batch based on the comprehensive output results respectively corresponding to the first diagnostic models of the W fault types and the preset vector.
[0083] On the basis of the above embodiment, optionally, determining the first loss function of the batch based on the comprehensive output results respectively corresponding to the first diagnostic models of the W fault types and the preset vector, comprising: summing the comprehensive output results respectively corresponding to the first diagnostic models of the W fault types to obtain the integration processing result of the W fault types; determining the first loss function of the batch based on the spatial distance between the integration processing result of the W fault types and the preset vector, wherein the preset vector includes W data, and the W data in the preset vector are respectively 1.
[0084] wherein, the integration processing result refers to the processing result obtained by summing the comprehensive output results respectively corresponding to the first diagnostic models of the W fault types. Exemplarily, the integration processing result A = T1 + T2 +... + T w-1 + T w , T1, T2,..., T w-1and T w The first diagnostic model of each of the W fault types corresponds to a respective integrated output result.
[0085] The first loss function is calculated according to the following formula:
[0086] loss1 = J(A)
[0087] wherein loss1 represents the first loss function, J(A) is used to calculate the spatial distance between the integrated processing result A and a preset vector , and the preset vector has w ones.
[0088] Step 3) Adjusting the model parameters of the W first diagnostic models of the batch respectively based on the batch first loss function.
[0089] S160, constructing a discriminator, performing generative adversarial training on the second diagnostic model corresponding to each of the W fault types and the discriminator based on the initial sample data set, and obtaining the target diagnostic model corresponding to each of the W fault types under the condition that a training end condition is met, wherein the target diagnostic model of any fault type is used to determine the probability that the electric reactor associated data belongs to the fault type.
[0090] wherein the discriminator can be a multi-layer perception machine. In this embodiment, the second diagnostic model corresponding to each of the W fault types and the discriminator are subjected to generative adversarial training based on the initial sample data set, and the target diagnostic model corresponding to each of the W fault types is obtained under the condition that a training end condition is met. The training end condition refers to the condition under which the generative adversarial training is ended. Specifically, the training end condition can be that the classification accuracy of the second diagnostic model reaches a preset accuracy, or the training end condition can be that the number of training reaches a preset number.
[0091] On the basis of the above embodiment, optionally, the generating adversarial training of the second diagnostic model corresponding to each of the W fault types and the discriminator based on the initial sample data set comprises: setting a one-hot code label of each sample data in the initial sample data set based on a fault type of each sample data in the initial sample data set; inputting any sample data into the second diagnostic model corresponding to each of the W fault types respectively to obtain an output result of the second diagnostic model corresponding to each of the W fault types respectively; integrating the output result of the second diagnostic model corresponding to each of the W fault types respectively into a third intermediate vector, inputting the third intermediate vector into the discriminator to obtain an output result of the discriminator; generating a second loss function of the second diagnostic model corresponding to each of the W fault types and a third loss function of the discriminator respectively based on one or more of the output result of the second diagnostic model corresponding to each of the W fault types, the third intermediate vector, the output result of the discriminator and the one-hot code label of the sample data; adjusting model parameters of the second diagnostic model corresponding to each of the W fault types based on the second loss function and adjusting model parameters of the discriminator based on the third loss function.
[0092] In this embodiment, the generating adversarial training process of the second diagnostic model and the discriminator is as follows:
[0093] 1) The fault types of each sample data in the initial sample data set are numbered in the form of one-hot code, and a one-hot code label of each sample data is set;
[0094] 2) Any sample data is input into the second diagnostic model corresponding to each of the W fault types respectively to obtain an output result of the second diagnostic model corresponding to each of the W fault types respectively;
[0095] 3) The output result of the second diagnostic model corresponding to each of the W fault types is integrated into a third intermediate vector; wherein the third intermediate vector is obtained by integrating the output result of the second diagnostic model corresponding to each of the W fault types;
[0096] 4) The third intermediate vector is input into the discriminator to obtain an output result of the discriminator;
[0097] 5) A second loss function of the second diagnostic model corresponding to each of the W fault types and a third loss function of the discriminator are generated respectively based on one or more of the output result of the second diagnostic model corresponding to each of the W fault types, the third intermediate vector, the output result of the discriminator and the one-hot code label of the sample data;
[0098] 6) Model parameters of the second diagnostic model corresponding to each of the W fault types are adjusted based on the second loss function, and model parameters of the discriminator are adjusted based on the third loss function.
[0099] 7) In the case of meeting the training end condition, W target diagnosis models corresponding to W fault types are obtained respectively.
[0100] Specifically, the second loss function of the second diagnosis model includes an adversarial loss variable function and a cross-entropy loss function, and the specific expression is as follows:
[0101]
[0102]
[0103] wherein, loss G represents the second loss function of the second diagnosis model, loss G1 represents the adversarial loss variable function, loss G2 represents the cross-entropy loss function, batch represents the data amount of the sample data contained in each batch during model training, W represents the number of the second diagnosis model, b im represents the one-hot label of the i th sample data in the m th second diagnosis model, G im represents the sample data of the i th sample data in the m th second diagnosis model, represents the output of the fault sample data input by the discriminator of the i th sample data after accepting the input,
[0104] The third loss function of the discriminator includes a real fault label loss function and a generated fault label loss function, and the specific expression is as follows:
[0105]
[0106] wherein, loss D represents the third loss function of the discriminator, loss D1 represents the real one-hot code label loss function, loss D2 represents the generated one-hot code label loss function, represents the output of the one-hot code label corresponding to the i th sample data input by the discriminator after accepting the input, The technical scheme of the embodiment is characterized in that initial sample data sets are acquired, and the initial sample data sets include sample data corresponding to W fault types of the electric reactor respectively; a sub-sample set corresponding to each fault type is respectively constructed based on the initial sample data sets; W initial diagnosis models are constructed, the W initial diagnosis models are respectively trained based on the sub-sample set corresponding to each fault type, and first diagnosis models corresponding to the W fault types are obtained; a plurality of batch sample sets are generated based on the sample data sets, and the number of sample data corresponding to any fault type in each batch sample set is at least one; the first diagnosis models corresponding to the W fault types are respectively jointly trained based on the plurality of batch sample sets, and second diagnosis models corresponding to the W fault types are obtained; in each training batch, sample data of each fault type in the batch sample set is input into the first diagnosis model of the corresponding fault type, the output result of each fault type first diagnosis model is converted into vector form data, and the comprehensive output result corresponding to each fault type first diagnosis model is determined based on a plurality of vector form data corresponding to each fault type first diagnosis model; the first loss function of the batch is determined based on the comprehensive output result corresponding to the first diagnosis model of the W fault types and a preset vector, and the model parameter adjustment of the W first diagnosis models of the batch is performed based on the first loss function of the batch; a discriminator is constructed, and the second diagnosis models corresponding to the W fault types and the discriminator are generated based on the initial sample data sets for generative adversarial training, and under the condition that the training end condition is met, the target diagnosis models corresponding to the W fault types are obtained, wherein the target diagnosis model of any fault type is used to determine the probability that the electric reactor associated data belongs to the fault type. Through multi-stage training, the target diagnosis model is obtained, and the accuracy of fault diagnosis of the fault diagnosis model is improved.
[0107] Embodiment two
[0108] Figure 2 is a flowchart of an electric reactor fault diagnosis method provided by the embodiment two of the present application. The embodiment performs fault diagnosis on a to-be-diagnosed electric reactor based on the target diagnosis model obtained by the electric reactor fault diagnosis model training method of the above-mentioned embodiment. As shown in the figure, Figure 2 the method comprises the following steps.
[0109] S210, electric reactor associated data of a to-be-diagnosed electric reactor is acquired.
[0110] S220, the electric reactor associated data is respectively input into the target diagnosis models corresponding to the W fault types for fault diagnosis, and the fault diagnosis results of the W fault types are obtained; the fault diagnosis result of the to-be-diagnosed electric reactor is determined based on the fault diagnosis results of the W fault types; wherein the target diagnosis model is obtained based on the electric reactor fault diagnosis model training method of any embodiment of the present application.
[0111] The reactor associated data includes at least one of current data, voltage data, temperature data and vibration data of the reactor. In the embodiment, an edge voltage sensing device is used to collect the voltage value of the reactor, an edge current sensing device is used to collect the current value of the reactor, an edge temperature sensing device is used to collect the temperature value of the reactor, and an acceleration vibration sensor is used to collect the real-time vibration data of the reactor. The wavelet packet decomposition method is used to process the original vibration signal of the reactor, and each value in the obtained wavelet packet time-frequency energy matrix is taken as a feature.
[0112] In the embodiment, the reactor associated data is input into the target diagnosis model corresponding to each of the W fault types respectively to perform fault diagnosis, and the fault diagnosis results of the W fault types are obtained. The fault diagnosis result of each fault type is the probability that the reactor associated data belongs to the fault type. Further, the fault diagnosis result of the reactor to be diagnosed is determined based on the fault diagnosis results of the W fault types. Specifically, the fault diagnosis results of the W fault types can be sorted, and the fault diagnosis result at the top of the sorting is taken as the fault diagnosis result of the reactor to be diagnosed.
[0113] The technical scheme of the embodiment improves the accuracy of fault diagnosis by performing fault diagnosis on the circuit breaker to be diagnosed through the target diagnosis model corresponding to each of the W fault types of the reactor, and determining the fault diagnosis result of the reactor to be diagnosed based on the fault diagnosis results of the W fault types.
[0114] Embodiment Three
[0115] Figure 3 is a structural schematic diagram of a fault diagnosis model training device for a reactor provided by Embodiment Three of the present application. As shown in the figure, Figure 3 the device includes:
[0116] An initial sample data set acquisition module 310 is configured to acquire an initial sample data set, and the initial sample data set includes sample data corresponding to each of W fault types of a reactor.
[0117] A sub-sample set construction module 320 is configured to construct a sub-sample set corresponding to each fault type based on the initial sample data set.
[0118] An initial diagnosis model training module 330 is configured to construct W initial diagnosis models, and train the W initial diagnosis models based on the sub-sample set corresponding to each fault type to obtain first diagnosis models corresponding to the W fault types.
[0119] The batch sample set generation module 340 is configured to generate a plurality of batch sample sets based on the initial sample data set, and the number of sample data corresponding to any fault type in each batch sample set is at least one.
[0120] The first diagnostic model training module 350 is configured to jointly train W first diagnostic models corresponding to W fault types based on the plurality of batch sample sets, respectively, to obtain W second diagnostic models corresponding to the W fault types, respectively. In each training batch, the sample data of each fault type in the batch sample set is input into the first diagnostic model corresponding to the fault type, the output result of each first diagnostic model of the fault type is converted into vector form data, and the comprehensive output result corresponding to each first diagnostic model of the fault type is determined based on a plurality of vector form data corresponding to the first diagnostic model of the fault type. The first loss function of the batch is determined based on the comprehensive output result corresponding to the first diagnostic model of the W fault types and a preset vector, and the model parameter of the W first diagnostic models of the batch is adjusted based on the first loss function of the batch.
[0121] The target diagnostic model determination module 360 is configured to construct a discriminator, perform generative adversarial training on the W second diagnostic models corresponding to the W fault types and the discriminator based on the initial sample data set, and obtain the target diagnostic model corresponding to each of the W fault types when a training end condition is met, wherein the target diagnostic model of any fault type is used to determine the probability that the electric reactor associated data belongs to the fault type.
[0122] The technical scheme of the embodiment comprises the following steps: obtaining an initial sample data set, wherein the initial sample data set comprises sample data corresponding to W fault types of a reactor; constructing a sub-sample set corresponding to each fault type based on the initial sample data set; constructing W initial diagnosis models, training the W initial diagnosis models based on the sub-sample set corresponding to each fault type, and obtaining first diagnosis models corresponding to the W fault types; generating a plurality of batch sample sets based on the sample data set, wherein the number of sample data corresponding to any fault type in each batch sample set is at least one; jointly training the first diagnosis models corresponding to the W fault types based on the plurality of batch sample sets, and obtaining second diagnosis models corresponding to the W fault types; in each training batch, inputting sample data of each fault type in the batch sample set into the first diagnosis model corresponding to the fault type, converting the output result of each fault type first diagnosis model into vector form data, and determining the comprehensive output result corresponding to each fault type first diagnosis model based on a plurality of vector form data corresponding to each fault type first diagnosis model; determining a first loss function of the batch based on the comprehensive output result corresponding to the first diagnosis models of the W fault types and a preset vector, and adjusting the model parameters of the W first diagnosis models of the batch based on the first loss function of the batch; constructing a discriminator, and performing generative adversarial training on the second diagnosis models corresponding to the W fault types and the discriminator based on the initial sample data set, and obtaining target diagnosis models corresponding to the W fault types under the condition that a training end condition is met, wherein the target diagnosis model of any fault type is used to determine the probability that the reactor associated data belongs to the fault type. Through multi-stage training, the target diagnosis model is obtained, and the accuracy of fault diagnosis of the fault diagnosis model is improved.
[0123] On the basis of the above embodiment, optionally, the number of sample data in the sub-sample set corresponding to each fault type is the same as the number of sample data in the initial sample data set; the sub-sample set construction module 320 is specifically configured to, for any sample data in the initial sample data set, if the sample data corresponds to an i-th fault type, set the label of the sample data as a first label; if the sample data corresponds to a fault type other than the i-th fault type, set the label of the sample data as a second label.
[0124] On the basis of the above embodiment, optionally, the batch sample set generation module 340 is specifically configured to set a one-hot code label of each sample data based on the fault type of each sample data in the initial sample data set; sample the sample data corresponding to the W fault types, and form the batch sample set by using the sample data obtained by sampling and the one-hot code label corresponding to the sample data, wherein the sum of the number of sample data corresponding to the W fault types in each batch sample set is a preset batch sample number.
[0125] On the basis of the above-mentioned embodiments, optionally, the first diagnostic model training module 350 comprises a comprehensive output result determination unit configured to convert the output result of the first diagnostic model of the i-th fault type into vector form data based on a first function, wherein the vector form data comprises w data, the i-th data of the vector form data is the output result of the first diagnostic model of the i-th fault type, the other data of the vector form data is set to a random number, and the sum of the w data is one; convert the vector form data into a first intermediate vector based on a second function, wherein the second function is used to set the maximum value in the vector form data to one and set the non-maximum value in the vector form data to zero; perform mean processing on the plurality of intermediate vectors corresponding to the first diagnostic model of the i-th fault type to obtain a second intermediate vector; and convert the second intermediate vector into the comprehensive output result corresponding to the first diagnostic model of the i-th fault type based on a third function, wherein the third function is used to set the non-maximum value in the second intermediate vector to zero and retain the maximum value in the second intermediate vector.
[0126] On the basis of the above-mentioned embodiments, optionally, the first diagnostic model training module comprises a first loss function determination unit configured to perform sum processing on the comprehensive output results corresponding to the W fault types of the first diagnostic model respectively to obtain the integration processing result of the W fault types; determine the first loss function of the batch based on the integration processing result of the W fault types and the spatial distance of the preset vector, wherein the preset vector comprises W data, and the W data in the preset vector are 1 respectively.
[0127] On the basis of the above-mentioned embodiments, optionally, the target diagnostic model determination module is specifically configured to set a one-hot code label for each sample data based on the fault type of each sample data in the initial sample data set; input any sample data into the second diagnostic model corresponding to the W fault types respectively to obtain the output result of the second diagnostic model corresponding to the W fault types respectively; integrate the output result of the second diagnostic model corresponding to the W fault types respectively into a third intermediate vector, and input the third intermediate vector into the discriminator to obtain the output result of the discriminator; generate the second loss function of the second diagnostic model corresponding to the W fault types respectively and the third loss function of the discriminator based on one or more of the output result of the second diagnostic model corresponding to the W fault types respectively, the third intermediate vector, the output result of the discriminator, and the one-hot code label of the sample data; and adjust the model parameters of the second diagnostic model corresponding to the W fault types based on the second loss function and adjust the model parameters of the discriminator based on the third loss function.
[0128] The reactor fault diagnosis model training device provided by the embodiments of the present application can execute the reactor fault diagnosis model training method provided by any of the embodiments of the present application, and has the function modules and beneficial effects corresponding to the execution method.
[0129] Embodiment four
[0130] Figure 4 is a structural schematic diagram of a reactor fault diagnosis device provided by embodiment four of the present application. As shown in the figure, Figure 4 The device comprises:
[0131] The reactor associated data acquisition module 410 is configured to acquire reactor associated data of a reactor to be diagnosed.
[0132] The fault diagnosis module 420 is configured to input the reactor associated data into target diagnosis models corresponding to W fault types respectively to perform fault diagnosis, obtain fault diagnosis results of the W fault types, and determine a fault diagnosis result of the reactor to be diagnosed based on the fault diagnosis results of the W fault types. The target diagnosis models are trained based on the reactor fault diagnosis model training method of any of the embodiments of the present application.
[0133] The technical solution of the present embodiment improves the accuracy of fault diagnosis by performing fault diagnosis on the circuit breaker to be diagnosed through the target diagnosis models corresponding to the W fault types of the reactor respectively, and determining the fault diagnosis result of the circuit breaker to be diagnosed based on the fault diagnosis results of the W fault types.
[0134] The reactor fault diagnosis device provided by the embodiments of the present application can execute the reactor fault diagnosis method provided by any of the embodiments of the present application, and has the function modules and beneficial effects corresponding to the execution method.
[0135] Embodiment five
[0136] Figure 5 is a structural schematic diagram of an electronic device provided by embodiment five of the present application. The electronic device 10 is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular telephones, smart phones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not intended to limit the implementations of the present application described and / or claimed in this document.
[0137] As Figure 5As shown, the electronic device 10 includes at least one processor 11, and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., connected to the at least one processor 11 in communication. The memory stores a computer program executable by the at least one processor 11, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or loaded into the random access memory (RAM) 13 from the storage unit 18. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0138] A plurality of components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc., an output unit 17, such as various types of displays, a speaker, etc., a storage unit 18, such as a magnetic disk, an optical disk, etc., and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.
[0139] The processor 11 can be various general and / or special-purpose processing components having processing and computing capabilities. Some examples of the processor 11 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 appropriate processor, controller, microcontroller, etc. The processor 11 performs various methods and processes described above, such as the fault diagnosis model training method of the electric reactor, and / or the fault diagnosis method of the electric reactor.
[0140] In some embodiments, the fault diagnosis model training method of the electric reactor, and / or the fault diagnosis method of the electric reactor can be implemented as a computer program tangibly embodied in a computer readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the fault diagnosis model training method of the electric reactor, and / or the fault diagnosis method of the electric reactor described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to perform the fault diagnosis model training method of the electric reactor, and / or the fault diagnosis method of the electric reactor by any other appropriate means (e.g., by means of firmware).
[0141] The various embodiments of the systems and techniques described above can be implemented in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a load programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0142] The computer program for implementing the fault diagnosis model training method of the electric reactor of the present application and / or the electric reactor fault diagnosis method can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the computer program, when executed by the processor, implements the functions / operations specified in the flowcharts and / or block diagrams. The computer program can be executed entirely on a machine, partially on a machine, partially on a machine as a standalone software package and partially on a remote machine, or entirely on a remote machine or server.
[0143] Embodiment six
[0144] Embodiment six of the present application also provides a computer readable storage medium, which stores computer instructions for causing a processor to execute a fault diagnosis model training method of an electric reactor, the method comprising:
[0145] Obtaining an initial sample data set, wherein the initial sample data set includes sample data corresponding to W fault types of an electric reactor respectively;
[0146] Based on the initial sample data set, a sub-sample set corresponding to each fault type is constructed respectively;
[0147] W initial diagnosis models are constructed, and each of the W initial diagnosis models is trained based on a sub-sample set corresponding to each fault type, to obtain a first diagnosis model corresponding to each of the W fault types;
[0148] Based on the initial sample data set, a plurality of batches of sample sets are generated, and the number of sample data corresponding to any fault type in each batch of sample sets is at least one;
[0149] The W fault types respectively correspond to the first diagnostic model based on a plurality of batch sample sets Joint training is performed to obtain the second diagnostic model corresponding to the W fault types: in each training batch, the sample data of each fault type in the batch sample set is input into the first diagnostic model corresponding to the fault type, the output result of each fault type first diagnostic model is converted into vector form data, and the comprehensive output result corresponding to each fault type first diagnostic model is determined based on the plurality of vector form data corresponding to each fault type first diagnostic model; the first loss function of the batch is determined based on the comprehensive output result corresponding to the first diagnostic model of the W fault types and the preset vector, and the model parameter adjustment of the W first diagnostic models of the batch is performed based on the first loss function of the batch.
[0150] The discriminator is constructed, and the second diagnostic model corresponding to the W fault types and the discriminator are generated based on the initial sample data set. Adversarial training is performed, and the target diagnostic model corresponding to the W fault types is obtained under the condition that the training end condition is met, wherein the target diagnostic model of any fault type is used to determine the probability that the reactor associated data belongs to the fault type.
[0151] And / or, an electric reactor fault diagnosis method is performed, and the method comprises:
[0152] Obtaining the reactor associated data of the electric reactor to be diagnosed;
[0153] The reactor associated data is input into the target diagnostic model corresponding to the W fault types respectively to perform fault diagnosis, and the fault diagnosis result of the W fault types is obtained. The fault diagnosis result of the electric reactor to be diagnosed is determined based on the fault diagnosis result of the W fault types; wherein the target diagnostic model is trained based on the electric reactor fault diagnosis model training method of any embodiment of the present application.
[0154] In the context of the present application, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer-readable storage medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of a machine-readable storage medium will include one or more lines of a program of instructions in a transitory signal, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0155] To provide for interaction with a user, the systems and techniques described here 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 a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can be used to provide for interaction with a user as well; 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 acoustic, speech, or tactile input.
[0156] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0157] The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and VPS service.
[0158] It should be understood that the various forms of flow shown above can be used to reorder, add or delete steps. For example, each step described in the present application can be executed in parallel, sequentially or in a different order, as long as the desired results of the technical solutions of the present application can be achieved, which is not limited herein.
[0159] The above detailed description does not constitute a limitation on the scope of protection of the present application. 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 replacements and improvements made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A method for training a fault diagnosis model of a reactor, characterized by, The method comprises the following steps: obtaining an initial sample data set, wherein the initial sample data set comprises sample data corresponding to W fault types of a reactor respectively, and the sample data is reactor associated data corresponding to the W fault types of the reactor respectively; constructing a sub-sample set corresponding to each fault type based on the initial sample data set respectively; constructing W initial diagnosis models, training the W initial diagnosis models based on the sub-sample set corresponding to each fault type respectively, and obtaining first diagnosis models corresponding to the W fault types respectively; generating a plurality of batch sample sets based on the initial sample data set, wherein the number of sample data corresponding to any fault type in each batch sample set is at least one; jointly training the first diagnosis models corresponding to the W fault types based on the plurality of batch sample sets respectively, and obtaining second diagnosis models corresponding to the W fault types respectively; in each training batch, inputting the sample data of each fault type in the batch sample set into the first diagnosis model of the corresponding fault type, converting the output result of each fault type first diagnosis model into vector form data, and determining the comprehensive output result corresponding to each fault type first diagnosis model based on a plurality of vector form data corresponding to each fault type first diagnosis model; determining the first loss function of the batch based on the comprehensive output result corresponding to the first diagnosis model of the W fault types respectively and a preset vector, and adjusting the model parameters of the W first diagnosis models of the batch based on the first loss function of the batch; constructing a discriminator, generating an adversarial training based on the initial sample data set for the second diagnosis models corresponding to the W fault types and the discriminator, and obtaining target diagnosis models corresponding to the W fault types respectively under the condition that a training end condition is met, wherein the target diagnosis model of any fault type is used to determine the probability that the reactor associated data belongs to the fault type; wherein the conversion of the output result of each fault type first diagnosis model into vector form data and the determination of the comprehensive output result corresponding to each fault type first diagnosis model based on a plurality of vector form data corresponding to each fault type first diagnosis model comprise: converting the output result of the first diagnosis model of the i-th fault type into vector form data based on a first function, wherein the vector form data comprises w data, the i-th data of the vector form data is the output result of the first diagnosis model of the i-th fault type, other data except the i-th data of the vector form data is set as a random number, and the sum of the w data is one; converting the vector form data into a first intermediate vector based on a second function, wherein the second function is used to set the maximum value in the vector form data to one and the non-maximum value in the vector form data to zero; performing mean value processing on a plurality of intermediate vectors corresponding to the first diagnosis model of the i-th fault type to obtain a second intermediate vector; convert the second intermediate vector into a comprehensive output result corresponding to the first diagnostic model of the ith fault type based on a third function, wherein the third function is configured to set non-maximum values in the second intermediate vector to zero and keep maximum values in the second intermediate vector.
2. The method of claim 1, wherein, The number of sample data in each sub-sample set corresponding to each fault type is the same as the number of sample data in the initial sample data set. The sub-sample set for the ith fault type is constructed in the following manner: If the sample data corresponds to the ith fault type, the label of the sample data is set to a first label. If the sample data corresponds to a fault type other than the ith fault type, the label of the sample data is set to a second label.
3. The method of claim 1, wherein, The generation of the plurality of batch sample sets based on the initial sample data set comprises: Based on the fault type of each sample data in the initial sample data set, a one-hot code label is set for each sample data. Sample data and the one-hot code label corresponding to the sample data are obtained by sampling the sample data corresponding to the W fault types, and the sum of the number of sample data corresponding to the W fault types in each batch sample set is a preset batch sample number.
4. The method of claim 1, wherein, The first loss function of the batch is determined based on the comprehensive output results of the first diagnostic models corresponding to the W fault types and a preset vector, which comprises: The integrated processing results of the W fault types are obtained by summing the comprehensive output results of the first diagnostic models corresponding to the W fault types. The first loss function of the batch is determined based on the spatial distance between the integrated processing results of the W fault types and the preset vector, wherein the preset vector includes W data, and the W data in the preset vector are each 1.
5. The method of claim 1, wherein, The generation of the second diagnostic models corresponding to the W fault types and the discriminator based on the initial sample data set comprises: Based on the fault type of each sample data in the initial sample data set, a one-hot code label is set for each sample data. The output results of the second diagnostic models corresponding to the W fault types are obtained by inputting any sample data into the second diagnostic models corresponding to the W fault types, respectively. The output results of the second diagnostic models corresponding to the W fault types are integrated into a third intermediate vector, and the third intermediate vector is input into the discriminator to obtain the output result of the discriminator. The second loss function of the second diagnostic models corresponding to the W fault types and the third loss function of the discriminator are generated based on one or more of the output results of the second diagnostic models corresponding to the W fault types, the third intermediate vector, the output result of the discriminator, and the one-hot code label of the sample data. The second diagnostic model corresponding to each of the W fault types is adjusted in model parameters based on the second loss function, and the discriminator is adjusted in model parameters based on the third loss function.
6. A method of diagnosing a fault of a reactor, characterized by, The method comprises: Obtaining reactor associated data of a to-be-diagnosed reactor; Inputting the reactor associated data into W target diagnostic models corresponding to W fault types respectively to perform fault diagnosis, and obtaining fault diagnosis results of the W fault types; determining a fault diagnosis result of the to-be-diagnosed reactor based on the fault diagnosis results of the W fault types; wherein the target diagnostic model is trained based on the reactor fault diagnosis model training method in any one of claims 1-5.
7. A device for training a failure diagnosis model of a reactor, characterized by, The method comprises: An initial sample data set acquisition module is configured to acquire an initial sample data set, wherein the initial sample data set comprises sample data corresponding to W fault types of a reactor, and the sample data is reactor associated data corresponding to the W fault types of the reactor; A sub-sample set construction module is configured to construct a sub-sample set corresponding to each fault type based on the initial sample data set; An initial diagnostic model training module is configured to construct W initial diagnostic models, and train the W initial diagnostic models based on the sub-sample set corresponding to each fault type to obtain first diagnostic models corresponding to the W fault types; A batch sample set generation module is configured to generate a plurality of batch sample sets based on the initial sample data set, and the number of sample data corresponding to any fault type in each batch sample set is at least one; A first diagnostic model training module is configured to jointly train first diagnostic models corresponding to W fault types based on a plurality of batch sample sets to obtain second diagnostic models corresponding to the W fault types; in each training batch, sample data of each fault type in the batch sample set is input into the first diagnostic model corresponding to the fault type, the output result of each fault type first diagnostic model is converted into vector form data, and a comprehensive output result corresponding to each fault type first diagnostic model is determined based on a plurality of vector form data corresponding to each fault type first diagnostic model; a first loss function of the batch is determined based on the comprehensive output results of the first diagnostic models corresponding to the W fault types and a preset vector, and the W first diagnostic models of the batch are adjusted in model parameters based on the first loss function of the batch; A target diagnostic model determination module is configured to construct a discriminator, perform generative adversarial training on the second diagnostic models corresponding to the W fault types and the discriminator based on the initial sample data set, and obtain target diagnostic models corresponding to the W fault types under the condition that a training end condition is met, wherein the target diagnostic model of any fault type is used to determine the probability that reactor associated data belongs to the fault type. The first diagnostic model training module comprises: The comprehensive output result determination unit is configured to convert the output result of the first diagnostic model of the i-th fault type into vector form data based on a first function, wherein the vector form data includes w data, the i-th data of the vector form data is the output result of the first diagnostic model of the i-th fault type, other data than the i-th data of the vector form data is set as a random number, and the sum of the w data is one; convert the vector form data into a first intermediate vector based on a second function, wherein the second function is configured to set the maximum value in the vector form data as one and set the non-maximum value in the vector form data as zero; perform mean processing on a plurality of intermediate vectors corresponding to the first diagnostic model of the i-th fault type to obtain a second intermediate vector; and convert the second intermediate vector into the comprehensive output result of the first diagnostic model of the i-th fault type based on a third function, wherein the third function is configured to set the non-maximum value in the second intermediate vector as zero and retain the maximum value in the second intermediate vector.
8. An electronic device, comprising: The electronic device comprises: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the fault diagnosis model training method of the electric reactor and / or the electric reactor fault diagnosis method of claim 6.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions for enabling the processor to execute the fault diagnosis model training method of the electric reactor and / or the electric reactor fault diagnosis method of claim 6 when executed by the processor.
Citation Information
Patent Citations
Power transmission line fault detection method based on auxiliary classification generative adversarial network
CN113406437A
Image recognition model training method and device, image recognition method and device and electronic equipment
CN114492674A