Fault detection method based on multi-dimensional anomaly detection and dual-path fine-grained positioning
Through the fault detection method of multi-dimensional abnormality detection and dual-path fine-grained positioning, the problems of unstable sample quality and low feature positioning accuracy in photovoltaic panel fault detection are solved, efficient feature extraction and precise positioning of small abnormalities are achieved, and the accuracy and robustness of photovoltaic panel fault detection are improved.
Patent Information
- Application Number
- CN202510601583.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-12
- Publication Date
- 2025-08-15
AI Technical Summary
The existing photovoltaic panel fault detection technology has problems such as unstable quality of the generated adversarial network sample, insufficient collaborative characterization of multi-scale features, and low fine-grained feature positioning accuracy, resulting in insufficient accuracy and robustness of photovoltaic panel fault detection.
The fault detection method of multi-dimensional anomaly detection and dual-path fine-grained positioning is adopted. Through the multi-dimensional anomaly evaluation unit and the dual-path fine-grained characteristic positioning structure, combined with the attention unit, gated unit and abnormal discriminant unit, discrete wavelet transformation, inverse wavelet transformation and position-space attention mechanism, local details and global structural areas are constructed, key areas are located through intersection operations, and a pre-trained model is introduced to extract hierarchical multi-scale features.
It significantly improves the feature extraction ability of microcracks and local hot spots, reduces the interference between complex light and background noise, enhances the robustness of the model in dynamic environments, and improves the fine-grained fault location and classification accuracy.
Smart Images

