Distributed photovoltaic fault detection method and device based on deep learning

A distributed photovoltaic fault detection method trained in the cloud and inferred in real time on edge devices, combined with an improved goat optimization algorithm and feature fusion technology, solves the problems of insufficient detection accuracy and excessive resource consumption on edge devices, and achieves efficient and real-time fault detection.

CN122153671APending Publication Date: 2026-06-05CHENGDU LINGDIAN INFORMATION TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHENGDU LINGDIAN INFORMATION TECHNOLOGY CO LTD
Filing Date
2026-03-02
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

In existing technologies, fault detection models for distributed photovoltaic power stations suffer from insufficient detection accuracy or excessive resource consumption when running on edge devices, making it difficult to maintain high accuracy and lightweight design under the constraints of edge computing resources.

Method used

A deep learning-based distributed photovoltaic fault detection method is adopted, which uses cloud servers for model training and deployment, and combines an improved goat optimization algorithm for real-time inference on the edge gateway. By fusing temporal features and image features and using an irradiance-power decoupling module, the influence of environmental factors is eliminated, and the detection accuracy is improved by using a spatiotemporal cross-modal alignment module.

Benefits of technology

It achieves high-precision real-time fault detection on edge devices, reduces network bandwidth pressure, improves the real-time performance and interpretability of detection, and solves the problem of low efficiency in traditional hyperparameter search.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122153671A_ABST
    Figure CN122153671A_ABST
Patent Text Reader

Abstract

The application discloses a kind of distributed photovoltaic fault detection method and device based on deep learning, and it is related to fault detection technical field.The method comprises: in cloud server, using deep learning algorithm, and introducing improved goat optimization algorithm, construct photovoltaic fault detection model, and photovoltaic fault detection model is deployed to the edge gateway of several photovoltaic power stations connected in a distributed manner;In edge gateway, the real-time operation data of photovoltaic power station is collected, and the real-time operation data is input into photovoltaic fault detection model, photovoltaic fault detection is carried out, real-time photovoltaic fault detection result is obtained, and is uploaded to cloud server.The application solves the problems of low model hyperparameter optimization efficiency, high edge side resource occupation and insufficient detection accuracy in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of fault detection technology, and in particular to a method and apparatus for detecting distributed photovoltaic faults based on deep learning. Background Technology

[0002] With the widespread application of distributed photovoltaic (PV) power plants, their operation and maintenance difficulties and costs are increasing. Traditional manual inspection methods are inefficient and cannot meet the real-time monitoring needs of massive distributed sites. In recent years, fault detection technology based on deep learning has gradually become a research hotspot. However, traditional deep learning models are usually trained and inferred centrally in the cloud, which puts a heavy strain on network bandwidth and results in high response latency when faced with massive amounts of real-time data. In addition, existing deep learning model hyperparameters (such as learning rate, batch size, number of network layers, etc.) usually rely on manual experience to perform grid search or random search, which is not only inefficient but also difficult to find the global optimum. This leads to problems such as insufficient detection accuracy or excessive model size and resource consumption when the model is running on edge devices, making it difficult to meet the requirements of "lightweight" and "high accuracy" on the edge side. Therefore, how to construct a distributed PV fault detection method that can adapt to the limitations of edge computing resources while maintaining high detection accuracy is a technical problem that urgently needs to be solved. Summary of the Invention

[0003] This invention provides a distributed photovoltaic fault detection method and device based on deep learning, which solves the problems of low efficiency in model hyperparameter optimization, high resource consumption on the edge side, and insufficient detection accuracy in the existing technology.

[0004] In a first aspect, embodiments of the present invention provide a distributed photovoltaic fault detection method based on deep learning, the method comprising: On a cloud server, a photovoltaic fault detection model is constructed using deep learning algorithms and an improved goat optimization algorithm. The photovoltaic fault detection model is then deployed to the edge gateways of several distributed photovoltaic power plants. At the edge gateway, real-time operating data of the photovoltaic power station is collected and input into the photovoltaic fault detection model to perform photovoltaic fault detection, obtain real-time photovoltaic fault detection results, and upload them to the cloud server.

[0005] The technical solution provided in this application has at least the following beneficial effects: By fully leveraging the high-performance computing capabilities of cloud servers for model training and full lifecycle management, and using edge gateways for local real-time inference, network bandwidth pressure is reduced and the real-time performance of fault detection is improved. Addressing the low efficiency of traditional hyperparameter search, an improved goat optimization algorithm is introduced. Through convergence factors, gray wolf collaboration, and the Levy flight mechanism, the algorithm effectively solves the problems of easily getting trapped in local optima and slow convergence speed, automatically finding globally optimal hyperparameters that balance "detection accuracy" and "model lightweighting" in complex solution spaces. During the optimization process, a surrogate model based on the lightweight GBDT algorithm is introduced, and high-quality training samples are generated through Latin hypercube sampling, avoiding time-consuming deep learning model training in each iteration and significantly improving hyperparameter optimization efficiency. The photovoltaic fault detection model adopts a dual-branch structure that fuses temporal and image features, combined with an irradiance-power decoupling module, eliminating the influence of environmental factors on electrical parameters. Simultaneously, a spatiotemporal cross-modal alignment module is used to establish the correspondence between temporal anomalies and image regions, significantly improving the accuracy and interpretability of fault detection.

[0006] In one alternative implementation, a photovoltaic fault detection model is constructed on a cloud server using a deep learning algorithm and incorporating an improved goat optimization algorithm. This model is then deployed to the edge gateways of several distributed photovoltaic power plants, including: On the cloud server, we obtain historical operating data from different photovoltaic power plants, clean, normalize, and label the historical operating data to obtain a model sample set. An initial photovoltaic fault detection model was constructed using deep learning algorithms. An improved goat optimization algorithm is used to iteratively optimize the hyperparameters of the initial photovoltaic fault detection model to obtain the optimal hyperparameters. Based on the model sample set, the hyperparameters of the initial photovoltaic fault detection model are adjusted according to the optimal hyperparameters to obtain the final photovoltaic fault detection model. Extract the model metadata of the final photovoltaic fault detection model and send the model metadata to the edge gateways of several distributed photovoltaic power plants; At the edge gateway, the model is reconstructed based on the model metadata to obtain the reconstructed photovoltaic fault detection model, thus completing the deployment of the photovoltaic fault detection model.

