Battery string defect image processing method and system based on battery repair

Through the combination of the lightweight defect detection model and natural language model based on YOLOv7, the problem of insufficient recognition ability of the existing technology in identifying subtle, complex or special-shaped battery string defects is solved, and efficient and accurate defect detection and comprehensive evaluation is achieved, supporting an intelligent process from detection to decision-making.

CN118657723BActive Publication Date: 2025-06-06SHANGHAI QIANYU PHOTOELECTRIC TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410702654.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2025-06-06
Estimated Expiration
2044-05-31

AI Technical Summary

Technical Problem

The prior art has limited recognition capabilities when identifying subtle, complex or special-shaped battery string defects, which are prone to missed detection or misjudgment, and insufficient consideration of the special form and connection method of the reworked battery string, resulting in poor detection effect.

Method used

A lightweight defect detection model is built based on YOLOv7 light network. Through deep feature extraction and the fusion of different scale features in multiple stages, combined with threshold segmentation algorithm and natural language model, efficient identification and comprehensive evaluation of battery string defects are achieved.

Benefits of technology

It significantly improves the ability to identify subtle, complex or unusual defects, reduces missed detection and misjudgment, ensures the accuracy of detection effects, and realizes the full-chain intelligence from detection to decision-making.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118657723B_ABST
    Figure CN118657723B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of image processing, and in particular relates to a battery string defect image processing method and system based on battery repair. The method first collects historical detection images of battery strings, and constructs a defect detection training set through enhanced preprocessing and threshold segmentation; secondly, a lightweight defect detection model is constructed based on a YOLOv7 lightweight network, and after training, it is used to detect battery string defects in real time, including defect location, type and damage degree; thirdly, a battery string comprehensive evaluation model is constructed, and the overall damage degree of the battery string is evaluated by combining defect information with physical data; finally, a maintenance strategy report is generated through a natural language model, and displayed in real time on an interactive interface to assist technicians in precise maintenance; the present invention realizes rapid identification and comprehensive evaluation of battery string defects, improves maintenance efficiency and accuracy, and has significant application value in the field of battery repair.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of image processing, and in particular relates to a method and system for processing battery string defects images based on battery repair. Background Art

[0002] With the development of renewable energy technology, especially the rapid rise of the solar photovoltaic industry, the performance of battery strings, as the core component of photovoltaic modules, directly affects the power generation efficiency and stability of the entire system. In the process of production, installation, operation and maintenance, and even later repair, efficient and accurate defect detection of battery strings is crucial. At present, image processing technology, as a non-contact, high-precision detection method, is widely used in quality control and fault diagnosis of battery strings.

[0003] For example, a Chinese patent with publication number CN107784660A discloses an image processing method, an image processing system and a defect detection device, which are used to process the raw image formed after optical scanning of the wafer. The image processing system includes an image edge recognition unit, an image segmentation unit, an image enhancement unit, an image denoising unit, an image marking unit and a data storage unit, so as to obtain the position and size information of the target defect such as a bubble defect from the raw image. The defect detection device includes the image processing system.

[0004] For example, a Chinese patent with publication number CN116228684A discloses a method and device for processing images of appearance defects of a battery shell, which includes the following steps: acquiring images of each surface of a target battery shell; synthesizing multiple images of the target battery from light sources at different angles into multiple images of different types; inputting a standard image template; performing grayscale comparison between the multiple synthesized images of the target battery of different types and the standard image template to locate the defective area of ​​the target battery; classifying the defect type of the target battery through deep learning; screening images with defects, and traversing the defective images through a rule judgment algorithm; and outputting the defect type, defect size, and defect coordinate position of the target shell.

[0005] The above existing technologies all have the following problems: 1) The ability to identify certain subtle, complex or special-shaped battery string defects is limited, which may easily lead to missed detection or misjudgment; 2) The existing image processing methods are often designed for standardized new battery strings, and the special shapes, connection methods, occlusion conditions, etc. of the repaired battery strings are not sufficiently considered, which may greatly reduce the detection effect; 3) There is insufficient support for functions such as defect severity assessment and repair suggestion generation, and the full chain intelligence from detection to decision-making cannot be achieved; In order to solve the above problems, the present invention provides a battery string defect image processing method and system based on battery repair Summary of the invention

[0006] In view of the shortcomings of the prior art, the present invention proposes a battery string defect image processing method and system based on battery repair. The method first collects historical detection images of battery strings, and after enhanced preprocessing, introduces a threshold segmentation algorithm to segment and annotate the target and background to form a defect detection training set; secondly, a lightweight defect detection model is constructed based on the YOLOv7 lightweight network, and the training set is used for training; thirdly, the real-time collected battery string image data is input into the trained model to quickly obtain the defect anchor frame, type and damage degree score; fourthly, combined with the physical data of the battery string, the comprehensive evaluation score of the damage degree is calculated through the battery string comprehensive evaluation model; finally, according to the defect anchor frame and evaluation score, a maintenance strategy report is generated through a natural language model, and displayed in real time on the interactive interface to provide technicians with accurate maintenance guidance; the method realizes efficient identification and comprehensive evaluation of battery string defects, improves the efficiency and accuracy of battery repair, and has broad application prospects.

[0007] To achieve the above object, the present invention provides the following technical solutions:

[0008] The battery string defect image processing method based on battery repair includes:

[0009] Step S1: Collect historical detection image data of battery strings, and perform enhancement preprocessing on the collected image data to obtain a preprocessed defect detection data set, introduce a threshold segmentation algorithm, segment the detection target and background of each image in the preprocessed defect detection data set, and annotate the segmented detection target and background to obtain a defect detection training set;

