Fault diagnosis model training method of circuit breaker and fault diagnosis method of circuit breaker
By performing multiple batches of training and parameter exchange variation on the circuit breaker fault diagnosis model, the problem that neural network diagnostic methods are prone to fall into local optimality is solved, and the accuracy of circuit breaker fault diagnosis is improved.
Patent Information
- Application Number
- CN202410989296.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2044-07-23
AI Technical Summary
Existing neural network-based circuit breaker fault diagnosis methods are prone to falling into local optimality, resulting in low diagnostic accuracy.
By building an initial model, including multiple generators and a discriminator, training multiple batches is performed, and model parameters exchange and mutate during each batch of training, preventing the model from falling into local optimality.
It improves the accuracy of the circuit breaker fault diagnosis model, avoids local optimal problems, and enhances the accuracy of diagnosis.
Smart Images

Figure CN118940112A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of fault detection, and in particular to a fault diagnosis model training method for a circuit breaker and a fault diagnosis method for a circuit breaker. Background Art
[0002] Circuit breakers play a dual role of control and protection in the distribution network system, and their operating conditions directly determine the operation of the entire power system. Therefore, fault diagnosis of circuit breakers is of great significance.
[0003] A variety of diagnostic methods have been proposed, involving various artificial intelligence algorithms, such as neural networks, etc. However, the circuit breaker fault diagnosis method based on neural networks has the problem of being easily trapped in local optimality. Summary of the invention
[0004] The present invention provides a fault diagnosis model training method for a circuit breaker and a fault diagnosis method for a circuit breaker, so as to prevent the fault diagnosis model from falling into a local optimum and improve the fault diagnosis accuracy of the fault diagnosis model.
[0005] According to one aspect of the present invention, a method for training a fault diagnosis model for a circuit breaker is provided, comprising:
[0006] Acquire a training data set, wherein the training data set includes circuit breaker sample data and fault labels corresponding to the circuit breaker sample data;
[0007] Constructing an initial model, wherein the initial model includes a plurality of generators and a discriminator; training the initial model in multiple batches based on the training data set: in the training process of any batch, adjusting the model parameters of the plurality of generators and the discriminator based on the sample data of the current batch and the fault labels corresponding to the sample data, to obtain a plurality of first generators and discriminators of the current batch; exchanging model parameters of at least some of the plurality of first generators of the current batch, and / or performing parameter variation on the model parameters of at least some of the plurality of first generators of the previous batch based on a preset variation ratio, to obtain a plurality of second generators of the current batch; training the plurality of second generators and the discriminator for the next batch;
[0008] When the training end condition is met, a plurality of candidate generators that have been trained in a plurality of batches are obtained; a verification data set is obtained, and verification processing is performed on the plurality of candidate generators based on the verification data set to obtain verification indicators respectively corresponding to the plurality of candidate generators, and a target generator is determined from the plurality of candidate generators based on the verification indicators respectively corresponding to the plurality of candidate generators;
[0009] A test data set is obtained, and the target generator is tested based on the test data set to obtain a test index of the target generator. When the test index meets a test condition, the target generator is determined as a circuit breaker fault diagnosis model.
[0010] According to another aspect of the present invention, a fault diagnosis method for a circuit breaker is provided, comprising:
[0011] Acquiring operating data related to a fault of a circuit breaker to be diagnosed;
[0012] The operating data is input into a circuit breaker fault diagnosis model for fault diagnosis to obtain a fault diagnosis result of the circuit breaker to be diagnosed, wherein the circuit breaker fault diagnosis model is trained based on the circuit breaker fault diagnosis model training method described in any embodiment of the present invention.
[0013] According to another aspect of the present invention, a fault diagnosis model training device for a circuit breaker is provided, comprising:
[0014] A training data set acquisition module, used to acquire a training data set, wherein the training data set includes circuit breaker sample data and fault labels corresponding to the circuit breaker sample data;
[0015] A training module is used to construct an initial model, wherein the initial model includes a plurality of generators and a discriminator; the initial model is trained in multiple batches based on the training data set: in the training process of any batch, model parameters of the plurality of generators and the discriminator are adjusted based on sample data of the current batch and fault labels corresponding to the sample data, so as to obtain a plurality of first generators and discriminators of the current batch; model parameters of at least some of the plurality of first generators of the current batch are exchanged, and / or model parameters of at least some of the plurality of first generators of the previous batch are mutated based on a preset mutation ratio, so as to obtain a plurality of second generators of the current batch; and the plurality of second generators and the discriminator are trained for the next batch;
[0016] A target generator determination module is used to obtain multiple candidate generators that have been trained in multiple batches when the training end condition is met; obtain a verification data set, perform verification processing on the multiple candidate generators based on the verification data set, obtain verification indicators corresponding to the multiple candidate generators, and determine a target generator from the multiple candidate generators based on the verification indicators corresponding to the multiple candidate generators;
[0017] The target generator test module is used to obtain a test data set, test the target generator based on the test data set, obtain the test index of the target generator, and determine the target generator as a circuit breaker fault diagnosis model when the test index meets the test conditions.
[0018] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0019] at least one processor; and
[0020] a memory communicatively connected to the at least one processor; wherein,
[0021] 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 so that the at least one processor can execute the fault diagnosis model training method for a circuit breaker described in any embodiment of the present invention, and / or the fault diagnosis method for a circuit breaker described in any embodiment of the present invention.
[0022] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the circuit breaker fault diagnosis model training method described in any embodiment of the present invention, and / or the circuit breaker fault diagnosis method described in any embodiment of the present invention when executed.
[0023] The technical solution of the embodiment of the present invention is to train multiple batches of multiple generators and one discriminator in the initial model, and for any batch, exchange model parameters of at least some of the multiple first generators obtained by training in the current batch, and / or mutate the model parameters of at least some of the multiple first generators obtained by training in the previous batch based on a preset mutation ratio, so as to prevent the fault diagnosis model from falling into the local optimum and improve the fault diagnosis accuracy of the fault diagnosis model.
[0024] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0026] Figure 1 is a flow chart of a fault diagnosis model training method for a circuit breaker provided in Embodiment 1 of the present invention;
[0027] Figure 2 is a flow chart of a circuit breaker fault diagnosis method provided by Embodiment 2 of the present invention;
[0028] Figure 3 It is a structural schematic diagram of a circuit breaker fault diagnosis model training device provided by Embodiment 3 of the present invention;
[0029] Figure 4 It is a structural schematic diagram of a fault diagnosis device for a circuit breaker provided in a fourth embodiment of the present invention;
[0030] Figure 5 It is a structural schematic diagram of an electronic device provided in Embodiment 5 of the present invention. DETAILED DESCRIPTION
[0031] 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.
[0032] 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 addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0033] Embodiment 1
[0034] Figure 1This is a flow chart of a method for training a fault diagnosis model for a circuit breaker provided in the first embodiment of the present invention. This embodiment is applicable to the case of training a fault diagnosis model for a circuit breaker. The method can be executed by a fault diagnosis model training device for a circuit breaker. The fault diagnosis model training device for a circuit breaker can be implemented in the form of hardware and / or software. The fault diagnosis model training device for a circuit breaker can be configured in an electronic device such as a computer or server for training a fault diagnosis model. Figure 1 As shown, the method includes:
[0035] S110. Obtain a training data set, wherein the training data set includes circuit breaker sample data and fault labels corresponding to the circuit breaker sample data.
[0036] Among them, the circuit breaker sample data refers to the operating data of the circuit breaker in a fault state. Specifically, the circuit breaker sample data includes but is not limited to the voltage and current data in the circuit breaker fault state, the mechanical vibration signal of the circuit breaker, the circuit breaker temperature, etc.; the voltage and current data in the circuit breaker fault state can be used to identify whether the circuit breaker has electrical faults such as overload and short circuit; the circuit breaker mechanical vibration signal can reflect the working state of the internal mechanical parts of the circuit breaker, such as loose base screws, shock absorber impact, and mechanism moving parts falling off; through the temperature sensor installed on the circuit breaker, the circuit breaker temperature can be monitored in real time to determine whether there is an overheating problem, thereby preventing the occurrence of dangerous situations such as fire. The fault label is used to characterize the type of fault corresponding to the circuit breaker sample data.
[0037] In this embodiment, before model training, a data set is pre-constructed and randomly divided into a training data set, a validation data set and a test data set, wherein the random division ratios of the training data set, the validation data set and the test data set may be 40%, 40% and 20%.
[0038] S120. Construct an initial model, wherein the initial model includes a plurality of generators and a discriminator; perform multiple batches of training on the initial model based on the training data set: in the training process of any batch, adjust the model parameters of the plurality of generators and the discriminator based on the sample data of the current batch and the fault labels corresponding to the sample data, to obtain a plurality of first generators and discriminators of the current batch; exchange model parameters of at least some of the plurality of first generators of the current batch, and / or perform parameter variation on the model parameters of at least some of the plurality of first generators of the previous batch based on a preset variation ratio, to obtain a plurality of second generators of the current batch; perform training on the plurality of second generators and the discriminator for the next batch.
[0039] Among them, the initial model includes multiple generators and a discriminator. The structures of the multiple generators are the same, but the initialization processes of different generators are different. The generator 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., and the discriminator can be a multi-layer perceptron.
[0040] In this embodiment, the sample data in the training data set can be divided into batches to obtain sample data of different batches and fault labels corresponding to the sample data. The training process of any batch is as follows:
[0041] 1) adjusting model parameters of multiple generators and discriminators based on the sample data of the current batch and the fault labels corresponding to the sample data to obtain multiple first generators and discriminators of the current batch;
[0042] 2) Exchanging model parameters of at least some of the multiple first generators in the current batch, and / or mutating model parameters of at least some of the multiple first generators in the previous batch based on a preset mutation ratio, to obtain multiple second generators in the current batch.
[0043] Among them, the first generator refers to the generator obtained after training in the current batch, the second generator refers to the generator after parameter exchange and / or parameter variation of at least a part of the first generator obtained by training in the current batch, and at least a part of the first generator refers to the first generator obtained by training in the current batch that undergoes parameter exchange and / or parameter variation. It should be noted that if the current batch is the first batch, the generator trained in the current batch is the initial generator in the initial model; if the current batch is not the first batch, the multiple generators trained in the current batch include the first generator and / or the second generator obtained in the previous batch, wherein the first generator is the first generator of the previous batch that has not undergone parameter exchange and / or parameter variation, and the second generator is the second generator obtained after parameter exchange and / or parameter variation of at least a part of the first generator of the previous batch.
[0044] During the training of multiple batches of the initial model, the generator's loss function includes the adversarial loss variable function and the cross entropy loss function. The specific expressions are as follows:
[0045]
[0046] Among them, loss G Represents the total loss function of the generator, loss G1 Represents the adversarial loss variable function, loss G2 Cross entropy loss function, batch represents the total training batch, W represents the number of generators, b imrepresents the fault label of the mth generator in the ith training batch, G im represents the fault sample data of the mth generator in the i-th training batch, Indicates the fault sample data accepted by the i-th training batch discriminator After the output,
[0047] The loss function of the discriminator includes the real fault label loss function and the generated fault label loss function. The specific expression is as follows:
[0048]
[0049]
[0050] Among them, loss D Represents the total loss function of the discriminator, loss D1 represents the real fault label loss function, loss D2 represents the loss function for generating fault labels, Indicates the fault label accepted by the discriminator in the i-th batch After the output,
[0051] On the basis of the above embodiment, optionally, the model parameter exchange of at least a local first generator among the multiple first generators of the current batch includes: determining at least a local first generator among the multiple first generators of the current batch; determining a generator pair among the at least local first generators, the generator pair including two of the first generators that exchange model parameters; and correspondingly exchanging local layer model parameters in the two first generators in the generator pair.
[0052] The generator pair refers to a pair of first generators for model parameter exchange. Specifically, each generator pair includes two generators, which can be randomly matched in pairs in the local first generator, and the two first generators that are successfully matched are regarded as a generator pair. For example, two adjacent first generators can be regarded as a generator pair, or they can be matched based on preset matching rules in at least the local first generator to obtain a generator pair.
[0053] It should be noted that in the process of exchanging model parameters, the parameters of the local network layers of the two first generators in the generator pair are exchanged accordingly, but the parameters of the first network layer in the first generator are not exchanged.
[0054] Among them, the local layer refers to the local network layer in the first generator, and the model parameters of the local layer are exchanged. It can be understood that the number of layers of the local layer corresponding to different generator pairs is different; optionally, the method for determining the number of layers of the local layer is: for any generator pair, the number of layers of the local layer corresponding to the generator pair is determined based on the number of the first generators and a first preset parameter; wherein the first preset parameter is a random number, or the first preset parameter is determined based on the processing accuracy of the two first generators in the generator pair; or the number of layers of the local layer is determined based on the order of the first generators in the generator pair.
[0055] Specifically, for any generator pair, the number of layers of the local layer corresponding to the generator pair can be determined based on the number of the first generator and a random number, wherein the first preset parameter can be a random number m, 1<m<the number of network layers of the first generator. Exemplarily, assuming that the number of network layers of the first generator is M, m (1<m<M) network layers can be randomly selected as local layers.
[0056] For any generator pair, the first preset parameter can also be determined based on the processing accuracy of the two first generators in the generator pair, and further, the number of layers of the local layer corresponding to the generator pair can be determined based on the number of first generators and the first preset parameter. Among them, the processing accuracy of the first generator refers to the accuracy of the fault classification of the first generator of the current batch, and the first preset parameter is negatively correlated with the processing accuracy of the first generator. In other words, the smaller the processing accuracy of the first generator, the larger the first preset parameter, and correspondingly, the larger the number of layers of the local layer.
[0057] Exemplarily, the calculation formula for the number of layers of a local layer is as follows:
[0058] m n =(M-1)*η n ,
[0059] Among them, m n represents the number of local layers corresponding to the nth first generator, n∈[1,N], N represents the number of first generators, M represents the total number of network layers of the first generator, η n Represents the first preset parameter corresponding to the nth first generator, η∈(0,1], the smaller the processing accuracy of the first generator, the larger the first preset parameter. It should be noted that since the structure of the generator is the same, the total number of layers of each first generator is M.
[0060] For any generator pair, the number of layers of the local layer can also be determined based on the order of the first generator in the generator pair. Exemplarily, the number of layers of the local layer is calculated as follows:
[0061]
[0062] Among them, m n Indicates the number of local layers corresponding to the nth first generator, m n is an integer, n∈[1,N], N represents the number of the first generator, M represents the total number of layers of the first generator, k1 is a hyperparameter, for example, k1=3 or 4; γ is bound to the order of the first generator and is evenly distributed in Wherein, k2 is the ranking position of the first generator. For example, a first generator is at the top of the ranking, and the k2 corresponding to the first generator is 1. It should be noted that if If the result of the calculation is not an integer, then The calculated results are approximated and the approximated The calculated result is taken as m n Specifically, we can use the rounding approximation method to The calculation results of m are approximated and the n ; For example: If The calculated result is 3.4, so the m obtained by approximate processing is n =3, if The calculated result is 4.7, so the m obtained by approximate processing is n =5. You can also use preset rules to The calculated results are approximated to obtain m n ; For example, the preset rule can be rounding up or rounding down. Taking rounding up as an example, regardless of The calculated result is 3.1 or 3.7, and the approximate m n Both are 4.
[0063] In this embodiment, the model parameter exchange method is: determine at least a local first generator from multiple first generators obtained from the current batch training. Specifically, the first generators can be sorted, and the local first generator can be selected according to the sorting result, or a local first generator can be randomly selected from the first generators; further, random matching is performed in pairs among at least the local first generators to obtain a generator pair; further, the local layer of the first generator in the generator pair is determined based on the number of layers of the local layer, and the model parameters of the local layers in the two first generators of the generator pair are correspondingly exchanged. Exemplarily, it can be done according to Any scheme of extracting m from any first generator in the generator pair n The parameters of the layers correspond to the parameters of the other generator in the generator pair m n The layers are exchanged accordingly.
[0064] On the basis of the above embodiment, optionally, the determining of at least a local first generator among the multiple first generators of the current batch includes: sorting the multiple first generators based on the processing accuracy of the multiple first generators of the current batch; dividing the multiple first generators into a first generator group and a second generator group based on the sorting of the multiple first generators; wherein the processing accuracy of at least one of the first generators in the first generator group is higher than the processing accuracy of at least one of the first generators in the second generator group; and determining at least one of the first generators in the second generator group as the at least local first generator that performs the model parameter exchange.
[0065] Among them, the first generator group is a generator group composed of generators with higher processing accuracy, and the second generator group is a generator group composed of generators with lower processing accuracy. It can be understood that since the first generator in the first generator group has higher processing accuracy, the parameters of the generators in the first generator group may not be exchanged, and the parameters remain unchanged. In this embodiment, the first generators can be sorted according to the processing accuracy of multiple first generators obtained by the current batch training to obtain the sorting result of the first generator, and the first generators can be divided according to the sorting result of the first generator according to the preset division ratio to obtain the first generator group and the second generator group, and at least one first generator in the second generator group is determined as at least a local first generator for performing model parameter exchange. The preset division ratio is used to divide the sorted first generator into the first generator group and the second generator group. Exemplarily, the preset division ratio can be 30%, and the first generators are sorted according to the processing accuracy of the first generator, and the first generators with the processing accuracy ranked in the top 30% are divided into the first generator group, and the first generators with the processing accuracy ranked in the bottom 60% are divided into the second generator group.
[0066] On the basis of the above embodiment, optionally, the model parameters of at least some of the multiple first generators in the current batch are mutated based on a preset variation ratio, including: determining at least some of the multiple first generators in the current batch; determining the preset variation ratio corresponding to each of the first generators, and mutating the model parameters of the first generator based on the preset variation ratio.
[0067] The preset mutation ratio refers to the ratio of parameter mutation of the first generator. Specifically, the preset mutation ratio can be a random ratio, such as 5%. The preset mutation ratio of the first generator can also be determined according to the batch, and the preset mutation ratio of the first generator is negatively correlated with the batch. Exemplarily, the calculation formula of the preset mutation ratio is as follows:
[0068]
[0069] Among them, q n represents the preset mutation ratio of the nth first generator, s represents the current batch, S represents the maximum batch, and y is a hyperparameter.
[0070] The preset variation ratio of the first generator can also be determined according to the processing accuracy of the first generator. The preset variation ratio of the first generator is negatively correlated with the processing accuracy of the first generator.
[0071] Exemplarily, the calculation formula of the preset variation ratio is as follows:
[0072] q n =y%*λ n
[0073] Among them, λ n is the coefficient of the preset mutation ratio of the nth first generator, λ n Negatively correlated with the processing accuracy of the first generator.
[0074] The preset variation ratio of the first generator can also be determined according to the batch and the processing accuracy of the first generator. Exemplarily, the above two calculation methods of the preset variation ratio are combined to obtain the calculation formula of the preset variation ratio as follows:
[0075]
[0076] It can be understood that the larger the training batch is, the higher the processing accuracy of the first generator obtained by the current batch training is, and correspondingly, the smaller the proportion of model parameters that undergo parameter mutation in the first generator is.
[0077] In this embodiment, at least some of the first generators in the current batch are determined; the preset variation ratio corresponding to each first generator is determined by the above-mentioned method for determining the preset variation ratio, and the model parameters of the first generator are mutated based on the preset variation ratio. Any scheme extracts the model parameters in the nth first generator for mutation processing, where W represents the total number of parameters of the first generator.
[0078] S130. When the training end conditions are met, multiple candidate generators that have been trained in multiple batches are obtained; a verification data set is obtained, and verification processing is performed on the multiple candidate generators based on the verification data set to obtain verification indicators respectively corresponding to the multiple candidate generators, and a target generator is determined from the multiple candidate generators based on the verification indicators respectively corresponding to the multiple candidate generators.
[0079] Among them, the training end condition refers to the condition for the end of training. Specifically, the training end condition may be that the processing accuracy of the generator reaches the preset accuracy, and the training end condition may also be that the training batch reaches the preset batch. In this embodiment, the judgment is made based on the preset training end condition. When the training end condition is met, the multiple first generators obtained through multiple batches of training are determined as candidate generators. Further, a verification data set is obtained, and verification processing is performed on multiple candidate generators based on the verification data set to obtain verification indicators corresponding to the multiple candidate generators respectively; further, the verification indicators corresponding to the multiple candidate generators can be judged based on the determination condition of the target generator, and the target generator is determined among the multiple candidate generators. Among them, the verification indicator is an indicator used to evaluate the performance of multiple candidate generators. Specifically, the verification indicator includes but is not limited to accuracy, recall rate, F1 score, etc. The determination condition of the target generator may be a threshold corresponding to the verification indicator, such as an accuracy threshold, an F1 score threshold, etc., which is not limited here.
[0080] S140, acquiring a test data set, performing test processing on the target generator based on the test data set to obtain a test indicator of the target generator, and determining the target generator as a circuit breaker fault diagnosis model when the test indicator meets a test condition.
[0081] Among them, the test indicators are used to further evaluate the performance of the target generator to determine whether they meet the test conditions. The test indicators include but are not limited to accuracy, recall rate, F1 score, etc. It should be noted that the test indicators can be the same as the verification indicators, or different from the verification indicators, and can be set by technical personnel in this field according to needs. In this embodiment, a test data set is obtained, and the target generator is tested based on the test data set to obtain the test indicators of the target generator. When the test indicators meet the test conditions, the target generator is determined as a circuit breaker fault diagnosis model. Among them, the test conditions can be thresholds corresponding to the test indicators, such as accuracy thresholds, recall thresholds, etc.
[0082] The technical solution of this embodiment is to train multiple batches of multiple generators and one discriminator in the initial model, and for any batch, exchange model parameters of at least some of the multiple first generators obtained by training in the current batch, and / or mutate the model parameters of at least some of the multiple first generators obtained by training in the previous batch based on a preset mutation ratio, so as to prevent the fault diagnosis model from falling into the local optimum and improve the fault diagnosis accuracy of the fault diagnosis model.
[0083] Embodiment 2
[0084] Figure 21 is a flow chart of a circuit breaker fault diagnosis method provided by the second embodiment of the present invention. The circuit breaker fault diagnosis model trained by the circuit breaker fault diagnosis model training method of the above embodiment performs fault diagnosis on the circuit breaker to be diagnosed. Figure 2 As shown, the method includes:
[0085] S210: Acquire operation data related to the fault of the circuit breaker to be diagnosed.
[0086] S220: Input the operation data into a circuit breaker fault diagnosis model to perform fault diagnosis, and obtain a fault diagnosis result of the circuit breaker to be diagnosed, wherein the circuit breaker fault diagnosis model is trained based on the circuit breaker fault diagnosis model training method according to any embodiment of the present invention.
[0087] The circuit breaker to be diagnosed refers to a circuit breaker with a fault to be diagnosed, and the operating data related to the fault of the circuit breaker to be diagnosed includes but is not limited to the voltage and current data under the fault state of the circuit breaker, the mechanical vibration signal of the circuit breaker, the temperature of the circuit breaker, etc. In this embodiment, the operating data related to the fault of the circuit breaker to be diagnosed is obtained; the operating data is input into the circuit breaker fault diagnosis model for fault diagnosis to obtain the fault diagnosis result of the circuit breaker to be diagnosed, wherein the fault diagnosis result of the circuit breaker to be diagnosed includes the fault type of the circuit breaker to be diagnosed.
[0088] The technical solution of this embodiment uses a circuit breaker fault diagnosis model to perform fault diagnosis on the circuit breaker to be diagnosed, thereby improving the accuracy of fault diagnosis.
[0089] Embodiment 3
[0090] Figure 3 Schematic diagram of the structure of a circuit breaker fault diagnosis model training device provided by the third embodiment of the present invention. Figure 3 As shown, the device comprises:
[0091] A training data set acquisition module 310 is used to acquire a training data set, wherein the training data set includes circuit breaker sample data and fault labels corresponding to the circuit breaker sample data;
[0092] The training module 320 is used to construct an initial model, wherein the initial model includes a plurality of generators and a discriminator; the initial model is trained in multiple batches based on the training data set: in the training process of any batch, the model parameters of the plurality of generators and the discriminator are adjusted based on the sample data of the current batch and the fault labels corresponding to the sample data, so as to obtain a plurality of first generators and discriminators of the current batch; the model parameters of at least some of the first generators of the current batch are exchanged, and / or the model parameters of at least some of the first generators of the previous batch are mutated based on a preset mutation ratio, so as to obtain a plurality of second generators of the current batch; the plurality of second generators and the discriminator are trained for the next batch;
[0093] The target generator determination module 330 is used to obtain multiple candidate generators that have been trained in multiple batches when the training end condition is met; obtain a verification data set, perform verification processing on the multiple candidate generators based on the verification data set, obtain verification indicators corresponding to the multiple candidate generators, and determine the target generator from the multiple candidate generators based on the verification indicators corresponding to the multiple candidate generators;
[0094] The target generator test module 340 is used to obtain a test data set, test the target generator based on the test data set, obtain the test index of the target generator, and determine the target generator as a circuit breaker fault diagnosis model when the test index meets the test conditions.
[0095] The technical solution of this embodiment is to train multiple batches of multiple generators and one discriminator in the initial model, and for any batch, exchange model parameters of at least some of the multiple first generators obtained by training in the current batch, and / or mutate the model parameters of at least some of the multiple first generators obtained by training in the previous batch based on a preset mutation ratio, so as to prevent the fault diagnosis model from falling into the local optimum and improve the fault diagnosis accuracy of the fault diagnosis model.
[0096] Based on the above embodiment, optionally, the training module 320 includes a parameter exchange unit, which is used to determine at least a local first generator among the multiple first generators of the current batch; determine a generator pair among the at least local first generators, and the generator pair includes two of the first generators that exchange model parameters; and correspondingly exchange local layer model parameters in the two first generators in the generator pair.
[0097] On the basis of the above embodiment, optionally, the parameter exchange unit includes a local first generator determination subunit which sorts the multiple first generators based on the processing accuracy of the multiple first generators of the current batch; divides the multiple first generators into a first generator group and a second generator group based on the sorting of the multiple first generators; wherein the processing accuracy of at least one of the first generators in the first generator group is higher than the processing accuracy of at least one of the first generators in the second generator group; and determines at least one of the first generators in the second generator group as the at least local first generator that performs the model parameter exchange.
[0098] On the basis of the above embodiments, optionally, the number of layers of the local layers corresponding to different generator pairs is different; the training module 320 also includes a local layer number determination unit, and the method for determining the number of layers of the local layer is: for any generator pair, the number of layers of the local layer corresponding to the generator pair is determined based on the number of the first generators and a first preset parameter; wherein the first preset parameter is a random number, or the first preset parameter is determined based on the processing accuracy of the two first generators in the generator pair; or the number of layers of the local layer is determined based on the order of the first generators in the generator pair.
[0099] Based on the above embodiment, optionally, the training module 320 also includes a parameter variation unit, which is used to determine at least some of the multiple first generators in the current batch; determine a preset variation ratio corresponding to each of the first generators, and perform variation processing on the model parameters of the first generator based on the preset variation ratio.
[0100] Based on the above embodiment, optionally, the preset variation ratio of the first generator is negatively correlated with the batch; or, the preset variation ratio of the first generator is negatively correlated based on the processing accuracy of the first generator.
[0101] The fault diagnosis model training device for a circuit breaker provided in an embodiment of the present invention can execute the fault diagnosis model training device for a circuit breaker provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0102] Embodiment 4
[0103] Figure 4 Schematic diagram of the structure of a circuit breaker fault diagnosis device provided by the fourth embodiment of the present invention. Figure 4 As shown, the device comprises:
[0104] The operation data acquisition module 410 is used to acquire operation data related to the fault of the circuit breaker to be diagnosed.
[0105] The fault diagnosis module 420 is used to input the operating data into a circuit breaker fault diagnosis model for fault diagnosis to obtain a fault diagnosis result of the circuit breaker to be diagnosed, wherein the circuit breaker fault diagnosis model is trained based on the circuit breaker fault diagnosis model training method described in any embodiment of the present invention.
[0106] The technical solution of this embodiment uses a circuit breaker fault diagnosis model to perform fault diagnosis on the circuit breaker to be diagnosed, thereby improving the accuracy of fault diagnosis.
[0107] The circuit breaker fault diagnosis device provided in the embodiment of the present invention can execute the circuit breaker fault diagnosis method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0108] Embodiment 5
[0109] Figure 5 1 is a schematic diagram of the structure of an electronic device provided in Embodiment 5 of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, 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 merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0110] like Figure 5 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, 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 the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. 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.
[0111] A number 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, speakers, etc.; a storage unit 18, such as a 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.
[0112] The processor 11 may be a variety of general and / or special processing components with 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 dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 11 executes the various methods and processes described above, such as a fault diagnosis model training method for a circuit breaker, and / or a fault diagnosis method for a circuit breaker.
[0113] In some embodiments, the fault diagnosis model training method for a circuit breaker, and / or the fault diagnosis method for a circuit breaker may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may 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 for a circuit breaker, and / or the fault diagnosis method for a circuit breaker described above may be executed. Alternatively, in other embodiments, the processor 11 may be configured to execute the fault diagnosis model training method for a circuit breaker, and / or the fault diagnosis method for a circuit breaker in any other appropriate manner (e.g., by means of firmware).
[0114] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0115] The computer program for implementing the fault diagnosis model training method for circuit breakers of the present invention and / or the fault diagnosis method for circuit breakers 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, a special-purpose computer or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or the block diagram are implemented. The computer program can be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0116] Embodiment 6
[0117] Embodiment 6 of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to execute a fault diagnosis model training method for a circuit breaker, the method comprising:
[0118] Acquire a training data set, wherein the training data set includes circuit breaker sample data and fault labels corresponding to the circuit breaker sample data;
[0119] Constructing an initial model, wherein the initial model includes a plurality of generators and a discriminator; training the initial model in multiple batches based on the training data set: in the training process of any batch, adjusting the model parameters of the plurality of generators and the discriminator based on the sample data of the current batch and the fault labels corresponding to the sample data, to obtain a plurality of first generators and discriminators of the current batch; exchanging model parameters of at least some of the plurality of first generators of the current batch, and / or performing parameter variation on the model parameters of at least some of the plurality of first generators of the previous batch based on a preset variation ratio, to obtain a plurality of second generators of the current batch; training the plurality of second generators and the discriminator for the next batch;
[0120] When the training end condition is met, a plurality of candidate generators that have been trained in a plurality of batches are obtained; a verification data set is obtained, and verification processing is performed on the plurality of candidate generators based on the verification data set to obtain verification indicators respectively corresponding to the plurality of candidate generators, and a target generator is determined from the plurality of candidate generators based on the verification indicators respectively corresponding to the plurality of candidate generators;
[0121] A test data set is obtained, and the target generator is tested based on the test data set to obtain a test index of the target generator. When the test index meets a test condition, the target generator is determined as a circuit breaker fault diagnosis model.
[0122] And / or, executing a circuit breaker fault diagnosis method, the method comprising:
[0123] Acquiring operating data related to a fault of a circuit breaker to be diagnosed;
[0124] The operating data is input into a circuit breaker fault diagnosis model for fault diagnosis to obtain a fault diagnosis result of the circuit breaker to be diagnosed, wherein the circuit breaker fault diagnosis model is trained based on the circuit breaker fault diagnosis model training method described in any embodiment of the present invention.
[0125] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0126] To provide interaction with a user, the systems and techniques described herein may 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 trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0127] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may 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.
[0128] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may 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 difficult management and weak business scalability in traditional physical hosts and VPS services.
[0129] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0130] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A circuit breaker fault diagnosis model training method, characterized in that: include: Acquire a training data set, wherein the training data set includes circuit breaker sample data and fault labels corresponding to the circuit breaker sample data; Constructing an initial model, wherein the initial model includes a plurality of generators and a discriminator; training the initial model in multiple batches based on the training data set: in the training process of any batch, adjusting the model parameters of the plurality of generators and the discriminator based on the sample data of the current batch and the fault labels corresponding to the sample data, to obtain a plurality of first generators and discriminators of the current batch; exchanging model parameters of at least some of the plurality of first generators of the current batch, and / or performing parameter variation on the model parameters of at least some of the plurality of first generators of the previous batch based on a preset variation ratio, to obtain a plurality of second generators of the current batch; training the plurality of second generators and the discriminator for the next batch; When the training end condition is met, a plurality of candidate generators that have been trained in a plurality of batches are obtained; a verification data set is obtained, and verification processing is performed on the plurality of candidate generators based on the verification data set to obtain verification indicators respectively corresponding to the plurality of candidate generators, and a target generator is determined from the plurality of candidate generators based on the verification indicators respectively corresponding to the plurality of candidate generators; A test data set is obtained, and the target generator is tested based on the test data set to obtain a test index of the target generator. When the test index meets a test condition, the target generator is determined as a circuit breaker fault diagnosis model.
2. The method according to claim 1, characterized in that: The exchanging model parameters of at least some of the first generators in the current batch of the multiple first generators includes: determining at least a partial first generator of the plurality of first generators of the current batch; Determining a generator pair among the at least partial first generators, the generator pair comprising two of the first generators that exchange model parameters; Correspondingly exchange the local layer model parameters in the two first generators in the generator pair.
3. The method according to claim 2, characterized in that The determining at least a partial first generator among the plurality of first generators of the current batch comprises: Sorting the plurality of first generators based on the processing accuracy of the plurality of first generators of the current batch; Dividing the plurality of first generators into a first generator group and a second generator group based on the sorting of the plurality of first generators; wherein the processing accuracy of at least one of the first generators in the first generator group is higher than the processing accuracy of at least one of the first generators in the second generator group; At least one of said first generators in said second group of generators is determined as said at least local first generator performing said model parameter exchange.
4. The method according to claim 2, characterized in that: Different generator pairs have different numbers of corresponding local layers; The number of layers of the local layer is determined in the following manner: for any generator pair, the number of layers of the local layer corresponding to the generator pair is determined based on the number of the first generators and a first preset parameter; wherein the first preset parameter is a random number, or the first preset parameter is determined based on the processing accuracy of the two first generators in the generator pair; Alternatively, the number of layers of the local layer is determined based on the ordering of the first generator in the generator pair.
5. The method according to any one of claims 1 to 4, characterized in that: The step of performing parameter variation on the model parameters of at least some of the first generators in the current batch based on a preset variation ratio includes: determining at least a partial first generator of the plurality of first generators of the current batch; Determine a preset variation ratio corresponding to each of the first generators, and perform variation processing on the model parameters of the first generator based on the preset variation ratio.
6. The method according to claim 5, characterized in that The preset variation ratio of the first generator is negatively correlated with the batch; or, The preset variation ratio of the first generator is negatively correlated with the processing accuracy of the first generator.
7. A circuit breaker fault diagnosis method, characterized in that: include: Acquiring operating data related to a fault of a circuit breaker to be diagnosed; The operating data is input into a circuit breaker fault diagnosis model for fault diagnosis to obtain a fault diagnosis result of the circuit breaker to be diagnosed, wherein the circuit breaker fault diagnosis model is trained based on the circuit breaker fault diagnosis model training method according to any one of claims 1 to 6.
8. A circuit breaker fault diagnosis model training device, characterized in that: include: A training data set acquisition module, used to acquire a training data set, wherein the training data set includes circuit breaker sample data and fault labels corresponding to the circuit breaker sample data; A training module is used to construct an initial model, wherein the initial model includes a plurality of generators and a discriminator; the initial model is trained in multiple batches based on the training data set: in the training process of any batch, model parameters of the plurality of generators and the discriminator are adjusted based on sample data of the current batch and fault labels corresponding to the sample data, so as to obtain a plurality of first generators and discriminators of the current batch; model parameters of at least some of the plurality of first generators of the current batch are exchanged, and / or model parameters of at least some of the plurality of first generators of the previous batch are mutated based on a preset mutation ratio, so as to obtain a plurality of second generators of the current batch; and the plurality of second generators and the discriminator are trained for the next batch; A target generator determination module is used to obtain multiple candidate generators that have been trained in multiple batches when the training end condition is met; obtain a verification data set, perform verification processing on the multiple candidate generators based on the verification data set, obtain verification indicators corresponding to the multiple candidate generators, and determine a target generator from the multiple candidate generators based on the verification indicators corresponding to the multiple candidate generators; The target generator test module is used to obtain a test data set, test the target generator based on the test data set, obtain the test index of the target generator, and determine the target generator as a circuit breaker fault diagnosis model when the test index meets the test conditions.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; 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 so that the at least one processor can execute the fault diagnosis model training method for a circuit breaker described in any one of claims 1 to 6, and / or the fault diagnosis method for a circuit breaker described in claim 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the fault diagnosis model training method for a circuit breaker described in any one of claims 1 to 6, and / or the fault diagnosis method for a circuit breaker described in claim 7 when executed.
Citation Information
Patent Citations
Steam turbine health state prediction method based on E-LSTM
CN110689171A
Ranking learning method and system based on evolution condition generative adversarial network and application
CN116245146A
Method and system for generating fault data of industrial robot, terminal, and storage medium
WO2023097774A1