[0007] In one alternative implementation, the operational data includes timing electrical data and image data, wherein the timing electrical data includes DC voltage, DC current, AC power, component backplane temperature, and ambient irradiance.

[0008] In one optional implementation, the photovoltaic fault detection model includes an input layer, a time-series feature extraction module, an irradiance-power decoupling module, an image feature extraction module, a spatiotemporal cross-modal alignment module, and an output layer.

[0009] In one alternative implementation, an improved goat optimization algorithm is used to iteratively optimize the hyperparameters of the initial photovoltaic fault detection model to obtain the optimal hyperparameters, including: The improved goat optimization algorithm is set as a multi-objective optimization function, and the hyperparameters of the initial photovoltaic fault detection model are encoded as the position vector of the improved goat optimization algorithm. Based on the prediction target parameters and hyperparameters of the fitness function, a surrogate model for fitness function computation is constructed using a lightweight algorithm. The chaotic sequence is generated using the Logistic mapping and then mapped to the solution space of the improved goat optimization algorithm to obtain the initial goat population. Based on the surrogate model, the fitness function is used to calculate the fitness value of the candidate hyperparameters for each initial goat in the initial goat population, and the individual with the best fitness is selected as the optimal individual. Based on the fitness value, a convergence factor, the gray wolf cooperative idea, and the Levy flight mechanism are introduced to update the position of the initial goat population, resulting in an updated goat population. Based on the surrogate model, the fitness function is used to calculate the fitness value of the candidate hyperparameters for each updated goat in the updated goat population, and the individual with the best fitness is updated as the best individual. Repeat the position update step until the current iteration count reaches the iteration count threshold or the fitness value of the best individual meets the requirements. Then, end the position update and decode the position vector of the best individual to obtain the optimal hyperparameters.

[0010] In one alternative implementation, the fitness function is formulated as follows: In the formula, For goats X The fitness values ​​of the corresponding alternative hyperparameters; For goats X The fault classification error rate of the corresponding alternative hyperparameters; For goats X The corresponding alternative hyperparameters affect the model complexity output by the surrogate model; For fitness weights; X Let be a goat variable, and its position vector be a hyperparameter. In the formula, For goatsX The corresponding alternative hyperparameters are reflected in the predicted classification accuracy of the surrogate model output; In the formula, For goats X The corresponding alternative hyperparameters are the total number of parameters in the prediction model output by the surrogate model; This is the preset maximum number of model parameters; For goats X The corresponding alternative hyperparameters are the number of predicted floating-point operations in the surrogate model output; This is the preset maximum number of floating-point operations; Weights for model complexity; In one alternative implementation, a surrogate model for fitness function computation is constructed using a lightweight algorithm based on the predicted target parameters and hyperparameters of the fitness function, including: The Latin hypercube sampling method is used to randomly sample several hyperparameters in the solution space of the hyperparameters. Each hyperparameter sample is loaded into the initial photovoltaic fault detection model, input into the model sample set for short-term pre-training, and the true classification accuracy, the total number of true model parameters, and the number of true floating-point operations are calculated on the validation set. By integrating several hyperparameter samples, the corresponding true classification accuracy, the total number of true model parameters, and the number of true floating-point operations, a surrogate sample set is obtained. A lightweight GBDT algorithm is used to construct an initial surrogate model. The input of the surrogate model is hyperparameters, and the output is the prediction classification accuracy, the total number of prediction model parameters, and the number of prediction floating-point operations. The proxy sample set is input into the initial proxy model for training, resulting in the final proxy model with the fitness function calculated.

[0011] In one alternative implementation, based on the model sample set and according to the optimal hyperparameters, the hyperparameters of the initial photovoltaic fault detection model are adjusted to obtain the final photovoltaic fault detection model, including: Based on the optimal hyperparameters, the hyperparameters of the initial photovoltaic fault detection model are adjusted, and the model sample set is input for fine-tuning training to obtain an optimized photovoltaic fault detection model. The loss value of the optimized photovoltaic fault detection model is calculated using a pre-defined loss function. If the loss value is less than the loss threshold, the optimized photovoltaic fault detection model will be output as the final photovoltaic fault detection model; otherwise, a new round of fine-tuning training will be carried out.

[0012] In one optional implementation, at the edge gateway, real-time operating data of the photovoltaic power station is collected and input into the photovoltaic fault detection model for photovoltaic fault detection. Real-time photovoltaic fault detection results are obtained and uploaded to the cloud server, including: At the edge gateway, real-time operation data of the photovoltaic power station is collected and preprocessed to obtain preprocessed real-time operation data, which includes preprocessed time-series electrical data and preprocessed image data. The input layer of the photovoltaic fault detection model receives preprocessed real-time running data. The time-series feature extraction module of the photovoltaic fault detection model is used to extract the actual observation features of the preprocessed time-series electrical data; Based on the preprocessed component backsheet temperature and preprocessed ambient irradiance in the preprocessed time-series electrical data, the irradiance-power decoupling module of the photovoltaic fault detection model is used to predict the corresponding theoretical normal state characteristics, and the difference between the actual observed characteristics and the theoretical normal state characteristics is used as the real-time time-series characteristics. The image feature extraction module of the photovoltaic fault detection model is used to extract real-time image features from the preprocessed image data. Using real-time temporal features as query vectors and flattened real-time image features as key and value vectors, the multi-head attention mechanism of the spatiotemporal cross-modal alignment module of the photovoltaic fault detection model is used to calculate the correspondence of temporal anomalies in the image space and output the fused global feature vector. Based on the global feature vector, the output layer of the photovoltaic fault detection model is used to call the Softmax classification function to generate real-time photovoltaic fault detection results; Real-time photovoltaic fault detection results are uploaded to the cloud server through a pre-built encrypted secure channel.

[0013] Secondly, embodiments of the present invention provide a deep learning-based distributed photovoltaic fault detection device for implementing a distributed photovoltaic fault detection method. The device includes: The model building unit is used on a cloud server to build a photovoltaic fault detection model using deep learning algorithms and an improved goat optimization algorithm, and then deploys the photovoltaic fault detection model to the edge gateways of several distributed photovoltaic power plants. The photovoltaic fault detection unit is used to collect real-time operating data of the photovoltaic power station at the edge gateway, input the real-time operating data into the photovoltaic fault detection model, perform photovoltaic fault detection, obtain real-time photovoltaic fault detection results, and upload them to the cloud server.