[0010] Step S2: construct a lightweight defect detection model based on the YOLOv7 lightweight network, input the segmented and labeled defect detection training set into the constructed lightweight defect detection model for training, and obtain a trained lightweight defect detection model;

[0011] Step S3: using an industrial camera or industrial endoscope to collect battery string image data in real time, input the collected data set into the trained lightweight defect detection model, and obtain the defect anchor frame, defect type, defect location and defect damage degree score of each anchor frame of each battery string;

[0012] Step S4: construct a comprehensive evaluation model for battery strings, input the output defect type, the damage degree score of each anchor frame defect, and the collected physical data of each battery string into the comprehensive evaluation model for battery strings, and calculate the comprehensive evaluation score of the damage degree of each battery string;

[0013] Step S5: Based on the acquired defect type, defect location and comprehensive evaluation score of the battery string damage degree, a corresponding battery string maintenance strategy report is generated through a natural language model, and the generated maintenance strategy report is displayed in real time through an interactive interface to assist technicians in repairing the battery string;

[0014] The construction and training process of the lightweight defect detection model in step S2 includes:

[0015] S201, slice the annotated defect detection training set to obtain an input image sequence of size 640×640×3, input the sliced ​​input image sequence into the CBS-k3 s1 c64 sublayer 1, CBS-k3 s1c64 sublayer 2 and CBS-k3 s2 c128 sublayer 3 of the backbone layer in sequence, perform preliminary feature extraction, obtain primary image extraction features, and input the obtained primary features into the ELAN sublayer 1, ELAN-CA sublayer 2, MPConv sublayer 2, ELAN sublayer 3, MPConv sublayer 3 and SPPCSPC_A sublayer in the backbone layer in sequence for deep feature extraction, and obtain high-dimensional image output features 3;

[0016] S202, input the high-dimensional feature 3 output by the SPPCSPC_A sublayer into the GSConv sublayer 1 in the bottleneck layer for dimensionality reduction, input the reduced high-dimensional feature 3 into the CBS-k3 s1 c64 sublayer 1 and the upsampling sublayer 1 in the bottleneck layer 1 in sequence, obtain the high-dimensional feature 4, and input the high-dimensional feature 4 and the high-dimensional feature 2 output by the ELAN sublayer 3 after dimensionality reduction by the GSConv sublayer 2 into the cascade sublayer 2 in the bottleneck layer 1 at the same time for cascade operation, and obtain the high-dimensional fusion feature 1;

[0017] S203, input the obtained high-dimensional fusion feature 1 to the ELAN-CA sublayer 2, GSConv sublayer 4, and upsampling sublayer 2 in the bottleneck layer 1 in sequence to obtain a high-dimensional feature 5, and input the obtained high-dimensional feature 5 and the high-dimensional feature 1 output by the ELAN-CA sublayer 2 after the dimensionality reduction by the GSConv sublayer 3 to the cascade sublayer 1 at the same time for cascade operation to obtain a high-dimensional fusion feature 2;

[0018] S204, input the obtained high-dimensional fusion feature 2 into the ELAN-CA sublayer 1 in the bottleneck layer 2 in sequence to obtain the high-dimensional feature 6, first input the obtained high-dimensional feature 6 into the CBS-k3 s1 c64 sublayer 1 in the prediction layer to obtain the output of the CBS-k3 s1 c64 sublayer 1, then input the output of the CBS-k3 s1 c64 sublayer 1 into the Yolo prediction head 1, obtain the defect anchor frame and anchor frame regression error in the corresponding battery string image, and input the high-dimensional feature 6 into the GSConv sublayer 5 to obtain the high-dimensional feature 7, and input the obtained high-dimensional feature 7 and the high-dimensional feature 8 output by the ELAN-CA sublayer 2 in the bottleneck layer 1 into the cascade sublayer 3 in the bottleneck layer 2 to obtain the high-dimensional fusion feature 3;

[0019] The construction and training process of the lightweight defect detection model in step S2 also includes:

[0020] S205, input the obtained high-dimensional fusion feature 3 to the ELAN-CA sublayer 3 in the bottleneck layer 2, obtain the high-dimensional feature 9, first input the obtained high-dimensional feature 9 to the CBS-k3 s1 c64 sublayer 2 in the prediction layer, obtain the output of the CBS-k3 s1 c64 sublayer 2, then input the output of the CBS-k3 s1 c64 sublayer 2 into the Yolo prediction head 2 to calculate the defect type and classification error of the corresponding defect frame, and cascade the high-dimensional features output by the CBS-k3 s1 c64 sublayer 1 and the CBS-k3 s1 c64 sublayer 2 in the prediction layer and input them into the Yolo prediction head 4 to calculate the defect position and position error of the corresponding defect anchor frame;

[0021] S206, input the high-dimensional feature 9 to the GSConv sublayer 6 in the bottleneck layer 2 for dimensionality reduction, and input the high-dimensional feature 9 after dimensionality reduction and the high-dimensional feature 3 after dimensionality reduction to the cascade sublayer 4 at the same time to obtain the high-dimensional fusion feature 4, and input the obtained high-dimensional fusion feature 4 to the CBS-k3 s2 c128 sublayer 3 in the prediction layer first to obtain the output of the CBS-k3 s2 c128 sublayer 3, and then input the output of the CBS-k3 s2 c128 sublayer 3 to the Yolo prediction head 3 to calculate the damage degree score and score error of each anchor frame defect;

