Photovoltaic cleaning equipment fault detection method, device and electronic equipment
Through the feature extraction of photovoltaic equipment data and the application of pre-trained models, the problem of low efficiency of photovoltaic equipment fault detection is solved, more efficient and accurate fault detection is achieved, and the generalization ability and stability of the model are enhanced.
Patent Information
- Application Number
- CN202410756466.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-13
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2044-06-13
AI Technical Summary
Existing photovoltaic equipment fault detection technology is inefficient and difficult to achieve early fault detection and accurate diagnosis. It also faces the problems of sparse data, weak model generalization ability and insufficient training stability.
By obtaining the equipment data of photovoltaic equipment, format conversion and feature extraction are performed, and a pre-trained fault detection model is used for fault detection. During the model training process, data annotation, preprocessing, expansion and feature extraction are used, combined with a neural network based on spectral collaborative optimization. model to enhance the generalization ability and training stability of the model.
It improves the efficiency and accuracy of fault detection, increases data samples, enhances the generalization ability and training stability of the fault detection model, and achieves more efficient fault detection and diagnosis.
Smart Images

Figure CN118332388B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a fault detection method, device and electronic equipment for photovoltaic cleaning equipment. Background Art
[0002] As an important component of renewable energy, photovoltaic equipment plays a key role in the transformation of the global energy structure. However, these devices often face multiple failure risks during operation, such as electrical failure, mechanical failure, and sensor failure, which may be caused by environmental factors, equipment aging, or operational errors. Timely detection and handling of faults are crucial to maintaining efficient operation of photovoltaic systems and reducing operation and maintenance costs.
[0003] Traditional fault detection methods often rely on manual inspection and simple sensor data monitoring, which are not only inefficient but also difficult to achieve early detection and accurate diagnosis of faults. With the development of artificial intelligence technology, especially the advancement of machine learning and deep learning technology, new ways of fault detection with higher efficiency and accuracy are provided. However, existing intelligent fault detection technologies still face problems such as sparse data, weak model generalization ability and insufficient training stability. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a fault detection method, device and electronic device for photovoltaic cleaning equipment to improve the efficiency and accuracy of fault detection, increase data samples, and enhance the generalization ability and training stability of the fault detection model.
[0005] In the first aspect, an embodiment of the present invention provides a fault detection method for photovoltaic cleaning equipment, which obtains equipment data of a device to be detected; converts the format of the equipment data to obtain identifiable equipment data; inputs the identifiable equipment data into a pre-trained fault detection model, and the fault detection model extracts features from the identifiable equipment data to obtain corresponding feature representations; performs fault detection based on the feature representation, and outputs fault detection results corresponding to the equipment data; the fault detection model is trained based on a target training data set, and the target training data set is obtained after labeling, data preprocessing, data expansion, feature extraction, and data classification of multiple collected equipment data.
[0006] In a preferred embodiment of the present invention, the above-mentioned pre-trained fault detection model is trained through the following steps: annotating the collected data of multiple devices to obtain a first training data set; performing data preprocessing on the first training data set to obtain a second training data set; performing data expansion on the second training data set to obtain a third training data set; performing feature extraction on the third training data set to obtain a target training data set; training the fault detection model based on the target training data set to obtain a pre-trained fault detection model.
[0007] In a preferred embodiment of the present invention, the above-mentioned labeling of the collected multiple device data to obtain the first training data set includes: labeling the device data based on a pre-set labeling type to obtain the first training data set; the labeling types include: normal operation, electrical failure, mechanical failure, sensor failure, software failure and other failures.
[0008] In a preferred embodiment of the present invention, the above-mentioned data preprocessing of the first training data set to obtain the second training data set includes: performing data verification on each device data in the first training data set to obtain a Boolean value of the validity of each device data; if the Boolean value representation is invalid, removing the device data corresponding to the Boolean value to obtain a second initial training data set; and standardizing the device data of the numerical type in the second initial training data set to obtain the second training data set.
[0009] In a preferred embodiment of the present invention, the above-mentioned data expansion of the second training data set to obtain the third training data set includes: generating new device data through a pre-built generator based on multiple device data in the second training data set; merging the new device data and the second training data set to obtain the third training data set.
[0010] In a preferred embodiment of the present invention, the above-mentioned feature extraction of the third training data set to obtain the target training data set includes: inputting the device data in the third training data set into a pre-trained feature extraction model to obtain the target training data set; wherein the feature extraction model is a neural network model based on spectral collaborative optimization; the feature extraction model is trained in the following manner: by initializing the spectral fingerprint of the feature extraction model, performing forward propagation to obtain the actual output; obtaining an error value based on the actual output and a pre-set expected output; determining the spectral response change based on the error value and analyzing the spectral response change to obtain an analysis result; adjusting the weights and biases of the neurons of the feature extraction model based on the analysis result; adjusting the learning rate based on the complexity of the spectral response change; feeding back the adjusted parameters and performing forward propagation again until the pre-set number of iterations is met to obtain the pre-trained feature extraction model.
[0011] In a preferred embodiment of the present invention, the above-mentioned training of the fault detection model based on the training data set to obtain a pre-trained fault detection model includes: dividing the training of the fault detection model into multiple training subtasks, and performing multiple training subtasks based on the training data set; monitoring the multiple training subtasks, and adjusting the synchronization frequency of the multiple training subtasks until the multiple training subtasks are completed; evaluating the fault detection model to obtain an evaluation result; and adjusting the hyperparameters of the fault detection model based on the evaluation result to obtain the pre-trained fault detection model.
[0012] In a second aspect, an embodiment of the present invention further provides a fault detection device for photovoltaic cleaning equipment, the device comprising: an equipment data acquisition module, used to acquire equipment data of an equipment to be detected; a format conversion module, used to convert the format of the equipment data to obtain identifiable equipment data; a fault detection module, used to input the identifiable equipment data into a pre-trained fault detection model, the fault detection model extracts features from the identifiable equipment data to obtain corresponding feature representations; fault detection is performed based on the feature representation, and a fault detection result corresponding to the equipment data is output; the fault detection model is trained based on a target training data set, and the target training data set is obtained after labeling, data preprocessing, data expansion, feature extraction, and data classification of multiple collected equipment data.
[0013] In a third aspect, an embodiment of the present invention further provides an electronic device, including a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the fault detection method for photovoltaic cleaning equipment of the first aspect mentioned above.
[0014] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the fault detection method for photovoltaic cleaning equipment of the first aspect mentioned above.
[0015] The embodiments of the present invention bring the following beneficial effects:
[0016] The embodiment of the present invention provides a fault detection method, device and electronic device for photovoltaic cleaning equipment, which obtains the equipment data of the equipment to be detected; converts the format of the equipment data to obtain identifiable equipment data; inputs the identifiable equipment data into a pre-trained fault detection model, and the fault detection model extracts features from the identifiable equipment data to obtain corresponding feature representations; performs fault detection based on the feature representations, and outputs fault detection results corresponding to the equipment data; the fault detection model is trained based on a target training data set, and the target training data set is obtained after labeling, data preprocessing, data expansion, feature extraction and data classification of multiple collected equipment data. In this method, the efficiency and accuracy of fault detection are improved, the data samples are increased, and the generalization ability and training stability of the fault detection model are enhanced.
[0017] Other features and advantages of the present disclosure will be set forth in the following description, or some features and advantages may be inferred or unambiguously determined from the description, or may be learned by implementing the above-mentioned technology of the present disclosure.
[0018] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0020] Figure 1 A flow chart of a fault detection method for photovoltaic cleaning equipment provided by an embodiment of the present invention;
[0021] Figure 2 A flow chart of another fault detection method for photovoltaic cleaning equipment provided by an embodiment of the present invention;
[0022] Figure 3 A schematic diagram of the structure of a fault detection device for photovoltaic cleaning equipment provided by an embodiment of the present invention;
[0023] Figure 4 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0025] As an important component of renewable energy, photovoltaic equipment plays a key role in the transformation of the global energy structure. However, these devices often face multiple failure risks during operation, such as electrical failure, mechanical failure, and sensor failure, which may be caused by environmental factors, equipment aging, or operational errors. Timely detection and handling of faults are crucial to maintaining efficient operation of photovoltaic systems and reducing operation and maintenance costs.
[0026] Traditional fault detection methods often rely on manual inspection and simple sensor data monitoring, which are not only inefficient but also difficult to achieve early detection and accurate diagnosis of faults. With the development of artificial intelligence technology, especially the advancement of machine learning and deep learning technology, new ways of fault detection with higher efficiency and accuracy are provided. However, existing intelligent fault detection technologies still face problems such as sparse data, weak model generalization ability and insufficient training stability.
[0027] Based on this, the embodiments of the present invention provide a fault detection method, device and electronic device for photovoltaic cleaning equipment, which obtains the equipment data of the equipment to be detected; converts the format of the equipment data to obtain identifiable equipment data; inputs the identifiable equipment data into a pre-trained fault detection model, and the fault detection model extracts features from the identifiable equipment data to obtain corresponding feature representations; performs fault detection based on the feature representations, and outputs the fault detection results corresponding to the equipment data; the fault detection model is trained based on a target training data set, and the target training data set is obtained after labeling, data preprocessing, data expansion, feature extraction and data classification of multiple collected equipment data. In this method, the efficiency and accuracy of fault detection are improved, the data samples are increased, and the generalization ability and training stability of the fault detection model are enhanced.
[0028] To facilitate understanding of this embodiment, a fault detection method for photovoltaic cleaning equipment disclosed in an embodiment of the present invention is first introduced in detail.
[0029] Example 1
[0030] The embodiment of the present invention provides a fault detection method for photovoltaic cleaning equipment. Figure 1 A flowchart of a fault detection method for photovoltaic cleaning equipment provided by an embodiment of the present invention. Figure 1As shown, the fault detection method of the photovoltaic cleaning equipment may include the following steps:
[0031] Step S101, obtaining device data of a device to be detected.
[0032] Among them, the equipment data may include: equipment temperature data, equipment vibration frequency data, equipment current data, light intensity data, equipment speed data, cleaning dosage data, operation time data, environmental humidity data, error log code data and maintenance record data.
[0033] It should be noted that the types of device data described above are only exemplary, and the number of specific types is not limited.
[0034] Among them, the equipment temperature data is the temperature data recorded during the operation of the equipment, in degrees Celsius; the equipment vibration frequency data is the vibration frequency of the equipment during operation recorded by the vibration sensor, in hertz; the equipment current data is the current value when the equipment is running, in ampere; the light intensity data is the ambient light intensity, in lux, reflecting the relationship between the cleaning effect and the lighting conditions; the equipment speed data is the speed of equipment operation, in meters per second; the cleaning dosage data is the cleaning dosage used during the cleaning process, in milliliters; the operation time data is the duration of each cleaning operation, in minutes; the environmental humidity data is the relative humidity of the environment, expressed in percentage; the error log code data is the error code when the equipment fails, which is used to diagnose the fault type; the maintenance record data is the historical maintenance record of the equipment, which is used to analyze the relationship between equipment failure and maintenance frequency.
[0035] Step S102, converting the format of the device data to obtain recognizable device data.
[0036] The acquired device data may be stored in a structured data format, such as a CSV (Comma-Separated Values) format, which is consistent with the data format used during model training.
[0037] Step S103, input the identifiable device data into a pre-trained fault detection model, the fault detection model extracts features from the identifiable device data to obtain corresponding feature representations; performs fault detection based on the feature representation, and outputs fault detection results corresponding to the device data.
[0038] Among them, the fault detection model is trained based on a target training data set, and the target training data set is obtained after labeling, data preprocessing, data expansion, feature extraction and data classification of multiple collected device data.
[0039] The photovoltaic cleaning equipment fault detection method provided by the embodiment of the present invention obtains the equipment data of the equipment to be detected; converts the format of the equipment data to obtain identifiable equipment data; inputs the identifiable equipment data into a pre-trained fault detection model, and the fault detection model extracts features from the identifiable equipment data to obtain corresponding feature representations; performs fault detection based on the feature representations, and outputs the fault detection results corresponding to the equipment data; the fault detection model is trained based on a target training data set, and the target training data set is obtained after labeling, data preprocessing, data expansion, feature extraction, and data classification of multiple collected equipment data. In this method, the efficiency and accuracy of fault detection are improved, the data samples are increased, and the generalization ability and training stability of the fault detection model are enhanced.
[0040] Example 2
[0041] The embodiment of the present invention also provides another fault detection method for photovoltaic cleaning equipment; this method is implemented on the basis of the method in the above embodiment; this method focuses on describing the specific implementation method of training a pre-trained fault detection model.
[0042] Figure 2 A flowchart of another fault detection method for photovoltaic cleaning equipment provided by an embodiment of the present invention is shown in FIG. Figure 2 As shown, the pre-trained fault detection model is trained through the following steps:
[0043] Step S201: annotate the collected data of multiple devices to obtain a first training data set.
[0044] Specifically, labeling the collected multiple device data to obtain the first training data set may include: labeling the device data based on a preset labeling type to obtain the first training data set.
[0045] Among them, the annotation types include: normal operation, electrical failure, mechanical failure, sensor failure, software failure and other failures.
[0046] Step S202: performing data preprocessing on the first training data set to obtain a second training data set.
[0047] Specifically, performing data preprocessing on the first training data set to obtain the second training data set may include: performing data verification on each device data in the first training data set to obtain a Boolean value of the validity of each device data; if the Boolean value representation is invalid, removing the device data corresponding to the Boolean value to obtain a second initial training data set; and performing standardization on the device data of the numerical type in the second initial training data set to obtain a second training data set.
[0048] Among them, each device data can be used as a data point, such as , which can be set is a data point in the first training data set, through the validation function Performs data validation on a data point and returns a Boolean value indicating the validity of the data point. ,but If it is an invalid value, indicating that the Boolean value is invalid, it is removed from the first training data set. The second initial training data set is obtained, which can be specifically expressed as the following formula (1):
[0049] (1)
[0050] Furthermore, in order to reduce the deviation in model training, it is necessary to convert data of different scales into a unified standard format. Specifically, the numerical device data can be standardized by using the Z-score standardization method using the following formula (2):
[0051] (2)
[0052] in, represents the standardized data, represents the original data points, represents the average value of all data. Represents standard deviation.
[0053] Step S203: perform data expansion on the second training data set to obtain a third training data set.
[0054] Specifically, expanding the second training data set to obtain the third training data set may include: generating new device data through a pre-built generator based on multiple device data in the second training data set; and merging the new device data with the second training data set to obtain the third training data set.
[0055] Among them, the generalization ability and robustness of the fault detection model can be enhanced in scenarios not limited to sparse or unbalanced data by adopting a generative adversarial network algorithm based on a dual-threshold memory mechanism and generating additional training samples.
[0056] Specifically, the construction process of the generative adversarial network based on the dual threshold memory mechanism can include the following steps:
[0057] Step A1, initializing the dual threshold memory mechanism.
[0058] Among them, the definition Indicates high threshold; Indicates low threshold; represents the memory factor; Representation Discriminator The accuracy rate; Represents the preset discriminator accuracy threshold; Representation Generator The loss function of Representation Discriminator The loss function of represents the number of samples; Indicates Input to the generator Random noise; Indicates A real sample; and Represent the parameters of the generator and the discriminator respectively; Represents the gradient clipping threshold; represents the learning rate; Indicates the total number of iterations; Indicated in The loss value of the iteration; Indicates the maximum theoretical value of loss; Represents the diversity index between generated samples and real samples; Representation sample and The similarity between represents the trade-off factor; represents the quality assessment of the generated samples; represents an evaluation function; Indicates The labels of real samples; Representation Discriminator For The predicted labels of samples; Represents the indicator function.
[0059] Preferably, It can be set to 0.8. It can be set to 0.3 to control the information flow between the generator and the discriminator, and optimize the stability and diversity of generated samples during the training of the fault detection model.
[0060] Furthermore, the memory factor is defined as , whose value depends on the discriminator The performance of the dynamic adjustment can be expressed by the following formula (3):
[0061] (3)
[0062] in, Representation Discriminator The accuracy of Indicates a preset accuracy threshold. Preferably, the accuracy threshold can be set to 0.75.
[0063] Among them, the accuracy It can be calculated by the following formula (4):
[0064] (4)
[0065] in, Indicates The labels of the real samples, Representation Discriminator For The predicted labels of samples, Represents the indicator function, which takes the value of 1 when the predicted label matches the true label, otherwise it takes the value of 0.
[0066] Step A2, build the core architecture of the generative adversarial network.
[0067] The core architecture includes a generator and a discriminator. The generator is responsible for generating samples that are close to the real data distribution, and the discriminator is responsible for distinguishing between the samples generated by the generator and the real samples. The loss function And the traditional discriminator The loss function , respectively defined by the following formulas (5-1) and (5-2):
[0068] (5-1)
[0069] (5-2)
[0070] in, represents the number of samples, Represents random noise, used for generator Create a new sample, represents the real sample.
[0071] It should be noted that in the training of generative adversarial networks, the loss functions of the generator and the discriminator are fixed. By adopting a dynamic balanced loss function adjustment mechanism, the loss functions of the generator and the discriminator can be dynamically adjusted according to their performance during the training process to maintain a balance between the two, thereby improving the overall stability and effect of the model.
[0072] Specifically, define the dynamic adjustment factor It is the following formula (6):
[0073] (6)
[0074] in, represents the trade-off factor, and denote the variance of the generator and discriminator losses, respectively.
[0075] Therefore, the generator loss function It is defined as the following formula (7):
[0076] (7)
[0077] in, Generator function representing the optimization of input data for fusion-aware conditioning. Represents the entropy weight of the generated sample.
[0078] It should be noted that during the training process, the generator not only considers minimizing the difference with the real samples, but also considers increasing the diversity and complexity of the generated samples. Therefore, this optimization method based on dynamic entropy weights can enable the generator to more effectively generate high-quality and diverse samples. The entropy weights of the generated samples are The calculation method can be expressed as the following formula (8):
[0079] (8)
[0080] in, Is a generator The generated The probability distribution corresponding to the samples.
[0081] Specifically, for each generated sample, the method of calculating its relative frequency in the entire sample space can be expressed as the following formula (9):
[0082] (9)
[0083] in, Indicates the generated sample The frequency of occurrence in the sample space.
[0084] Specifically, the discriminator loss function It can be defined as the following formula (10):
[0085] (10)
[0086] in, Represents the adjustment strength parameter, which is used to control the magnitude of loss adjustment.
[0087] Furthermore, the loss variance is calculated, the generator loss variance The calculation method can be expressed as the following formula (11):
[0088] (11)
[0089] in, Indicates The loss of the generator for the iteration, represents the average loss of the generator and the discriminator.
[0090] It should be noted that traditional generative adversarial network training methods often ignore the perceptual characteristics of the input data. In the calculation process, the generator function is improved. By analyzing and adjusting the perceptual characteristics of the input data, the generator's ability to process the input data is improved, thereby improving the quality of the generated samples and their consistency with the real data.
[0091] Specifically, the perceptual adjustment function of the input data is defined as The formula (12) is:
[0092] (12)
[0093] in, Representation data The perception score of Represents the adjustment factor, which is used to control the influence of perception on input data.
[0094] Furthermore, in calculating the perception score When the input data is calculated The sensitivity of changes in different feature dimensions is obtained, which can be specifically expressed as the following formula (13):
[0095] (13)
[0096] in, represents the total number of features, Indicates Features, Represents the weight associated with the feature, which is used to measure the importance of different features.
[0097] Specifically, the discriminator loss variance The calculation method can be expressed as the following formula (14):
[0098] (14)
[0099] in, Indicates The discriminator loss of the iteration, Represents the average loss of the generator and the discriminator. The training process is that the generator and the discriminator continuously evolve in a dynamic "chasing game" to improve the quality of the generated samples.
[0100] Step A3, enhance the robustness of the model when facing real-world data in an environment not limited to noisy data or outliers through a robust optimization strategy.
[0101] Specifically, by introducing gradient clipping and adaptive learning rate adjustment optimization algorithms, stability during training is ensured. and the discriminator The gradient is clipped to prevent gradient explosion. Preferably, the gradient clipping threshold Can be set to 1.0.
[0102] Among them, the gradient of the generator and the gradient of the discriminator The trimming methods are expressed as the following equations (15-1) and (15-2):
[0103] (15-1)
[0104] (15-2)
[0105] in, and Represent the clipped gradients of the generator and discriminator respectively, and Respectively represent the gradients of the generator and discriminator before clipping.
[0106] Furthermore, for the gradients before clipping of the generator and discriminator and , which can be calculated as the following formulas (16-1) and (16-2):
[0107] (16-1)
[0108] (16-2)
[0109] in, and denote the parameters of the generator and the discriminator respectively, Indicates A real sample, Indicates Input to the generator of random noise.
[0110] Furthermore, adaptive learning rate adjustment is performed to set the initial learning rate .
[0111] In one embodiment, the initial learning rate It can be 0.01 and dynamically adjusted according to the model performance. The adaptive adjustment of learning rate can be expressed as the following formula (17):
[0112] (17)
[0113] in, Indicates the current iteration number, Indicates the total number of iterations.
[0114] In another embodiment, the initial learning rate It can be 0.0001 and dynamically adjusted according to the model performance. The adaptive adjustment of learning rate can be expressed as the following formula (18):
[0115] (18)
[0116] in, Indicated in The loss value of the iteration, Represents the maximum theoretical value of the loss, which is used to normalize the adjustment of the learning rate.
[0117] Step A4: perform data diversity enhancement.
[0118] Among them, in scenarios not limited to category imbalance or a small number of samples, the new samples (i.e., new device data) generated by the generator can be merged with the second data set to increase data diversity and improve the generalization ability of the model.
[0119] Specifically, the calculation generates samples With real samples Diversity index between The method can be expressed as the following formula (19):
[0120] (19)
[0121] in, Representation sample and The similarity between them is calculated by calculating the cosine similarity between samples, which can be expressed as the following formula (20):
[0122] (20)
[0123] Step A5: perform model evaluation and adjustment.
[0124] After each training cycle, a series of evaluation indicators, such as the quality and diversity of generated samples, are used to evaluate the model performance.
[0125] Specifically, define the model performance evaluation indicators .
[0126] In one embodiment, the model performance evaluation index is the quality and diversity of the generated samples, which can be expressed as the following formula (21):
[0127] (twenty one)
[0128] in, represents the quality assessment of the generated samples; represents a trade-off factor, which can be set to 0.5 in one embodiment.
[0129] Furthermore, the quality assessment of the generated samples It can be expressed as the following formula (22):
[0130] (twenty two)
[0131] in, represents an evaluation function for measuring the quality of generated samples. In one embodiment, the quality of generated samples is evaluated by the similarity with real samples.
[0132] Furthermore, model parameters are adjusted according to the evaluation results, such as the network structure and learning rate of the generator and discriminator. The adjustment method may be manual or pre-set program, which is not limited here.
[0133] In one embodiment, if the model performance evaluation index If it is smaller than the preset threshold, you can adjust the initial learning rate or the number of model layers.
[0134] Step S204: extract features from the third training data set to obtain a target training data set.
[0135] Specifically, performing feature extraction on the third training data set to obtain the target training data set may include: inputting device data in the third training data set into a pre-trained feature extraction model to obtain the target training data set.
[0136] It should be noted that in the related art, neural networks are used for feature extraction. In some neural network structures, problems such as gradient disappearance, gradient explosion, or falling into local optimal solutions may be encountered, affecting the stability of training and the performance of the model. Therefore, the embodiment of the present application adopts a neural network parameter optimization algorithm based on spectral collaborative optimization. Inspired by the spectral phenomenon in nature, the spectral collaborative optimization algorithm simulates the characteristics of material absorption and emission spectra in spectral analysis, and applies it to the optimization process of the weights and biases of the neural network. First, a unique "spectral fingerprint" is assigned to each neuron. This fingerprint is a multidimensional data that represents the response intensity of the neuron at different frequencies. During the training process, according to the changes in the input data, the response of the neuron will produce corresponding changes, and these changes will be recorded as "spectral response changes". By analyzing the changes in spectral response, the spectral collaborative optimization algorithm adjusts the weights and biases to make the neural network respond more accurately to specific frequencies.
[0137] The feature extraction model is a neural network model based on spectral collaborative optimization; the training method of the feature extraction model includes the following steps:
[0138] Step B1, by initializing the spectral fingerprint of the feature extraction model, forward propagation is performed to obtain the actual output.
[0139] Specifically, define Representing neurons Spectral fingerprint of represents the dimension of the spectral fingerprint; Indicated in Random vectors generated in dimensional space; Representing neurons Output: represents the activation function; Representing neurons and The weight between Representing neurons Bias of The first elements; Indicates the expected output; Indicates error; Representing neurons The spectral response changes; represents the trade-off parameter; Represents the gradient calculation of the current error and spectral fingerprint; , Represent the adjustment amount of weight and bias respectively; , represents the moderating factor in the learning process; , represents the function describing how the spectral fingerprint affects the weight and bias adjustments; represents the learning rate; represents the initial learning rate; represents the attenuation parameter; The norm representing the spectral variation; represents a function that changes with the number of iterations; Indicates the current iteration number; Represents the attenuation coefficient.
[0140] Furthermore, an initial spectral fingerprint is assigned to each neuron. is given a unique spectral fingerprint , spectral fingerprint is a dimensional vector, where is the spectral dimension. The initial spectral fingerprint can be expressed as the following formula (23):
[0141] (twenty three)
[0142] in, Indicated in Random vectors generated in dimensional space.
[0143] Further, conventional forward propagation is performed to calculate the network output. During the forward propagation process, the output of each neuron The calculation method can be expressed as the following formula (24):
[0144] (twenty four)
[0145] in, represents the activation function, Representing neurons and The weight between Representing neurons The bias of The first elements.
[0146] Step B2, obtaining an error value based on the actual output and the preset expected output.
[0147] Specifically, assuming is the expected output, the error Calculated by the mean square error function, it can be expressed as the following formula (25):
[0148] (25)
[0149] in, Indicates The true labels of samples, Indicates The output of the neuron corresponding to the sample.
[0150] Step B3, determining the spectral response change based on the error value and analyzing the spectral response change to obtain an analysis result.
[0151] Specifically, the calculation method of the spectral response change of each neuron can be expressed as the following formula (26):
[0152] (26)
[0153] in, represents the mapping function, which converts the error and the current spectral fingerprint Mapped to a new spectral change vector.
[0154] Furthermore, the calculation of the mapping function involves the error and the current spectral fingerprint , which can be expressed as the following formula (27):
[0155] (27)
[0156] in, Represents a trade-off parameter between 0 and 1. It indicates that the gradient calculation of the current error and spectral fingerprint is based on a certain mathematical rule, which can be specifically expressed as the following formula (28):
[0157] (28)
[0158] in, Represents spectral fingerprint In the The weight of the dimension.
[0159] Specifically, for each neuron , analyze the spectral changes to determine the adjustment direction of weights and biases, which can be expressed as the following formula (29):
[0160] (29)
[0161] in, represents the adjustment function, which determines the adjustment of weights and biases according to the spectral changes, inputs and outputs; Representing neurons The spectral response changes, The first elements, Representing neurons Output.
[0162] In one embodiment, the weight and bias adjustments The calculation methods can be expressed as the following equations (30) and (31):
[0163] (30)
[0164] (31)
[0165] in, and They represent the adjustment factors in the learning process, and Represents two functions.
[0166] Step B4, adjusting the weights and biases of the neurons of the feature extraction model based on the analysis results.
[0167] Specifically, the update rules for weights and biases can be expressed as the following equations (32) and (33):
[0168] (32)
[0169] (33)
[0170] in, represents the learning rate, Indicates the current iteration number.
[0171] Step B5, adjusting the learning rate based on the complexity of the spectral response change.
[0172] Specifically, the learning rate is updated according to the complexity of the spectral change, which can be expressed as the following formula (34):
[0173] (34)
[0174] in, represents the initial learning rate, represents an attenuation parameter, The norm of the spectral variation. Represents a number of iterations The changing function can be expressed as the following formula (35):
[0175] (35)
[0176] in, Represents a decay coefficient, which is used to control the rate at which the learning rate decreases as the number of iterations increases; Represents a parameter that controls how much the learning rate is adjusted. Indicates the spectrum rescaling factor.
[0177] Furthermore, the spectrum rescaling factor Representing neurons In iteration In one embodiment, the performance indicator is accuracy, and its calculation formula can be the following formula (36):
[0178] (36)
[0179] in, Representing neurons The amount of change in performance between the current iteration and the previous iteration, represents the accuracy of the previous iteration, Represents an adjustment factor.
[0180] Further, the spectral fingerprint adjustment is performed based on the spectrum rescaling factor , the spectral fingerprint of neurons The adjustment formula in the next iteration can be as follows (37):
[0181] (37)
[0182] in, represents the adjustment coefficient of the learning rate, represents the Hadamard product, Represents a function used to determine the adjustment direction based on the current spectral fingerprint and error. represents the spectral fingerprint of the next iteration, is the spectral fingerprint of this iteration.
[0183] Step B6, the adjusted parameters are fed back and forward propagated again until the preset number of iterations is met to obtain a pre-trained feature extraction model.
[0184] Step S205 , training a fault detection model based on a target training data set to obtain a pre-trained fault detection model.
[0185] Specifically, training a fault detection model based on a training data set to obtain a pre-trained fault detection model may include: dividing the training of the fault detection model into multiple training subtasks, and performing the multiple training subtasks based on the training data set; monitoring the multiple training subtasks, and adjusting the synchronization frequency of the multiple training subtasks until the multiple training subtasks are completed; evaluating the fault detection model to obtain an evaluation result; and adjusting the hyperparameters of the fault detection model based on the evaluation result to obtain the pre-trained fault detection model.
[0186] It should be noted that the embodiment of the present application proposes an improved extreme learning machine classifier, which is an efficient single-layer feedforward neural network, characterized in that the weights and biases of the hidden layer nodes are randomly generated at the beginning, and then no longer adjusted, and only the weights of the output layer are trained. And by introducing a dynamic adaptive synchronization mechanism, more efficient parallel processing and more accurate learning effects are achieved. This mechanism dynamically monitors the progress of each training subtask and adaptively adjusts their synchronization frequency, thereby ensuring the consistency and accuracy of learning while increasing the training speed. At the same time, an integral release neuron model is introduced, which draws on the working principle of the biological nervous system, so that the network can better capture time dynamics when processing time series data. By means of integral release, neurons are activated only after reaching a certain threshold, which enables the network to adjust its response more finely and improve classification accuracy.
[0187] Specifically, define represents the output function of the extreme learning machine; represents input data or feature vector; represents the number of hidden layer neurons; Indicates The weights of the hidden layer neurons to the output layer; Represents the hidden layer The output function of each neuron; represents the hidden layer output matrix; represents the target output matrix; represents the regularization parameter; Indicates the synchronization frequency; Indicates the basic synchronization frequency; Indicates the adjustment factor, which is used to adjust the synchronization frequency; represents the variance of the training error; Indicates The error of training samples; represents the average error; Indicates The integrate-and-release model of neurons; Indicates The threshold of each neuron; Indicates time point The input signal Indicates The time constant of each neuron; Indicates the model accuracy; Represents the elements of the hidden layer output matrix, representing the The training samples are passed through The output of the hidden layer neurons; and Respectively represent The weights and biases of the hidden layer neurons; Indicates training samples.
[0188] Furthermore, the ELM output function It is defined as the following formula (38):
[0189] (38)
[0190] in, represents the number of hidden layer neurons, represents the output layer weight, Represents the hidden layer The output of a neuron.
[0191] Furthermore, the output layer weights are calculated by minimizing the error, which can be expressed as the following formula (39):
[0192] (39)
[0193] in, represents the hidden layer output matrix, Represents the target output matrix.
[0194] Furthermore, ridge regression is used to solve The method can be expressed as the following formula (40):
[0195] (40)
[0196] in, represents the regularization parameter, which is used to control the complexity of the model to prevent overfitting. represents the hidden layer output matrix, represents the identity matrix, Represents the hidden layer output matrix The transpose of .
[0197] In one embodiment, the regularization parameter Can be set to 0.001.
[0198] Furthermore, the hidden layer output matrix The components of The calculation method can be expressed as the following formula (41):
[0199] (41)
[0200] in, represents the activation function of the hidden layer neurons, and Respectively represent The weights and biases of the hidden layer neurons, Indicates training samples.
[0201] Furthermore, the dynamic adaptive synchronization mechanism dynamically monitors the progress of each training subtask and adaptively adjusts their synchronization frequency, thereby improving the training speed while ensuring the consistency and accuracy of learning. The dynamic adjustment method can be expressed as the following formula (42):
[0202] (42)
[0203] in, Indicates the basic synchronization frequency, represents the adjustment factor, represents the variance of the training error.
[0204] Furthermore, the variance of the training error The calculation method can be expressed as the following formula (43):
[0205] (43)
[0206] in, Indicates The error of training samples is represents the average error.
[0207] Furthermore, during the training process, the synchronization mechanism and the parameters of the integral release neurons are continuously adjusted to adapt to the characteristics of the data and the needs of learning. It can be expressed as the following formula (44):
[0208] (44)
[0209] in, Indicates the current iteration number. Indicates a point in time, Indicates The time constant of a neuron is Indicates the input signal.
[0210] when Reaching the threshold When , the neuron fires, satisfying the following equation (45):
[0211]
[0212] By comprehensively analyzing the characteristics of the data and the performance of the model, the training strategy is automatically adjusted to achieve the best learning effect.
[0213] Furthermore, the model is evaluated and adjusted. The performance of the classifier on the training set and the validation set is evaluated, and comprehensive evaluation is performed using indicators such as accuracy, recall, and F1 score. Based on the evaluation results, the hyperparameters of the model are adjusted to optimize its performance in practical applications. In one embodiment, the synchronization frequency is dynamically adjusted based on the change in accuracy. or neuron parameters and , to improve model performance.
[0214] The photovoltaic cleaning equipment fault detection method provided by the embodiment of the present invention reduces the error in the fault detection model training by performing data preprocessing, increases the number of training samples by data expansion, thereby improving the generalization ability and robustness of the fault detection model, and improves the stability of the fault detection model training and the performance of the trained model by feature extraction. In summary, by training the fault detection model, not only the data samples are increased, but also the generalization ability and training stability of the fault detection model are enhanced, thereby improving the efficiency and accuracy of the fault detection model when performing fault detection.
[0215] Example 3
[0216] Corresponding to the above method embodiment, the embodiment of the present invention provides a fault detection device for photovoltaic cleaning equipment, Figure 3 A schematic diagram of a fault detection device for photovoltaic cleaning equipment provided by an embodiment of the present invention is shown in FIG. Figure 3 As shown, the fault detection device of the photovoltaic cleaning equipment may include:
[0217] The device data acquisition module 301 is used to acquire device data of the device to be detected.
[0218] The format conversion module 302 is used to convert the format of the device data to obtain identifiable device data.
[0219] The fault detection module 303 is used to input the identifiable device data into a pre-trained fault detection model, and the fault detection model extracts features from the identifiable device data to obtain corresponding feature representations; performs fault detection based on the feature representations, and outputs fault detection results corresponding to the device data; the fault detection model is trained based on a target training data set, and the target training data set is obtained after labeling, data preprocessing, data expansion, feature extraction, and data classification of multiple collected device data.
[0220] The fault detection device for photovoltaic cleaning equipment provided by the embodiment of the present invention obtains the equipment data of the equipment to be detected; converts the format of the equipment data to obtain identifiable equipment data; inputs the identifiable equipment data into a pre-trained fault detection model, and the fault detection model extracts features from the identifiable equipment data to obtain corresponding feature representations; performs fault detection based on the feature representations, and outputs the fault detection results corresponding to the equipment data; the fault detection model is trained based on a target training data set, and the target training data set is obtained after labeling, data preprocessing, data expansion, feature extraction, and data classification of multiple collected equipment data. In this method, the efficiency and accuracy of fault detection are improved, the data samples are increased, and the generalization ability and training stability of the fault detection model are enhanced.
[0221] In some embodiments, the fault detection module is also used to annotate the collected data of multiple devices to obtain a first training data set; perform data preprocessing on the first training data set to obtain a second training data set; perform data expansion on the second training data set to obtain a third training data set; perform feature extraction on the third training data set to obtain a target training data set; and train a fault detection model based on the target training data set to obtain a pre-trained fault detection model.
[0222] In some embodiments, the fault detection module is further used to annotate the device data based on a preset annotation type to obtain a first training data set; the annotation types include: normal operation, electrical failure, mechanical failure, sensor failure, software failure and other failures.
[0223] In some embodiments, the fault detection module is also used to perform data verification on each device data in the first training data set to obtain a Boolean value of the validity of each device data; if the Boolean value representation is invalid, the device data corresponding to the Boolean value is removed to obtain a second initial training data set; and the device data of the numerical type in the second initial training data set is standardized to obtain a second training data set.
[0224] In some embodiments, the fault detection module is further used to generate new device data through a pre-built generator based on multiple device data in the second training data set; and merge the new device data with the second training data set to obtain a third training data set.
[0225] In some embodiments, the fault detection module is also used to input the device data in the third training data set into a pre-trained feature extraction model to obtain a target training data set; wherein the feature extraction model is a neural network model based on spectral collaborative optimization; the feature extraction model is trained as follows: by initializing the spectral fingerprint of the feature extraction model, forward propagation is performed to obtain the actual output; an error value is obtained based on the actual output and a pre-set expected output; based on the error value, the spectral response change is determined and the spectral response change is analyzed to obtain an analysis result; based on the analysis result, the weights and biases of the neurons of the feature extraction model are adjusted; based on the complexity of the spectral response change, the learning rate is adjusted; the adjusted parameters are fed back and forward propagation is performed again until the pre-set number of iterations is met to obtain a pre-trained feature extraction model.
[0226] In some embodiments, the fault detection module is also used to divide the training of the fault detection model into multiple training subtasks, and perform multiple training subtasks based on the training data set; monitor the multiple training subtasks, and adjust the synchronization frequency of the multiple training subtasks until the multiple training subtasks are completed; evaluate the fault detection model to obtain an evaluation result; and adjust the hyperparameters of the fault detection model based on the evaluation result to obtain a pre-trained fault detection model.
[0227] The device provided in the embodiment of the present invention has the same implementation principle and technical effects as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.
[0228] Example 4
[0229] The embodiment of the present invention also provides an electronic device for running the fault detection method of the photovoltaic cleaning device; see Figure 4 A structural schematic diagram of an electronic device is shown, which includes a memory 400 and a processor 401, wherein the memory 400 is used to store one or more computer instructions, and the one or more computer instructions are executed by the processor 401 to implement the above-mentioned fault detection method for photovoltaic cleaning equipment.
[0230] Further, Figure 4 The electronic device shown further includes a bus 402 and a communication interface 403 , and the processor 401 , the communication interface 403 and the memory 400 are connected via the bus 402 .
[0231] The memory 400 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 403 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 402 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0232] The processor 401 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 401. The above processor 401 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present invention can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 400, and the processor 401 reads the information in the memory 400 and completes the steps of the method of the above embodiment in combination with its hardware.
[0233] An embodiment of the present invention also provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the above-mentioned photovoltaic cleaning equipment fault detection method. The specific implementation can be found in the method embodiment, which will not be repeated here.
[0234] The computer program product for the fault detection method for photovoltaic cleaning equipment provided in the embodiment of the present invention includes a computer-readable storage medium storing a non-volatile program code executable by a processor. The instructions included in the program code can be used to execute the method described in the previous method embodiment. The specific implementation can be found in the method embodiment, which will not be repeated here.
[0235] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0236] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0237] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0238] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0239] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that can be executed by a processor. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., various media that can store program codes.
[0240] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A fault detection method for photovoltaic cleaning equipment, characterized in that: The method comprises: Obtain device data of the device to be detected; Convert the device data into a format to obtain identifiable device data; The identifiable device data is input into a pre-trained fault detection model, and the fault detection model extracts features from the identifiable device data to obtain corresponding feature representations; fault detection is performed based on the feature representations, and a fault detection result corresponding to the device data is output; the fault detection model is trained based on a target training data set, and the target training data set is obtained after labeling, data preprocessing, data expansion, feature extraction, and data classification of a plurality of collected device data; The pre-trained fault detection model is trained by the following steps: Annotating the collected multiple device data to obtain a first training data set; Performing data preprocessing on the first training data set to obtain a second training data set; Performing data expansion on the second training data set to obtain a third training data set; Performing feature extraction on the third training data set to obtain a target training data set; Training a fault detection model based on the target training data set to obtain a pre-trained fault detection model; The step of performing data expansion on the second training data set to obtain a third training data set includes: Based on the plurality of device data in the second training data set, generating new device data by a pre-built generator; Merging the new device data and the second training data set to obtain the third training data set; The generator is obtained in the process of constructing a generative adversarial network based on a dual-threshold memory mechanism; The construction process of the generative adversarial network based on the dual-threshold memory mechanism includes: initializing the dual-threshold memory mechanism, building the core architecture of the generative adversarial network, enhancing the model through a robust optimization strategy, enhancing data diversity, and evaluating and adjusting the model; The initialization dual threshold memory mechanism includes: definition Indicates high threshold; Indicates low threshold; represents the memory factor; Representation Discriminator The accuracy rate; Represents the preset discriminator accuracy threshold; Representation Generator The loss function of Representation Discriminator The loss function of represents the number of samples; Indicates Input to the generator Random noise; Indicates A real sample; and Represent the parameters of the generator and the discriminator respectively; Represents the gradient clipping threshold; represents the learning rate; Indicates the total number of iterations; Indicated in The loss value of the iteration; Indicates the maximum theoretical value of loss; Represents the diversity index between generated samples and real samples; Representation sample and The similarity between represents the trade-off factor; represents the quality assessment of the generated samples; represents an evaluation function; Indicates The labels of real samples; Representation Discriminator For The predicted labels of samples; represents the indicator function; The core architecture includes a generator and a discriminator; the core architecture for building a generative adversarial network includes: Traditional generator The loss function It is defined by the following formula: ; Traditional discriminator The loss function It is defined by the following formula: ; in, represents the number of samples, Represents random noise, used for generator Create a new sample, represents the real sample; Defining Dynamic Adjustment Factors The following formula: ;in, represents the trade-off factor, and Represent the variance of the generator and discriminator losses respectively; Generator loss function It is defined as the following formula: ;in, A generator function representing the optimization of input data for fusion-aware conditioning; Represents the entropy weight of the generated sample; Entropy weights for generating samples The calculation method is expressed as the following formula: ;in, Is a generator The generated The probability distribution corresponding to the samples; For each generated sample, the relative frequency of the generated sample in the entire sample space is calculated as follows: ;in, Indicates the generated sample The frequency of occurrence in the sample space; Discriminator loss function It is defined as the following formula: ;in, Represents the adjustment strength parameter, which is used to control the magnitude of loss adjustment; Calculate the loss variance, generator loss variance The calculation method is expressed as the following formula: ;in, Indicates The loss of the generator for the iteration, represents the average loss of the generator and the discriminator; Define the perceptual adjustment function for input data The following formula: ;in, Representation data The perception score of represents the adjustment factor, which is used to control the influence of perception on input data; Calculating the perception score Input data by calculation The sensitivity of changes in different feature dimensions is obtained and expressed as the following formula: ;in, represents the total number of features, Indicates Features, Represents the weight associated with the feature, which is used to measure the importance of different features; Discriminator loss variance The calculation method is expressed as the following formula: ;in, Indicates The discriminator loss of the iteration, represents the average loss of the generator and the discriminator; The model is enhanced by a robust optimization strategy, including: Enhance the model by introducing gradient clipping and adaptive learning rate adjustment optimization algorithm; The model is enhanced by introducing gradient clipping and adaptive learning rate adjustment optimization algorithm, including: Generator gradients The clipping method is expressed as the following formula: ; Gradient of the discriminator The clipping method is expressed as the following formula: ; in, and Represent the clipped gradients of the generator and discriminator respectively, and Respectively represent the gradients of the generator and discriminator before clipping; Generator gradients before clipping The calculation method is represented by the following formula: ; Gradients before discriminator clipping The calculation method is expressed as the following formula: ; in, and denote the parameters of the generator and the discriminator respectively, Indicates A real sample, Indicates Input to the generator Random noise; Perform adaptive learning rate adjustment and set the initial learning rate ; At the initial learning rate When it is 0.01, the learning rate adaptive adjustment method is expressed as the following formula: ;in, Indicates the current iteration number, Indicates the total number of iterations; At the initial learning rate When is 0.0001, the adaptive adjustment method of the learning rate is expressed as the following formula: ;in, Indicated in The loss value of the iteration, Indicates the maximum theoretical value of the loss, which is used to normalize the adjustment of the learning rate; The data diversity enhancement includes: Calculate the generated samples With real samples Diversity index between The method is expressed as the following formula: :in, Representation sample and The similarity between them is calculated as follows: ; The model evaluation and adjustment includes: defining model performance evaluation indicators , model performance evaluation indicators It is expressed as the following formula: ;in, represents the quality assessment of the generated samples; Represents a trade-off factor.
2. The method according to claim 1, characterized in that The step of labeling the collected multiple device data to obtain a first training data set includes: Annotating the device data based on a preset annotation type to obtain the first training data set; The annotation types include: normal operation, electrical failure, mechanical failure, sensor failure, software failure and other failures.
3. The method according to claim 1, characterized in that The step of performing data preprocessing on the first training data set to obtain a second training data set includes: Performing data verification on each device data in the first training data set to obtain a Boolean value of the validity of each device data; If the Boolean value representation is invalid, removing the device data corresponding to the Boolean value to obtain a second initial training data set; The device data of the numerical type in the second initial training data set is standardized to obtain the second training data set.
4. The method according to claim 1, characterized in that: The step of extracting features from the third training data set to obtain a target training data set includes: Inputting the device data in the third training data set into a pre-trained feature extraction model to obtain the target training data set; Among them, the feature extraction model is a neural network model based on spectral collaborative optimization; the training method of the feature extraction model is: by initializing the spectral fingerprint of the feature extraction model, forward propagation is performed to obtain the actual output; an error value is obtained based on the actual output and a pre-set expected output; based on the error value, the spectral response change is determined and the spectral response change is analyzed to obtain an analysis result; based on the analysis result, the weights and biases of the neurons of the feature extraction model are adjusted; based on the complexity of the spectral response change, the learning rate is adjusted; the adjusted parameters are fed back and forward propagation is performed again until the pre-set number of iterations is met to obtain a pre-trained feature extraction model.
5. The method according to claim 1, characterized in that The training of the fault detection model based on the training data set to obtain a pre-trained fault detection model includes: Dividing the training of the fault detection model into a plurality of training subtasks, and performing the plurality of training subtasks based on the training data set; Monitoring the plurality of training subtasks, and adjusting the synchronization frequencies of the plurality of training subtasks until the plurality of training subtasks are completed; Evaluating the fault detection model to obtain an evaluation result; The hyperparameters of the fault detection model are adjusted based on the evaluation results to obtain a pre-trained fault detection model.
6. A fault detection device for photovoltaic cleaning equipment, characterized in that: Used to implement the fault detection method of photovoltaic cleaning equipment according to any one of claims 1 to 5, the device comprises: A device data acquisition module is used to acquire device data of the device to be detected; A format conversion module, used for converting the format of the device data to obtain identifiable device data; A fault detection module is used to input the identifiable device data into a pre-trained fault detection model, the fault detection model performs feature extraction on the identifiable device data to obtain a corresponding feature representation; fault detection is performed based on the feature representation, and a fault detection result corresponding to the device data is output; the fault detection model is trained based on a target training data set, and the target training data set is obtained after labeling, data preprocessing, data expansion, feature extraction and data classification of multiple collected device data.
7. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the fault detection method for photovoltaic cleaning equipment according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are called and executed by the processor, the computer-executable instructions prompt the processor to implement the fault detection method for photovoltaic cleaning equipment according to any one of claims 1 to 5.