[0014] A third aspect of this invention provides an electronic device, which includes: At least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by at least one processor, such that the at least one processor can perform the method proposed in the first aspect of the present invention.

[0015] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as described in the first aspect of the present invention. Attached Figure Description

[0016] Figure 1 This is a schematic diagram of the electronic device structure of the hardware operating environment involved in the embodiments of the present invention; Figure 2 This is a flowchart illustrating the steps of a distributed photovoltaic fault detection method based on deep learning, as provided in an embodiment of the present invention. Figure 3 This is a functional unit diagram of a distributed photovoltaic fault detection device based on deep learning provided in an embodiment of the present invention. Detailed Implementation

[0017] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0018] The present invention will be further described below with reference to the accompanying drawings.

[0019] Reference Figure 1 , Figure 1 This is a schematic diagram of the electronic device structure of the hardware operating environment involved in the embodiments of the present invention.

[0020] like Figure 1As shown, the electronic device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen or an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be a high-speed random access memory (RAM) or a stable non-volatile memory (NVM), such as a disk drive. The memory 1005 may also optionally be a storage device independent of the aforementioned processor 1001.

[0021] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0022] like Figure 1 As shown, the memory 1005, which serves as a storage medium, may include an operating system, a data storage module, a network communication module, a user interface module, and an electronic program for a deep learning-based distributed photovoltaic fault detection device.

[0023] exist Figure 1 In the electronic device shown, the network interface 1004 is mainly used for distributed photovoltaic fault detection with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the electronic device of the present invention can be set in the electronic device. The electronic device calls the electronic program of the deep learning-based distributed photovoltaic fault detection device stored in the memory 1005 through the processor 1001 and executes the deep learning-based distributed photovoltaic fault detection method provided in the embodiment of the present invention.

[0024] Reference Figure 2 The present invention provides a deep learning-based distributed photovoltaic fault detection method, the method comprising: S201: On a cloud server, using deep learning algorithms and introducing an improved goat optimization algorithm, a photovoltaic fault detection model is constructed, and the photovoltaic fault detection model is deployed to the edge gateways of several distributed photovoltaic power stations. It is worth noting that the cloud server is equipped with a high-performance graphics processing unit (GPU) cluster and a distributed storage system to process massive amounts of historical running data. The cloud is responsible for the entire lifecycle management of the model, including data cleaning, model training, hyperparameter optimization, model evaluation, and version control. Edge gateways are deployed at various photovoltaic power plant sites. They are typically based on ARM architecture or embedded GPU platforms and have limited computing resources and storage space, used to perform real-time data acquisition and model inference. Traditional deep learning model hyperparameters (such as learning rate, batch size, number of convolutional kernels, number of network layers, etc.) usually rely on human experience to perform grid search or random search. This is not only inefficient, but also difficult to find the global optimum, which may lead to insufficient accuracy or excessive resource consumption when the model is running on edge devices. This embodiment introduces an improved goat optimization algorithm and improves it to address its shortcomings such as being prone to getting trapped in local optima and having a slow convergence speed. It is specifically designed to automatically find a set of optimal hyperparameters that balance "detection accuracy" and "model lightweighting" in a complex solution space. S202: At the edge gateway, real-time operating data of the photovoltaic power station is collected and input into the photovoltaic fault detection model to perform photovoltaic fault detection, obtain real-time photovoltaic fault detection results, and upload them to the cloud server.

[0025] The technical solution provided in this application has at least the following beneficial effects: By fully leveraging the high-performance computing capabilities of cloud servers for model training and full lifecycle management, and using edge gateways for local real-time inference, network bandwidth pressure is reduced and the real-time performance of fault detection is improved. Addressing the low efficiency of traditional hyperparameter search, an improved goat optimization algorithm is introduced. Through convergence factors, gray wolf collaboration, and the Levy flight mechanism, the algorithm effectively solves the problems of easily getting trapped in local optima and slow convergence speed, automatically finding globally optimal hyperparameters that balance "detection accuracy" and "model lightweighting" in complex solution spaces. During the optimization process, a surrogate model based on the lightweight GBDT algorithm is introduced, and high-quality training samples are generated through Latin hypercube sampling, avoiding time-consuming deep learning model training in each iteration and significantly improving hyperparameter optimization efficiency. The photovoltaic fault detection model adopts a dual-branch structure that fuses temporal and image features, combined with an irradiance-power decoupling module, eliminating the influence of environmental factors on electrical parameters. Simultaneously, a spatiotemporal cross-modal alignment module is used to establish the correspondence between temporal anomalies and image regions, significantly improving the accuracy and interpretability of fault detection.