[0022] S207, setting a training cycle, and using the anchor frame regression error, classification error, position error and score error to calculate the comprehensive loss error, and using the set cycle and comprehensive loss error to perform training to obtain a trained lightweight defect detection model.

[0023] Specifically, the specific steps of step S4 include:

[0024] S401, the defect type corresponding to each battery string, the defect damage degree score data of each anchor frame, and the collected physical data related to the corresponding battery string obtained by the lightweight defect detection model in real time are unified in data format to obtain a data set in a unified format;

[0025] S402, constructing a battery string comprehensive evaluation model based on a random forest algorithm, and inputting the acquired data set in a unified format into the constructed battery string comprehensive evaluation model to calculate and obtain a comprehensive evaluation score of the corresponding battery string.

[0026] Specifically, the specific steps of step S5 include:

[0027] S501, integrating the acquired defect type, defect location and comprehensive evaluation score of the battery string damage degree to obtain basic data of the corresponding battery string maintenance strategy;

[0028] S502, construct and train a text search matching model, and input the basic data of the corresponding battery string maintenance strategy into the text search matching model to automatically generate a detailed maintenance strategy report for each battery string, including maintenance response methods for different defect types, analysis of damage causes and preventive measures;

[0029] S503: Integrate the generated maintenance strategy report into a fixed or mobile interactive interface, and display the maintenance strategy of the battery string in the form of text, list, table or image to assist in the rapid maintenance of the battery string.

[0030] Specifically, the labels annotated on the segmented detection target and background include: defect anchor frame, defect type, defect location and defect assessment damage degree score in each anchor frame.

[0031] Specifically, the defect types include cracks, stains, bulges, deformations, scratches, broken connecting wires, and damaged connecting wires.

[0032] The battery string defect image processing system based on battery repair includes: data collection and preprocessing module, model building and training module, real-time defect detection module, comprehensive evaluation module and repair strategy generation and display module;

[0033] The data collection and preprocessing module is used for the collection, preprocessing, background segmentation and labeling of the historical detection image data of the battery string; the model construction and training module is used for the construction and optimization training of the lightweight defect detection model; the real-time defect detection module is used to use the obtained lightweight defect detection model to perform defect detection on the battery string image data collected in real time, and calculate the defect anchor frame, defect type, defect position and defect damage degree score of each anchor frame of the corresponding battery string; the comprehensive evaluation module is used to comprehensively evaluate the damage degree of the battery string based on the acquired physical data of each battery string, the defect type and the damage degree score of each defect anchor frame; the maintenance strategy generation and display module is used to generate the maintenance strategy report of the corresponding battery string based on the comprehensive evaluation score of the damage degree and the defect location and defect anchor frame information obtained by the comprehensive evaluation module, and display the report in real time.

[0034] Specifically, the data collection and preprocessing module includes a data collection unit, an image enhancement unit, and a background segmentation and annotation unit; the model construction and training module includes a model construction unit and a model training unit; the real-time defect detection module includes a real-time image acquisition unit and a defect detection unit; the maintenance strategy generation and display module includes a maintenance strategy generation unit and an interactive display unit;

[0035] A data collection unit is used to collect historical detection image data of battery strings; an image enhancement unit is used to perform enhancement preprocessing on the collected image data; a background segmentation and annotation unit is used to segment and annotate the detection target and background in the preprocessed image to obtain a defect detection training set; a model construction unit is used to build a lightweight defect detection model based on the YOLOv7 lightweight network; a model training unit is used to optimize the training of the lightweight defect detection model using the segmented and annotated defect detection training set; a real-time image acquisition unit is used to use a dedicated camera or an industrial endoscope to collect battery string image data in real time; a defect detection unit is used to input the real-time collected image data into the trained lightweight defect detection model to obtain the defect anchor frame, defect type, defect position and defect damage degree score of each anchor frame of each battery string; a maintenance strategy generation unit is used to generate a maintenance strategy report for the corresponding battery string through a natural language model based on the obtained defect anchor frame, defect position and battery string damage degree comprehensive evaluation score; an interactive display unit is used to display the generated maintenance strategy report in real time through an interactive interface so that the staff can view and perform corresponding maintenance operations.

[0036] Specifically, a computer-readable storage medium stores computer instructions, and when the computer instructions are executed, a battery string defect image processing method based on battery repair is executed.

[0037] Specifically, an electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the battery string defect image processing method based on battery repair is implemented.

[0038] Compared with the prior art, the present invention has the following beneficial effects:

[0039] In view of the shortcomings of the prior art, the present invention constructs a new defect detection model based on the YOLOv7 lightweight network, and significantly improves the recognition ability of subtle, complex or special-shaped defects through deep feature extraction and fusion of multi-stage and different-scale features, reducing missed detections and misjudgments; at the same time, the present invention fully considers the special form and connection method of the repaired battery string, effectively copes with complex scenes such as occlusion, and ensures the accuracy of the detection effect; in addition, the present invention also strengthens the functions of defect severity assessment and repair suggestion generation, realizing the full-chain intelligence from detection to decision-making, and providing strong support for battery repair work. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 This is a flow chart of a battery string defect image processing method based on battery repair according to Embodiment 1 of the present invention;

[0041] Figure 2 This is a structural diagram of a lightweight defect detection model according to Embodiment 1 of the present invention;

[0042] Figure 3 This is a structural diagram of the MPConv sublayer in the lightweight defect detection model of Example 1 of the present invention;

[0043] Figure 4 This is a structural diagram of the SPPCSPC_A sublayer in the lightweight defect detection model of Example 1 of the present invention;

