Method and system for defect localization of photovoltaic modules
By leveraging a cloud-edge collaborative architecture and real-time preprocessing by edge servers, combined with the collaborative work of drones and cloud servers, the problem of rapid defect location in photovoltaic module inspection has been solved, achieving efficient defect identification and location, and improving the operation and maintenance efficiency of photovoltaic power plants.
Patent Information
- Application Number
- CN202611281117.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-21
- Publication Date
- 2026-11-20
AI Technical Summary
Existing photovoltaic module inspection technologies are unable to quickly locate defects in the event of sudden failures or extreme weather conditions, leading to decreased power generation efficiency and increased risk of module aging.
By adopting a cloud-edge collaborative architecture, edge servers are used to preprocess inspection images collected by drones in real time, identify defects and send them to the edge servers, and only images containing defects are uploaded to the cloud server for analysis. By combining the collaborative work of drones and cloud servers, rapid defect location can be achieved.
It enables rapid defect location in complex photovoltaic inspection scenarios, reduces cloud computing pressure, and improves location accuracy and operation and maintenance response speed.
Smart Images

Figure CN123142002A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of power, and in particular to a method and system for locating defects in photovoltaic modules. Background Technology
[0002] With the popularization of photovoltaic power generation technology, photovoltaic modules are installed at high density and are distributed widely. Regular inspection and maintenance of photovoltaic modules are necessary measures to ensure power generation.
[0003] Existing photovoltaic module inspection technologies mainly rely on manual inspection or fixed monitoring equipment. In the event of sudden failures or extreme weather conditions, it is difficult to quickly locate the defects in photovoltaic modules, making it difficult to eliminate defects in a timely manner. This not only affects power generation efficiency but may also exacerbate the aging risk of photovoltaic modules.
[0004] In conclusion, how to quickly locate defects in photovoltaic modules in complex photovoltaic inspection scenarios is a technical problem that urgently needs to be solved. Summary of the Invention
[0005] This application provides a method and system for locating defects in photovoltaic modules, aiming to solve the technical problem of how to quickly locate defects in photovoltaic modules.
[0006] In a first aspect, embodiments of this application provide a defect location method for photovoltaic modules, applied to any edge server in a defect location system for photovoltaic modules, the system further including a cloud server, the method comprising:
[0007] Obtain inspection images of the photovoltaic modules to be inspected;
[0008] When it is determined that the inspection image includes defect information based on the inspection image, the inspection image and the defect information are sent to the cloud server;
[0009] In response to receiving the location information of the defect information in the photovoltaic module to be inspected from the cloud server, the defect location information of the photovoltaic module to be inspected is determined based on the location information.
[0010] Output the defect location information.
[0011] In one possible implementation, the method further includes:
[0012] The inspection image is converted to grayscale to obtain a grayscale image of the inspection image;
[0013] The grayscale image is processed for background segmentation to obtain the photovoltaic image of the inspection image, and the photovoltaic image is sent to the cloud server;
[0014] The mean grayscale value of the photovoltaic image is calculated by averaging the grayscale values of each pixel in the photovoltaic image.
[0015] If the average grayscale value is less than a first preset grayscale value or greater than a second preset grayscale value, then the inspection image is determined to include defect information; wherein the first preset grayscale value is less than the second preset grayscale value.
[0016] In one possible implementation, the step of performing background segmentation processing on the grayscale image to obtain the photovoltaic image of the inspection image includes:
[0017] For each pixel in the grayscale image, if the grayscale value is less than a first preset threshold or greater than a second preset threshold, then the pixel is determined to be a background pixel; wherein, the first preset threshold is less than the second preset threshold.
[0018] If the grayscale value is greater than or equal to the first preset threshold and less than or equal to the second preset threshold, then the pixel is determined to be a foreground pixel.
[0019] The pixel adjacent to the foreground pixel at a preset orientation is determined as the target pixel;
[0020] The photovoltaic image is obtained based on the target pixels.
[0021] In one possible implementation, obtaining the photovoltaic image based on the target pixel includes:
[0022] If the target grayscale value of the target pixel is greater than or equal to the first preset threshold and less than or equal to the second preset threshold, then the target pixel is determined to be a photovoltaic pixel.
[0023] If the target grayscale value of the target pixel is less than the first preset threshold or greater than the second preset threshold, then the target pixel is determined as an edge pixel.
[0024] The photovoltaic image is obtained based on the photovoltaic pixels and the edge pixels.
[0025] In one possible implementation, the system further includes multiple inspection drones communicatively connected to the edge server, and the method further includes:
[0026] If the current time is within the preset inspection cycle of the edge server, then the photovoltaic modules in the area where the edge server is located are identified as the photovoltaic modules to be inspected.
[0027] Based on the inspection type of the photovoltaic module to be inspected, an inspection instruction including the inspection route is generated.
[0028] The inspection command is sent to the target inspection drone that is in an idle state among the plurality of inspection drones, so that the target inspection drone can acquire the inspection image based on the inspection command.
[0029] In one possible implementation, the method further includes:
[0030] If the inspection type is routine, then the preset inspection path of the photovoltaic module to be inspected is determined as the inspection route.
[0031] If the inspection type is sudden, the inspection route is determined based on the first location information of the photovoltaic module to be inspected, the second location information of the inspection drone that is performing inspection tasks on the adjacent photovoltaic modules, and the pre-trained route planning model.
[0032] The adjacent photovoltaic module refers to the photovoltaic module that is adjacent to the photovoltaic module to be inspected and whose inspection type is routine. The route planning model is obtained by training an initial route planning model based on a neural network model based on a pre-acquired sample set. The sample set includes multiple samples, and each sample includes two location information and the corresponding shortest route.
[0033] Secondly, embodiments of this application provide a defect location method for photovoltaic modules, applied to a cloud server in a defect location system for photovoltaic modules. The system further includes an edge server, and the method includes:
[0034] The system receives inspection images and defect information of photovoltaic modules to be inspected from the edge server; wherein the inspection images are images that the edge server has determined to contain defects.
[0035] Based on the inspection images and the defect information, the location information of the defect information in the photovoltaic module to be inspected is determined;
[0036] The location information is sent to the edge server.
[0037] In one possible implementation, the method further includes:
[0038] Receive the photovoltaic image corresponding to the inspection image sent by the edge server.
[0039] In one possible implementation, the system further includes multiple inspection drones communicatively connected to the edge server. The step of determining the location information of the defect information within the photovoltaic module to be inspected, based on the inspection images and the defect information, includes:
[0040] Based on the flight position of the inspection drone at the moment the inspection image is generated, the initial defective component in the photovoltaic module to be inspected corresponding to the defect information is determined;
[0041] The normalized image of the photovoltaic image is subjected to distortion correction processing to obtain the corrected image of the photovoltaic image;
[0042] For each pixel coordinate in the corrected image, coordinate transformation is performed on the pixel coordinates to obtain the first coordinates corresponding to the pixel; wherein, the first coordinates are used to indicate the position of the pixel in the device coordinate system of the image acquisition device of the inspection drone;
[0043] The first coordinate is transformed to obtain the second coordinate corresponding to the pixel; wherein the second coordinate is used to indicate the position of the pixel in the world coordinate system of the initial defect component;
[0044] The location information is obtained based on the second coordinates of each pixel in the corrected image.
[0045] Thirdly, embodiments of this application provide a defect location system for photovoltaic modules, comprising:
[0046] Multiple inspection drones are used to collect inspection images of the photovoltaic modules to be inspected;
[0047] Cloud servers are used to perform the second aspect above and / or various possible implementations of the second aspect;
[0048] Multiple edge servers are communicatively connected to the cloud server, and each edge server is communicatively connected to the multiple inspection drones, for use in the first aspect and / or various possible implementations of the first aspect.
[0049] Fourthly, embodiments of this application provide a defect location device for photovoltaic modules, applied to any edge server in a defect location system for photovoltaic modules. The system further includes a cloud server, and the device includes:
[0050] The first processing module is used to acquire inspection images of the photovoltaic modules to be inspected;
[0051] The second processing module is used to send the inspection image and the defect information to the cloud server when it is determined that the inspection image includes defect information based on the inspection image.
[0052] The third processing module is used to respond to the location information of the defect information in the photovoltaic module to be inspected returned by the cloud server, and determine the defect location information of the photovoltaic module to be inspected based on the location information.
[0053] The fourth processing module is used to output the defect location information.
[0054] In one possible implementation, the device further includes a fifth processing module for:
[0055] The inspection image is converted to grayscale to obtain a grayscale image of the inspection image;
[0056] The grayscale image is processed for background segmentation to obtain the photovoltaic image of the inspection image, and the photovoltaic image is sent to the cloud server;
[0057] The mean grayscale value of the photovoltaic image is calculated by averaging the grayscale values of each pixel in the photovoltaic image.
[0058] If the average grayscale value is less than a first preset grayscale value or greater than a second preset grayscale value, then the inspection image is determined to include defect information; wherein the first preset grayscale value is less than the second preset grayscale value.
[0059] In one possible implementation, the fifth processing module is specifically used for:
[0060] For each pixel in the grayscale image, if the grayscale value is less than a first preset threshold or greater than a second preset threshold, then the pixel is determined to be a background pixel; wherein, the first preset threshold is less than the second preset threshold.
[0061] If the grayscale value is greater than or equal to the first preset threshold and less than or equal to the second preset threshold, then the pixel is determined to be a foreground pixel.
[0062] The pixel adjacent to the foreground pixel at a preset orientation is determined as the target pixel;
[0063] The photovoltaic image is obtained based on the target pixels.
[0064] In one possible implementation, the fifth processing module is further configured to:
[0065] If the target grayscale value of the target pixel is greater than or equal to the first preset threshold and less than or equal to the second preset threshold, then the target pixel is determined to be a photovoltaic pixel.
[0066] If the target grayscale value of the target pixel is less than the first preset threshold or greater than the second preset threshold, then the target pixel is determined as an edge pixel.
[0067] The photovoltaic image is obtained based on the photovoltaic pixels and the edge pixels.
[0068] In one possible implementation, the system further includes multiple inspection drones communicatively connected to the edge server, and the device further includes a sixth processing module for:
[0069] If the current time is within the preset inspection cycle of the edge server, then the photovoltaic modules in the area where the edge server is located are identified as the photovoltaic modules to be inspected.
[0070] Based on the inspection type of the photovoltaic module to be inspected, an inspection instruction including the inspection route is generated.
[0071] The inspection command is sent to the target inspection drone that is in an idle state among the plurality of inspection drones, so that the target inspection drone can acquire the inspection image based on the inspection command.
[0072] In one possible implementation, the device further includes a seventh processing module for:
[0073] If the inspection type is routine, then the preset inspection path of the photovoltaic module to be inspected is determined as the inspection route.
[0074] If the inspection type is sudden, the inspection route is determined based on the first location information of the photovoltaic module to be inspected, the second location information of the inspection drone that is performing inspection tasks on the adjacent photovoltaic modules, and the pre-trained route planning model.
[0075] The adjacent photovoltaic module refers to the photovoltaic module that is adjacent to the photovoltaic module to be inspected and whose inspection type is routine. The route planning model is obtained by training an initial route planning model based on a neural network model based on a pre-acquired sample set. The sample set includes multiple samples, and each sample includes two location information and the corresponding shortest route.
[0076] Fifthly, embodiments of this application provide a defect location device for photovoltaic modules. The system further includes an edge server and a cloud server applied to the defect location system of photovoltaic modules. The device includes:
[0077] The receiving module is used to receive inspection images and defect information of the photovoltaic modules to be inspected sent by the edge server; wherein, the inspection images are images that the edge server has determined to have defects.
[0078] The determination module is used to determine the location information of the defect information in the photovoltaic module to be inspected based on the inspection image and the defect information;
[0079] The sending module is used to send the location information to the edge server.
[0080] In one possible implementation, the receiving module is further configured to receive a photovoltaic image corresponding to the inspection image sent by the edge server.
[0081] In one possible implementation, the system further includes multiple inspection drones communicatively connected to the edge server, and the determining module is specifically used for:
[0082] Based on the flight position of the inspection drone at the moment the inspection image is generated, the initial defective component in the photovoltaic module to be inspected corresponding to the defect information is determined;
[0083] The normalized image of the photovoltaic image is subjected to distortion correction processing to obtain the corrected image of the photovoltaic image;
[0084] For each pixel coordinate in the corrected image, coordinate transformation is performed on the pixel coordinates to obtain the first coordinates corresponding to the pixel; wherein, the first coordinates are used to indicate the position of the pixel in the device coordinate system of the image acquisition device of the inspection drone;
[0085] The first coordinate is transformed to obtain the second coordinate corresponding to the pixel; wherein the second coordinate is used to indicate the position of the pixel in the world coordinate system of the initial defect component;
[0086] The location information is obtained based on the second coordinates of each pixel in the corrected image.
[0087] Sixthly, embodiments of this application provide an electronic device, including: a memory and a processor;
[0088] The memory stores computer-executed instructions;
[0089] The processor executes computer execution instructions stored in the memory, causing the processor to perform any possible implementation of the first aspect and / or any possible implementation of the second aspect as described above.
[0090] In a seventh aspect, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement any possible implementation of the first aspect and / or any possible implementation of the second aspect.
[0091] Eighthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements any possible implementation of the first aspect and / or any possible implementation of the second aspect as described above.
[0092] The defect location method and system for photovoltaic modules provided in this application are applied to any edge server and cloud server in a photovoltaic module defect location system. Each edge server is communicatively connected to multiple inspection drones. The method includes: the edge server acquiring inspection images of the photovoltaic module to be inspected collected by the inspection drones; when it is determined that the inspection image contains defect information, the edge server sends the inspection image and defect information to the cloud server; the cloud server receives the inspection image and defect information sent by the edge server, determines the location information of the defect information in the photovoltaic module to be inspected based on the inspection image and defect information, and sends the location information to the edge server; the edge server receives the location information, determines and outputs the defect location information of the photovoltaic module to be inspected based on the location information. Through the above method, the defect identification task is offloaded to the edge server for local execution, and only valid images containing defects are uploaded to the cloud for defect location analysis. This decouples the defect identification and accurate location tasks, effectively reducing the computational burden on the cloud, while the centralized processing of the cloud server further improves the accuracy of defect location, achieving rapid defect location of the photovoltaic module to be inspected. Attached Figure Description
[0093] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0094] Figure 1 A flowchart illustrating a method for locating defects in a photovoltaic module provided in this application. Figure 1 ;
[0095] Figure 2 A flowchart illustrating a method for locating defects in a photovoltaic module provided in this application. Figure 2 ;
[0096] Figure 3 A flowchart illustrating a method for locating defects in a photovoltaic module provided in this application. Figure 3 ;
[0097] Figure 4 A flowchart illustrating a method for locating defects in a photovoltaic module provided in this application. Figure 4 ;
[0098] Figure 5 A flowchart illustrating a method for locating defects in a photovoltaic module provided in this application. Figure 5 ;
[0099] Figure 6 A schematic diagram of the structure of a defect location device for a photovoltaic module provided in this application. Figure 1 ;
[0100] Figure 7A schematic diagram of the structure of a defect location device for a photovoltaic module provided in this application. Figure 2 ;
[0101] Figure 8 This is a schematic diagram of the structure of an electronic device provided in this application.
[0102] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0103] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application.
[0104] The application background of this application is explained as follows:
[0105] In recent years, photovoltaic (PV) power generation, as an important component of clean energy, has developed rapidly worldwide. PV power generation utilizes the photovoltaic effect of photovoltaic cells to directly convert solar radiation energy into electrical energy. One crucial component is the solar cell array, or PV module. The performance of PV modules is closely related to the amount of electricity generated; therefore, regular inspection and maintenance of PV modules are essential measures to ensure power generation.
[0106] Photovoltaic modules are distributed across various terrains, forming different types of photovoltaic systems. These include mountain photovoltaic systems on undulating ridges and sunny slopes, fishpond photovoltaic systems above shallow fishponds or aquaculture areas, rooftop photovoltaic systems on urban and rural building rooftops, and hilly photovoltaic systems on gentle slopes and gully-ridden areas. In addition, there are ground-mounted centralized photovoltaic systems in the Gobi Desert, restorative photovoltaic systems in coal mining subsidence areas or abandoned mines, and tidal zone photovoltaic systems in coastal mudflats or near-shore areas. The wide distances between these different types of photovoltaic systems and the complexity of their respective terrains make inspection of the modules difficult, especially quickly locating defects in existing modules.
[0107] Current photovoltaic (PV) module inspection technologies primarily rely on manual inspections or fixed monitoring equipment. However, under conditions of sudden failures or extreme weather, these technologies struggle to quickly locate defects in PV modules. Specifically, manual inspections require technicians to carry inspection instruments and visually or use infrared thermal imaging to scan each PV module individually. This is not only time-consuming and labor-intensive but also limited by the accessibility of personnel in complex terrains, resulting in large areas not being covered in a timely manner and making it difficult to pinpoint defect locations immediately. While fixed monitoring equipment (such as cameras) can achieve localized real-time monitoring, their fixed installation positions and viewing angles limit coverage and create numerous blind spots. For sudden failures far from monitoring points, they often fail to capture accurate defect locations, severely limiting their positioning capabilities. Furthermore, some solutions utilize drones to collect images and combine them with cloud analysis for PV module defect detection. While this method expands the scope of inspections, image transmission to the cloud relies on network bandwidth, and centralized cloud processing introduces additional computational delays. A significant time lag exists between image acquisition and location result output, which also fails to meet the requirements for rapid and accurate defect location determination in complex scenarios.
[0108] In summary, existing photovoltaic (PV) module inspection technologies all suffer from the problem of difficulty in quickly locating defects in PV modules, making it difficult to eliminate defects in a timely manner. For operation and maintenance scenarios requiring rapid dispatch and on-site repair, the inability to promptly determine the location of PV module defects prolongs the fault handling cycle, thereby affecting power plant power generation efficiency and operation and maintenance management quality. Therefore, how to achieve rapid location of PV module defects in complex PV inspection scenarios is an urgent technical problem to be solved.
[0109] Based on the aforementioned technical problems, the inventors, in the process of researching defect localization methods for photovoltaic modules, discovered that by combining a cloud-edge collaborative architecture with UAV image processing technology, rapid identification and accurate localization of defects in distributed photovoltaic modules can be achieved. Specifically, with an edge server as the core, leveraging its geographical advantage of proximity to photovoltaic modules, the inspection images collected by the UAV are preprocessed in real time. The defect identification task is then offloaded to the edge server, and only images containing defects are uploaded to the cloud server for defect location analysis. This decouples the defect identification and localization tasks, reduces the cloud load through edge computing, and improves localization accuracy through centralized analysis on the cloud server, ultimately achieving efficient defect localization of distributed photovoltaic modules. Based on this, this application provides a method and system for defect localization of photovoltaic modules.
[0110] The technical solution of this application and how it solves the above-mentioned technical problems will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.
[0111] Figure 1 A flowchart illustrating a method for locating defects in a photovoltaic module provided in this application. Figure 1 This method is applied to any edge server and cloud server in a photovoltaic module defect location system. The system also includes multiple inspection drones that communicate with each edge server, such as... Figure 1 As shown, the method includes:
[0112] S101: Obtain inspection images of the photovoltaic modules to be inspected.
[0113] In this step, the edge server refers to a computing device deployed near the data access side of the photovoltaic power station to receive and initially process inspection images. It's essentially a small data center set up locally at the photovoltaic power station, enabling local processing of images captured by inspection drones or cameras, thus avoiding uploading all raw data directly to a remote center. The photovoltaic modules to be inspected refer to those solar panels included in this inspection plan that have not yet been scanned and inspected. They are the target objects to be investigated and located in this inspection. These can be single modules in a distributed photovoltaic power station or target modules among multiple modules in the same branch or array. The inspection images are image data representing the current state of the photovoltaic modules to be inspected and serve as input for subsequent defect identification and location.
[0114] Specifically, for typical photovoltaic (PV) systems such as mountain PV, fishpond PV, rooftop PV, and hilly PV, a corresponding edge server is set up, ensuring that each edge server corresponds to a specific type of PV system. Each edge server has its own preset inspection cycle, which refers to the frequency at which each edge server automatically initiates an inspection task on its assigned PV modules at a pre-set time interval according to the PV type. For example, edge servers located in harsh environments or areas with high failure rates can have their inspection cycle shortened to once every two hours; while in areas with stable power generation environments and well-functioning modules, it can be set to once a day.
[0115] The edge server can use a clock synchronization module to determine in real time whether the current time falls within a preset inspection cycle. If the current time is within the edge server's preset inspection cycle, the photovoltaic modules in the area where the edge server is located are identified as photovoltaic modules to be inspected. At this time, the edge server sends inspection commands to multiple inspection drones that are communicatively connected to it. After receiving the inspection commands, the inspection drones immediately execute image acquisition tasks. The inspection drones are equipped with image acquisition devices (such as visible light cameras) to acquire inspection images of the photovoltaic modules to be inspected in real time and send the acquired inspection images to the edge server.
[0116] S102: When it is determined that the inspection image includes defect information based on the inspection image, the inspection image and defect information are sent to the cloud server.
[0117] For the cloud server side, it receives inspection images and defect information of the photovoltaic modules to be inspected sent by the edge server; among them, the inspection images are images that the edge server has determined to have defects.
[0118] In this step, defect information is used to indicate the judgment result of anomalies or defects in the inspection images, and is the basis for the edge server to decide whether to trigger the cloud server's defect location processing. The cloud server receives the inspection images and defect information uploaded by the edge server and returns the location information of the defects in the photovoltaic modules. Specifically, the edge server first performs an initial defect judgment on the inspection images, and when it is determined that the inspection image includes defect information, it uploads the inspection image and defect information to the cloud server. In this way, the edge server does not need to send all inspection images to the cloud server indiscriminately, but only sends the inspection images where defects are determined to exist to the cloud server to further determine the location of the defects, thereby significantly saving data transmission bandwidth and cloud storage resources. This on-demand upload mechanism also effectively reduces the overall response latency of defect location, allowing the cloud server to concentrate its computing power on inspection images that actually contain defects, further improving the efficiency and accuracy of defect location.
[0119] For example, the edge server can identify defects in the inspection image based on preset recognition rules (such as temperature threshold comparison, image grayscale anomaly detection, etc.) or a pre-trained deep learning recognition model, and output a binary label to obtain a defect judgment result. That is, the defect judgment result is a binary result: including defect information or not including defect information. The defect information can specifically be a defect presence marker identified by the edge server, or it can further include defect categories (such as battery cell failure, diode failure, shading failure, dust and dirt accumulation failure, etc.).
[0120] In one possible implementation, the preset identification rule may also be: if the similarity between the inspection image and a historical inspection image that does not contain defect information is greater than or equal to a preset threshold, then the inspection image does not contain defect information; conversely, if the similarity between the inspection image and a historical inspection image that does not contain defect information is less than the preset threshold, then the inspection image contains defect information.
[0121] When it is determined that the inspection image contains defect information, the edge server is triggered to upload the inspection image and defect information to the cloud server. The sending method can be synchronous packaged sending, that is, sending the inspection image and defect information as a unified message, or it can be separate sending, that is, uploading the inspection image first, and then uploading the defect information index record corresponding to the inspection image. The cloud server reads the information based on the identifier of the inspection image.
[0122] When it is determined that the inspection image does not contain defect information, the edge server does not need to upload the inspection image. Instead, it marks the inspection image as a defect-free result locally, ends the subsequent defect location process corresponding to the inspection image, and then continues to execute the subsequent inspection tasks.
[0123] Through this binary judgment mechanism, the edge server identifies defects in the inspection images, obtaining a binary defect judgment result. Only inspection images with defects are pushed to the cloud server connected to the edge server. The cloud server then analyzes the location information of the defect information in the photovoltaic module. On the one hand, the edge server can quickly analyze and determine whether there is defect information, ensuring the timeliness of defect detection; on the other hand, the cloud server analyzes the location information of the defect information in the photovoltaic module, which not only improves the accuracy of location information analysis and reduces the amount of data processed by the cloud server, improving data processing efficiency, but also avoids normal inspection images occupying uplink transmission bandwidth and cloud computing resources.
[0124] S103: Based on the inspection images and defect information, determine the location information of the defect information in the photovoltaic module to be inspected.
[0125] In this step, location information refers to the specific location of the defect information within the photovoltaic module. When determining the location of the defect information within the photovoltaic module, the cloud server can map the abnormal area indicated by the defect information based on the correspondence between the inspection images and the defect information, thereby obtaining the location information of the defect information within the photovoltaic module.
[0126] Specifically, the positioning result can be represented in several forms: for example, it can be represented by point coordinates in the component coordinate system, that is, by establishing a two-dimensional plane coordinate system with a corner point of the photovoltaic module as the origin, and using a set of precise coordinates. The pixel-level location of the defect can be numerically labeled; alternatively, regional coordinates can be used, which describe the approximate area occupied by the defect in the form of a rectangle or polygon, making it easier for subsequent maintenance personnel to quickly locate the abnormal area; in addition, component partition identification can be used, which pre-divides a photovoltaic module into several regular sub-regions (such as "top left", "middle", "bottom right" or numbered according to the cell string sequence), and the location of the defect is roughly represented by the partition number to which it belongs.
[0127] These three methods of representing location information decrease in precision at each level, but they are applicable to different scenarios. Point coordinates are suitable for precise positioning and automated repair guidance, area coordinates are suitable for area-type defects (such as hot spots and dust accumulation areas), and partition identifiers are suitable for rapid preliminary checks and maintenance work order dispatch. Through any of the above representation methods, the location information ultimately returned by the cloud server to the edge server can provide maintenance personnel or automated equipment with clear and actionable defect location guidance.
[0128] In practice, the process begins by first identifying an initial defective component within the photovoltaic module based on the drone's flight position when capturing the inspection image. This determines which module or sub-string the defect falls within, providing a spatial reference for subsequent coordinate mapping. Next, the coordinates of each pixel in the inspection image are transformed into the device coordinate system of the drone's data acquisition equipment. Then, combining the drone's pose parameters and the acquisition equipment's intrinsic and extrinsic parameters, the pixel coordinates are transformed into the world coordinate system of the initial defective component, yielding the pixel's position coordinates in real 3D space. Finally, by traversing all defective pixels in the inspection image, the location information of the defect within the photovoltaic module is obtained, thus transforming the defect from "seeing it in the image" to "locating it on the module."
[0129] S104: Send the location information to the edge server.
[0130] For the edge server side, it receives the location information of the defects in the photovoltaic module from the cloud server.
[0131] After generating location information, the cloud server encapsulates the information and returns it to the edge server via a communication link. This can be done by the cloud server actively pushing the information or by the edge server retrieving it through a query. To ensure the edge server can correlate the returned results with the original inspection task, the encapsulated result can include information related to the inspection task. If multiple defective objects exist in an inspection image, the cloud server can output multiple location information entries, maintaining the association between each entry and its corresponding defective object.
[0132] S105: In response to receiving the location information of the defect information in the photovoltaic module to be inspected from the cloud server, determine the defect location information of the photovoltaic module to be inspected based on the location information.
[0133] S106: Output defect location information.
[0134] After receiving location information, the edge server overlays it onto the corresponding inspection image or the 3D model of the photovoltaic module to be inspected, generating defect location information for use by the maintenance side. This information is then pushed to maintenance personnel via a Human-Machine Interface (HMI). For example, the defect location information can be pushed to the maintenance terminal's application or monitoring platform via a wireless network, allowing maintenance personnel to remotely view the specific location and type of defect on the photovoltaic module. Simultaneously, it can automatically generate maintenance work orders containing location coordinates, inspection time, and module number, sending alarm notifications to maintenance personnel via SMS or instant messaging tools. This ensures that defect information reaches relevant personnel immediately, facilitating timely defect rectification.
[0135] In addition, the edge server can also issue a re-shooting command to the inspection drone based on the returned location information, so that the inspection drone can take a second close-up shot of the location of the defect information in the photovoltaic module.
[0136] The defect location method for photovoltaic modules provided in this application is applied to a defect location system consisting of a cloud server, multiple edge servers communicating with the cloud server, and multiple inspection drones communicating with each edge server. Specifically, it is applied to any one edge server. The method includes: acquiring inspection images of the photovoltaic modules to be inspected. The edge servers are deployed locally at the photovoltaic power station as data access sides, capable of processing images collected by the inspection drones locally. Each edge server corresponds to a type of photovoltaic module and has its own inspection cycle. A clock synchronization module determines in real time whether the current time falls within a preset inspection cycle. If the current time is within its preset inspection cycle, an inspection command is issued to the inspection drone, which then performs image acquisition and transmits the inspection image back to the edge server. After acquiring the inspection image, the edge server performs a preliminary defect judgment based on preset recognition rules or a deep learning model, outputting a binary result. Only when the inspection image is determined to contain defect information is the inspection image and defect information uploaded to the cloud server. After receiving the inspection images and defect information uploaded by the edge server, the cloud server determines the location of the defect information on the photovoltaic module to be inspected and returns the generated location information to the edge server. In response to the received location information, the edge server overlays it on the inspection image or the 3D model of the photovoltaic module to generate defect location information that can be used by operation and maintenance personnel, and pushes it to the operation and maintenance terminal through the human-machine interface.
[0137] Using the above methods, in terms of data transmission and resource utilization, the edge server performs initial defect judgment locally and only uploads inspection images and defect information containing defects to the cloud server. This avoids the ineffective occupation of uplink transmission bandwidth and cloud storage resources by a large number of normal inspection images. At the same time, the on-demand upload mechanism effectively reduces the overall response latency of defect location, enabling the cloud server's computing power to focus on serving images that actually have anomalies, improving data processing efficiency, and realizing rapid location of photovoltaic module defects. This, in turn, improves the operation and maintenance response speed and fault handling efficiency of photovoltaic power station inspections.
[0138] Figure 2 A flowchart illustrating a method for locating defects in a photovoltaic module provided in this application. Figure 2 This method is applied to any edge server in a photovoltaic module defect location system, such as... Figure 2 As shown, based on the above embodiments, the defect location method for photovoltaic modules further includes determining whether the inspection image contains defect information, specifically including the following steps:
[0139] S201: Perform grayscale processing on the inspection image to obtain a grayscale image of the inspection image.
[0140] Since the visible light cameras on inspection drones acquire color images during the inspection process, to reduce the computational complexity of subsequent processing and highlight the brightness and structural information in the images, the original color images are usually first converted into grayscale images. Subsequent analysis and processing are then performed within the grayscale domain. Grayscale processing refers to performing pixel-level numerical conversion operations on the color images containing red, green, and blue channel information acquired by the inspection drone, discarding the original color information and retaining only the single-channel grayscale information that reflects the brightness and darkness of the image.
[0141] For example, the RGB three primary colors (Red, Green, Blue, RGB) of each pixel in the inspection image can be fused and calculated into a single grayscale value within the range of [0, 255] according to a preset weighted conversion formula, ultimately generating a grayscale image composed of different shades of black and white gray. The preset weighted conversion formula can be expressed as:
[0142]
[0143] Where Y represents the grayscale value of each pixel in the grayscale image; R, G, and B represent the red, green, and blue values of each pixel in the inspection image, respectively, and all of them range from [0, 255]. , , These represent the pre-set weight values for the red, green, and blue values, respectively. Optionally, The value can be 0.229. The value can be 0.587. The value can be 0.114.
[0144] By converting inspection images to grayscale, the amount of data stored in the images can be significantly reduced, color-irrelevant interference factors can be eliminated, and the computational complexity of subsequent defect identification and defect location can be simplified.
[0145] S202: Perform background segmentation processing on the grayscale image to obtain the photovoltaic image of the inspection image, and send the photovoltaic image to the cloud server.
[0146] For the cloud server side, it receives the photovoltaic images corresponding to the inspection images sent by the edge server.
[0147] Because the inspection images collected by the inspection drone contain images of other objects besides the photovoltaic modules to be inspected, such as the sky, ground, support shadows, and weeds—irrelevant background images that do not belong to the photovoltaic modules—the images of the photovoltaic modules to be inspected constitute the foreground of the inspection image, while other irrelevant background images constitute the background. To ensure effective defect detection only on the photovoltaic module area in subsequent processing, eliminate environmental noise introduced by non-target objects such as the sky, shadows, and weeds, reduce the consumption of computational resources by redundant background pixels, and ensure that the location and defect classification of the photovoltaic modules can be performed on a clean input image, it is necessary to remove irrelevant background images from the inspection image.
[0148] For example, foreground and background images can be eliminated based on the pixel differences between the foreground and background images in the corresponding grayscale image of the inspection image. These differences can be specifically manifested as jumps in pixel grayscale values. Specifically, photovoltaic modules themselves have regular rectangular geometric shapes, relatively uniform grayscale distributions, and periodically arranged cell structures, while background objects such as the sky, ground, shadows, and weeds often exhibit irregular shapes or large grayscale fluctuations. Based on these differences, image segmentation algorithms (such as thresholding, edge detection, region growing, or graph cut-based segmentation methods) can be used to establish foreground and background discrimination criteria at the pixel level. Pixel clusters whose grayscale values fall within the typical grayscale range of the photovoltaic module and satisfy geometric connectivity constraints are marked as foreground targets and retained. Pixel clusters whose grayscale values do not fall within the typical grayscale range of the photovoltaic module, or do not satisfy geometric connectivity constraints, are marked as background and eliminated.
[0149] In other words, by setting a reasonable grayscale threshold for segmenting pixels, each pixel in the grayscale image corresponding to the inspection image can be classified into two categories: "belonging to photovoltaic modules" or "not belonging to photovoltaic modules". This allows for the separation of clean photovoltaic module imaging areas from the original inspection image, thus obtaining the photovoltaic image corresponding to the inspection image.
[0150] S203: Perform an average calculation on the grayscale value of each pixel in the photovoltaic image to obtain the average grayscale value of the photovoltaic image.
[0151] In this step, the mean grayscale value refers to the average value obtained by summing the grayscale values of all pixels in the photovoltaic image and dividing by the total number of pixels. It can be understood that the grayscale value of each pixel in the photovoltaic image is represented by an integer between [0, 255], where 0 represents pure black, 255 represents pure white, and intermediate values represent different shades of gray. Therefore, the mean grayscale value of the photovoltaic image directly reflects the overall brightness level of the image. A mean value close to 0 indicates that the photovoltaic image is close to black and relatively dark; a mean value close to 255 indicates that the photovoltaic image is close to white and relatively bright.
[0152] Specifically, the mean grayscale value of a photovoltaic image is calculated by substituting the grayscale values of all pixels in the image one by one and summing them. The resulting total grayscale value is then divided by the total number of pixels in the photovoltaic image, and the quotient is the mean grayscale value of the photovoltaic image. It should be noted that the photovoltaic image here refers to the effective image area after the aforementioned background segmentation processing, retaining only the imaging area of the photovoltaic module to be inspected and removing irrelevant background objects. Its size may be smaller than the original inspection image, but the pixels participating in the mean calculation are limited to all pixels within this effective area, excluding the positions of the removed background pixels.
[0153] The specific calculation process can be represented mathematically as follows:
[0154]
[0155] Where M represents the average grayscale value of the photovoltaic image; N represents the total number of pixels in the photovoltaic image; g i This represents the grayscale value of each pixel, i = 1, 2, 3, ..., n. In practical engineering implementations, this calculation is usually accomplished using an image processing programming library. By traversing each pixel position in the photovoltaic image, its grayscale value is accumulated into a temporary variable, while the count of the traversed pixels is recorded. After the traversal is completed, the accumulated value is divided by the total number of pixels to obtain the average grayscale value of the photovoltaic image.
[0156] S204: Determine whether the average grayscale value is less than the first preset grayscale value or greater than the second preset grayscale value.
[0157] If not, proceed to S205; if yes, proceed to S206.
[0158] The first preset grayscale value is less than the second preset grayscale value, which is used to limit the effective grayscale range for defect judgment. The first preset grayscale value refers to the lower limit threshold of the grayscale range of normal images, determined by statistical analysis of the average grayscale values of a large number of inspection images of normal photovoltaic modules and inspection images of defective photovoltaic modules. For example, the first preset grayscale value can be 105, 110, 115, or 120, etc. The second preset grayscale value refers to the upper limit threshold of the grayscale range of the above-mentioned normal images. For example, the second preset grayscale value can be 150, 155, or 160, etc.
[0159] S205: It is determined that the inspection images do not include defect information.
[0160] In other words, if the average grayscale value is greater than or equal to the first preset grayscale value and less than or equal to the second preset grayscale value, then the inspection image is determined to not contain defect information.
[0161] If the grayscale value is between the first preset grayscale value and the second preset grayscale value, it indicates that the overall brightness level of the photovoltaic image falls within the statistical distribution range of the average grayscale value of a normal photovoltaic module. Its grayscale center position is consistent with that of a photovoltaic module in known good condition. The image is not significantly darker than the lower threshold due to factors such as shadows, stains, or severe dust accumulation, nor is it significantly brighter than the upper threshold due to factors such as hot spots, abnormal surface reflection, or overexposure. Therefore, it is determined that there is no obvious grayscale abnormality on the surface of the photovoltaic module, and it does not contain the overall brightness deviation caused by typical defects such as internal cracks, hot spots, breakage, or shading. In other words, it is determined that the inspection image does not contain defect information.
[0162] S206: Determine that the inspection images include defect information.
[0163] In other words, if the average grayscale value is less than the first preset grayscale value or greater than the second preset grayscale value, then the inspection image is determined to include defect information.
[0164] If the average grayscale value is less than the first preset grayscale value, it indicates that the overall brightness of the inspection image is significantly lower than the typical level of a normal photovoltaic module. Therefore, it is determined that the inspection image contains defect information, and the defect type is shading, stains, or shadows, etc. If the average grayscale value is greater than the second preset grayscale value, it indicates that the overall brightness of the inspection image is significantly higher than the typical level of a normal photovoltaic module. Therefore, it is determined that the inspection image contains defect information, and the defect type is hot spots, overexposure, or abnormal surface reflection, etc.
[0165] The defect location method for photovoltaic modules provided in this application first involves an inspection drone equipped with a visible light camera acquiring a color inspection image of the photovoltaic module to be inspected. Then, the color inspection image is sequentially processed by grayscale conversion, background segmentation, and grayscale mean statistics. Finally, the inspection image is determined to contain defect information based on the comparison between the grayscale mean and the preset grayscale value.
[0166] Specifically, grayscale processing converts the original RGB three-channel color image into a single-channel grayscale image using a weighted conversion formula. This significantly reduces the data volume and eliminates color interference while preserving brightness and structural information. Next, background segmentation is performed on the grayscale image. Utilizing the differences in pixel grayscale values and geometric connectivity between the photovoltaic module and background objects, irrelevant background pixels such as the sky, ground, shadows, and weeds are removed, retaining only the imaging area of the photovoltaic module to be inspected as the valid photovoltaic image. Then, the grayscale values of all pixels within this valid area are summed and divided by the total number of pixels to calculate the average grayscale value of the photovoltaic image. This average grayscale value directly reflects the overall brightness level of the photovoltaic image. The average grayscale value is then compared with a first preset grayscale value and a second preset grayscale value. If the average grayscale value is greater than or equal to the first preset grayscale value and less than or equal to the second preset grayscale value, the current inspection image is determined not to contain defect information; conversely, if the average grayscale value is less than the first preset grayscale value or greater than the second preset grayscale value, the current inspection image is determined to contain defect information.
[0167] The above methods reduce the computational load and memory consumption of edge servers and cloud servers, making them particularly suitable for high-concurrency image processing scenarios in large-scale photovoltaic power plant inspections. Furthermore, background segmentation processing accurately separates the imaging area of the photovoltaic modules to be inspected from the complex on-site environment, eliminating noise pollution from non-target objects such as sky brightness variations, ground reflection interference, support shadows, and weeds. This ensures that subsequent grayscale mean statistics are performed only on the effective module areas, avoiding dilution and shifting of the mean calculation results by background pixels. This improves the signal-to-noise ratio and reliability of defect identification, providing valuable prior information for subsequent targeted defect re-inspection and fine-tuning, further enhancing the accuracy of defect location and the speed of operation and maintenance response.
[0168] Figure 3 A flowchart illustrating a method for locating defects in a photovoltaic module provided in this application. Figure 3 This method is applied to any edge server in a photovoltaic module defect location system, such as... Figure 3 As shown, in Figure 2 Based on the previous embodiment, in S202: background segmentation processing is performed on the grayscale image to obtain the photovoltaic image of the inspection image, specifically including:
[0169] S301: Obtain the grayscale value of each pixel in the grayscale image.
[0170] For example, in engineering implementation, obtaining the grayscale value of each pixel can be achieved using an image data structure from an open-source computer vision library. This image data structure organizes the grayscale image into a two-dimensional array arranged in rows, with each row containing several column elements, and each element storing the grayscale value of the corresponding pixel. Therefore, by using a double loop to traverse all rows and columns of the grayscale image, the grayscale value at each position in the two-dimensional array can be read sequentially. After the traversal is complete, the grayscale value sequence of all pixels in the grayscale image can be obtained.
[0171] S302: Determine whether the grayscale value is less than the first preset threshold or greater than the second preset threshold.
[0172] If not, execute S303; if yes, execute S304.
[0173] The first preset threshold is less than the second preset threshold. The first and second preset thresholds are two gray-level thresholds used to distinguish between foreground pixels and background pixels during the background segmentation of a grayscale image. They together define a continuous gray-level value range. The first preset threshold is the lower limit of the gray-level value range, and the second preset threshold is the upper limit of the gray-level value range. Pixels with gray-level values within this gray-level value range are determined to be foreground targets (i.e., photovoltaic module imaging), while pixels with gray-level values outside this gray-level value range are determined to be background pixels.
[0174] Specifically, historical inspection images of photovoltaic modules under different times and weather conditions can be analyzed to examine the differences between foreground and background pixels. For example, in real-world scenarios, the surface of photovoltaic modules is typically in a medium-to-bright grayscale range. Under sufficient sunlight, the grayscale value may be concentrated between 100 and 200, while the sky background may be concentrated between 200 and 250, and the shadowed areas on the ground may be concentrated between 0 and 50. In this case, a first preset threshold of approximately 80 and a second preset threshold of approximately 210 can be set. However, it is important to emphasize that the specific values of the first and second preset thresholds are not fixed constants but will vary with factors such as light intensity, camera exposure parameters of the inspection drone, aerial altitude, surface cleanliness of the photovoltaic modules, and degree of aging.
[0175] S303: Determine the pixel as a background pixel.
[0176] In other words, if the grayscale value is less than the first preset threshold or greater than the second preset threshold, the pixel is determined to be a background pixel.
[0177] Understandably, when the grayscale value of a pixel is less than the first preset threshold, it indicates that the brightness level of the pixel is too low. This usually corresponds to dark background areas such as shadows, ground projections, or weeds in the inspection image. The grayscale values of these areas deviate significantly from the brightness range that the photovoltaic module surface should have. When the grayscale value of a pixel is greater than the second preset threshold, it indicates that the brightness level of the pixel is too high. This usually corresponds to the sky, areas with strong light reflection, or other overly bright background objects. The grayscale values of these areas also do not belong to the normal grayscale distribution of the photovoltaic module surface.
[0178] Therefore, if the gray value is less than the first preset threshold or greater than the second preset threshold, the pixel is determined to be a background pixel and will be excluded or ignored in subsequent processing, thereby avoiding the misintroduction of non-target information such as shadows and sky into the subsequent defect detection process.
[0179] S304: The pixel is identified as the foreground pixel.
[0180] In other words, if the grayscale value is greater than or equal to the first preset threshold and less than or equal to the second preset threshold, then the pixel is determined to be a foreground pixel.
[0181] When the grayscale value of a pixel is greater than or equal to the first preset threshold and less than or equal to the second preset threshold, it indicates that the brightness level of the pixel falls within the grayscale range that a normal photovoltaic module surface should have. It is neither an excessively dark shadow area nor an excessively bright sky or reflective area. Therefore, the pixel is determined to be a foreground pixel, that is, a pixel belonging to the effective imaging area of the photovoltaic module. These pixels will be retained for subsequent grayscale mean calculation and defect identification, etc.
[0182] S305: Determine the pixel adjacent to the foreground pixel at a preset orientation as the target pixel.
[0183] To ensure the accuracy of foreground pixel identification, after initially determining a pixel as a foreground pixel based on a grayscale threshold, further verification can be performed using the spatial neighborhood relationships of the image. Specifically, starting from the location of the foreground pixel, target pixels located at a preset orientation and adjacent to the foreground pixel are searched. The preset orientation refers to the spatially adjacent pixel positions relative to the current center pixel (foreground pixel) in the two-dimensional image coordinate system. These positions constitute the pixel's neighborhood system, with four-neighbor and eight-neighbor connectivity modes being the most commonly used.
[0184] The four-neighborhood refers to the four pixel positions located directly above (same column, previous row), directly below (same column, next row), directly to the left (previous column, same row), and directly to the right (next column, same row) of the starting point. These four pixels are directly adjacent to the center pixel in the horizontal or vertical direction and share an edge. The eight-neighborhood is based on the four-neighborhood and further adds four diagonal positions: top left (previous row, previous column), bottom left (next row, previous column), top right (previous row, next column), and bottom right (next row, next column). A total of eight pixels are adjacent to the center pixel in the horizontal, vertical, or diagonal direction, and the diagonal pixels share a vertex with the center pixel.
[0185] The reason for identifying these neighboring pixels as target pixels is that pixels belonging to the same target object (such as the surface of a photovoltaic module) are usually spatially continuous. That is, pixels within the foreground region tend to cluster together in their neighborhood and do not appear in isolation. Therefore, by using the neighboring pixels around a foreground pixel as target pixels, the accuracy of determining whether a target pixel is a foreground pixel can be improved.
[0186] Based on the target pixel, the corresponding unconfirmed pixels are obtained. Furthermore, based on the grayscale distribution characteristics of the unconfirmed pixels and their surrounding neighboring pixels and the threshold comparison results, it is comprehensively determined whether these unconfirmed pixels truly belong to the foreground area of the photovoltaic module. Finally, the entire set of foreground pixels after neighborhood verification is extracted to form a complete photovoltaic image that retains only the photovoltaic module image while completely eliminating background interference.
[0187] S306: Determine whether the target grayscale value of the target pixel is greater than or equal to the first preset threshold and less than or equal to the second preset threshold.
[0188] If yes, then execute S307; otherwise, execute S308.
[0189] S307: The target pixel is determined to be a photovoltaic pixel.
[0190] In other words, if the target grayscale value of the target pixel is greater than or equal to the first preset threshold and less than or equal to the second preset threshold, then the target pixel is determined to be a photovoltaic pixel.
[0191] The target grayscale value of the target pixel can be obtained by referring to S301, which will not be repeated here. Based on S304, it can be understood that if the target grayscale value of the target pixel is greater than or equal to the first preset threshold and less than or equal to the second preset threshold, it indicates that the brightness level of the target pixel falls within the grayscale range that should be present on the surface of a normal photovoltaic module. That is, the neighboring pixels around the previously determined foreground pixel are also foreground pixels, so they are determined as photovoltaic pixels.
[0192] S308: Define the target pixel as an edge pixel.
[0193] In other words, if the target grayscale value of the target pixel is less than the first preset threshold or greater than the second preset threshold, the target pixel is determined to be an edge pixel.
[0194] Based on S303, it is understandable that if the target gray value of the target pixel is less than the first preset threshold or greater than the second preset threshold, the target pixel is determined to be a background pixel. That is, the neighboring pixels around the previously determined foreground pixel are background pixels. The target pixel is located in the edge region of the decomposition between the foreground pixel and the background, so it is determined to be an edge pixel.
[0195] S309: A photovoltaic image is obtained based on photovoltaic pixels and edge pixels.
[0196] Understandably, photovoltaic (PV) pixels refer to the core, valid pixels that are ultimately confirmed as belonging to the PV module after further filtering out potential misjudgment noise from the foreground pixels. They can be understood as high-confidence foreground pixels retained after multiple rounds of verification, possessing higher reliability and purity compared to the original foreground pixels. Edge pixels, on the other hand, refer to the pixels located at the boundaries of the PV module's imaging area. These pixels are situated at the interface between the PV module and the background, accurately delineating the geometric shape, boundary orientation, and corner positions of the PV module. They are crucial information ensuring that the PV module area in the final image strictly corresponds to its actual physical form. For example, using high-confidence PV pixels as the main area and edge pixels as the boundary constraints, the grayscale image is segmented to extract the PV pixels, thus obtaining the PV image corresponding to the inspection image.
[0197] The defect localization method for photovoltaic modules provided in this application first obtains the grayscale value of each pixel in a grayscale image. Then, using a first preset threshold as the lower limit of the grayscale interval and a second preset threshold as the upper limit of the grayscale interval, it is determined whether the grayscale value of each pixel falls within the effective grayscale interval. If the grayscale value is less than the first preset threshold or greater than the second preset threshold, the pixel is determined to be a background pixel. If the grayscale value is greater than or equal to the first preset threshold and less than or equal to the second preset threshold, the pixel is determined to be a foreground pixel. Based on this, in order to improve the accuracy of foreground pixel determination and eliminate isolated misjudgments caused by noise or local lighting anomalies, a spatial neighborhood verification mechanism is further introduced. Taking the location of the foreground pixel as the center, pixels adjacent to it in a preset orientation (such as four-neighborhood or eight-neighborhood) are determined as target pixels. Then, it is determined whether the grayscale values of these target pixels also fall within the effective grayscale interval. If the grayscale value of the target pixel still meets the foreground determination condition, it is confirmed as a photovoltaic pixel. If the grayscale value of the target pixel falls outside the effective interval, it is marked as an edge pixel. Finally, the high-confidence photovoltaic pixels confirmed by neighborhood verification are used as the main imaging area of the photovoltaic module, and the edge pixels are used as the precise boundary contour between the photovoltaic module and the background. This results in a photovoltaic image that removes irrelevant background and retains only the effective imaging area of the photovoltaic module to be inspected.
[0198] The above method can effectively filter out isolated misjudged pixels caused by noise or local illumination fluctuations, making the final set of photovoltaic pixels closer to the real component outline in terms of spatial integrity. The resulting photovoltaic image provides clean, accurate, and spatially clear input data for subsequent defect information judgment and defect location, ensuring the reliability and accuracy of the entire defect location process from the source.
[0199] Figure 4 A flowchart illustrating a method for locating defects in a photovoltaic module provided in this application. Figure 4 This method is applied to cloud servers in photovoltaic module defect location systems, such as... Figure 4 As shown, based on the above embodiment, in S103: based on the inspection image and defect information, the location information of the defect information in the photovoltaic module is determined, specifically including:
[0200] S401: Based on the flight position of the inspection drone at the moment the inspection image is generated, determine the initial defective component in the photovoltaic module to be inspected that corresponds to the defect information.
[0201] In this step, the generation time refers to the precise timestamp when the shutter of the image acquisition device, such as a visible light camera, on the inspection drone triggers the exposure. This timestamp is used to connect the inspection image with the flight trajectory data of the inspection drone. The flight position refers to the three-dimensional absolute coordinates of the antenna phase center (or fuselage center of gravity) of the inspection drone in the geographic space coordinate system at the generation time, including longitude, latitude, and altitude. This flight position data is usually provided by the Real-Time Kinematic (RTK) module on the inspection drone, with an accuracy of up to the centimeter level.
[0202] Understandably, the inspection drone flies along a specific path, and the inspection images it collects are temporally ordered. By obtaining the generation time of the inspection image containing defect information, and then searching for the drone's location in the RTK module's storage module based on that generation time, we can determine its flight position. Then, by obtaining the imaging angle of the visible light camera on the drone that captured the inspection image containing defect information at that flight position, we can identify the possible component with the defect information in the photovoltaic module to be inspected, i.e., the initial defective component.
[0203] For example, the acquisition of the imaging angle of the visible light camera at this flight position relies on two core sensors on the inspection drone: the inertial measurement unit (IMU) and the gimbal. The IMU measures the drone's pitch angle (the nose wobbles up and down), roll angle (the fuselage tilts left and right), and yaw angle (the nose points horizontally) in real time. The gimbal suspends and stabilizes the visible light camera, and its own three axial angles (corresponding to pitch, roll, and yaw) are also recorded in real time. The IMU data and gimbal data corresponding to the flight position are vector-superimposed to synthesize the imaging angle of the visible light camera at that flight position.
[0204] Using the flight position as the projection center of the visible light camera and the imaging angle as the direction of the light ray, combined with the camera's inherent intrinsic parameters, a collinearity equation can be constructed. This equation describes a spatial ray originating from the camera and passing through the defective pixel in the image; that is, the image pixel, the camera projection center, and the ground object are strictly collinear. Since the photovoltaic modules have known precise coordinates in three-dimensional space (from the power plant design drawings), the intersection of this spatial ray with the three-dimensional models of all photovoltaic modules is calculated. The photovoltaic module component that the spatial ray first encounters is the initial defective component.
[0205] S402: Perform distortion correction processing on the normalized image of the photovoltaic image to obtain the corrected image of the photovoltaic image.
[0206] During inspection flights, factors such as solar altitude angle, cloud cover, and real-time adjustments to the camera's automatic exposure strategy can cause significant differences in brightness and contrast in images of the same photovoltaic module taken at different waypoints. Since defect characteristics are often subtle changes in grayscale or color, these changes are easily masked by the overall brightness fluctuations caused by variations in lighting when analyzed directly from the original images. Furthermore, the visible light or infrared lenses used for photovoltaic inspections, especially wide-angle lenses designed to cover a larger field of view, inevitably suffer from radial and tangential distortion during manufacturing and assembly. This distortion causes the pixel coordinates of actual physical points in the inspection images to deviate from their ideal pinhole projection positions.
[0207] Therefore, to more accurately identify defective areas from the initial defective components, the cloud server first preprocesses the photovoltaic image. Preprocessing includes normalization and distortion correction. Normalization results in a normalized image, which uses linear or nonlinear mapping algorithms to rescale the pixel grayscale values of the original image to a standardized numerical range. For example, the mean is normalized to zero, the variance is normalized to a unit value, or histogram equalization stretches the dynamic distribution range to the entire grayscale range, thus forcing the entire image to be statistically consistent. Distortion correction relies on the camera intrinsic parameter matrix and radial-tangential distortion coefficients, precisely calculated by the cloud server using a checkerboard calibration method, to perform inverse coordinate remapping and grayscale resampling on each pixel of the normalized image.
[0208] For example, normalization can be mathematically represented as:
[0209]
[0210] Where X0 represents the normalized gray value of a pixel in the photovoltaic image, that is, the gray value of a certain pixel in the normalized image; X represents the gray value of a pixel in the photovoltaic image. This represents the minimum grayscale value among all pixels in a photovoltaic image; This represents the maximum grayscale value among all pixels in the photovoltaic image.
[0211] Subsequently, for each pixel in the normalized image, its corresponding distortion-free ideal coordinates are first solved using a preset inverse distortion model. Then, the original grayscale value is assigned to the corresponding integer pixel position in the corrected image through grayscale resampling. This process is essentially a combination of nonlinear coordinate transformation and grayscale mapping from the distorted image space to the distortion-free image space. The grayscale value of each pixel in the final corrected image strictly corresponds to the radiance value that should be at that position in the real world, and no longer includes the geometric coordinate disturbance caused by lens optical deformation.
[0212] S403: For the pixel coordinates of each pixel in the corrected image, perform coordinate transformation processing on the pixel coordinates to obtain the first coordinates corresponding to the pixel; wherein, the first coordinates are used to indicate the position of the pixel in the device coordinate system of the image acquisition device of the inspection drone.
[0213] The essence of this step is to map each corrected pixel in the distorted image from the two-dimensional plane coordinate system to the three-dimensional camera coordinate system inherent in the image acquisition device of the inspection drone, thereby providing a unified three-dimensional basis for subsequent defect localization of the inspection image.
[0214] In practice, the pixel coordinates of the corrected image are defined in a pixel coordinate system, which has the top left corner of the image as the origin, the positive x-axis pointing horizontally to the right, and the positive y-axis pointing vertically downwards. The camera coordinate system, on the other hand, is a three-dimensional right-handed Cartesian coordinate system with the camera's optical center as the origin, the Z-axis pointing in front of the camera lens (i.e., the shooting direction), the X-axis pointing horizontally to the right, and the Y-axis pointing vertically downwards.
[0215] Transforming pixel coordinates to the camera coordinate system relies on the inverse operation of the camera intrinsic parameter matrix. Specifically, the cloud server has already accurately solved for the camera's intrinsic parameter matrix during the prior camera calibration phase, which includes the equivalent focal length and principal point coordinates. During the transformation, for any pixel coordinate in the calibrated image... The corrected pixel is normalized by the inverse transformation of the intrinsic parameter matrix to obtain the first three-dimensional coordinate of the pixel in the camera coordinate system: x c and y c These represent the horizontal and vertical offsets of the spatial ray originating from the optical center and passing through the pixel at a unit depth from the optical center, respectively. The Z coordinate is forcibly set to 1, indicating that the first coordinate is actually located on the virtual projection plane at a unit distance in front of the camera.
[0216] S404: Perform coordinate transformation on the first coordinate to obtain the second coordinate corresponding to the pixel; wherein, the second coordinate is used to indicate the position of the pixel in the world coordinate system of the initial defective component.
[0217] Understandably, the coordinate system of the photovoltaic module to be inspected is the world coordinate system, and the coordinate system of the initial defective component is also the world coordinate system. In order to determine the specific location of the defect in the initial defective component, the first coordinate in the camera coordinate system needs to be transformed to the second coordinate in the world coordinate system. This is necessary to accurately align the "local observation direction" defined based on the camera's own attitude with the "global physical space" which has absolute geographical significance, so that the optical projection of the defect can jump from the relative perception domain of the carrier to the objective world coordinate system that can be reproduced on the ground.
[0218] Transforming the first coordinate in the camera coordinate system to the world coordinate system depends on the extrinsic parameter matrix of the image acquisition device. This matrix consists of two parts: one part is the translation vector, which is directly given by the absolute three-dimensional position of the camera optical center in the world coordinate system measured by the RTK module; the other part is the rotation matrix, which is the rotation relationship of the camera coordinate system relative to the world coordinate system calculated by combining the imaging angles recorded by the inertial measurement unit and the gimbal.
[0219] Specifically, the extrinsic parameter matrix is used to perform homogeneous coordinate transformation on the first coordinate representing the spatial ray of the pixel. The rotation matrix is used to correct the camera's local spatial orientation to the global world coordinate system. Then, the translation vector is superimposed to compensate for the offset of the coordinate origin from the camera's optical center to the reference origin of the world coordinate system. Finally, the second coordinate, which can characterize the position of the spatial point corresponding to the defect pixel in the unified world coordinate system of the photovoltaic module, is obtained. This achieves a complete conversion of the camera's relative observation coordinates to absolute coordinates with global positioning attributes.
[0220] S405: Obtain position information based on the second coordinates of each pixel in the corrected image.
[0221] Understandably, after a series of coordinate transformations, each pixel in the corrected image has obtained its precise three-dimensional world coordinates on the surface of the photovoltaic module. The cloud server traverses all the second coordinates obtained through coordinate transformation in the corrected image and forms a set of coordinate values for each pixel's second coordinates, which is used as the location information of the defect in the initial defect component.
[0222] The defect location method for photovoltaic modules provided in this application first determines the initial defective component in the photovoltaic module corresponding to the defect information by using the flight position of the inspection drone at the moment the inspection image is generated. Then, to more accurately determine the defective area from the initial defective component, the photovoltaic image is normalized and distortion corrected to obtain a corrected image. Next, each pixel in the corrected image undergoes two coordinate transformations: the first transformation maps the two-dimensional pixel coordinates in the pixel coordinate system to the three-dimensional camera coordinate system with the camera's optical center as the origin, obtaining a first coordinate representing the direction of a spatial ray; the second transformation transforms the first coordinate from the camera's local coordinate system to a world coordinate system with absolute geographical significance, obtaining a second coordinate for each pixel on the physical surface of the photovoltaic module. Finally, the second coordinates of all pixels in the corrected image are traversed and aggregated into a set of positional information coordinate values covering the entire imaging area of the initial defective component. This set serves as the final location basis for the defect, for subsequent on-site navigation and maintenance by maintenance personnel.
[0223] The above methods enable precise location of defects in photovoltaic modules, significantly shorten the processing cycle from image analysis to on-site repair, improve the overall efficiency and reliability of photovoltaic power plant operation and maintenance, and effectively reduce power generation losses caused by hot spot deterioration or fault omission due to defect location deviation.
[0224] Figure 5 A flowchart illustrating a method for locating defects in a photovoltaic module provided in this application. Figure 5 This method is applied to any edge server in a photovoltaic module defect location system, such as... Figure 5 As shown, based on the above embodiments, the defect location method for photovoltaic modules further includes:
[0225] S501: If the current time is within the preset inspection cycle of the edge server, then the photovoltaic modules in the area where the edge server is located will be identified as photovoltaic modules to be inspected.
[0226] As mentioned in 101, the inspection cycle refers to the frequency at which each edge server automatically starts an inspection task for its photovoltaic modules according to the time interval preset according to the photovoltaic type. It can be two hours / time, daily / time, etc. If the current time is within the preset inspection cycle of the edge server, the photovoltaic modules in its area are identified as photovoltaic modules to be inspected, and the type of this inspection task is determined to be daily.
[0227] In another possible implementation, if the edge server receives an inspection request from the site monitoring platform or the terminal of the maintenance personnel via the wireless network, it will identify the photovoltaic module corresponding to the inspection request as the photovoltaic module to be inspected. The request data packet of the inspection request carries a specific type identifier to distinguish between two completely different inspection needs: routine inspection (daily type) and emergency inspection for unexpected events (emergency type).
[0228] S502: Generate inspection instructions including the inspection route based on the inspection type of the photovoltaic modules to be inspected.
[0229] When the edge server receives an inspection request from the site monitoring platform or maintenance personnel's terminal via the wireless network, its internal request parsing module first performs protocol decomposition on the request data packet to extract the type identifier field. This type identifier can be a predefined enumerated value, such as binary code "00" representing daily type and "01" representing burst type. The edge server compares this code with the locally stored type mapping table to determine the inspection type of the photovoltaic module to be inspected.
[0230] If the comparison result shows that the identifier corresponds to the daily type, it indicates that this inspection belongs to the periodic routine maintenance task. Then, using the component number to be inspected carried in the inspection request as an index, a table lookup operation is performed in the local database of the edge server to obtain the inspection route corresponding to this daily type inspection task, and fill it into the route field of the inspection instruction.
[0231] If the comparison result shows that the identifier corresponds to the sudden type, it indicates that this inspection is an unconventional emergency response task triggered by an unexpected event (such as equipment high temperature alarm, external impact damage, obstruction by foreign objects, or unexpected working conditions such as sudden changes in weather). The edge server parses the precise geographical coordinates of the unexpected event location from the additional data field of the inspection request, generates the sudden inspection route based on the location information of the unexpected event location, and fills it into the route field of the inspection instruction.
[0232] Whether it is a routine or emergency situation, the generated inspection instructions will include not only the inspection route, but also a task priority field, expected execution time period, and urgency level label. Finally, they will be encapsulated into a standard control message that conforms to a drone communication protocol and sent to the inspection drone via a wireless network.
[0233] S503: Sends inspection commands to the target inspection drone that is idle among multiple inspection drones, so that the target inspection drone can collect inspection images based on the inspection commands.
[0234] In this step, the target inspection drone refers to the specific physical flight device that is in an idle state and suitable for carrying out this inspection task, selected from multiple inspection drones that are connected to the edge server.
[0235] In its implementation, the edge server is pre-configured with a real-time updated drone status registry. During each heartbeat detection or status reporting cycle, this registry receives telemetry data packets from various inspection drones, parses them, and fills in fields including flight status flags (idle, inspecting, returning, charging, fault), 3D spatial coordinates, remaining battery percentage, and remaining onboard storage capacity. When the edge server identifies a target inspection drone, it first performs a coarse screening based on the status flags, filtering out all inspection drones whose flight status flags are not "idle." Then, it performs multi-target ranking and evaluation within the candidate set, prioritizing the inspection drone with the highest remaining battery power and the largest remaining onboard storage capacity. Higher battery power ensures safe return even in energy-intensive conditions such as headwinds or hovering for reshoots, while larger remaining onboard storage capacity ensures the inspection drone can hold more image frames during a single takeoff and landing, avoiding premature interruption of the inspection journey and data unloading due to full storage. Once the target inspection drone is identified, the edge server modifies the drone's status to "assigned" in the registry to prevent the same drone from being repeatedly assigned by other inspection requests.
[0236] Subsequently, the edge server sends the previously generated inspection instruction message, including the inspection route, to the communication module of the target inspection drone through the data link layer. After receiving the instruction, the onboard flight control of the target inspection drone first performs message verification and signature verification, and after the verification is successful, sends back an acknowledgment signal to the edge server and switches the "idle" flag in its status register to "inspection". Then, the target inspection drone performs routine inspection of the photovoltaic module to be inspected or performs emergency inspection at the location where an unexpected event has occurred, according to the inspection route in the inspection instruction.
[0237] The photovoltaic module defect localization method provided in this application embodiment takes into account both routine daily inspections of photovoltaic modules that are periodically and automatically initiated, and emergency inspections of photovoltaic modules in response to requests from site monitoring platforms or maintenance personnel terminals. It accurately distinguishes the nature of the task by utilizing type identifiers carried in the request data packets. Based on the inspection type of the photovoltaic module to be inspected, an inspection command including an inspection route is generated. This command is then sent to a target inspection drone that is idle among multiple inspection drones, enabling the target drone to acquire inspection images based on the command. This method improves the flexibility of inspection tasks in responding to different application scenarios, optimizes the utilization efficiency of limited drone resources, reduces the risk of task interruption and resource conflicts, and provides a complete, continuous, and high-quality image data acquisition foundation for subsequent accurate photovoltaic module defect localization.
[0238] In one possible implementation, based on the above embodiments, the defect location method for photovoltaic modules further includes the generation of inspection routes, specifically including:
[0239] (1) If the inspection type is daily, the preset inspection path of the photovoltaic module to be inspected is determined as the inspection route.
[0240] When the edge server determines that the type identifier of this inspection request corresponds to the daily type, it indicates that the current inspection task of the photovoltaic module to be inspected is a periodic routine maintenance task, rather than a sudden emergency event. Its core requirement is to complete the routine inspection image acquisition of the designated area with a fixed time frequency and stable coverage quality, rather than pursuing the shortest time from the start to the end.
[0241] Therefore, the edge server directly determines the preset inspection path corresponding to the photovoltaic module to be inspected as the inspection route for this inspection task. For example, this involves performing a precise index query in the local database using the photovoltaic module number as the key. The preset inspection path is a set of standardized waypoint sequences pre-calculated and stored by maintenance personnel during the routine maintenance preparation phase. This sequence includes not only the longitude, latitude, and altitude coordinates that the inspection drone will sequentially pass through in three-dimensional space, but also specifies the flight speed, gimbal pitch angle, and precise camera exposure trigger position that the inspection drone should maintain at each waypoint. This ensures that the inspection drone can cover the upper surface of each photovoltaic module in the inspection area with a uniform attitude and overlap rate when flying along the path.
[0242] By directly determining the preset inspection path as the inspection route, routine inspection tasks are characterized by high-frequency repetitive execution. Re-executing the path search algorithm every time a task is triggered would significantly consume the computing resources and time of the edge server. However, directly determining the preset inspection path of the photovoltaic modules to be inspected as the inspection route can complete the route determination in milliseconds, leaving the saved computing power for the real-time planning needs of sudden tasks.
[0243] (2) If the inspection type is sudden, the inspection route is determined based on the first location information of the photovoltaic module to be inspected, the second location information of the inspection drone that is performing inspection tasks on the adjacent photovoltaic modules, and the pre-trained route planning model.
[0244] Among them, the adjacent photovoltaic module refers to the photovoltaic module that is adjacent to the photovoltaic module to be inspected and whose inspection type is routine; the route planning model is obtained by training the initial route planning model based on the neural network model based on the pre-acquired sample set. The sample set includes multiple samples, and each sample includes two location information and the corresponding shortest route.
[0245] In other words, if the inspection type is sudden, the edge server will not necessarily select a new target inspection drone that is idle from the multiple inspection drones it is communicating with to execute the sudden inspection task. Instead, it will prioritize judging whether there is an inspection drone that is performing a routine inspection task near the location of the photovoltaic module to be inspected that has experienced an accident. It can temporarily interrupt the current routine inspection task and directly switch to execute this sudden inspection task, thereby saving the inspection drone the time of taking off from the hangar and flying long distances, and improving inspection efficiency.
[0246] Specifically, the edge server finds the neighboring photovoltaic modules adjacent to the photovoltaic module to be inspected based on the pre-stored location information of each photovoltaic module, obtains the inspection status identifier of the neighboring photovoltaic module, and if the inspection status identifier of the neighboring photovoltaic module indicates that it is in the inspection state and the inspection type is daily, then the real-time location information of the target inspection drone corresponding to the neighboring photovoltaic module is obtained, and the real-time location information is determined as the second location information.
[0247] Subsequently, based on the first location information of the photovoltaic module to be inspected, the second location information of the inspection drone currently performing routine inspection tasks on adjacent photovoltaic modules, and a pre-trained route planning model, an inspection route is determined. To minimize the impact on the routine inspection tasks of adjacent photovoltaic modules, this inspection route is the shortest route between the first and second location information obtained from the route planning model. This shortest route is filled into the route field of the inspection command and sent to the inspection drone currently performing inspection tasks on adjacent photovoltaic modules, so that the drone can be controlled to perform a surprise inspection at the location of the photovoltaic module to be inspected according to the shortest inspection route.
[0248] The route planning model is obtained by training an initial route planning model based on a neural network model using a pre-acquired sample set. The sample set includes multiple samples, each containing two location information points and the corresponding shortest route.
[0249] For example, the neural network model can be a Graph Neural Network (GNN) model. The arrangement of photovoltaic modules, roads, or air corridors in a photovoltaic power station constitute a natural graph structure. Each hovering waypoint or photovoltaic module center can be regarded as a graph node, and the flyable paths between adjacent nodes can be regarded as edges of the graph. The weights of the edges can be distance, headwind resistance, or battery consumption rate. The initial model can be a graph attention network or a graph convolutional network. Its input layer receives node features (such as coordinates, elevation, and no-fly zone status) and edge features (such as length and wind direction influence). Through neighborhood aggregation operations of multiple layers of graph convolution, it learns the end-to-end mapping from any pair of nodes to the shortest path.
[0250] Multiple samples in a pre-acquired sample set are pre-labeled into location sample pairs using methods such as manual annotation. Each sample includes two location pieces and a corresponding shortest route. The two location pieces are encoded as source and target node labels on the graph, and the shortest route between them serves as the supervision label. During the training of the initial route planning model, each sample is first preprocessed, including at least one of outlier detection, missing value handling, standardization, and normalization. Subsequently, the preprocessed sample set D is divided into a training set Di. train and test set D test (D=D) train ∪D test Optionally, the split ratio requires the training set to have a higher proportion than the test set, for example, it could be 7:3 or 8:2, etc., and then the training set D is used... train The initial route planning model is trained to obtain the route planning model.
[0251] During training, the edge server or training platform starts a built-in timer that continuously records the initial route planning model on the training set D from the moment training begins. train The iteration time is accumulated synchronously with each batch of training data input and backpropagation update. After each training batch ends, the current accumulated training time is read and compared in real time with the preset time threshold to determine whether the accumulated value has reached the upper limit specified by the preset time. The preset time threshold is the single training time set in advance according to the requirements.
[0252] If the cumulative training time is less than the preset time threshold, then continue from the training set D. trainThe next batch of data is extracted and fed into the initial route planning model for weight updates and gradient descent operations, while the timer continuously increments. If the cumulative training time is greater than or equal to a preset time threshold, the current training loop is immediately interrupted, and subsequent training rounds that have not yet been completed are no longer executed. Instead, the current parameter state of the model is fixed and loaded into the test set D. test Entering the testing phase. This training control strategy with time as a hard constraint ensures that the model training process will not consume computing resources indefinitely due to slow convergence of the loss function. It also makes the output time window of each model iteration controllable, which makes it easy for edge servers to complete the periodic updates or online fine-tuning of the model within a limited computing budget, without the need for manual intervention or waiting for the current round to end naturally.
[0253] Furthermore, based on test set D test During the testing process, a loss function is pre-set in the initial route planning model to represent the training results. The test results are calculated using the loss function to obtain the loss function value of the initial route planning model. Then, based on the magnitude of the loss function value, the initial route planning model is generated into a route planning model.
[0254] Specifically, the edge server utilizes test set D test To evaluate the generalization performance of the current model parameters, this evaluation is achieved by inputting test samples into the model and calculating the difference between its output and the true shortest route label. The quantification of this difference is the loss function value. The specific form of the loss function depends on the task of the route planning model. If the route planning model is used to directly predict the numerical value of the shortest path length, the loss function can use mean squared error or mean absolute error, and its calculation expression is the average of the sum of squares or absolute values of the differences between the predicted path length and the true shortest path length on the test samples. If the route planning model is used to generate a sequence of waypoints on the path, the loss function can be designed as the average Euclidean distance between the predicted waypoint coordinates and the true waypoint coordinates, plus a deviation penalty term for the total path length, to ensure that the route planning model pays attention to both the spatial accuracy of the path and its total length attribute.
[0255] Regardless of the specific form used, the loss function value is essentially a non-negative real number. The smaller the value, the closer the prediction result of the initial route planning model on the test sample is to the manually labeled shortest route, and the better the model performance.
[0256] After training and testing the initial route planning model, the edge server needs to evaluate whether the current performance of the initial route planning model has met the requirements of actual deployment based on an objective quantitative standard. A preset threshold can be used to measure whether the loss function value has reached an acceptable upper limit. In the path length prediction task, if the site operation and maintenance requires that the error between the planned route and the actual optimal route not exceed a certain proportion of the spacing between adjacent photovoltaic modules (e.g., not exceeding 5% of the center-to-center distance between two modules), then the loss function value corresponding to this error can be determined as the preset threshold. In the waypoint sequence generation task, the preset threshold can be set as the upper limit of the average spatial distance between the predicted waypoint and the actual waypoint, for example, 0.5 meters or 1 meter. The size of this preset threshold is usually set based on engineering experience or business needs, and this application does not specifically limit it.
[0257] For example, if the loss function value is less than a preset threshold, it indicates that the initial route planning model is not working well on the test set D. test The processing accuracy reached an acceptable level, and the deviation between the predicted route and the actual label was within the error range allowed by the station operation and maintenance. At this time, the initial route planning model had good generalization ability. The edge server solidified and saved the initial route planning model and generated it into a route planning model.
[0258] Conversely, if the loss function value is greater than or equal to a preset threshold, it indicates that the prediction bias of the initial route planning model exceeds an acceptable range, and its fitting ability or generalization performance is insufficient to support actual path planning needs. In this case, the edge server does not discard the initial route planning model directly, but triggers a model parameter update process. Typically, the backpropagation algorithm is used to calculate the gradient of the loss function with respect to the weights of each layer, and the connection weights and bias terms within the initial route planning model are adjusted along the gradient descent direction, so that the updated parameters can produce lower loss values in subsequent training. After completing the parameter update, the initial route planning model returns to the training phase and uses the training set D again. train A new round of supervised learning begins from scratch, with the training time reset. After training, the new loss function value is evaluated again using test location samples and compared with the threshold. This process is repeated iteratively, with each iteration improving upon the previous round of parameter optimization, until the loss function value generated in a test is less than the preset threshold, at which point the iteration loop terminates.
[0259] (3) If the inspection type is sudden and there are no inspection drones performing inspection tasks in the vicinity of the photovoltaic modules, the inspection route is determined based on the first location information and the location information of the target inspection drone.
[0260] There are currently no inspection drones performing inspection tasks on the adjacent photovoltaic modules, which means that the adjacent modules are not currently within the preset inspection cycle of their corresponding edge servers, and are not occupied by any inspection drone within the scheduling coverage of their corresponding edge servers to perform flight operations. In other words, the site area corresponding to the photovoltaic modules that need to be inspected for emergency inspection tasks is in a vacuum window period of inspection resource coverage.
[0261] Specifically, after determining the location of the unexpected event, i.e., the first location information of the photovoltaic module to be inspected, the edge server finds that the status flags of the neighboring modules are all displayed as "unassigned" or "idle" when querying the real-time task status registry. This indicates that the conditions for nearby scheduling have been lost, and it is impossible to use the already airborne drone to temporarily switch tasks to shorten the emergency response time. At this time, the edge server directly uses the unexpected event location information parsed from the inspection request as the first location information, and combines it with the real-time geographical location of the target inspection drone determined in S503. These two sets of spatial coordinates are used as the planning start point and end point, respectively. The route planning model is used to calculate the shortest flight route from the current location of the target drone to the scene of the emergency, and this route is determined as the inspection route for this emergency inspection task.
[0262] This application provides a defect location system for photovoltaic modules, comprising:
[0263] (1) Multiple inspection drones are used to collect inspection images of photovoltaic modules to be inspected;
[0264] Each inspection drone is equipped with a high-precision RTK differential positioning module and a three-axis stabilized gimbal. At the moment the shutter is triggered during flight, it is not only used to capture inspection images, but also to simultaneously lock the longitude, latitude, altitude, gimbal pitch angle and yaw angle corresponding to that frame. These high-frequency coupled metadata constitute a rigid benchmark for subsequent accurate spatial mapping.
[0265] (2) Cloud server, used to execute the method provided in the above-described method embodiment applied to cloud server. Its implementation principle and technical effect are similar, and will not be repeated here.
[0266] The cloud server can be a public cloud computing service instance provided by a third-party service provider, or it can be a private cloud server, a dedicated hybrid cloud node, or a high-performance computing cloud host adapted to big data processing of photovoltaic power plants, a lightweight application cloud server, and other types of cloud computing power carriers.
[0267] (3) Multiple edge servers are connected to the cloud server. Each edge server is connected to multiple inspection drones to execute the method provided in the above-described method embodiment applied to the edge server. The implementation principle and technical effect are similar, and will not be repeated here.
[0268] Edge servers are typically deployed close to the data source. Considering the real-time requirements of the application scenario and network conditions, they are usually deployed near the photovoltaic power plant site, such as in the data acquisition station within the plant, in the cabinet of the local monitoring room, or in an outdoor integrated chassis near the equipment cluster. This allows for close-range wireless communication with the inspection drone, ensuring low-latency issuance of control commands and high-speed transmission of inspection images.
[0269] Figure 6 A schematic diagram of the structure of a defect location device for a photovoltaic module provided in this application. Figure 1 The defect location device for the photovoltaic module is applied to any edge server in the defect location system of the photovoltaic module. The system also includes a cloud server, such as... Figure 6 As shown, the defect location device 60 for the photovoltaic module includes:
[0270] The first processing module 601 is used to acquire inspection images of the photovoltaic modules to be inspected;
[0271] The second processing module 602 is used to send the inspection image and defect information to the cloud server when it is determined that the inspection image includes defect information based on the inspection image.
[0272] The third processing module 603 is used to respond to the location information of the defect information in the photovoltaic module to be inspected returned by the cloud server, and determine the defect location information of the photovoltaic module to be inspected based on the location information.
[0273] The fourth processing module 604 is used to output defect location information.
[0274] In one possible implementation, the defect location device 60 of the photovoltaic module further includes a fifth processing module 605, for:
[0275] The inspection image is converted to grayscale to obtain a grayscale image of the inspection image;
[0276] The grayscale image is processed for background segmentation to obtain the photovoltaic image of the inspection image, and the photovoltaic image is sent to the cloud server;
[0277] The mean gray value of the photovoltaic image is calculated by averaging the gray values of each pixel in the photovoltaic image.
[0278] If the average grayscale value is less than the first preset grayscale value or greater than the second preset grayscale value, then the inspection image is determined to include defect information; wherein the first preset grayscale value is less than the second preset grayscale value.
[0279] In one possible implementation, the fifth processing module 605 is specifically used for:
[0280] For each pixel in a grayscale image, if the grayscale value is less than a first preset threshold or greater than a second preset threshold, the pixel is determined to be a background pixel; wherein, the first preset threshold is less than the second preset threshold.
[0281] If the grayscale value is greater than or equal to the first preset threshold and less than or equal to the second preset threshold, then the pixel is determined to be a foreground pixel.
[0282] The pixel adjacent to the foreground pixel at a preset orientation is determined as the target pixel;
[0283] A photovoltaic image is obtained based on the target pixels.
[0284] In one possible implementation, the fifth processing module 605 is further used for:
[0285] If the target grayscale value of the target pixel is greater than or equal to the first preset threshold and less than or equal to the second preset threshold, then the target pixel is determined to be a photovoltaic pixel.
[0286] If the target grayscale value of the target pixel is less than the first preset threshold or greater than the second preset threshold, then the target pixel is determined as an edge pixel.
[0287] A photovoltaic image is obtained based on photovoltaic pixels and edge pixels.
[0288] In one possible implementation, the photovoltaic module defect location system further includes multiple inspection drones communicating with an edge server, and the photovoltaic module defect location device 60 further includes a sixth processing module 606 for:
[0289] If the current time is within the preset inspection cycle of the edge server, then the photovoltaic modules in the area where the edge server is located will be identified as photovoltaic modules to be inspected.
[0290] Based on the inspection type of the photovoltaic modules to be inspected, an inspection instruction including the inspection route is generated.
[0291] The inspection command is sent to the target inspection drone that is in an idle state among multiple inspection drones, so that the target inspection drone can collect inspection images based on the inspection command.
[0292] In one possible implementation, the defect location device 60 of the photovoltaic module further includes a seventh processing module 607, for:
[0293] If the inspection type is routine, then the preset inspection path of the photovoltaic module to be inspected will be determined as the inspection route.
[0294] If the inspection type is sudden, the inspection route is determined based on the first location information of the photovoltaic module to be inspected, the second location information of the inspection drone that is performing inspection tasks on the adjacent photovoltaic modules, and the pre-trained route planning model.
[0295] Among them, the adjacent photovoltaic module refers to the photovoltaic module that is adjacent to the photovoltaic module to be inspected and whose inspection type is routine; the route planning model is obtained by training the initial route planning model based on the neural network model based on the pre-acquired sample set. The sample set includes multiple samples, and each sample includes two location information and the corresponding shortest route.
[0296] The defect location device for photovoltaic modules provided in this embodiment can execute the method provided in the above-described method embodiment applied to edge servers. Its implementation principle and technical effect are similar, and will not be described again in this embodiment.
[0297] Figure 7 A schematic diagram of the structure of a defect location device for a photovoltaic module provided in this application. Figure 2 The defect location device for this photovoltaic module is applied to the cloud server in the defect location system of the photovoltaic module. The system also includes edge servers, such as... Figure 7 As shown, the defect location device 70 for the photovoltaic module includes:
[0298] The receiving module 701 is used to receive inspection images and defect information of the photovoltaic modules to be inspected sent by the edge server; wherein, the inspection image is an image that the edge server has determined to have defects.
[0299] The determination module 702 is used to determine the location information of the defect information in the photovoltaic module to be inspected based on the inspection image and defect information;
[0300] The sending module 703 is used to send location information to the edge server.
[0301] In one possible implementation, the receiving module 701 is also used to receive the photovoltaic image corresponding to the inspection image sent by the edge server.
[0302] In one possible implementation, the system also includes multiple inspection drones communicating with an edge server, and the determination module 702 is specifically used for:
[0303] Based on the flight position of the inspection drone at the moment the inspection image is generated, the initial defective component corresponding to the defect information in the photovoltaic module to be inspected is determined.
[0304] The normalized photovoltaic image is subjected to distortion correction processing to obtain the corrected photovoltaic image;
[0305] For each pixel coordinate in the corrected image, a coordinate transformation is performed on the pixel coordinates to obtain the first coordinates corresponding to the pixel; whereby the first coordinates are used to indicate the position of the pixel in the device coordinate system of the image acquisition device of the inspection drone;
[0306] The first coordinate is transformed to obtain the second coordinate corresponding to the pixel; the second coordinate is used to indicate the position of the pixel in the world coordinate system of the initial defective component.
[0307] Position information is obtained based on the second coordinate of each pixel in the corrected image.
[0308] The defect location device for photovoltaic modules provided in this embodiment can execute the method provided in the above-described method embodiment applied to cloud servers. Its implementation principle and technical effect are similar, and will not be described again in this embodiment.
[0309] Figure 8 A schematic diagram of the structure of an electronic device provided in this application, such as... Figure 8 As shown, the electronic device 80 provided in this embodiment includes at least one processor 801 and a memory 802. Optionally, the electronic device 80 further includes a communication component 803. The processor 801, memory 802, and communication component 803 are connected via a bus 804.
[0310] In a specific implementation, at least one processor 801 executes computer execution instructions stored in memory 802, causing at least one processor 801 to perform the above-described method.
[0311] The specific implementation process of processor 801 can be found in the method provided in the above embodiment of the method applied to any edge server and / or cloud server. The implementation principle and technical effect are similar, and will not be repeated here.
[0312] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0313] The memory may include random access memory (RAM) in high-speed memory, and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0314] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0315] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the methods described above for application to any edge server and / or cloud server method embodiments.
[0316] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the methods described above for any edge server and / or cloud server method embodiments.
[0317] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random-Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0318] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside within an ASIC. Alternatively, the processor and the readable storage medium can exist as discrete components in a device.
[0319] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0320] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0321] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0322] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.
[0323] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0324] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope.
Claims
1. A method for defect location in a photovoltaic module, characterized in that, Any edge server in a defect location system for photovoltaic modules, the system further including a cloud server, the method comprising: Obtain inspection images of the photovoltaic modules to be inspected; When it is determined that the inspection image includes defect information based on the inspection image, the inspection image and the defect information are sent to the cloud server; In response to receiving the location information of the defect information in the photovoltaic module to be inspected from the cloud server, the defect location information of the photovoltaic module to be inspected is determined based on the location information. Output the defect location information.
2. The method according to claim 1, characterized in that, The method further includes: The inspection image is converted to grayscale to obtain a grayscale image of the inspection image; The grayscale image is processed for background segmentation to obtain the photovoltaic image of the inspection image, and the photovoltaic image is sent to the cloud server; The mean grayscale value of the photovoltaic image is calculated by averaging the grayscale values of each pixel in the photovoltaic image. If the average grayscale value is less than a first preset grayscale value or greater than a second preset grayscale value, then the inspection image is determined to include defect information; wherein the first preset grayscale value is less than the second preset grayscale value.
3. The method according to claim 2, characterized in that, The step of performing background segmentation processing on the grayscale image to obtain the photovoltaic image of the inspection image includes: For each pixel in the grayscale image, if the grayscale value is less than a first preset threshold or greater than a second preset threshold, then the pixel is determined to be a background pixel; wherein, the first preset threshold is less than the second preset threshold. If the grayscale value is greater than or equal to the first preset threshold and less than or equal to the second preset threshold, then the pixel is determined to be a foreground pixel. The pixel adjacent to the foreground pixel at a preset orientation is determined as the target pixel; The photovoltaic image is obtained based on the target pixels.
4. The method according to claim 3, characterized in that, Obtaining the photovoltaic image based on the target pixel includes: If the target grayscale value of the target pixel is greater than or equal to the first preset threshold and less than or equal to the second preset threshold, then the target pixel is determined to be a photovoltaic pixel. If the target grayscale value of the target pixel is less than the first preset threshold or greater than the second preset threshold, then the target pixel is determined as an edge pixel. The photovoltaic image is obtained based on the photovoltaic pixels and the edge pixels.
5. The method according to any one of claims 1 to 4, characterized in that, The system also includes multiple inspection drones that are communicatively connected to the edge server, and the method further includes: If the current time is within the preset inspection cycle of the edge server, then the photovoltaic modules in the area where the edge server is located are identified as the photovoltaic modules to be inspected. Based on the inspection type of the photovoltaic module to be inspected, an inspection instruction including the inspection route is generated. The inspection command is sent to the target inspection drone that is idle among the plurality of inspection drones, so that the target inspection drone can acquire the inspection image based on the inspection command.
6. The method according to claim 5, characterized in that, The method further includes: If the inspection type is routine, then the preset inspection path of the photovoltaic module to be inspected is determined as the inspection route. If the inspection type is sudden, the inspection route is determined based on the first location information of the photovoltaic module to be inspected, the second location information of the inspection drone that is performing inspection tasks on the adjacent photovoltaic modules, and the pre-trained route planning model. The adjacent photovoltaic module refers to the photovoltaic module that is adjacent to the photovoltaic module to be inspected and whose inspection type is routine. The route planning model is obtained by training an initial route planning model based on a neural network model based on a pre-acquired sample set. The sample set includes multiple samples, and each sample includes two location information and the corresponding shortest route.
7. A method for defect location in a photovoltaic module, characterized in that, A cloud server applied to a defect location system for photovoltaic modules, the system further including an edge server, the method comprising: The system receives inspection images and defect information of photovoltaic modules to be inspected from the edge server; wherein the inspection images are images that the edge server has determined to contain defects. Based on the inspection images and the defect information, the location information of the defect information in the photovoltaic module to be inspected is determined; The location information is sent to the edge server.
8. The method according to claim 7, characterized in that, The method further includes: Receive the photovoltaic image corresponding to the inspection image sent by the edge server.
9. The method according to claim 8, characterized in that, The system also includes multiple inspection drones communicatively connected to the edge server. The step of determining the location information of the defect within the photovoltaic module to be inspected, based on the inspection images and the defect information, includes: Based on the flight position of the inspection drone at the time the inspection image is generated, the initial defective component in the photovoltaic module to be inspected corresponding to the defect information is determined; The normalized image of the photovoltaic image is subjected to distortion correction processing to obtain the corrected image of the photovoltaic image; For each pixel coordinate in the corrected image, coordinate transformation is performed on the pixel coordinates to obtain the first coordinates corresponding to the pixel; wherein, the first coordinates are used to indicate the position of the pixel in the device coordinate system of the image acquisition device of the inspection drone; The first coordinate is transformed to obtain the second coordinate corresponding to the pixel; wherein the second coordinate is used to indicate the position of the pixel in the world coordinate system of the initial defect component; The location information is obtained based on the second coordinates of each pixel in the corrected image.
10. A defect location system for photovoltaic modules, characterized in that, include: Multiple inspection drones are used to collect inspection images of the photovoltaic modules to be inspected; A cloud server for performing the method as described in any one of claims 7 to 9; Multiple edge servers are communicatively connected to the cloud server, and each edge server is communicatively connected to the multiple inspection drones, for performing the method as described in any one of claims 1 to 6.