[0026] In one alternative implementation, a photovoltaic fault detection model is constructed on a cloud server using a deep learning algorithm and incorporating an improved goat optimization algorithm. This model is then deployed to the edge gateways of several distributed photovoltaic power plants, including: S2011: On the cloud server, obtain some historical operating data of different photovoltaic power plants, clean, normalize and label the historical operating data to obtain the model sample set; In this embodiment, the operating data includes time-series electrical data and image data. The time-series electrical data includes DC voltage, DC current, AC power, component backplane temperature, and ambient irradiance. Data source and acquisition: Historical operating data includes, but is not limited to: electrical parameters at the second or minute level collected by the data acquisition and monitoring control system, hot spot images of components captured by infrared thermal imagers, and appearance images of components captured by ordinary RGB cameras; Data acquisition needs to cover photovoltaic power plants in different seasons, time periods (morning, noon, and evening), weather conditions (sunny, cloudy, and rainy), and geographical locations to ensure sample diversity; Data cleaning: Missing value handling: Use interpolation methods (such as linear interpolation or Lagrange interpolation) to fill in short-term data missingness caused by communication failures; if the missing time is too long, directly remove the data for that period. Outlier handling: Identify and remove obviously physically unreasonable data caused by sensor malfunctions (such as negative irradiance or current exceeding the rated value) based on the 3σ principle or box plot method. Denoising: Wavelet transform or moving average methods are used to smooth electrical signals and eliminate high-frequency noise interference; Data normalization: For time-series electrical data (voltage, current, power, etc.), Min-Max normalization or Z-Score standardization is used to map the data to [0, 1] or the standard normal distribution interval, eliminating dimensional differences and accelerating model convergence; For image data, pixel values ​​are normalized to the range of [0, 1] and then resized to a uniform size (e.g., 224x224 pixels). Data annotation: Fault label definition: The definition includes categories such as "normal operation", "short circuit fault", "open circuit fault", "shading", "component aging / crack", and "hot spot fault". Labeling process: Historical data is labeled by combining operation and maintenance records, expert experience and image recognition technology; for example, when electrical parameters drop abnormally at a certain moment and the corresponding image shows trees obstructing the view, it is labeled as "shading". S2012: Using deep learning algorithms, construct an initial photovoltaic fault detection model; In this embodiment, the photovoltaic fault detection model includes an input layer, a time-series feature extraction module, an irradiance-power decoupling module, an image feature extraction module, a spatiotemporal cross-modal alignment module, and an output layer. Overall model architecture design: The initial model adopts a multi-branch fusion deep neural network structure, which includes two main input branches: a temporal branch (processing electrical data) and an image branch (processing visual data). Temporal feature extraction module: A bidirectional long short-term memory (Bi-LSTM) network is used to capture the dynamic dependence of parameters such as voltage and current on time during photovoltaic power generation. The input of this module is a preprocessed sequence of time-series electrical vectors, and the output is a high-dimensional feature vector containing time context information. Image feature extraction module: It employs lightweight convolutional neural networks, such as MobileNetV3, ShuffleNetV2, or custom convolutional neural networks (CNNs) built with depthwise separable convolutions, aiming to reduce the computational cost of the model and adapt to edge devices; this module is responsible for extracting visual features such as texture, color, and temperature distribution from RGB or infrared images; Other key modules: The initial architecture reserves interfaces for the irradiance-power decoupling module and the spatiotemporal cross-modal alignment module, but the specific parameters inside (such as the number of attention heads and the dimension of hidden layers) are undetermined or randomly initialized at this time, and await subsequent optimization. S2013: Using an improved goat optimization algorithm, the hyperparameters of the initial photovoltaic fault detection model are iteratively optimized to obtain the optimal hyperparameters; In this embodiment, the hyperparameters to be optimized include, but are not limited to, the number of LSTM layers, the learning rate, the Dropout rate, and the number of CNN convolutional kernels. S2014: Based on the model sample set, the hyperparameters of the initial photovoltaic fault detection model are adjusted according to the optimal hyperparameters to obtain the final photovoltaic fault detection model. S2015: Extract the model metadata of the final photovoltaic fault detection model and send the model metadata to the edge gateways of several distributed photovoltaic power plants; In this embodiment, the model metadata is defined as follows: Metadata includes not only the model's weight file, but also: model structure description file (such as JSON or Protobuf format, which defines the connection relationship between layers), input and output tensor definitions, preprocessing parameters (normalized mean and variance), model version number, checksum, etc. Model compression and serialization: To accommodate the limited network bandwidth and storage space at the edge, the model can be quantized (e.g., quantized from a 32-bit floating-point number to an 8-bit integer) and pruned before transmission. The processed model files are serialized into a common exchange format, such as OpenNeural Network Exchange (ONNX) or TensorFlow Lite, to ensure cross-platform compatibility. Secure distribution mechanism: The cloud server pushes metadata packets to the designated edge gateway via message queues (such as MQTT) or HTTPS protocols; The transmission process uses a TLS / SSL encrypted channel to prevent the model from being tampered with or stolen; After receiving the file, the edge gateway verifies its integrity using a checksum and confirms the version number, deciding whether to overwrite the old model or store it in parallel. S2016: At the edge gateway, the model is reconstructed based on the model metadata to obtain the reconstructed photovoltaic fault detection model, thus completing the deployment of the photovoltaic fault detection model; In this embodiment, Model parsing and loading: The edge gateway runs a lightweight inference engine (such as TensorFlow Lite, TensorRT, ONNXRuntime); the inference engine reads the received model structure file and weight data, and reconstructs the computation graph of the neural network in the memory of the edge device; Hardware-accelerated mapping: If the edge gateway is equipped with a Neural-network Processing Unit (NPU) or other AI acceleration chips, the inference engine will map operators (convolution, fully connected, etc.) in the computation graph to the hardware acceleration interface to improve inference speed. Deployment verification: After the model is loaded, the system automatically inputs a set of preset test data and runs the inference process; If the inference results are compared with the expected results and are within the allowable error range, the model status is marked as "online / running" and it officially begins to receive real-time data for testing; if the verification fails, it is rolled back to the previous version of the model and an alarm is reported to the cloud.