[0044] Figure 5 This is a structural diagram of the ELAN-CA sublayer in the lightweight defect detection model of Example 1 of the present invention;

[0045] Figure 6 This is a module architecture diagram of a battery string defect image processing system based on battery repair according to Example 2 of the present invention. DETAILED DESCRIPTION

[0046] Example 1

[0047] See also Figure 1 , an embodiment of the present invention provides: a battery string defect image processing method based on battery repair, comprising the following steps:

[0048] Step S1: Collect historical detection image data of battery strings, and perform enhanced preprocessing on the collected image data to obtain a preprocessed defect detection data set, introduce a threshold segmentation algorithm, segment the detection target and background of each image in the preprocessed defect detection data set, and annotate the segmented detection target and background to obtain a defect detection training set; further, the labels annotated for the segmented detection target and background in this embodiment include: defect anchor frame, defect type, defect location and defect assessment damage degree score in each anchor frame; defect types include cracks, stains, bulges, deformations, scratches, broken connecting wires, and damaged connecting wires.

[0049] Step S2: Construct a lightweight defect detection model based on the YOLOv7 lightweight network, input the segmented and labeled defect detection training set into the constructed lightweight defect detection model for training, and obtain a trained lightweight defect detection model; further, although the YOLOv7 algorithm performs well in many aspects, it still has some limitations when dealing with specific types of dense-small target detection tasks, especially battery string detection. Due to the special connection method and special working environment of the battery string, it suffers from various types of damage, which will also be obscured by the special connection method, resulting in missed detection and false detection. Therefore, this embodiment makes targeted improvements to YOLOv7 to improve its performance in battery string return detection, please refer to Figure 2 , where the construction and training process of the lightweight defect detection model includes:

[0050] S201, slice the annotated defect detection training set to obtain an input image sequence of size 640×640×3, input the sliced ​​input image sequence into the CBS-k3 s1 c64 sublayer 1, CBS-k3 s1c64 sublayer 2 and CBS-k3 s2 c128 sublayer 3 of the backbone layer in sequence, perform preliminary feature extraction, obtain primary image extraction features, and input the obtained primary features into the ELAN sublayer 1, ELAN-CA sublayer 2, MPConv sublayer 2, ELAN sublayer 3, MPConv sublayer 3 and SPPCSPC_A sublayer in the backbone layer in sequence for deep feature extraction, and obtain high-dimensional image output features 3;

[0051] Furthermore, the CBS-k3 s1 c64 sublayer 1, CBS-k3 s1 c64 sublayer 2 and CBS-k3 s2c128 sublayer 3 in this embodiment have the same structure, wherein CBS-k3 s1 c64 sublayer 1 represents a layer including convolution, batch normalization and Silu activation function (Convolution-BatchNormalization-Silu Activation), wherein the convolution operation uses a 3×3 kernel, a step size of 1, and outputs a 64-channel feature map; the convolution operation in CBS-k3 s2 c128 uses a 3×3 kernel, a step size of 2, and outputs a 128-channel feature map; the ELAN sublayer 1 has the same structure as the ELAN sublayer 3, and the ELAN network uses the existing network structure in the original YOLOv7-small network, and replaces all the original standard convolution operations in the ELAN network with deep separation convolution DSC; the MPConv sublayer 2 has the same structure as the MPConv sublayer 3, please refer to Figure 3 , the MPConv sublayer consists of MaxPool-k2,hw / 2 units, CBS-k1 s2 c / 2 units, CBS-k1 s1 c / 2 units, CBS-k3 s2 c / 2 units, and residual connections, where MaxPool-k2,hw / 2 represents a large pooling function with a kernel size of 2×2 and an output channel of 64. The letters in CBS-k1 s2 c / 2 units, CBS-k1 s1 c / 2 units, and CBS-k3 s2 c / 2 units have the same meanings as those in CBS-k3 s1 c64 sublayer 1. h, w, and c represent the height, width, and number of channels of the corresponding input features; see Figure 4 , the SPPCSPC_A sublayer consists of CBS-k3 s2128 units, CBS-k1 s264 units, CBS-k1 s132 units, MaxPool-k3 units, MaxPool-k6 units, MaxPool-k9 units, CBS-k1 s116 units, residual connections, CBS-k1s316 units, CBAM_ATT-k1 s1 units, and CBS-k1 s316 units, where the CBAM_ATT-k1 s1 unit is connected to the CBS-k1 s116 unit by replacing the last layer of the convolutional network with a kernel size of 3×3 in the CBS-k1s116 unit, and the CBAM_ATT-k1s1 unit represents a convolutional attention network, and all convolutions in the attention network are replaced by depth-separated convolutions with a kernel size of 1×1 and a stride of 1;

[0052] S202, input the high-dimensional feature 3 output by the SPPCSPC_A sublayer into the GSConv sublayer 1 in the bottleneck layer for dimensionality reduction, input the reduced high-dimensional feature 3 into the CBS-k3 s1 c64 sublayer 1 and the upsampling sublayer 1 in the bottleneck layer 1 in sequence, obtain the high-dimensional feature 4, and input the high-dimensional feature 4 and the high-dimensional feature 2 output by the ELAN sublayer 3 after dimensionality reduction by the GSConv sublayer 2 into the cascade sublayer 2 in the bottleneck layer 1 at the same time for cascade operation, and obtain the high-dimensional fusion feature 1;

