Photovoltaic module anomaly detection method, device, equipment and storage medium
By training and optimizing a deep Siamese network model, combined with feature extraction and classification networks, the problems of high maintenance burden and low accuracy in photovoltaic module anomaly detection have been solved, achieving efficient anomaly detection.
Patent Information
- Application Number
- CN202310446392.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-24
- Publication Date
- 2026-11-10
- Estimated Expiration
- 2043-04-24
AI Technical Summary
Existing methods for detecting anomalies in photovoltaic modules suffer from high maintenance burden and low accuracy. Methods based on physical models have a heavy maintenance burden, while data-driven methods are prone to false alarms or missed alarms.
A deep twin network model was trained and optimized, and combined with feature extraction and classification networks to establish a combined neural network model for anomaly detection of photovoltaic modules.
It effectively reduces false alarms or missed alarms in anomaly detection and improves the accuracy of anomaly detection for photovoltaic modules.
Smart Images

Figure CN116662799B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of photovoltaic module testing, and specifically to a photovoltaic module anomaly detection method, a photovoltaic module anomaly detection device, an electronic device, and a readable storage medium. Background Technology
[0002] Anomaly detection is a crucial technical means for the safe and reliable operation and maintenance of photovoltaic power generation systems. Domestic and international experts have conducted a series of studies on anomaly detection methods for major equipment in photovoltaic systems. Currently, there are two main research methods: physical model-based methods and data-driven methods.
[0003] Physical model-based anomaly detection methods, based on domain-specific knowledge, establish a physical model by studying the internal operating mechanisms of the system to infer the inherent operating principles or causal relationships of the equipment. Anomalies are detected by comparing the residuals between the model's output and the actual acquired signals to evaluate system performance or operating status. However, this method suffers from significant maintenance burdens and low executability.
[0004] Data-driven anomaly detection methods utilize machine learning techniques to build a data-based model. The difference between the model's output and the actual detected signal is used to determine whether the device is operating normally. However, this method suffers from false alarms or missed alarms, resulting in low accuracy and impacting overall performance. Summary of the Invention
[0005] The purpose of this invention is to provide a method, apparatus, device, and storage medium for detecting anomalies in photovoltaic modules, in order to solve the above-mentioned technical problems.
[0006] To achieve the above objectives, embodiments of the present invention provide a method for detecting anomalies in photovoltaic modules, the method comprising:
[0007] Obtain current and historical operating data of the photovoltaic power station, and establish a training sample set based on the historical operating data;
[0008] The initial deep Siamese network model is trained using the training sample set to obtain the target deep Siamese network model;
[0009] The target deep Siamese network model is segmented to obtain a feature extraction model;
[0010] The feature extraction model is combined with a preset classification network to obtain a combined neural network model;
[0011] The combined neural network model is trained using the training sample set to obtain the target combined neural network model;
[0012] Based on the current operating data of the photovoltaic power station, the target combined neural network model is used to detect anomalies in the photovoltaic modules and obtain the detection results.
[0013] Optionally, it also includes:
[0014] Determine whether there is any abnormal data in the operating data of the photovoltaic power station;
[0015] If there is abnormal data in the operation data of the photovoltaic power station, determine the type of abnormality of the abnormal data;
[0016] Based on the anomaly type, perform data trimming operations corresponding to the anomaly type on the anomaly data.
[0017] Optionally, establishing a training sample set based on the historical operational data includes:
[0018] Based on the historical operation data, labeled operation data and unlabeled operation data were determined;
[0019] Based on the unlabeled operation data, the operation data of photovoltaic modules belonging to the same type of operation state and the operation data of photovoltaic modules not belonging to the same type of operation state are determined.
[0020] The operating data of photovoltaic modules belonging to the same type of operating state are grouped into pairs, and unlabeled positive sample pairs are established based on the operating data of photovoltaic modules belonging to the same type of operating state in each pair.
[0021] The operating data of photovoltaic modules that do not belong to the same type of operating state are grouped into pairs, and unlabeled negative sample pairs are established based on the operating data of photovoltaic modules that do not belong to the same type of operating state in each pair.
[0022] The training sample set is obtained based on the unlabeled positive sample pairs and the unlabeled negative sample pairs.
[0023] Optionally, establishing a training sample set based on the historical operational data further includes:
[0024] Based on the labeled running data, the label type for each labeled running data is determined; wherein, the label type includes a normal class for normal running data and an abnormal class for abnormal running data;
[0025] The labeled running data is grouped into pairs.
[0026] Determine whether two tagged running data belonging to the same group have the same label type;
[0027] If two labeled running data belonging to the same group have the same label type, then a labeled positive sample pair is established based on the two labeled running data in that group;
[0028] If two labeled data sets belonging to the same group have different label types, then a labeled negative sample pair is created based on the two labeled data sets in that group.
[0029] The training sample set is obtained based on the labeled positive sample pairs and the labeled negative sample pairs.
[0030] Optionally, training the initial deep Siamese network model using the training sample set to obtain the target deep Siamese network model further includes:
[0031] The initial deep Siamese network model is pre-trained using the unlabeled positive sample pairs and the unlabeled negative sample pairs to obtain the pre-trained deep Siamese network model.
[0032] The pre-trained deep Siamese network model is tuned and trained using the labeled positive sample pairs and the labeled negative sample pairs to obtain the tuned deep Siamese network model as the target deep Siamese network model.
[0033] Optionally, the step of training the initial deep Siamese network model using the training sample set to obtain the target deep Siamese network model further includes:
[0034] The initial deep Siamese network model is pre-trained using the unlabeled positive sample pairs and the unlabeled negative sample pairs to obtain the pre-trained deep Siamese network model, the predicted values of the unlabeled positive sample pairs, and the predicted values of the unlabeled negative sample pairs.
[0035] Based on the predicted values of the unlabeled positive sample pairs and the predicted values of the unlabeled negative sample pairs, the loss values of the unlabeled positive sample pairs and the loss values of the unlabeled negative sample pairs during the pre-training process are calculated.
[0036] The weights of the pre-trained deep Siamese network model are updated based on the loss values of the unlabeled positive sample pairs and the loss values of the unlabeled negative sample pairs.
[0037] Determine whether the current pre-training meets the preset pre-training convergence condition. If so, save the current pre-trained deep Siamese network model.
[0038] The pre-trained deep Siamese network model is tuned and trained using the labeled positive sample pairs and the labeled negative sample pairs to obtain the tuned deep Siamese network model, the predicted values of the labeled positive sample pairs, and the predicted values of the labeled negative sample pairs.
[0039] Based on the predicted values of the labeled positive sample pairs and the predicted values of the labeled negative sample pairs, the loss values of the labeled positive sample pairs and the loss values of the labeled negative sample pairs are calculated during the optimization training process.
[0040] Based on the loss values of labeled positive sample pairs and labeled negative sample pairs during the optimization training process, the weights of the optimized deep Siamese network model are updated.
[0041] Determine whether the current optimization training meets the preset optimization training convergence condition. If so, save the current optimized deep Siamese network model as the target deep Siamese network model.
[0042] Optionally, training the combined neural network model using the training sample set to obtain the target combined neural network model includes:
[0043] The ensemble neural network model is trained for classification using the labeled positive sample pairs and the labeled negative sample pairs to obtain the target ensemble neural network model, the classification prediction values of the labeled positive sample pairs, and the classification prediction values of the labeled negative sample pairs.
[0044] Based on the classification prediction values of the labeled positive sample pairs and the classification prediction values of the labeled negative sample pairs, the loss values of the labeled positive sample pairs and the loss values of the labeled negative sample pairs during the classification training process are calculated.
[0045] The weights of the target combined neural network model are updated based on the loss values of labeled positive sample pairs and labeled negative sample pairs during classification training.
[0046] Determine whether the current classification training meets the preset classification training convergence condition. If so, save the current target classification network model.
[0047] In a second aspect of the present invention, a photovoltaic module anomaly detection device is provided, the device comprising:
[0048] The data acquisition module is used to acquire the current and historical operating data of the photovoltaic power station.
[0049] The data processing module is used to establish a training sample set based on the historical operating data;
[0050] The model training module is used for:
[0051] The initial deep Siamese network model is trained using the training sample set to obtain the target deep Siamese network model;
[0052] The target deep Siamese network model is segmented to obtain a feature extraction model;
[0053] The feature extraction model is combined with a preset classification network to obtain a combined neural network model;
[0054] The combined neural network model is trained using the training sample set to obtain the target combined neural network model;
[0055] An anomaly detection module is used to detect anomalies in photovoltaic modules based on the current operating data of the photovoltaic power station and using the target combined neural network model to obtain detection results.
[0056] A third aspect of this application provides an electronic device configured to perform the above-described photovoltaic module anomaly detection method.
[0057] A fourth aspect of this application provides a machine-readable storage medium storing instructions that, when executed by a processor, are configured by the processor to perform the aforementioned photovoltaic module anomaly detection method.
[0058] This invention acquires current and historical operating data of a photovoltaic power station, establishes a training sample set based on the historical operating data, and trains an initial deep twin network model using this training sample set to obtain a target deep twin network model. The target deep twin network model is then segmented to obtain a feature extraction model. This feature extraction model is combined with a preset classification network to obtain a combined neural network model. The combined neural network model is then trained using the training sample set to obtain a target combined neural network model. Finally, based on current operating data, this target combined neural network model is used to detect anomalies in photovoltaic modules. In other words, this invention trains and optimizes an initial deep twin network model using a training sample set to obtain a target deep twin network, then segments this target deep twin network and combines it with a classification network to classify abnormal components, effectively reducing false alarms or missed alarms in anomaly detection and improving the accuracy of photovoltaic string anomaly detection.
[0059] Other features and advantages of the embodiments of the present invention will be described in detail in the following detailed description section. Attached Figure Description
[0060] The accompanying drawings are provided to further illustrate embodiments of the present invention and form part of the specification. They are used together with the following detailed description to explain the embodiments of the present invention, but do not constitute a limitation thereof. In the drawings:
[0061] Figure 1 This is a flowchart illustrating a photovoltaic module anomaly detection method provided by the present invention;
[0062] Figure 2This is a schematic diagram of the structure of a photovoltaic module anomaly detection device provided by the present invention. Detailed Implementation
[0063] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit the scope of the present invention.
[0064] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this application.
[0065] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly defined.
[0066] Example 1
[0067] Please refer to Figure 1 , Figure 1 This is a schematic diagram of a photovoltaic module anomaly detection method provided in this embodiment.
[0068] Step S100: Obtain the current operation data and historical operation data of the photovoltaic power station, and establish a training sample set based on the historical operation data.
[0069] This step utilizes the SCADA system of the photovoltaic power station to obtain the operating data of the photovoltaic power station. The operating data of the photovoltaic power station includes the current operating data and the historical operating data. All the historical operating data of the photovoltaic power station are collected and a database is established according to different granularities. It is understood that the operating data of the photovoltaic power station equipment is affected by the weather. Therefore, in this embodiment, meteorological data also needs to be acquired and stored in the database for subsequent model training.
[0070] Understandably, after establishing the target database, it is necessary to preprocess the photovoltaic power plant operation data within the database. Specifically, this involves: determining whether the photovoltaic power plant operation data contains anomalies; if anomalies are found, identifying the anomaly type. Preset anomaly types can include outliers, missing data, and noise. Based on these preset anomaly types, corresponding data correction operations are performed, such as outlier removal, missing value imputation, and data filtering. For example, if anomalies are detected in the photovoltaic power plant operation data and it is determined that the anomaly belongs to the missing data type, then missing value imputation is performed on the outlier data.
[0071] It is important to understand that the runtime data in the target database includes both unlabeled and labeled runtime data. This embodiment establishes labeled positive / negative sample pairs and unlabeled positive / negative sample pairs for both labeled and unlabeled runtime data. Specifically:
[0072] For unlabeled operational data, this embodiment identifies the operational data of photovoltaic modules belonging to the same operational state and those belonging to different operational states. The operational data belonging to the same operational state are grouped in pairs, and a positive unlabeled sample pair is established based on each pair. Similarly, the operational data belonging to different operational states are grouped in pairs, and a negative unlabeled sample pair is established based on each pair. A training sample set is obtained based on these positive and negative unlabeled sample pairs. For example, the acquired unlabeled operational data is classified according to different combiner boxes. The unlabeled operational data within the same combiner box are sorted, and the average current of the combiner box is calculated. Unlabeled operational data with current values greater than the average current are paired in pairs as positive unlabeled sample pairs. Unlabeled operational data with current values less than or equal to the average current are randomly paired in pairs with unlabeled operational data with current values greater than the average current as negative unlabeled sample pairs.
[0073] For labeled running data, this embodiment sets the normal running data in the labeled running data as the normal class and the abnormal running data in the labeled running data as the abnormal class to complete the label classification of the labeled running data. The labeled running data is grouped in pairs, and it is determined whether the label types of the two labeled running data in the same group are the same. If they are the same, a positive labeled sample pair is established based on the two labeled running data in the group. If they are not the same, a negative labeled sample pair is established based on the two labeled running data in the group.
[0074] Step S200: Train the initial deep Siamese network model using the training sample set to obtain the target deep Siamese network model.
[0075] Specifically, this implementation pre-trains the initial deep Siamese network model using unlabeled positive and negative sample pairs from the training sample set. This yields predicted values and representations for both unlabeled positive and negative sample pairs. Based on these predicted values, a pre-set loss function is used to calculate the loss values for both pairs during pre-training. The weights of the pre-trained deep Siamese network model are then updated based on these loss values. If the pre-training meets the preset convergence criteria, the pre-trained deep Siamese network model is saved. Then, a small number of labeled positive sample pairs are used... This paper performs optimization training on the pre-trained deep Siamese network model using a pair of positive samples and a small number of negative samples, obtaining the optimized deep Siamese network model, the predicted values of the positive samples, and the predicted values of the negative samples. Based on the predicted values of the positive and negative samples, the loss values of the positive and negative samples during the optimization training process are calculated using a pre-set loss function. The weights of the optimized deep Siamese network model are updated based on these loss values. It is then determined whether the current optimization training meets the preset optimization training convergence conditions. If so, the optimized deep Siamese network model is saved as the target deep Siamese network model. The preset pre-training convergence conditions and preset optimization training conditions can be that training stops when the current training iterations reach a preset number of iterations.
[0076] It is understandable that the loss functions designed for different models will also differ. In this embodiment, a robust contrastive loss function is designed for the deep Siamese network model. Therefore, the loss function of the pre-trained deep Siamese network model and the loss function of the deep Siamese network model can be expressed by equation (1):
[0077] L = L frobust +λ×L fclss (1)
[0078] In equation (1), L is the loss function, L frobust For robust contrastive loss function, L fclss This is the cross-entropy loss function for binary classification.
[0079] Robust contrastive loss function L frobust Specifically, it is shown in equation (2):
[0080]
[0081] In equation (2), I represents the set of the top (1-ε)% of positive and negative sample pairs obtained by sorting the truncation contrast loss values of positive and negative sample pairs in the same batch from smallest to largest, ε is an empirically set proportion, and Y is the true value of the predicted label of the current sample pair. i,j When Y is 0, the current input sample is a positive sample pair. i,j When D is 1, the current input sample is a negative sample pair. w Let z be the Euclidean distance between the representations of the current sample pair in the latent space, and m be the loss cutoff value; where the representation of the current sample pair is the data representation z obtained after the last layer of the sample pair data input into the deep Siamese network. i and z j .
[0082] Binary cross-entropy loss function L fclss Specifically, it is shown in equation (3):
[0083]
[0084] In equation (3), Y i,j The predicted label value for the current sample pair. Predict the probability that the current sample is a positive sample pair.
[0085] This step, based on the determined loss, updates the weights of the deep Siamese network using gradient descent. Specifically, the model weights are initialized, denoted as w0, and the weight parameter α is set (α can be set to 0.001). Through the calculated loss model, the truncated contrastive loss values for the same batch of positive and negative sample pairs can be obtained, resulting in a set of truncated contrastive loss values containing all positive and negative sample pairs in the same batch, denoted as I. batch Calculate the data gradient g in this batch. t , The weights for updating the next running data can be calculated using w. t+1 =w t -α⊙g t Perform calculations and updates.
[0086] Step S300: Segment the target deep Siamese network model to obtain the feature extraction model.
[0087] It is understandable that the deep twin network has two branches with the same deep network structure, both consisting of Linear1>Tanh1>Linear2>Tanh2>Linear3>Tanh3>Linear4>Tanh4 layers. Therefore, in this embodiment, one branch is selected from the deep twin network model as the feature extraction model for anomaly detection of photovoltaic modules based on operational data.
[0088] Step S400: Combine the feature extraction model with the preset classification network to obtain a combined neural network model.
[0089] Step S500: Train the combined neural network model using the training sample set to obtain the target combined neural network model.
[0090] The default classification network is a deep neural network with a two-layer MLP structure.
[0091] Specifically, in this embodiment, a small number of labeled positive sample pairs and a small number of labeled negative sample pairs are classified according to a preset type. The classified labeled positive sample pairs and labeled negative sample pairs are used to train the combined neural network model to obtain the target combined neural network model, the classification prediction values of labeled positive sample pairs, and the classification prediction values of labeled negative sample pairs. Based on the classification prediction values of labeled positive sample pairs and labeled negative sample pairs, the loss values of labeled positive sample pairs and labeled negative sample pairs during the classification training process are calculated using a preset loss function. The weights of the target combined neural network model are updated based on the loss values. It is then determined whether the current classification training meets the preset classification training convergence condition. If so, the current target combined neural network model is saved.
[0092] It should be understood that, for the target ensemble neural network, this embodiment has designed a multi-class cross-entropy loss function, as shown in equation (4):
[0093]
[0094] In equation (4), L fmclss Let C be the cross-entropy loss function for multi-class classification, and p be the number of samples. i y represents the probability that a sample belongs to the i-th class. i ∈[y0,y1,...,y C-1 When the current sample belongs to the i-th class, y i =1, otherwise y i =0.
[0095] The weights of the target combined neural network are updated using the gradient descent method. The specific update steps are the same as those for the weight update steps of the deep Siamese network in step S200.
[0096] Step S600: Based on the current operating data of the photovoltaic power station, use the target combined neural network to perform anomaly detection on the photovoltaic modules and obtain the detection results.
[0097] The target ensemble neural network can not only detect anomalies in photovoltaic modules, but also classify anomalies to obtain more detailed anomaly detection information.
[0098] This invention acquires current and historical operating data of a photovoltaic power station, establishes a training sample set based on the historical operating data, trains a target deep twin network model using this training sample set, then segments the target deep twin network model to obtain a feature extraction model, combines the feature extraction model with a preset classification network to obtain a combined neural network model, trains the combined neural network model using the training sample set to obtain a target combined neural network model, and finally uses this target combined neural network model to detect anomalies in photovoltaic modules based on current operating data. In other words, this invention trains and optimizes an initial deep twin network model using a training sample set to obtain a target deep twin network model, then segments the target deep twin network and combines it with a classification network to classify abnormal components, effectively reducing false alarms or missed alarms in anomaly detection and improving the accuracy of photovoltaic string anomaly detection.
[0099] Example 2
[0100] Please refer to Figure 2 , Figure 2 This is a schematic diagram of the structure of a photovoltaic module anomaly detection device 200 provided in an embodiment of this application.
[0101] The photovoltaic module anomaly detection device 200 includes:
[0102] The data acquisition module 210 is used to acquire the current operating data and historical operating data of the photovoltaic power station;
[0103] Data processing module 220 is used to build a training sample set based on historical operating data;
[0104] Model training module 230 is used for:
[0105] The initial deep Siamese network model is trained using the training sample set to obtain the target deep Siamese network model;
[0106] The target deep Siamese network model is segmented to obtain a feature extraction model;
[0107] By combining the feature extraction model with a pre-defined classification network, a combined neural network model is obtained.
[0108] The target combined neural network model is obtained by training the combined neural network model using the training sample set;
[0109] The anomaly detection module 240 is used to detect anomalies in photovoltaic modules based on the current operating data of the photovoltaic power station and using a target combined neural network model to obtain the detection results.
[0110] It should be understood that this device corresponds to the above-described photovoltaic module anomaly detection method embodiment and is capable of performing the various steps involved in the above method embodiment. The specific functions of this device can be found in the description above, and detailed descriptions are omitted here to avoid repetition. The device includes at least one software function module that can be stored in memory or embedded in the device's operating system (OS) in the form of software or firmware.
[0111] Example 3
[0112] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0113] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0114] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0115] Example 4
[0116] This invention also provides a computer-readable storage medium storing instructions that, when executed by a processor, are adapted to perform a program containing steps of a photovoltaic module anomaly detection method.
[0117] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0118] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0119] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0120] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0121] It should also be noted that the various specific technical features described in the above embodiments can be combined in any suitable manner without contradiction. To avoid unnecessary repetition, the embodiments of the present invention will not describe the various possible combinations separately.
[0122] In addition, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0123] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0124] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method for detecting anomalies in photovoltaic modules, characterized in that, The method includes: Obtain current and historical operating data of the photovoltaic power station. Based on the historical operating data, determine labeled and unlabeled operating data. Establish labeled positive and negative sample pairs and unlabeled positive and negative sample pairs for labeled and unlabeled operating data respectively to build a training sample set. The initial deep Siamese network model is trained using the training sample set to obtain the target deep Siamese network model; The target deep Siamese network model is segmented to obtain a feature extraction model; The feature extraction model is combined with a preset classification network to obtain a combined neural network model; The combined neural network model is trained using the training sample set to obtain the target combined neural network model; Based on the current operating data of the photovoltaic power station, the target combined neural network model is used to detect anomalies in the photovoltaic modules, and the detection results are obtained. The step of training the initial deep Siamese network model using the training sample set to obtain the target deep Siamese network model includes: The initial deep Siamese network model is pre-trained using the unlabeled positive sample pairs and the unlabeled negative sample pairs to obtain the pre-trained deep Siamese network model. The pre-trained deep Siamese network model is tuned and trained using the labeled positive sample pairs and the labeled negative sample pairs to obtain the tuned deep Siamese network model as the target deep Siamese network model. The step of training the initial deep Siamese network model using the training sample set to obtain the target deep Siamese network model further includes: The initial deep Siamese network model is pre-trained using the unlabeled positive sample pairs and the unlabeled negative sample pairs to obtain the pre-trained deep Siamese network model, the predicted values of the unlabeled positive sample pairs, and the predicted values of the unlabeled negative sample pairs. Based on the predicted values of the unlabeled positive sample pairs and the predicted values of the unlabeled negative sample pairs, the loss values of the unlabeled positive sample pairs and the loss values of the unlabeled negative sample pairs during the pre-training process are calculated. The weights of the pre-trained deep Siamese network model are updated based on the loss values of the unlabeled positive sample pairs and the loss values of the unlabeled negative sample pairs. Determine whether the current pre-training meets the preset pre-training convergence condition. If so, save the current pre-trained deep Siamese network model. The pre-trained deep Siamese network model is tuned and trained using the labeled positive sample pairs and the labeled negative sample pairs to obtain the tuned deep Siamese network model, the predicted values of the labeled positive sample pairs, and the predicted values of the labeled negative sample pairs. Based on the predicted values of the labeled positive sample pairs and the predicted values of the labeled negative sample pairs, the loss values of the labeled positive sample pairs and the loss values of the labeled negative sample pairs are calculated during the optimization training process. Based on the loss values of labeled positive sample pairs and labeled negative sample pairs during the optimization training process, the weights of the optimized deep Siamese network model are updated. Determine whether the current optimization training meets the preset optimization training convergence condition. If so, save the current optimized deep Siamese network model as the target deep Siamese network model. The loss function of the pre-trained deep Siamese network model and the loss function of the deep Siamese network model are as follows: ; in, For loss function, For robust contrastive loss function, The cross-entropy loss function is used for binary classification. Robust contrastive loss function Specifically: in, The top results are obtained by sorting the truncation contrast loss values of positive and negative sample pairs in the same batch from smallest to largest. The set consisting of positive and negative sample pairs. The proportion set for experience, For the current sample pair, the predicted label is the true value when... When the value is 0, the current input sample is a positive sample pair. When the value is 1, the current input sample is a negative sample pair. Let Euclidean distance be the representation of the current sample pair in the latent space. denoted as the loss cutoff value; where the representation of the current sample pair is the data representation obtained after the last layer of the sample pair input into the deep Siamese network. and ; Specifically, for the unlabeled running data, unlabeled positive and negative sample pairs are established, including: The acquired unlabeled operation data is classified according to different combiner boxes, and the unlabeled operation data under the same combiner box is sorted to calculate the average current of the combiner box at this time. Unlabeled operational data with current values greater than the average current value are paired up to form unlabeled positive sample pairs. Unlabeled operational data with current values less than or equal to the average current value are randomly paired with unlabeled operational data with current values greater than the average current value to form unlabeled negative sample pairs.
2. The photovoltaic module anomaly detection method according to claim 1, characterized in that, Also includes: Determine whether there is any abnormal data in the operating data of the photovoltaic power station; If there is abnormal data in the operation data of the photovoltaic power station, determine the type of abnormality of the abnormal data; Based on the anomaly type, perform data trimming operations corresponding to the anomaly type on the anomaly data.
3. The photovoltaic module anomaly detection method according to claim 1, characterized in that, For labeled running data, establish labeled positive and negative sample pairs, including: Based on the labeled running data, the label type for each labeled running data is determined; wherein, the label type includes a normal class for normal running data and an abnormal class for abnormal running data; The labeled running data is grouped into pairs. Determine whether two tagged running data belonging to the same group have the same label type; If two labeled running data belonging to the same group have the same label type, then a labeled positive sample pair is established based on the two labeled running data in that group; If two labeled data sets belonging to the same group have different label types, then a labeled negative sample pair is created based on the two labeled data sets in that group. The training sample set is obtained based on the labeled positive sample pairs and the labeled negative sample pairs.
4. The photovoltaic module anomaly detection method according to claim 3, characterized in that, The step of training the combined neural network model using the training sample set to obtain the target combined neural network model includes: The ensemble neural network model is trained for classification using the labeled positive sample pairs and the labeled negative sample pairs to obtain the target ensemble neural network model, the classification prediction values of the labeled positive sample pairs, and the classification prediction values of the labeled negative sample pairs. Based on the classification prediction values of the labeled positive sample pairs and the classification prediction values of the labeled negative sample pairs, the loss values of the labeled positive sample pairs and the loss values of the labeled negative sample pairs during the classification training process are calculated. The weights of the target combined neural network model are updated based on the loss values of labeled positive sample pairs and labeled negative sample pairs during classification training. Determine whether the current classification training meets the preset classification training convergence condition. If so, save the current target classification network model.
5. A photovoltaic module anomaly detection device, employing the photovoltaic module anomaly detection method as described in any one of claims 1-4, characterized in that, The device includes: The data acquisition module is used to acquire the current and historical operating data of the photovoltaic power station. The data processing module is used to establish a training sample set based on the historical operating data; The model training module is used for: The initial deep Siamese network model is trained using the training sample set to obtain the target deep Siamese network model; The target deep Siamese network model is segmented to obtain a feature extraction model; The feature extraction model is combined with a preset classification network to obtain a combined neural network model; The combined neural network model is trained using the training sample set to obtain the target combined neural network model; An anomaly detection module is used to detect anomalies in photovoltaic modules based on the current operating data of the photovoltaic power station and using the target combined neural network model to obtain detection results.
6. An electronic device, characterized in that, include: A processor and a memory, the memory storing machine-readable instructions executable by the processor, which, when executed by the processor, perform the photovoltaic module anomaly detection method according to any one of claims 1-4.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions for causing a machine to perform the photovoltaic module anomaly detection method according to any one of claims 1-4.