[0027] In one alternative implementation, an improved goat optimization algorithm is used to iteratively optimize the hyperparameters of the initial photovoltaic fault detection model to obtain the optimal hyperparameters, including: S20131: Set the multi-objective optimization function of the improved goat optimization algorithm as the fitness function, and encode the hyperparameters of the initial photovoltaic fault detection model into the position vector of the improved goat optimization algorithm; The formula for the fitness function is: In the formula, For goats X The fitness values ​​of the corresponding alternative hyperparameters; For goats X The fault classification error rate of the corresponding alternative hyperparameters; For goats X The corresponding alternative hyperparameters affect the model complexity output by the surrogate model; For fitness weights; X Let be a goat variable, and its position vector be a hyperparameter. In the formula, For goats X The corresponding alternative hyperparameters are reflected in the predicted classification accuracy of the surrogate model output; In the formula, For goats X The corresponding alternative hyperparameters are the total number of parameters in the prediction model output by the surrogate model; This is the preset maximum number of model parameters; For goats X The corresponding alternative hyperparameters are the number of predicted floating-point operations in the surrogate model output; This is the preset maximum number of floating-point operations; Weights for model complexity; S20132: Based on the predicted target parameters and hyperparameters of the fitness function, a surrogate model for fitness function calculation is constructed using a lightweight algorithm; S20133: Use Logistic mapping to generate chaotic sequences, and map the chaotic sequences to the solution space of the improved goat optimization algorithm to obtain the initial goat population; The formula is: In the formula, For the first n+ 1. n One chaotic variable; This is the stability coefficient, typically 4; nFor chaotic variable indicators; In the formula, For the initial goat population i The first goat; For the first i One chaotic variable; These are the upper and lower bounds of the search space; For goat indicator quantity; S20134: Based on the surrogate model, using the fitness function, calculate the fitness value of the candidate hyperparameters corresponding to each initial goat in the initial goat population, and take the individual with the best fitness as the optimal individual. S20135: Based on the fitness value, the convergence factor, the gray wolf cooperative idea, and the Levy flight mechanism are introduced to update the position of the initial goat population and obtain the updated goat population. In this embodiment, random numbers for ascending are generated randomly. ,like Performing acts of climbing at height, including: Based on the cooperative model of gray wolves, the top three most fit goats in the initial goat population are designated as Alpha, Beta, and Delta goats. The initial goat population is then updated based on these three groups using the following formula: In the formula, For the first t+ 1, t The execution of the climbing action in the next iteration yields the first... i A newer goat, in the initial iteration, The initial goat; For the first t Total step size for each iteration; For Alpha goats, Beta goats, and Delta goats; Weighting of step length for ascent; t This represents the current iteration number; In the formula, For the updated goats Distance to Alpha goats, Beta goats, and Delta goats; For the first t The next iteration includes Alpha goats, Beta goats, and Delta goats; Enclosing factor; C As an attack factor; The convergence factor; A random number between [0, 1]; In the formula, This represents the maximum number of iterations. , To adjust the parameters; It is the hyperbolic tangent function; This represents the maximum value of the convergence factor. This represents the minimum convergence factor. like Performing foraging behaviors, including: In the formula, For the first t+ The execution of foraging behavior in the first iteration yields the first... i A newer goat; This is the step size parameter; These are random numbers distributed according to a standard normal distribution. A random number between [0, 1]; If a goat's fitness does not improve for several generations, the Levy flight mechanism is triggered, with the following formula: In the formula, For the first t+ The execution of Levy's flight in the first iteration yields the first... i A newer goat; for Levy Distributed random numbers; b for Levy Step length, and b ∈[1,2]; For flight control step size; S20136: Based on the surrogate model, using the fitness function, calculate the fitness value of the candidate hyperparameters for each updated goat in the updated goat population, and update the individual with the best fitness as the best individual; S20137: Repeat the position update step until the current iteration count reaches the iteration count threshold or the fitness value of the best individual meets the requirements, then end the position update and decode the position vector of the best individual to obtain the optimal hyperparameters.

[0028] In one alternative implementation, a surrogate model for fitness function computation is constructed using a lightweight algorithm based on the predicted target parameters and hyperparameters of the fitness function, including: S201321: Using the Latin hypercube sampling method, a number of hyperparameter samples are randomly selected from the solution space of the hyperparameters. In this embodiment, the solution space is defined as follows: First, the range of values ​​for the hyperparameters to be optimized (the solution space) is defined; for example, the learning rate ∈ [1...]. e −5 ,1 e −2 The number of hidden units in LSTM is ∈ [64, 512], the number of convolutional kernels in CNN is ∈ [16, 128], the dropout ratio D is ∈ [0.1, 0.5], etc.; each hyperparameter dimension is treated as an independent coordinate axis; Hierarchical sampling principle: The Latin hypercube sampling method is a "fill-the-space" sampling strategy; assuming that several samples need to be extracted, the algorithm first divides the value range of each hyperparameter dimension into several equally spaced, non-overlapping sub-intervals. Random pairing: In each dimension, a point is independently and randomly selected to be located in each sub-interval; then, the points in different dimensions are combined by random arrangement to ensure that in the multidimensional space of the hyperparameter, only one sample point falls in each sub-interval on any one-dimensional projection. Compared to simple Monte Carlo random sampling, the Latin hypercube sampling method can cover the entire high-dimensional hyperparameter solution space more uniformly and comprehensively with a very small number of samples, thereby ensuring that the dataset required to build the surrogate model has good representativeness and orthogonality, avoiding sampling blind spots, and improving the robustness of the surrogate model to predict unknown regions. S201322: Load each hyperparameter sample into the initial photovoltaic fault detection model, input the model sample set for short-term pre-training, and calculate the true classification accuracy, the total number of true model parameters, and the number of true floating-point operations on the validation set. In this embodiment, model configuration loading: for each hyperparameter sample generated in S201321, the cloud server dynamically modifies the network structure configuration file and trainer configuration of the initial photovoltaic fault detection model; Short-cycle pre-training (evaluation training): To reduce the time cost of building the surrogate model, instead of performing full convergence training (which typically requires hundreds of epochs), a rapid pre-training with a set number of epochs (e.g., 10-20 epochs) is performed. The training data uses a small subset randomly selected from the model sample set, rather than the full dataset. During this process, the trend of the loss value decrease curve on the validation set is monitored, and intermediate results obtained in advance (such as the average accuracy of the first 5 epochs) are used as an approximate indicator of the potential performance of the hyperparameter set. Since the quality of hyperparameters is usually apparent in the early stages of training (e.g., unreasonable hyperparameters can cause the loss to increase or oscillate instead of decrease), short-cycle pre-training is sufficient to distinguish the quality of hyperparameters. S201323: Integrate several hyperparameter samples, the corresponding true classification accuracy, the total number of true model parameters, and the number of true floating-point operations to obtain a proxy sample set; In this embodiment, data cleaning and normalization are performed as follows: Before integration, the acquired data is cleaned as necessary; for example, invalid samples that cause NaN (non-numerical) overflow during training due to extreme parameter settings are removed; and numerical target variables (such as accuracy and number of parameters) are normalized using Min-Max to eliminate the influence of different units on subsequent model training. Dataset partitioning: The integrated complete sample dataset is divided into a training set and a test set (e.g., in a 9:1 ratio); the training set is used to train the surrogate model, and the test set is used to verify the fitting accuracy of the surrogate model itself; Proxy sample set structure: The final generated proxy sample set is a structured dataset with input features as hyperparameter vectors and output labels as target fitness parameter vectors; this dataset will serve as a "textbook" for subsequent learning algorithms; S201324: Use the lightweight Gradient Boosting Decision Tree (GBDT) algorithm to construct an initial surrogate model. The input of the surrogate model is the hyperparameters, and the output is the prediction classification accuracy, the total number of prediction model parameters, and the number of prediction floating-point operations. In this embodiment, the GBDT algorithm is a machine learning algorithm based on ensemble learning. Compared with neural networks, GBDT has extremely high training efficiency when processing tabular data (hyperparameters are typical tabular data), strong robustness to outliers, and good generalization ability under small sample conditions, making it very suitable as a surrogate model. Multi-output task processing architecture: Since it is necessary to simultaneously predict three objectives—accuracy, number of parameters, and computational cost—the initial surrogate model constructed in this step adopts the following architecture: Multi-task GBDT architecture: Modify the objective function of GBDT to simultaneously optimize the weighted sum of loss functions for three objectives and output three predicted values ​​at once; Model initialization: Set the basic hyperparameters of GBDT, such as setting the maximum tree depth (Depth) to 6-8 (to prevent overfitting), the learning rate (Learning Rate) to 0.1, and the number of iterations (N_Estimators) to 100-500, to build an untrained initial surrogate model framework; S201325: Input the agent sample set into the initial agent model for training to obtain the final agent model with fitness function calculation; In this embodiment, the training process is as follows: the training portion of the agent sample set divided in S201323 is input into the initial agent model; the GBDT algorithm fits the residual (negative gradient) of the previous iteration by iteratively adding decision trees. Loss function optimization: For the classification accuracy branch, mean squared error or Log-Cosh loss function is used for regression fitting; for the parameter quantity and computational quantity branches, since they usually have a non-linear but deterministic relationship with hyperparameters, mean squared error loss function is also used; by minimizing these loss functions, the algorithm continuously adjusts the structure of the decision tree and the weights of the leaf nodes, thereby learning the high-dimensional non-linear mapping relationship from the hyperparameter space to the model performance space. Model Validation and Saving: After training, the surrogate model is evaluated using a reserved test set. If the prediction error (such as root mean square error) is less than a preset threshold (e.g., accuracy prediction error <1%), the surrogate model is considered to have fit successfully. The trained surrogate model (including model structure parameters and internal decision tree rules) is serialized and saved as a core component for fitness function calculation. Application: In the subsequent optimization process of the improved goat optimization algorithm, when it is necessary to calculate the fitness of a certain goat (i.e., a new set of hyperparameters), the hyperparameters can be directly input into the surrogate model. The surrogate model can output the accuracy and complexity indicators of the prediction in milliseconds, without the need for time-consuming deep neural network training, thereby accelerating the hyperparameter optimization process.