[0053] S203, the obtained high-dimensional fusion feature 1 is sequentially input into the ELAN-CA sublayer 2, the GSConv sublayer 4, and the upsampling sublayer 2 in the bottleneck layer 1 to obtain the high-dimensional feature 5, and the obtained high-dimensional feature 5 and the high-dimensional feature 1 output by the ELAN-CA sublayer 2 after the dimensionality reduction by the GSConv sublayer 3 are simultaneously input into the cascade sublayer 1 for cascade operation to obtain the high-dimensional fusion feature 2; in this example, the GSConv sublayer 1, the GSConv sublayer 2, the GSConv sublayer 3, the GSConv sublayer 4, the GSConv sublayer 5 and the GSConv sublayer 3 have the same structure, and in this embodiment, the convolution kernel size of the standard convolution and the depth separation convolution in all the GSConv sublayers is set to 1×1, and the corresponding input feature map is subjected to dimensionality reduction processing to reduce the complexity of calculation; in this embodiment, the upsampling sublayer 1 and the upsampling sublayer 2 have the same structure, and the upsampling sublayer 1 upsamples the input feature map by 2 times, and the upsampling sublayer 2 upsamples the input feature map by 1 / 2 times;

[0054] S204, input the obtained high-dimensional fusion feature 2 into the ELAN-CA sublayer 1 in the bottleneck layer 2 in sequence to obtain the high-dimensional feature 6, first input the obtained high-dimensional feature 6 into the CBS-k3 s1 c64 sublayer 1 in the prediction layer to obtain the output of the CBS-k3 s1 c64 sublayer 1, then input the output of the CBS-k3 s1 c64 sublayer 1 into the Yolo prediction head 1, obtain the defect anchor frame and anchor frame regression error in the corresponding battery string image, and input the high-dimensional feature 6 into the GSConv sublayer 5 to obtain the high-dimensional feature 7, and input the obtained high-dimensional feature 7 and the high-dimensional feature 8 output by the ELAN-CA sublayer 2 in the bottleneck layer 1 into the cascade sublayer 3 in the bottleneck layer 2 to obtain the high-dimensional fusion feature 3;

[0055] S205, input the obtained high-dimensional fusion feature 3 to the ELAN-CA sublayer 3 in the bottleneck layer 2, obtain the high-dimensional feature 9, first input the obtained high-dimensional feature 9 to the CBS-k3 s1 c64 sublayer 2 in the prediction layer, obtain the output of the CBS-k3 s1 c64 sublayer 2, then input the output of the CBS-k3 s1 c64 sublayer 2 into the Yolo prediction head 2 to calculate the defect type and classification error of the corresponding defect frame, and cascade the high-dimensional features output by the CBS-k3 s1 c64 sublayer 1 and the CBS-k3 s1 c64 sublayer 2 in the prediction layer and input them into the Yolo prediction head 4 to calculate the defect position and position error of the corresponding defect anchor frame;

[0056] S206, input the high-dimensional feature 9 to the GSConv sublayer 6 in the bottleneck layer 2 for dimensionality reduction, and input the high-dimensional feature 9 after dimensionality reduction and the high-dimensional feature 3 after dimensionality reduction to the cascade sublayer 4 at the same time to obtain the high-dimensional fusion feature 4, and input the obtained high-dimensional fusion feature 4 to the CBS-k3 s2 c128 sublayer 3 in the prediction layer first to obtain the output of the CBS-k3 s2 c128 sublayer 3, and then input the output of the CBS-k3 s2 c128 sublayer 3 to the Yolo prediction head 3 to calculate the damage degree score and score error of each anchor frame defect;

[0057] Further, in this embodiment, the structures of ELAN-CA sublayer 1, ELAN-CA sublayer 2 and ELAN-CA sublayer 3 are the same, see Figure 5 , the ELAN-CA sublayer consists of CBS-k3 s2128 units, CBS-k1 s264 units, CBS-k1 s132 units, CBS-k1 s116 units, CBS-k1 s316 units, CBAM_ATT-k1 s1 units, CBS-k1 s316 units and residual connections, where the CBAM_ATT-k1 s1 unit is connected to the CBS-k1 s116 unit by replacing the last layer of the convolutional network with a kernel size of 3×3 in the CBS-k1 s116 unit, and the CBAM_ATT-k1 s1 unit represents a convolutional attention network, and all convolutions in the attention network are replaced by depth-separated convolutions with a kernel size of 1×1 and a stride of 1; Yolo prediction head 1, Yolo prediction head 2, Yolo prediction head 3, and Yolo prediction head 4 have the same structure, and use the prediction head structure corresponding to the original YOLOv7-small network;

[0058] S207. Set a training cycle, and use the anchor frame regression error, classification error, position error and score error to calculate the comprehensive loss error, and set a loss threshold. Use the set cycle and comprehensive loss error to perform training to obtain a trained lightweight defect detection model. Furthermore, in this embodiment, the training cycle is set to 200, and the loss threshold is set to 0.1.

[0059] Step S3: using an industrial camera or industrial endoscope to collect battery string image data in real time, input the collected data set into the trained lightweight defect detection model, and obtain the defect anchor frame, defect type, defect location and defect damage degree score of each anchor frame of each battery string;

[0060] Step S4: construct a comprehensive evaluation model for battery strings, input the output defect type, the damage degree score of each anchor frame defect, and the collected physical data of each battery string into the comprehensive evaluation model for battery strings, and calculate the comprehensive evaluation score of the damage degree of each battery string; further, the specific steps of step S4 include:

[0061] S401, the defect type corresponding to each battery string obtained by the lightweight defect detection model in real time, the defect damage degree score data of each anchor frame and the collected physical data related to the corresponding battery string are unified in data format to obtain a data set in a unified format; the physical data related to the battery string includes the total length of the battery string, the number of battery cells, the area of ​​the battery cell, the rated power, the date of manufacture, the years of use, and the working environment temperature; and the physical data related to the battery string are collected to construct characteristic variables, including defect density (the ratio of the number of defects to the number of battery cells), the average damage degree score, the maximum damage degree score, and the battery string age ratio; and the non-numerical defect type data collected above are encoded by unique hot encoding or label encoding, so that the dimensions of all input battery defect data are unified;

[0062] S402, constructing a battery string comprehensive evaluation model based on a random forest algorithm, and inputting the acquired data set in a unified format into the constructed battery string comprehensive evaluation model to calculate and obtain a comprehensive evaluation score of the corresponding battery string.

[0063] This process combines the defect type output by the lightweight defect detection model, the damage degree score of each anchor frame defect, and the collected physical data of the battery string. The accuracy and consistency of the input data are ensured through unified data format and feature variable construction. Furthermore, the comprehensive evaluation model constructed using the random forest algorithm can fully consider the impact of various factors on the damage degree of the battery string and calculate the comprehensive evaluation score of each battery string. This not only improves the accuracy and objectivity of the evaluation, but also provides a strong basis for the subsequent processing of the battery string.

[0064] Step S5: Based on the acquired defect type, defect location and comprehensive evaluation score of the battery string damage degree, a corresponding battery string maintenance strategy report is generated through a natural language model, and the generated maintenance strategy report is displayed in real time through an interactive interface to assist technicians in repairing the battery string; further, the specific steps of step S5 include:

[0065] S501, integrating the acquired defect type, defect location and comprehensive evaluation score of the battery string damage degree to obtain basic data of the corresponding battery string maintenance strategy; defect location: accurately describing the location of the defect in the battery string, including the specific battery cell number, row number or column number, and the area number of the battery cell;

[0066] S502. Build and train a text search matching model, and input the basic data of the corresponding battery string maintenance strategy into the text search matching model to automatically generate a detailed maintenance strategy report for each battery string, including maintenance response methods for different defect types, analysis of damage causes and preventive measures; further, the text search matching model is constructed by a pre-trained language model (such as GPT-3, BERT, etc.); the maintenance strategy report should cover:

[0067] 1) Repair and response methods for different defect types: Provide detailed inspection steps, repair process, required tools and materials, and operating precautions for specific defects;

[0068] 2) Analysis of the cause of damage: Based on existing data and professional knowledge, speculate on possible factors that lead to defects, such as manufacturing defects, environmental impacts, improper operation and maintenance, etc.;

[0069] 3) Preventive measures: Propose systematic improvement measures and regular maintenance suggestions to reduce the recurrence of similar defects, such as optimizing production processes, strengthening monitoring and early warning, regular inspections and cleaning, etc.

[0070] S503. Integrate the generated maintenance strategy report into a fixed or mobile interactive interface, and display the maintenance strategy of the battery string in the form of text, list, table or image to assist in the rapid maintenance of the battery string. Furthermore, seamlessly embed the generated maintenance strategy report into the interactive interface of the photovoltaic power station management system, mobile APP or dedicated maintenance tool on the fixed or mobile device to ensure that the technicians can access it in real time.

[0071] Example 2

[0072] See also Figure 6 , another embodiment provided by the present invention: a battery string defect image processing system based on battery repair, comprising: a data collection and preprocessing module, a model building and training module, a real-time defect detection module, a comprehensive evaluation module and a repair strategy generation and display module;

[0073] The data collection and preprocessing module is used for the collection, preprocessing, background segmentation and labeling of the historical detection image data of the battery string; the model construction and training module is used for the construction and optimization training of the lightweight defect detection model; the real-time defect detection module is used to use the obtained lightweight defect detection model to perform defect detection on the battery string image data collected in real time, and calculate the defect anchor frame, defect type, defect position and defect damage degree score of each anchor frame of the corresponding battery string; the comprehensive evaluation module is used to comprehensively evaluate the damage degree of the battery string based on the acquired physical data of each battery string, the defect type and the damage degree score of each defect anchor frame; the maintenance strategy generation and display module is used to generate the maintenance strategy report of the corresponding battery string based on the comprehensive evaluation score of the damage degree and the defect location and defect anchor frame information obtained by the comprehensive evaluation module, and display the report in real time.

[0074] The data collection and preprocessing module includes a data collection unit, an image enhancement unit, and a background segmentation and annotation unit; the model building and training module includes a model building unit and a model training unit; the real-time defect detection module includes a real-time image acquisition unit and a defect detection unit; the comprehensive evaluation module includes a comprehensive score calculation unit and a score error unit; the maintenance strategy generation and display module includes a maintenance strategy generation unit and an interactive display unit;

[0075] A data collection unit is used to collect historical detection image data of battery strings; an image enhancement unit is used to perform enhancement preprocessing on the collected image data; a background segmentation and annotation unit is used to segment and annotate the detection target and background in the preprocessed image to obtain a defect detection training set; a model construction unit is used to build a lightweight defect detection model based on the YOLOv7 lightweight network; a model training unit is used to optimize the training of the lightweight defect detection model using the segmented and annotated defect detection training set; a real-time image acquisition unit is used to use a dedicated camera or an industrial endoscope to collect battery string image data in real time; a defect detection unit is used to input the real-time collected image data into the trained lightweight defect detection model to obtain the defect anchor frame, defect type, defect position and defect damage degree score of each anchor frame of each battery string; a maintenance strategy generation unit is used to generate a maintenance strategy report for the corresponding battery string through a natural language model based on the obtained defect anchor frame, defect position and battery string damage degree comprehensive evaluation score; an interactive display unit is used to display the generated maintenance strategy report in real time through an interactive interface so that the staff can view and perform corresponding maintenance operations.