Figure CN120498378A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of photovoltaic system fault detection, and in particular to a fault detection method based on multi-dimensional anomaly detection and dual-path fine-grained positioning. Background Art
[0002] Photovoltaic power generation systems have become a core component of clean energy systems. However, PV panels, exposed to complex environments over long periods of time, are susceptible to highly sensitive faults such as hot spot effects, hidden cracks, and stain deposition, leading to reduced energy conversion efficiency and potential safety hazards. Traditional fault detection relies on manual inspections or threshold determination methods, which are subject to high subjectivity, delayed response, and high rates of missed detection. With the convergence of the Internet of Things and artificial intelligence (AI), intelligent detection technologies based on deep learning are becoming mainstream, but they still face multiple technical bottlenecks.
[0003] Currently, research on data-driven photovoltaic fault diagnosis focuses primarily on multimodal data fusion and deep learning model optimization. For example, a visual monitoring solution based on an improved ResNet architecture improves classification robustness through ensemble learning, while semi-supervised contrastive learning techniques (such as the FMC-HT network) alleviate the problem of insufficient labeled data. XGBoost and Transformer combined with data augmentation techniques have demonstrated potential in complex anomaly classification tasks. In the field of anomaly detection, generative adversarial networks (GANs) have attracted attention for their powerful data generation capabilities. Conditional generative adversarial networks (CGANs) generate simulated samples through two-dimensional preprocessing to enhance fault classification; multi-scale convolutional neural networks (MSCNNs) combined with GANs generate data-balanced samples to improve harmonic fault diagnosis accuracy; and the WTGAN-GP model based on Wasserstein distance and gradient penalty addresses data scarcity through a temporal generative network. Furthermore, innovative approaches such as spatiotemporal generative adversarial networks (CNN-LSTM GANs), self-supervised attention generative adversarial networks (SSAGANs), and digital twin-driven virtual sensor models have further expanded the application boundaries of anomaly detection. In terms of fine-grained feature extraction, spatial-channel fusion excitation technology, class activation map positioning and multi-dimensional feature adaptation mechanism have significantly improved the detection capability of tiny abnormal areas.
[0004] However, in photovoltaic panel fault detection, there are problems such as unstable sample quality of generative adversarial networks, insufficient collaborative representation of multi-scale features, and low accuracy of fine-grained feature positioning.
[0005] In view of this, the present invention is proposed. Summary of the Invention
[0006] In view of this, the present invention proposes a fault detection method based on multi-dimensional anomaly detection and dual-path fine-grained positioning, which belongs to the photovoltaic system intelligent fault diagnosis method of multi-unit generative adversarial network (MAEU-GAN) and dual-path fine-grained feature positioning (DP-FGL), which realizes the enhancement of multi-dimensional feature characterization capability, significantly improves the feature extraction capability of micro-anomalies such as microcracks and local hot spots, and reduces the interference of complex lighting and background noise, enhances the robustness of the model in dynamic environments, and achieves breakthroughs in fine-grained fault localization and classification accuracy: combining the multi-scale feature fusion strategy of local details and global semantics to accurately locate dispersed abnormal areas and distinguish high-similarity fault modes.
[0007] Specifically, the present invention is achieved through the following technical solutions:
[0008] The present invention provides a fault detection method based on multi-dimensional anomaly detection and dual-path fine-grained positioning, comprising the following steps:
[0009] Implement anomaly detection based on a multi-dimensional anomaly assessment unit and fault diagnosis based on a dual-path fine-grained feature localization structure for photovoltaic systems;
[0010] The multidimensional anomaly assessment unit includes an attention unit, a gating unit, and an anomaly discrimination unit. The attention unit integrates discrete wavelet transform, inverse wavelet transform, and position-space attention mechanism. The position-space attention mechanism is realized by designing a parallel computing structure of position attention PA and spatial attention SA by the discriminator feature difference.
[0011] The fault diagnosis method of the dual-path fine-grained feature positioning structure includes constructing local detail areas and global structure areas, locating key areas through intersection operations, and introducing a pre-trained model to extract hierarchical multi-scale features.
[0012] Optionally, during the anomaly detection process of the multidimensional anomaly assessment unit, a bidirectional closed-loop feedback mechanism is adopted, wherein one feedback mechanism path is the anomaly score fused with the generator reconstruction residual and the discriminator feature difference, which drives the gating unit to dynamically adjust the feature channel weights through the gradient backpropagation of the loss function, and the other feedback mechanism path is the adjustment of the position attention PA, spatial attention SA and wavelet branch proportional coefficient by the discriminator feature difference.
[0013] Optionally, one of the feedback mechanism paths is the abnormal score fused with the generator reconstruction residual and the discriminator feature difference. Through the gradient back propagation of the loss function, the gate control unit is driven to dynamically adjust the feature channel weight. The gate weight W gate The adjustment of depends on the gradient of the anomaly score S obtained by the anomaly discrimination unit, and its formula is:
[0014]
[0015] is the partial derivative of the loss with respect to the anomaly score, if Indicates that the current abnormal score S is too high. Indicates that the current anomaly score S is too low. It is the partial derivative of the anomaly score S with respect to the gated feature Gated, which is used to quantify the influence of each channel in the gated feature Gated on the anomaly score S. Gated is the weight of the gated feature W gate The partial derivative of W is used to measure gate The magnitude of the impact of the change on the gating feature Gated.
[0016] Alternatively, another feedback mechanism path is the process of adjusting the position attention PA, spatial attention SA and wavelet branch scale coefficients by the discriminator feature difference. The outputs of PA and SA are:
[0017] F PA =F in ⊙M PA (2)
[0018] F SA =F in ⊙M SA (3)
[0019] Among them F in is the input feature, M PA is the position attention map, M SA is the spatial attention map, ⊙ is the element-wise multiplication;
[0020] Discriminator feature difference △D feat The feedback to PA and SA is as shown in formulas (4) and (5):
[0021]
[0022] In the formula is the sensitivity of the loss to the discriminator feature differences, is the sensitivity of the characteristic difference to the PA output, To represent the attention map M PA The impact of changes in the PA module output;
[0023] The attention unit divides the input features into the original domain branch ratio 1-β and the wavelet domain branch ratio β. The feedback mechanism analyzes the contribution of each sub-band to the anomaly score and dynamically adjusts the β value as shown in formula (6):
[0024] β (t+1) =β (t) +γ·△β (6)
[0025] Where β (t) is the wavelet branch proportional coefficient at the current moment, β (t+1) is the wavelet branch proportional coefficient at the next moment, that is, the value adjusted according to the feedback, γ is the learning rate, which is used to control the amplitude of each adjustment, and △β is the adjustment amount of the wavelet branch proportional coefficient, which is calculated based on the gradient contribution of the high-frequency subband.
[0026] Optionally, the method for constructing local detail regions includes: generating a heat map by back-propagation gradient weighting, combining dynamic threshold segmentation with morphological contour analysis, achieving parallel positioning of multiple defect regions in a single heat map, and locating multiple circular local detection regions in a single heat map in parallel, specifically expressed as:
[0027]
[0028] in represents the center coordinate of the i-th local area, Indicates its radius.
[0029] Optionally, the method for constructing the global structure region is to locate the key region on the deep features, and the formula is expressed as:
[0030] G=(g x ,g y ,g r ) (8)
[0031] where g x ,g y is the center coordinate of the global circular area, g r is the radius.
[0032] Optionally, the method of locating key areas by intersection operation and introducing pre-trained models to extract hierarchical multi-scale features includes: finding L that has the largest geometric intersection with G i , for each local area L i , the Euclidean distance between the center of the circle and the global structure area is expressed as:
[0033]
[0034] According to the distance d i The relationship with the radius divides the relative positions between areas into the following three cases:
[0035]
[0036] When the Euclidean distance between the center points of the circles is greater than the sum of the radii, the local area will not participate in the selection of the final key area. When the Euclidean distance between the center points of the circles is less than or equal to the sum of the radii, the area of the smaller circle is taken. When the two circles intersect, the intersection area A i Calculated as:
[0037]
[0038] To sum up, its fine-grained feature area S is:
[0039]
[0040] After locating the key areas, the pre-trained Swin Transformer is used to extract hierarchical multi-scale features, and the final classification optimization is achieved through feature fusion and collaborative optimization of the classifier.
[0041] The above-mentioned scheme of the present invention is suitable for the refined detection of high-similarity faults such as surface cracks, hot spot effects, and dirt deposition on photovoltaic panels. It can be applied to industrial detection scenarios such as abnormal area positioning of photovoltaic arrays under complex lighting conditions, multi-dimensional classification of fault types, and system health status assessment.
[0042] Its core solutions include: (1) Multi-Unit Dynamic Perception Generative Adversarial Network (MAEU-GAN), which dynamically allocates feature weights to focus on potential abnormal areas by integrating channel-spatial attention mechanism, adaptive gated feature selection module and residual discriminant unit, and continuously optimizes the quality of generated samples by combining bidirectional closed-loop feedback mechanism (generation-detection-feedback-optimization), significantly improving the detection sensitivity of small sample faults; (2) Wavelet-Position-Spatial Attention (WPSA) module, which extracts multi-scale frequency domain features based on discrete wavelet transform (DWT), and captures pixel-level position dependency and inter-region spatial correlation by parallel coupling of position attention and spatial attention mechanism, and finally fuses frequency domain-spatial domain-position three-dimensional features to enhance multi-granularity discrimination capability; (3) Dual-Path Fine-Grained Feature Localization Framework (DP-FGL), which constructs local detail (edge, texture) and global structure (shape, distribution) feature heat maps based on Grad-CAM technology, locates key areas through intersection operation, and introduces pre-trained Swin Transformer model to extract hierarchical multi-scale features.
[0043] The solution of the present invention has the following technical effects:
[0044] The present invention achieves the following significant advantages in photovoltaic panel fault detection by integrating a multi-unit dynamic perception generative adversarial network (MAEU-GAN), a wavelet-position-space attention (WPSA) module, and a dual-path fine-grained feature localization framework (DP-FGL): (1) Collaborative optimization of generated sample quality and detection sensitivity: Based on a two-way closed-loop feedback mechanism, the generation and discrimination processes are dynamically balanced, effectively alleviating the anomaly missed detection problem caused by sample distribution bias in traditional generative adversarial networks, and can still stably improve fault detection in data-scarce scenarios; (2) Enhanced multi-dimensional feature characterization capabilities: Through a frequency-spatial-position three-dimensional collaborative focusing mechanism, the feature extraction capability of small anomalies such as microcracks and local hot spots is significantly improved, while reducing the interference of complex lighting and background noise, and enhancing the robustness of the model in dynamic environments; (3) Breakthrough in fine-grained fault localization and classification accuracy: Combining a multi-scale feature fusion strategy with local details and global semantics, it accurately locates dispersed anomaly areas and distinguishes high-similarity fault modes. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Various other advantages and benefits will become apparent to those skilled in the art by reading the detailed description of the preferred embodiment below. The accompanying drawings are only for the purpose of illustrating the preferred embodiment and are not to be considered as limiting the present invention. The same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0046] Figure 1 Provide a diagnostic framework for overall testing;
[0047] Figure 2 This is the structure diagram of the attention unit;
[0048] Figure 3 It is a two-way closed-loop feedback framework;
[0049] Figure 4 This is the DP-FGL structure diagram;
[0050] Figure 5 Extracting maps for local detail areas;
[0051] Figure 6 Extracting a map for global structural regions;
[0052] Figure 7 Extract example graphs for fine-grained fault regions;
[0053] Figure 8 This is the result of the MAEU-GAN model ablation experiment;
[0054] Figure 9 This is the result of WPSA ablation experiment;
[0055] Figure 10 Confusion matrix for fine-grained fault diagnosis;
[0056] Figure 11 Radar chart for model performance comparison;
[0057] Figure 12 A schematic diagram of the structure of a computer device. DETAILED DESCRIPTION
[0058] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numerals in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0059] The terms used in the present disclosure are for the purpose of describing particular embodiments only and are not intended to limit the present disclosure. The singular forms "a", "an", and "the" used in the present disclosure and the appended claims are intended to include plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0060] It should be understood that although the terms first, second, third, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time" or "when" or "in response to determining",
[0061] Example
[0062] The present invention proposes a fault detection method based on multi-dimensional anomaly detection and dual-path fine-grained positioning, comprising the following steps:
[0063] Implement anomaly detection based on a multi-dimensional anomaly assessment unit and fault diagnosis based on a dual-path fine-grained feature localization structure for photovoltaic systems;
[0064] The multidimensional anomaly assessment unit includes an attention unit, a gating unit, and an anomaly discrimination unit. The attention unit integrates discrete wavelet transform, inverse wavelet transform, and position-space attention mechanism. The position-space attention mechanism is realized by designing a parallel computing structure of position attention PA and spatial attention SA by the discriminator feature difference.
[0065] The fault diagnosis method of the dual-path fine-grained feature positioning structure includes constructing local detail areas and global structure areas, locating key areas through intersection operations, and introducing a pre-trained model to extract hierarchical multi-scale features.
[0066] The specific implementation is divided into two stages: "anomaly detection based on the multi-dimensional anomaly evaluation unit (MAEU-GAN)" and "fault diagnosis based on the dual-path fine-grained feature localization structure (DP-FGL). The specific steps are as follows:
[0067] A. Anomaly Detection Based on Multi-dimensional Anomaly Evaluation Unit (MAEU-GAN):
[0068] 1) Constructing a Multi-Unit Dynamic Perception Generative Adversarial Network (MAEU-GAN)
[0069] This network architecture combines attention units, gating units, and anomaly detection units, working together to achieve efficient anomaly detection. The attention unit integrates discrete wavelet transform (DWT), inverse wavelet transform (IWT), and position-spatial attention (PSA) to perform feature enhancement in the wavelet domain. The PSA mechanism focuses on key image regions, significantly improving the ability to perceive subtle features and differences in photovoltaic panel images. This unit employs a multi-branch structure to fuse information from the wavelet domain and the original feature domain, preserving input features through residual connections. This enhances the feature extraction capabilities of both the generator and discriminator, ensuring they more accurately capture important spatial information. The gating unit effectively suppresses irrelevant features and noisy areas through a lightweight dynamic filtering mechanism, further improving feature reliability and robustness. The anomaly detection unit calculates anomaly scores and quantifies the degree of anomaly in samples based on the residuals between the generator-generated and ground-truth samples, as well as the discriminator's feature differences, enabling accurate anomaly detection. Through the collaborative work of these three units, MAEU-GAN achieves sensitive and accurate identification of anomaly samples even in imbalanced data.
[0070] 2) A new type of attention unit - Wavelet-Position-SpatialAttention (WPSA) is proposed, such as Figure 2As shown in the figure: WPSA designs a channel segmentation strategy to achieve parallel processing of normal domain information preservation and wavelet domain feature enhancement. Specifically, the input features are divided into normal information path and wavelet processing path through the dynamic division mechanism of channel dimension, which are directly transmitted to preserve the integrity of the original features, while the multi-scale feature extraction is performed through the residual learning structure of discrete wavelet transform-inverse transform, which effectively solves the problem of insufficient utilization of frequency domain information in traditional attention modules. In the wavelet domain processing stage, an innovative position-spatial attention parallel weighting mechanism is proposed. By designing a parallel computing structure of position attention (PA) and channel compression spatial attention (SA) based on the discriminator feature difference, the coordinated optimization of global position sensitivity and local feature difference is achieved.
[0071] 3) A two-way closed-loop feedback mechanism is designed, such as Figure 3 As shown in Figure 1, by injecting the anomaly detection results and the discriminator feature differences back into the feature extraction and selection process, a continuous iteration of "detection, feedback, and optimization" is formed. This mechanism includes two core feedback paths:
[0072] ① Based on the abnormal score fused with the generator reconstruction residual and the discriminator feature difference, the gradient back propagation of the loss function drives the gating unit to dynamically adjust the feature channel weight. The output characteristics of the gating unit are as shown in Formula 1, and the gating weight W gate The adjustment depends on the gradient of the anomaly score S obtained by the anomaly discrimination unit, and its formula is:
[0073]
[0074] is the partial derivative of the loss with respect to the anomaly score, if Indicates that the current anomaly score S is too high and the gating weight W needs to be adjusted gate , reduce S, if This indicates that the current anomaly score S is too low and needs to be increased to improve the sensitivity of anomaly detection. is the partial derivative of the anomaly score S with respect to the gated feature Gated, which is used to quantify the influence of each channel in the gated feature Gated on the anomaly score S. A larger absolute value indicates that the channel contributes significantly to the anomaly score and its weight needs to be adjusted first. Gated is the weight of the gated feature W gate The partial derivative of W is used to measure gate The magnitude of the impact of the change on the gating feature Gated.
[0075] ②Attention unit feedback adjustment
[0076] The attention unit feedback adjustment includes the adjustment of the discriminator feature difference to the position attention (PA), spatial attention (SA) and wavelet branch scale coefficient. First, the output of PA and SA is:
[0077] F PA =F in ⊙M PA (2)
[0078] F SA =F in ⊙M SA (3)
[0079] Among them F in is the input feature, M PA is the position attention map, M SA is the spatial attention map, ⊙ is the element-wise multiplication. Discriminator feature difference △D feat The feedback to PA and SA is as shown in formulas 4 and 5:
[0080]
[0081] In the formula The sensitivity of the loss to the discriminator feature difference is Increase △D feat This will lead to an increase in loss. It is necessary to reduce the feature difference between the generated samples and the real samples and increase △D feat The loss can be reduced, but the discriminator's ability to distinguish needs to be enhanced. The sensitivity of the characteristic difference to the PA output, which quantifies the F PA The change of △D feat If a small change in a position F PA Leading to △D feat Significant changes indicate that this region contributes more to the semantic difference of the discriminator. feat The effect is weak and the gradient approaches zero. To represent the attention map M PA The impact of changes in on the PA module output. For spatial attention (SA), the optimization process is similar to that of PA. The attention unit divides the input features into the original domain branch (accounting for 1-β) and the wavelet domain branch (accounting for β). The feedback mechanism dynamically adjusts the β value by analyzing the contribution of each sub-band to the anomaly score, as shown in Formula 6:
[0082] β (t+1) =β (t) +γ·△β (6)
[0083] Where β (t) Is the wavelet branch proportional coefficient at the current moment. (t+1)is the wavelet branch scaling coefficient at the next moment. This is the value adjusted based on feedback. γ is the learning rate, which controls the magnitude of each adjustment. △β is the adjustment amount for the wavelet branch scaling coefficient, which is calculated based on the gradient contribution of the high-frequency subband.
[0084] B. Fault diagnosis based on dual-path fine-grained feature localization structure (DP-FGL):
[0085] A dual-path fine-grained feature localization structure is proposed, such as Figure 4 As shown in Figure 2, this structure aims to guide the model to focus on more discriminative regions, extract unique and differentiated features, and reduce the similarity between different fault types. In neural convolutional networks, mid-level features can both preserve rich spatial details and contain certain global information. By balancing details with overall structure, mid-level features enhance the model's ability to capture local details. Compared to shallow-level features, mid-level features can better handle complex local differences, avoiding the trade-off between overly simple shallow features and overly abstract deep features. Based on this, a dual-path fine-grained feature localization structure was designed, combining the strengths of mid-level and deep features. On the one hand, mid-level features are used for regional supervised learning, helping the model focus on more discriminative regions and improving its ability to recognize fine-grained differences. On the other hand, deep features are used to locate key areas and enhance the model's understanding of overall structure. By leveraging the advantages of mid-level features in capturing details and deep features in global modeling, this structure effectively improves feature discriminability in fault diagnosis tasks, thereby enhancing diagnostic accuracy.
[0086] 1) Local detail area
[0087] In the photovoltaic panel fault diagnosis task, the fine-grained analysis capability of mid-level features is of key significance in improving the accuracy of fault location. It performs particularly well in local structure modeling, and can effectively capture key detail information such as the extension trajectory of cracks, the diffusion boundary of stains, and the intensity gradient of local hot spots. Such local features usually have the characteristics of uneven spatial distribution and obvious scale changes, and require more discriminative feature expressions for accurate modeling and identification. In order to give full play to the advantages of mid-level features in local detail perception, this paper introduces the GradCAM algorithm, which generates a heat map by back-propagation gradient weighting, and combines dynamic threshold segmentation with morphological contour analysis to realize a parallel positioning algorithm for multiple defect areas in a single heat map. It can locate multiple circular local detection areas in parallel in a single heat map, accurately indicating key detail areas where faults may exist. Figure 5 shown.
[0088] 2) Global structure area
[0089] Deep features are mainly responsible for capturing global structural information in photovoltaic panel fault diagnosis, such as the overall shape, layout, and spatial relationships between the photovoltaic panel parts. Unlike mid-level features that focus on local details, deep features can reveal more complex global patterns in the image, thereby helping the model identify the overall manifestations of photovoltaic panel faults. By locating key areas based on deep features, such as Figure 6 As shown, the model provides a clearer understanding of the overall operational status of PV panels, particularly for those exhibiting widespread faults or systemic defects. Deep features provide guidance that helps the model more precisely locate faults, determine their type and scope, and further enhance the accuracy of fault diagnosis. Leveraging the global information provided by deep features, the model can comprehensively assess the impact of faults, improve its ability to identify complex fault patterns, and ensure the efficient and stable operation of the PV system.
[0090] 3) Fault fine-grained area
[0091] The local area is composed of multiple circular areas, and its area set can be expressed as:
[0092]
[0093] in represents the center coordinate of the i-th local area, Represents its radius. From 2.2.2, it can be concluded that the global area can be expressed as:
[0094] G=(g x ,g y ,g r ) (8)
[0095] where g x ,g y is the center coordinate of the global circular area, g r is the radius, and the fine-grained fault area is to find the L that has the largest geometric intersection with G i ,like Figure 7 The specific operations are as follows:
[0096] For each local region L i , the Euclidean distance between the center of the circle and the global area can be expressed as:
[0097]
[0098] According to the distance d i The relationship between the areas and the radius can be divided into the following three cases:
[0099]
[0100] When the Euclidean distance between the centers of the circles is greater than the sum of the radii, the local area will not participate in the selection of the final key area. When the Euclidean distance between the centers of the circles is less than or equal to the sum of the radii, the area of the smaller circle is taken. When two circles intersect, the intersection area A i Calculated as:
[0101]
[0102] To sum up, its fine-grained feature area S is:
[0103]
[0104] After key area extraction, the framework further uses the pre-trained Swin Transformer to extract multi-scale features, and achieves the final classification optimization through feature fusion and collaborative optimization of the classifier.
[0105] The above steps are specific applications of the method of the present invention. To comprehensively evaluate the performance of the MAEU-GAN model proposed in this paper, five sets of ablation experiments were designed for verification. The experimental settings are shown in Table 1 below.
[0106] Table 1 MAEU-GAN model ablation experiment settings
[0107]
[0108] The results of the ablation experiment on the MAEU-GAN model ( Figure 8 ) and a systematic analysis was conducted, and the following conclusions were drawn: (1) From Experiment 1 ( Figure 8 a) shows that the addition of the bidirectional feedback mechanism improves the model accuracy by 1.33%, while the missed detection rate (FN) decreases significantly. This shows that bidirectional feedback effectively optimizes the transmission path of abnormal features by enhancing the information interaction between the generator and the discriminator, thereby improving the overall performance of the model. (2) Experiment 2( Figure 8 b) When the WPSA unit is removed, the model accuracy drops to 89.67%, which is significantly lower than the complete model. This result proves that WPSA significantly enhances the model's ability to perceive the global semantics (such as the distribution of abnormal regions) and local details (such as texture anomalies) of the image through multi-scale feature fusion and spatial position information weighting, thereby improving the accuracy of anomaly detection. (3) Experiment 3 ( Figure 8 c) The results show that removing the gated unit leads to a decrease in accuracy. This shows that the gated unit achieves focused screening of key features by dynamically adjusting the feature channel weights, suppresses the interference of redundant information, and thus optimizes the feature expression ability of the model. (4) Experiment 4 ( Figure 8d) validates the effectiveness of the proposed anomaly scoring unit. This module quantifies the distribution difference between anomalous and normal samples, constructing a highly discriminative evaluation metric and providing a reliable saliency basis for anomaly localization. In summary, MAEU-GAN significantly improves anomaly detection performance in complex scenarios through the collaborative design of bidirectional feedback, WPSA attention, gating units, and anomaly scoring modules.
[0109] To deeply analyze the effectiveness of GAN fusion attention unit, the gate unit and abnormality discrimination unit are retained in the ablation experiment, and a detailed analysis of different attention mechanism combinations is carried out. The specific experimental settings are shown in Table 2.
[0110] Table 2 WPSA ablation experiment settings
[0111] Experiment number Wavelet transform PA SA 1 × √ √ 2 × √ × 3 × × √ 4 √ √ √
[0112] The results of the WPSA ablation experiment are as follows Figure 9 As shown above. The results of Experiment 1 above show that when the wavelet transform is not applied to the attention unit, the accuracy is 92.83%, which is lower than the accuracy of the full attention unit. This demonstrates that the wavelet transform, through discrete wavelet decomposition, can extract differentiated features in the multi-scale frequency domain, effectively enhancing the model's sensitivity to subtle texture anomalies. In Experiment 2, when only the positional attention mechanism (PA) is used, the model accuracy is 92.17%. This result shows that the positional attention mechanism plays a key role in extracting position-related features in the input data. By focusing on the weight distribution of different positions, the model is able to more effectively capture key fault-related information. However, compared with the full attention unit, the accuracy is slightly lower, indicating that relying solely on positional features may not be sufficient to fully capture complex detailed features. In Experiment 3, when only the spatial attention mechanism (SA) is used, the model accuracy is 91.78%. This shows that the spatial attention mechanism can effectively focus on the spatial information in the input data, improving the model's ability to perceive spatial anomaly features. However, the accuracy is still lower than that of the complete attention unit, indicating that a single spatial feature is limited by the limitations of spatial information when processing subtle texture anomalies.
[0113] In summary, WPSA significantly improves the model's diagnostic performance. The wavelet transform effectively enhances sensitivity to subtle texture anomalies by extracting differentiated features in the multi-scale frequency domain. The positional and spatial attention mechanisms, which focus on extracting positional and spatial features, respectively, further optimize the model's performance.
[0114] The results of these ablation experiments demonstrate that the combination of wavelet transform and attention mechanism significantly improves the model's diagnostic performance. The wavelet transform effectively enhances sensitivity to subtle texture anomalies by extracting differentiated features in the multi-scale frequency domain, while the positional and spatial attention mechanisms focus on extracting positional and spatial features, respectively. The synergistic effect of these two mechanisms further optimizes the model's performance. This demonstrates that combining multiple mechanisms can significantly improve the model's robustness and accuracy in complex fault diagnosis tasks.
[0115] To further verify the performance of the model, this experiment compared the method proposed in the present invention with mainstream networks such as lightweight CNN, HFCNN, and SeF-HRNet. As shown in Table 3, the method of this embodiment significantly outperforms other comparison models with an accuracy rate of 96.22%. In-depth analysis shows that by organically combining the generative adversarial network (GAN) with the multi-unit collaborative architecture, the model achieves better detection performance: the attention unit effectively enhances the ability to capture key features, the gating unit realizes dynamic optimization of information flow, and the anomaly discrimination unit significantly improves the model's sensitivity to abnormal samples.
[0116] Table 3 Comparative experimental results of anomaly detection with different models
[0117]
[0118] For abnormal fault data detected, Grad-CAM technology is first used to generate heat maps focusing on local detail features and global structural features. By calculating the intersection of the two, key fine-grained feature regions are accurately located. The resulting fine-grained feature region images are then fed into a pre-trained Swin Transformer model, which uses its hierarchical attention mechanism to extract and classify multi-scale features, ultimately outputting the fault detection results.
[0119] like Figure 10 As shown in the figure, the classification model demonstrated excellent predictive performance in all four categories, with overall stable and reliable performance. Specifically, the model's recognition capabilities for categories 0, 2, and 3 were particularly outstanding, achieving 100% accuracy for all three categories: all 50 samples in each category were correctly predicted, and no cases were misclassified into other categories. For the prediction of category 1, the model also maintained a high accuracy rate, with only three misclassifications, one of which was misclassified as category 0 and two as category 2. It is worth noting that all misclassification cases occurred between category 1 and other numerical categories, and did not involve the non-adjacent category 3. This performance shows that the model has a good ability to distinguish category features, especially when dealing with non-adjacent categories, showing an absolute advantage, while there are subtle discrimination errors in the boundary cases of adjacent numerical categories.
[0120] In order to systematically evaluate the fine-grained fault diagnosis model. During the test, the model simultaneously receives four types of feature inputs: original images based on anomaly detection, local detail area images, global structure area images, and fine-grained feature area images, and performs multi-level feature extraction and fusion classification through the Swin Transformer model; at the same time, in order to verify the effectiveness of feature expression, the fine-grained feature area is separately input into the ResNet50 network for comparative verification. All comparative experiments strictly maintain the same hardware environment, training parameters and test data sets to ensure the comparability and credibility of the results. The experimental results are as follows Figure 11 shown.
[0121] Analysis of radar chart data reveals that the GradCAM-based key region extraction method significantly improves the classification performance of the Swin Transformer model. Experiments show that when inputting fine-grained feature region images (i.e., the intersection of local detail and global structural features), the model achieves a state-of-the-art accuracy of 98.5% in classification tasks, with balanced performance across all metrics. In contrast, methods that directly input the original anomaly detection image exhibit significant limitations in feature representation. Notably, the model's performance exhibits input feature sensitivity: while evaluation metrics for either local detail regions or global structural regions alone outperform the original image input, they underperform the combined features of the two. This demonstrates that fine-grained feature regions more completely preserve key discriminative information in the image, facilitating the effective extraction and fusion of multi-level features. Given the same fine-grained feature input, the Swin Transformer demonstrates superior feature extraction capabilities compared to ResNet-50. Its hierarchical structure, based on a windowed attention mechanism, is more suitable for modeling the spatial correlation of fine-grained features, resulting in more accurate classification.
[0122] In order to systematically verify the effectiveness of the photovoltaic fault diagnosis model proposed in this study, a multi-dimensional comparative experiment was designed. As shown in Table 4, four mainstream methods, including DFB-SVM, semantic segmentation model, PCA-kNN, and IFD-FGIF, were selected as benchmark models for a horizontal comparative analysis from the perspective of diagnostic accuracy. Experimental data show that the fusion model of the fine-grained feature extraction module and the Swin Transformer architecture proposed in the embodiment of the present invention exhibits significant advantages: its average diagnostic accuracy reaches 98.5%. It can be concluded that the fault diagnosis model proposed in this paper not only breaks through the limitations of traditional methods in terms of feature expression capabilities, but also solves the problem that existing deep learning models do not pay enough attention to local detail features.
[0123] Table 4 Comparative experimental results of fault classification of different models
[0124]
[0125] Overall, the present invention is significantly superior to other general methods of traditional existing technologies in terms of detection accuracy, abnormal sensitivity and fault diagnosis capabilities, providing an innovative technical solution for intelligent monitoring and fault diagnosis of photovoltaic systems, and has broad application prospects and promotion potential.
[0126] Figure 12 This is a schematic diagram of the structure of a computer device disclosed in the present invention. Figure 12 As shown, the computer device 400 includes at least a memory 402 and a processor 401; the memory 402 is connected to the processor via a communication bus 403, and is used to store computer instructions executable by the processor 401, and the processor 401 is used to read computer instructions from the memory 402 to implement the steps of the method described in any of the above embodiments.
[0127] For the above-mentioned device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the partial description of the method embodiments. The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the disclosed solution. A person of ordinary skill in the art can understand and implement it without paying any creative work.
[0128] Computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media, and storage devices, including, for example, semiconductor memory devices (e.g., EPROM, EEPROM, and flash memory devices), magnetic disks (e.g., internal or removable), magneto-optical disks, and CD ROM and DVD-ROM disks. The processor and memory can be supplemented by, or incorporated in, special purpose logic circuitry.
[0129] Finally, it should be noted that although this specification contains many specific implementation details, these should not be interpreted as limiting the scope of any invention or the scope of what is claimed, but are primarily intended to describe the features of specific embodiments of a particular invention. Certain features described in multiple embodiments within this specification may also be implemented in combination in a single embodiment. On the other hand, various features described in a single embodiment may also be implemented separately in multiple embodiments or in any suitable sub-combination. In addition, although features may function in certain combinations as described above and may even be initially claimed as such, one or more features from a claimed combination may in some cases be removed from the combination, and a claimed combination may refer to a sub-combination or a variation of a sub-combination.
[0130] Similarly, although operations are depicted in a particular order in the accompanying drawings, this should not be understood as requiring that these operations be performed in the particular order shown or performed sequentially, or that all illustrated operations be performed to achieve the desired results. In some cases, multitasking and parallel processing may be advantageous. In addition, the separation of various system modules and components in the above-described embodiments should not be understood as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product, or packaged into multiple software products.
[0131] Thus, specific embodiments of the subject matter have been described. Other embodiments are within the scope of the following claims. In some cases, the actions recited in the claims can be performed in a different order and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the particular order shown or sequential sequence to achieve the desired results. In some implementations, multitasking and parallel processing may be advantageous.
[0132] The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present disclosure should be included in the scope of protection of the present disclosure.
Claims
1. A fault detection method based on multi-dimensional anomaly detection and dual-path fine-grained positioning, characterized in that: The steps include: Implement anomaly detection based on a multi-dimensional anomaly assessment unit and fault diagnosis based on a dual-path fine-grained feature localization structure for photovoltaic systems; The multidimensional anomaly assessment unit includes an attention unit, a gating unit, and an anomaly discrimination unit. The attention unit integrates discrete wavelet transform, inverse wavelet transform, and position-space attention mechanism. The position-space attention mechanism is realized by designing a parallel computing structure of position attention PA and spatial attention SA by the discriminator feature difference. The fault diagnosis method of the dual-path fine-grained feature positioning structure includes constructing local detail areas and global structure areas, locating key areas through intersection operations, and introducing a pre-trained model to extract hierarchical multi-scale features.
2. The fault detection method according to claim 1, characterized in that: During the anomaly detection process of the multidimensional anomaly assessment unit, a bidirectional closed-loop feedback mechanism is adopted, in which one feedback mechanism path is the anomaly score fused with the generator reconstruction residual and the discriminator feature difference. The gradient backpropagation of the loss function drives the gating unit to dynamically adjust the feature channel weight. The other feedback mechanism path is the adjustment of the position attention PA, spatial attention SA and wavelet branch proportional coefficient by the discriminator feature difference.
3. The fault detection method according to claim 2, characterized in that: One of the feedback mechanism paths is the abnormal score of the fusion of the generator reconstruction residual and the discriminator feature difference. Through the back propagation of the gradient of the loss function, the gate control unit is driven to dynamically adjust the feature channel weight. The gate weight W gate The adjustment of depends on the gradient of the anomaly score S obtained by the anomaly discrimination unit, and its formula is: is the partial derivative of the loss with respect to the anomaly score, if Indicates that the current abnormal score S is too high. Indicates that the current anomaly score S is too low. It is the partial derivative of the anomaly score S with respect to the gated feature Gated, which is used to quantify the influence of each channel in the gated feature Gated on the anomaly score S. Gated is the weight of the gated feature W gate The partial derivative of W is used to measure gate The magnitude of the impact of the change on the gating feature Gated.
4. The fault detection method according to claim 3, characterized in that: Another feedback mechanism path is the process of adjusting the position attention PA, spatial attention SA and wavelet branch scale coefficients by the discriminator feature difference. The outputs of PA and SA are: F PA =F in ⊙M PA (2) F SA =F in ⊙M SA (3) Among them F in is the input feature, M PA is the position attention map, M SA is the spatial attention map, ⊙ is the element-wise multiplication; Discrimination Device characteristic difference △D feat The feedback to PA and SA is as shown in formulas (4) and (5): In the formula is the sensitivity of the loss to the discriminator feature differences, is the sensitivity of the characteristic difference to the PA output, To represent the attention map M PA The impact of changes in the PA module output; The attention unit divides the input features into the original domain branch ratio 1-β and the wavelet domain branch ratio β. The feedback mechanism analyzes the contribution of each sub-band to the anomaly score and dynamically adjusts the β value as shown in formula (6): b (t+1) =b (t) +γ·△β (6) Where β (t) is the wavelet branch proportional coefficient at the current moment, β (t+1) is the wavelet branch proportional coefficient at the next moment, that is, the value adjusted according to the feedback, γ is the learning rate, which is used to control the amplitude of each adjustment, and △β is the adjustment amount of the wavelet branch proportional coefficient, which is calculated based on the gradient contribution of the high-frequency subband.
5. The fault detection method according to claim 1, characterized in that: The method for constructing local detail regions includes: generating a heat map through back-propagation gradient weighting, combining dynamic threshold segmentation with morphological contour analysis, and achieving parallel positioning of multiple defect regions in a single heat map. Multiple circular local detection regions are located in parallel in a single heat map, specifically expressed as: in represents the center coordinate of the i-th local area, Indicates its radius.
6. The fault detection method according to claim 5, characterized in that: The method of constructing the global structure area is to locate the key area based on the deep features, and the formula is expressed as: G=(g x ,g y ,g r ) (8) where g x ,g y is the center coordinate of the global circular area, g r is the radius.
7. The fault detection method according to claim 6, characterized in that: The method of locating key areas by intersection operation and introducing pre-training model to extract hierarchical multi-scale features includes: finding L with the largest geometric intersection with G i , for each local area L i , the Euclidean distance between the center of the circle and the global structure area is expressed as: According to the distance d i The relationship with the radius divides the relative positions between areas into the following three cases: When the Euclidean distance between the center points of the circles is greater than the sum of the radii, the local area will not participate in the selection of the final key area. When the Euclidean distance between the center points of the circles is less than or equal to the sum of the radii, the area of the smaller circle is taken. When the two circles intersect, the intersection area A i Calculated as: To sum up, its fine-grained feature area S is: After locating the key areas, the pre-trained Swin Transformer is used to extract hierarchical multi-scale features, and the final classification optimization is achieved through feature fusion and collaborative optimization of the classifier.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the fault detection method according to any one of claims 1 to 7 are executed.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the fault detection method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Method for monitoring abnormal state of automobile air conditioner controller based on multi-modal data fusion
CN121187263A
Cell sheet layer quantitative loading method and device
CN121427665A