[0029] In one alternative implementation, based on the model sample set and according to the optimal hyperparameters, the hyperparameters of the initial photovoltaic fault detection model are adjusted to obtain the final photovoltaic fault detection model, including: S20141: Based on the optimal hyperparameters, adjust the hyperparameters of the initial photovoltaic fault detection model and input them into the model sample set for fine-tuning training to obtain the optimized photovoltaic fault detection model. In this embodiment, the optimal hyperparameters obtained in S2013 (such as the determined number of LSTM layers being 2, the learning rate being 0.001, and the number of CNN cores being 32, etc.) are assigned to the network structure definition of the initial model to construct a complete network to be trained. Full training and fine-tuning: Divide the cleaned model sample set into training, validation, and test sets in a ratio (e.g., 8:1:1); use the training set to iterate through multiple rounds of training on the model with configured hyperparameters; use the Adam optimizer or SGD optimizer to update the network weights through backpropagation; adopt an early stopping strategy, i.e., monitor the loss value on the validation set, and stop training when the loss value no longer decreases after several consecutive rounds (e.g., 10 rounds) to prevent overfitting; S20142: Calculate the loss value of the optimized photovoltaic fault detection model using a pre-defined loss function; In this embodiment, the loss value is calculated by using the cross-entropy loss function to calculate the error between the model's prediction result and the true label. S20143: If the loss value is less than the loss threshold, the optimized photovoltaic fault detection model will be output as the final photovoltaic fault detection model; otherwise, a new round of fine-tuning training will be carried out. In this embodiment, the threshold judgment is as follows: if the loss value on the test set is less than the preset threshold (e.g., 0.05) and the accuracy reaches the preset requirement (e.g., 95%), then the model is confirmed to be qualified; otherwise, the dataset is adjusted or the regularization parameters are fine-tuned, and the training process is retried.