[0076] The specific workflow of the system is as follows: first, the data collection unit in the data collection and preprocessing module is used to collect historical image data, which is preprocessed by the image enhancement unit and annotated with the help of the background segmentation and annotation unit to form a training set; second, the model construction unit in the model construction and training module is used to build a lightweight defect detection model based on the YOLOv7 network, and the training set is input into the model training unit to train the lightweight defect detection model; third, the real-time defect detection module obtains the battery string image through the real-time image acquisition unit, and the defect detection unit uses the trained model to identify defects; fourth, the comprehensive evaluation module combines physical data and defect information to calculate the comprehensive evaluation score of the battery string damage degree; fifth, the maintenance strategy generation and display module uses the maintenance strategy generation unit to generate a maintenance strategy report based on the acquired defect anchor frame and the battery string comprehensive damage degree score, and displays it in real time through the interactive display unit to assist technicians in maintenance; the system not only realizes the automated process from data collection to maintenance strategy generation, but also further improves the efficiency of battery repair.

[0077] Example 3

[0078] A computer-readable storage medium stores computer instructions, which, when executed, execute a battery string defect image processing method based on battery repair.

[0079] Example 4

[0080] An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the battery string defect image processing method based on battery repair is implemented.

[0081] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in the field may also change, modify, replace and modify the above-mentioned embodiments without departing from the scope of protection of the purpose of the present invention and the claims, and all of these are within the protection of the present invention.

Claims

1. A battery string defect image processing method based on battery repair, characterized in that: include: Step S1: Collect historical detection image data of battery strings, and perform enhancement preprocessing on the collected image data to obtain a preprocessed defect detection data set, introduce a threshold segmentation algorithm, segment the detection target and background of each image in the preprocessed defect detection data set, and annotate the segmented detection target and background to obtain a defect detection training set; Step S2: construct a lightweight defect detection model based on the YOLOv7 lightweight network, input the segmented and labeled defect detection training set into the constructed lightweight defect detection model for training, and obtain a trained lightweight defect detection model; Step S3: collect battery string image data in real time, input the collected data set into the trained lightweight defect detection model, and obtain the defect anchor frame, defect type, defect location and defect damage degree score of each anchor frame of each battery string; Step S4: construct a comprehensive evaluation model for battery strings, input the output defect type, the damage degree score of each anchor frame defect, and the collected physical data of each battery string into the comprehensive evaluation model for battery strings, and calculate the comprehensive evaluation score of the damage degree of each battery string; Step S5: Generate a corresponding battery string maintenance strategy report through a natural language model according to the acquired defect type, defect location and comprehensive evaluation score of the battery string damage degree, and display the generated maintenance strategy report through an interactive interface; The construction and training process of the lightweight defect detection model in step S2 includes: S201, slice the annotated defect detection training set to obtain an input image sequence of size 640×640×3, input the sliced ​​input image sequence into the CBS-k3 s1 c64 sublayer 1, CBS-k3 s1 c64 sublayer 2 and CBS-k3 s2 c128 sublayer 3 of the backbone layer in sequence, perform preliminary feature extraction, obtain primary image extraction features, and input the obtained primary features into the ELAN sublayer 1, ELAN-CA sublayer 2, MPConv sublayer 2, ELAN sublayer 3, MPConv sublayer 3 and SPPCSPC_A sublayer in the backbone layer in sequence for deep feature extraction, and obtain high-dimensional image output features 3; S202, input the high-dimensional feature 3 output by the SPPCSPC_A sublayer into the GSConv sublayer 1 in the bottleneck layer for dimensionality reduction, input the reduced high-dimensional feature 3 into the CBS-k3 s1 c64 sublayer 1 and the upsampling sublayer 1 in the bottleneck layer 1 in sequence, obtain the high-dimensional feature 4, and input the high-dimensional feature 4 and the high-dimensional feature 2 output by the ELAN sublayer 3 after dimensionality reduction by the GSConv sublayer 2 into the cascade sublayer 2 in the bottleneck layer 1 at the same time for cascade operation, and obtain the high-dimensional fusion feature 1; S203, input the obtained high-dimensional fusion feature 1 to the ELAN-CA sublayer 2, GSConv sublayer 4, and upsampling sublayer 2 in the bottleneck layer 1 in sequence to obtain a high-dimensional feature 5, and input the obtained high-dimensional feature 5 and the high-dimensional feature 1 output by the ELAN-CA sublayer 2 after the dimensionality reduction by the GSConv sublayer 3 to the cascade sublayer 1 at the same time for cascade operation to obtain a high-dimensional fusion feature 2; S204, input the obtained high-dimensional fusion feature 2 into the ELAN-CA sublayer 1 in the bottleneck layer 2 in sequence to obtain the high-dimensional feature 6, first input the obtained high-dimensional feature 6 into the CBS-k3 s1 c64 sublayer 1 in the prediction layer to obtain the output of the CBS-k3 s1 c64 sublayer 1, then input the output of the CBS-k3 s1 c64 sublayer 1 into the Yolo prediction head 1, obtain the defect anchor frame and anchor frame regression error in the corresponding battery string image, and input the high-dimensional feature 6 into the GSConv sublayer 5 to obtain the high-dimensional feature 7, and input the obtained high-dimensional feature 7 and the high-dimensional feature 8 output by the ELAN-CA sublayer 2 in the bottleneck layer 1 into the cascade sublayer 3 in the bottleneck layer 2 to obtain the high-dimensional fusion feature 3; The construction and training process of the lightweight defect detection model in step S2 also includes: S205, input the obtained high-dimensional fusion feature 3 to the ELAN-CA sublayer 3 in the bottleneck layer 2, obtain the high-dimensional feature 9, first input the obtained high-dimensional feature 9 to the CBS-k3 s1 c64 sublayer 2 in the prediction layer, obtain the output of the CBS-k3 s1 c64 sublayer 2, then input the output of the CBS-k3 s1 c64 sublayer 2 into the Yolo prediction head 2 to calculate the defect type and classification error of the corresponding defect frame, and cascade the high-dimensional features output by the CBS-k3 s1 c64 sublayer 1 and the CBS-k3 s1 c64 sublayer 2 in the prediction layer and input them into the Yolo prediction head 4 to calculate the defect position and position error of the corresponding defect anchor frame; S206, input the high-dimensional feature 9 to the GSConv sublayer 6 in the bottleneck layer 2 for dimensionality reduction, and input the high-dimensional feature 9 after dimensionality reduction and the high-dimensional feature 3 after dimensionality reduction to the cascade sublayer 4 at the same time to obtain the high-dimensional fusion feature 4, and input the obtained high-dimensional fusion feature 4 to the CBS-k3 s2 c128 sublayer 3 in the prediction layer first to obtain the output of the CBS-k3 s2 c128 sublayer 3, and then input the output of the CBS-k3 s2 c128 sublayer 3 to the Yolo prediction head 3 to calculate the damage degree score and score error of each anchor frame defect; S207, setting a training cycle, and using the anchor frame regression error, classification error, position error and score error to calculate the comprehensive loss error, and using the set cycle and comprehensive loss error to perform training to obtain a trained lightweight defect detection model.