[0030] In one optional implementation, at the edge gateway, real-time operating data of the photovoltaic power station is collected and input into the photovoltaic fault detection model for photovoltaic fault detection. Real-time photovoltaic fault detection results are obtained and uploaded to the cloud server, including: S2021: At the edge gateway, real-time operation data of the photovoltaic power station is collected, and the real-time operation data is preprocessed to obtain preprocessed real-time operation data. The preprocessed real-time operation data includes preprocessed time-series electrical data and preprocessed image data. In this embodiment, multi-source data is collected in real time: The edge gateway communicates with inverters, combiner boxes, and weather stations via Modbus, CAN bus, or IEC 104 protocol to read real-time timing electrical data such as voltage, current, and power. Meanwhile, by connecting a gimbal camera or drone terminal via RTSP streaming protocol or USB interface, image data of photovoltaic modules can be captured periodically. Data stream buffering and synchronization: Since electrical data and image data may be collected at different frequencies (e.g., electrical data once per second, image data once per minute), the edge gateway maintains a timestamp-aligned circular buffer to ensure that the data input to the model is time-corresponding. Data preprocessing Time series data: The sequence is extracted using a sliding window (such as the data from the most recent 10 minutes) and standardized using the same normalization parameters as in the training phase; Image data: Decode, denoise (Gaussian filtering), histogram equalization (contrast enhancement), and crop out the region of interest containing only photovoltaic modules to remove background interference; S2022: The input layer of the photovoltaic fault detection model receives preprocessed real-time running data. In this embodiment, the input layer formats the temporal data into a three-dimensional tensor, formats the image data into a four-dimensional tensor, and encapsulates it according to the Batch Size defined by the model (usually the edge inference Batch Size is 1). S2023: Using the time-series feature extraction module of the photovoltaic fault detection model, extract the actual observed features of the preprocessed time-series electrical data; In this embodiment, the Bi-LSTM network performs bidirectional scanning on the input time series, extracts the forward and reverse hidden state features, and splices them into a complete actual observation feature vector, which contains the current electrical operating state trend. S2024: Based on the pre-processed component backsheet temperature and pre-processed ambient irradiance in the pre-processed time-series electrical data, the irradiance-power decoupling module of the photovoltaic fault detection model is used to predict the corresponding theoretical normal state characteristics, and the difference between the actual observed characteristics and the theoretical normal state characteristics is used as the real-time time-series characteristics. In this embodiment, the principle is: the photovoltaic output power is directly proportional to the ambient irradiance and inversely proportional to the module backsheet temperature; Implementation: The decoupling module internally stores standard photovoltaic cell physical models or empirical regression formulas; it takes the current module backsheet temperature and ambient irradiance as input to calculate the theoretical normal power, i.e., the theoretical normal state characteristics. The difference between actual observed characteristics and theoretical normal state characteristics is calculated, which effectively eliminates false alarms caused by weather changes; S2025: Image feature extraction module using photovoltaic fault detection model to extract real-time image features from preprocessed image data; In this embodiment, a lightweight CNN (such as MobileNet) performs multi-layer convolution and pooling operations on the image to extract texture features (cracks, broken grids) and thermal radiation features (hot spots) in the image, generating a high-dimensional real-time image feature map. S2026: Using real-time time series features as query vectors, flattening real-time image features as key and value vectors, and using the multi-head attention mechanism of the spatiotemporal cross-modal alignment module of the photovoltaic fault detection model, the correspondence of time series anomalies in the image space is calculated, and the fused global feature vector is output. In this embodiment, the process is as follows: the model calculates the similarity (Attention Score) between the query vector and the key vectors of different regions in the image; if the time series shows an anomaly in a certain string, the attention mechanism will automatically assign high weights to the key vectors of the corresponding string region in the image. Output: The weighted sum of the value vectors generates the fused global feature vector; this means that the model not only knows that "there is a fault", but also confirms "where the fault is" and "what it looks like" through visual features; S2027: Based on the global feature vector, the output layer of the photovoltaic fault detection model is used to call the Softmax classification function to generate real-time photovoltaic fault detection results; S2028: Upload real-time photovoltaic fault detection results to the cloud server through a pre-built encrypted secure channel.

[0031] This invention also provides a deep learning-based distributed photovoltaic fault detection device 300, referring to... Figure 3 The device may include the following units: Model building unit 301 is used to build a photovoltaic fault detection model on a cloud server using deep learning algorithms and introducing an improved goat optimization algorithm, and to deploy the photovoltaic fault detection model to the edge gateways of several distributed photovoltaic power stations. The photovoltaic fault detection unit 302 is used to collect real-time operating data of the photovoltaic power station at the edge gateway, input the real-time operating data into the photovoltaic fault detection model, perform photovoltaic fault detection, obtain real-time photovoltaic fault detection results, and upload them to the cloud server.

[0032] Based on the same inventive concept, another embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus. Memory, used to store computer programs; The processor, when executing the program stored in the memory, implements the deep learning-based distributed photovoltaic fault detection method of the present invention.

[0033] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of representation, only one thick line is used in the diagram, but this does not indicate that there is only one bus or one type of bus. The communication interface is used for communication between the aforementioned terminal and other devices. The memory can include Random Access Memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory can also be at least one storage device located remotely from the aforementioned processor.

[0034] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0035] Furthermore, to achieve the above objectives, embodiments of the present invention also propose a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the deep learning-based distributed photovoltaic fault detection method of the embodiments of the present invention.

[0036] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable hardware devices (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0037] The embodiments of the present invention are described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (apparatus), and computer program products according to embodiments of the invention. It should 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 terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0038] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate 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 1One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0039] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal 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.

[0040] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. "And / or" indicates that either one or both can be chosen. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes the element.

[0041] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A distributed photovoltaic fault detection method based on deep learning, characterized in that, The method includes: On a cloud server, a photovoltaic fault detection model is constructed using deep learning algorithms and an improved goat optimization algorithm. The photovoltaic fault detection model is then deployed to the edge gateways of several distributed photovoltaic power plants. At the edge gateway, real-time operating data of the photovoltaic power station is collected and input into the photovoltaic fault detection model to perform photovoltaic fault detection, obtain real-time photovoltaic fault detection results, and upload them to the cloud server.

2. The deep learning-based distributed photovoltaic fault detection method according to claim 1, characterized in that, On a cloud server, a photovoltaic fault detection model is constructed using deep learning algorithms and an improved goat optimization algorithm. This model is then deployed to the edge gateways of several distributed photovoltaic power plants, including: On the cloud server, we obtain historical operating data from different photovoltaic power plants, clean, normalize, and label the historical operating data to obtain a model sample set. An initial photovoltaic fault detection model was constructed using deep learning algorithms. An improved goat optimization algorithm is used to iteratively optimize the hyperparameters of the initial photovoltaic fault detection model to obtain the optimal hyperparameters. Based on the model sample set, the hyperparameters of the initial photovoltaic fault detection model are adjusted according to the optimal hyperparameters to obtain the final photovoltaic fault detection model. Extract the model metadata of the final photovoltaic fault detection model and send the model metadata to the edge gateways of several distributed photovoltaic power plants; At the edge gateway, the model is reconstructed based on the model metadata to obtain the reconstructed photovoltaic fault detection model, thus completing the deployment of the photovoltaic fault detection model.

3. The deep learning-based distributed photovoltaic fault detection method according to claim 2, characterized in that, The operational data includes time-series electrical data and image data. The time-series electrical data includes DC voltage, DC current, AC power, component backplane temperature, and ambient irradiance.

4. The deep learning-based distributed photovoltaic fault detection method according to claim 3, characterized in that, The photovoltaic fault detection model includes an input layer, a time-series feature extraction module, an irradiance-power decoupling module, an image feature extraction module, a spatiotemporal cross-modal alignment module, and an output layer.

5. The deep learning-based distributed photovoltaic fault detection method according to claim 4, characterized in that, An improved goat optimization algorithm is used to iteratively optimize the hyperparameters of the initial photovoltaic fault detection model to obtain the optimal hyperparameters, including: The improved goat optimization algorithm is set as a multi-objective optimization function, and the hyperparameters of the initial photovoltaic fault detection model are encoded as the position vector of the improved goat optimization algorithm. Based on the prediction target parameters and hyperparameters of the fitness function, a surrogate model for fitness function computation is constructed using a lightweight algorithm. The chaotic sequence is generated using the Logistic mapping and then mapped to the solution space of the improved goat optimization algorithm to obtain the initial goat population. Based on the surrogate model, the fitness function is used to calculate the fitness value of the candidate hyperparameters for each initial goat in the initial goat population, and the individual with the best fitness is selected as the optimal individual. Based on the fitness value, a convergence factor, the gray wolf cooperative idea, and the Levy flight mechanism are introduced to update the position of the initial goat population, resulting in an updated goat population. Based on the surrogate model, the fitness function is used to calculate the fitness value of the candidate hyperparameters for each updated goat in the updated goat population, and the individual with the best fitness is updated as the best individual. Repeat the position update step until the current iteration count reaches the iteration count threshold or the fitness value of the best individual meets the requirements. Then, end the position update and decode the position vector of the best individual to obtain the optimal hyperparameters.

6. The deep learning-based distributed photovoltaic fault detection method according to claim 5, characterized in that, The formula for the fitness function is: In the formula, For goats X The fitness values ​​of the corresponding alternative hyperparameters; For goats X The fault classification error rate of the corresponding alternative hyperparameters; For goats X The corresponding alternative hyperparameters affect the model complexity output by the surrogate model; For fitness weights; X Let be a goat variable, and its position vector be a hyperparameter. In the formula, For goats X The corresponding alternative hyperparameters are reflected in the predicted classification accuracy of the surrogate model output; In the formula, For goats X The corresponding alternative hyperparameters are the total number of parameters in the prediction model output by the surrogate model; This is the preset maximum number of model parameters; For goats X The corresponding alternative hyperparameters are the number of predicted floating-point operations in the surrogate model output; This is the preset maximum number of floating-point operations; These are the model complexity weights.

7. The deep learning-based distributed photovoltaic fault detection method according to claim 6, characterized in that, Based on the predicted target parameters and hyperparameters of the fitness function, a surrogate model for fitness function computation is constructed using a lightweight algorithm, including: The Latin hypercube sampling method is used to randomly sample several hyperparameters in the solution space of the hyperparameters. Each hyperparameter sample is loaded into the initial photovoltaic fault detection model, input into the model sample set for short-term pre-training, and the true classification accuracy, the total number of true model parameters, and the number of true floating-point operations are calculated on the validation set. By integrating several hyperparameter samples, the corresponding true classification accuracy, the total number of true model parameters, and the number of true floating-point operations, a surrogate sample set is obtained. A lightweight GBDT algorithm is used to construct an initial surrogate model. The input of the surrogate model is hyperparameters, and the output is the prediction classification accuracy, the total number of prediction model parameters, and the number of prediction floating-point operations. The proxy sample set is input into the initial proxy model for training, resulting in the final proxy model with the fitness function calculated.

8. The deep learning-based distributed photovoltaic fault detection method according to claim 7, characterized in that, Based on the model sample set, the hyperparameters of the initial photovoltaic fault detection model are adjusted according to the optimal hyperparameters to obtain the final photovoltaic fault detection model, including: Based on the optimal hyperparameters, the hyperparameters of the initial photovoltaic fault detection model are adjusted, and the model sample set is input for fine-tuning training to obtain an optimized photovoltaic fault detection model. The loss value of the optimized photovoltaic fault detection model is calculated using a pre-defined loss function. If the loss value is less than the loss threshold, the optimized photovoltaic fault detection model will be output as the final photovoltaic fault detection model; otherwise, a new round of fine-tuning training will be carried out.

9. The deep learning-based distributed photovoltaic fault detection method according to claim 8, characterized in that, At the edge gateway, real-time operational data of the photovoltaic power station is collected and input into the photovoltaic fault detection model for fault detection. Real-time photovoltaic fault detection results are obtained and uploaded to the cloud server, including: At the edge gateway, real-time operation data of the photovoltaic power station is collected and preprocessed to obtain preprocessed real-time operation data, which includes preprocessed time-series electrical data and preprocessed image data. The input layer of the photovoltaic fault detection model receives preprocessed real-time running data. The time-series feature extraction module of the photovoltaic fault detection model is used to extract the actual observation features of the preprocessed time-series electrical data; Based on the preprocessed component backsheet temperature and preprocessed ambient irradiance in the preprocessed time-series electrical data, the irradiance-power decoupling module of the photovoltaic fault detection model is used to predict the corresponding theoretical normal state characteristics, and the difference between the actual observed characteristics and the theoretical normal state characteristics is used as the real-time time-series characteristics. The image feature extraction module of the photovoltaic fault detection model is used to extract real-time image features from the preprocessed image data. Using real-time temporal features as query vectors and flattened real-time image features as key and value vectors, the multi-head attention mechanism of the spatiotemporal cross-modal alignment module of the photovoltaic fault detection model is used to calculate the correspondence of temporal anomalies in the image space and output the fused global feature vector. Based on the global feature vector, the output layer of the photovoltaic fault detection model is used to call the Softmax classification function to generate real-time photovoltaic fault detection results; Real-time photovoltaic fault detection results are uploaded to the cloud server through a pre-built encrypted secure channel.

10. A deep learning-based distributed photovoltaic fault detection device, used to implement the distributed photovoltaic fault detection method as described in any one of claims 1-9, characterized in that, The device includes: The model building unit is used on a cloud server to build a photovoltaic fault detection model using deep learning algorithms and an improved goat optimization algorithm, and then deploys the photovoltaic fault detection model to the edge gateways of several distributed photovoltaic power plants. The photovoltaic fault detection unit is used to collect real-time operating data of the photovoltaic power station at the edge gateway, input the real-time operating data into the photovoltaic fault detection model, perform photovoltaic fault detection, obtain real-time photovoltaic fault detection results, and upload them to the cloud server.