2. The battery string defect image processing method based on battery repair according to claim 1, characterized in that: The specific steps of step S4 include: S401, the defect type corresponding to each battery string, the defect damage degree score data of each anchor frame, and the collected physical data related to the corresponding battery string obtained by the lightweight defect detection model in real time are unified in data format to obtain a data set in a unified format; S402, constructing a battery string comprehensive evaluation model based on a random forest algorithm, and inputting the acquired data set in a unified format into the constructed battery string comprehensive evaluation model to calculate and obtain a comprehensive evaluation score of the corresponding battery string.

3. The battery string defect image processing method based on battery repair according to claim 2, characterized in that: The specific steps of step S5 include: S501, integrating the acquired defect type, defect location and comprehensive evaluation score of the battery string damage degree to obtain basic data of the corresponding battery string maintenance strategy; S502, construct and train a text search matching model, and input the basic data of the corresponding battery string maintenance strategy into the text search matching model to automatically generate a detailed maintenance strategy report for each battery string, the report including maintenance response methods for different defect types, analysis of damage causes and preventive measures; S503: Integrate the generated maintenance strategy report into a fixed or mobile interactive interface, and display the maintenance strategy of the battery string in the form of text, list, table or image to assist in the rapid maintenance of the battery string.

4. A battery string defect image processing system based on battery repair, which is implemented based on the battery string defect image processing method based on battery repair according to any one of claims 1 to 3, characterized in that: include: Data collection and preprocessing module, model building and training module, real-time defect detection module; The data collection and preprocessing module is used for the collection, preprocessing, background segmentation and labeling of the battery string historical detection image data; the model construction and training module is used for the construction and optimization training of the lightweight defect detection model; The real-time defect detection module is used to perform defect detection on the battery string image data collected in real time using the obtained lightweight defect detection model, and calculate the defect anchor frame, defect type, defect position and defect damage degree score of each anchor frame of the corresponding battery string.

5. The battery string defect image processing system based on battery repair according to claim 4, characterized in that: The data collection and preprocessing module includes a data collection unit, an image enhancement unit and a background segmentation and annotation unit; The data collection unit is used to collect the battery string historical detection image data; the image enhancement unit is used to perform enhancement preprocessing on the collected image data; The background segmentation and labeling unit is used to segment and label the detection target and background in the preprocessed image, so as to obtain a defect detection training set.

6. The battery string defect image processing system based on battery repair according to claim 5, characterized in that: The model building and training module includes a model building unit and a model training unit; the real-time defect detection module includes a real-time image acquisition unit and a defect detection unit; The model building unit is used to build a lightweight defect detection model based on the YOLOv7 lightweight network; the model training unit is used to optimize the lightweight defect detection model using the segmented and labeled defect detection training set; The real-time image acquisition unit is used to acquire battery string image data in real time using a dedicated camera or an industrial endoscope; The defect detection unit is used to input the real-time collected image data into the trained lightweight defect detection model to obtain the defect anchor frame, defect type, defect position and defect damage degree score of each anchor frame of each battery string.

7. A computer-readable storage medium, characterized in that: Computer instructions are stored thereon, and when the computer instructions are executed, the battery string defect image processing method based on battery repair as described in any one of claims 1 to 3 is executed.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the battery string defect image processing method based on battery repair described in any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • Image processing method, image processing system and defect detection device

    CN107784660A

  • Battery shell appearance defect image processing method and device

    CN116228684A

  • Steel surface defect detection method based on improved YOLOv5s

    CN115829991A

  • Battery detection method and device

    US20210209739A1