Abnormality identification method and system of battery pack, medium and product

By using the multi-scale feature fusion and adaptive weighted fusion mechanism of the SGCF-YOLO model, high-precision identification of multi-scale anomalies inside the battery pack is achieved, solving the problem of insufficient detection accuracy of small-sized screw loosening and large-area condensation areas in the existing technology, and ensuring non-invasive perception of the internal state of the battery pack.

CN121616922APending Publication Date: 2026-03-06ELECTRIC POWER RES INST OF GUANGDONG POWER GRID CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511822818.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-05
Publication Date
2026-03-06

AI Technical Summary

Technical Problem

In existing technologies, it is difficult to simultaneously identify multi-scale abnormal targets inside the battery pack with high accuracy in a single model. In particular, it is difficult to achieve both detection accuracy and segmentation accuracy for small-sized loose screws and large-area condensation areas.

Method used

The SGCF-YOLO model is adopted, and multi-scale feature map data is extracted through convolutional neural network. Sampling alignment, channel splicing, local and non-local response weight calculation and weighted fusion are performed on the feature map data of adjacent scales to construct a cross-scale adaptive feature fusion mechanism, and output screw loosening detection results and condensation segmentation results respectively.

Benefits of technology

It achieves high-precision identification of small loose screws and large-scale irregular condensation areas in a unified inference process, solves the problem of insufficient detection accuracy of existing methods in multi-scale anomaly coexistence scenarios, and avoids the safety risks of disassembly and inspection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121616922A_ABST
    Figure CN121616922A_ABST
Patent Text Reader

Abstract

The invention discloses a battery pack abnormity identification method and system, a medium and a product, and belongs to the field of battery pack visual detection, and the method comprises the steps: obtaining internal image data of a battery pack, inputting a preset SGCF-YOLO model, extracting a multi-scale feature map of three levels through a convolutional neural network, and carrying out the recognition of the internal image data of the battery pack; performing sampling alignment, channel splicing, local and non-local response weight calculation and weighted fusion on the adjacent level feature maps in sequence to generate first fusion feature data and second fusion feature data; inputting the first fusion feature data into the target detection branch, and outputting a screw looseness detection result; inputting the second fusion feature data into an instance segmentation branch, and outputting a condensation segmentation result; and combining the screw looseness detection result and the condensation segmentation result, and outputting an abnormal recognition result. According to the invention, the technical problem that the multi-scale abnormal target in the battery pack is difficult to identify synchronously with high precision in a single model in the prior art can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of visual inspection of battery packs, and relates to a method, system, medium and product for anomaly identification of battery packs. Background Technology

[0002] As a core component of electric vehicles and energy storage systems, battery packs have a complex internal structure, containing a large number of connecting screws and thermal management components. During operation, the screws are prone to loosening due to vibration, or internal condensation may occur due to temperature differences. Both of these can lead to serious safety risks such as short circuits and thermal runaway. Therefore, it is necessary to conduct regular abnormal inspections on the internal condition of the battery pack.

[0003] Existing technologies mainly employ two types of methods: one is based on battery management system-based electrical parameter monitoring, which indirectly judges anomalies through changes in voltage, current, or internal resistance. However, this method often does not show obvious changes in electrical parameters in the stage of slight screw loosening or early condensation, making it difficult to provide timely warnings. The other type is based on image recognition-based visual detection methods, which usually use single-scale target detection models (such as the YOLO series) for anomaly identification. However, since screw loosening is a small target, while condensation presents as a large-scale irregular area, the scale difference between the two is significant. Traditional models use the same weight for all scales when fusing features, which leads to small targets being easily missed and large targets having blurred boundaries, making it difficult to achieve high-precision detection and segmentation simultaneously in a single inference. Summary of the Invention

[0004] This application provides a method, system, medium, and product for anomaly identification of battery packs, which can solve the technical problem in the prior art that it is difficult to identify multi-scale anomalies inside battery packs with high precision and synchronously in a single model.

[0005] To achieve the above objectives, in a first aspect, the present invention provides a method for identifying anomalies in a battery pack, comprising:

[0006] Acquire internal image data of the battery pack to be inspected;

[0007] The internal image data of the battery pack is input into a preset SGCF-YOLO model, which extracts multi-scale feature map data of three levels through a convolutional neural network. For each pair of adjacent scale feature map data, sampling alignment, channel stitching, local and non-local response weight calculation, and weighted fusion are performed sequentially to obtain multiple fused feature data. These multiple fused feature data include first fused feature data generated by fusing first-level and second-level feature map data, and second fused feature data generated by fusing second-level and third-level feature map data. The first fused feature data is input into the target detection branch, outputting screw loosening detection result data; the second fused feature data is input into the instance segmentation branch, outputting condensation segmentation result data.

[0008] Based on the screw loosening detection results and condensation segmentation results, anomaly identification results are output.

[0009] Compared with existing technologies, the embodiments of this application have the following beneficial effects: By acquiring internal image data of the battery pack to be detected, non-invasive perception of the internal state of the sealed battery pack is achieved, avoiding the safety risks brought about by disassembly and inspection; the image data is input into a preset SGCF-YOLO model, and multi-scale feature map data is extracted using a convolutional neural network, effectively capturing multi-level visual information from local details to global semantics; furthermore, by sequentially performing sampling alignment, channel stitching, local and non-local response weight calculation, and weighted fusion on each pair of adjacent scale feature map data, a cross-scale adaptive feature fusion mechanism is constructed, overcoming the semantic ambiguity problem caused by fixed weight fusion in traditional methods; the first fused feature data generated by fusing the first-level and second-level feature maps is input into the target detection branch to output screw loosening detection result data. The second fused feature data, generated by fusing the feature maps of the second and third levels, is input into the instance segmentation branch to output the condensation segmentation result data. This ensures that the fused features with high spatial detail preservation are assigned to the small target detection task, while the fused features with both semantic richness and boundary integrity are assigned to the large-area region segmentation task. This allows for the simultaneous and accurate identification of two types of heterogeneous anomalies within a unified inference process. Finally, based on the two types of results, the anomaly identification result is output to complete the diagnosis of anomalies inside the battery pack. Overall, the synergistic effect of multi-scale extraction, cross-scale adaptive weighted fusion, and dual-task branch output enables the model to simultaneously and accurately identify both small loose screw targets and large-area irregular condensation areas. This solves the core technical challenge of existing single-branch visual detection methods in multi-scale anomaly coexistence scenarios, which struggle to balance the detection rate of small targets with the segmentation accuracy of large targets.

[0010] In some embodiments of the first aspect of this application, the step of sequentially performing sampling alignment, channel stitching, local and non-local response weight calculation, and weighted fusion on each pair of adjacent scale feature map data yields multiple fused feature data, including:

[0011] The feature map data pairs of adjacent scales are sampled and aligned, and then concatenated along the channel dimension to generate the corresponding joint feature map data.

[0012] Based on the joint feature map data, local response weight calculation and non-local response weight calculation are performed respectively to obtain local attention weight data and non-local attention weight data, and then element-wise multiplication is performed to obtain fused weight data.

[0013] Based on the fusion weight data, the sampled and aligned feature map data pairs are weighted and fused to obtain the corresponding fusion feature data.

[0014] Compared with existing technologies, the above embodiments have the following beneficial effects: by sampling and aligning feature map data pairs at adjacent scales, spatial misalignment caused by resolution differences is eliminated, providing a geometric consistency basis for subsequent feature fusion; further, by generating joint feature map data through channel dimension splicing operations, complementary information of high and low-level features is integrated, enriching the feature expression before fusion; then, local response weight calculation and non-local response weight calculation are performed according to the joint feature map data to obtain local attention weight data and non-local attention weight data, which respectively capture the texture detail response in the local neighborhood and the long-range semantic dependency in the global scope; and the two types of weights are fused through element-wise multiplication operations to construct a dynamic gating mechanism that takes into account both local details and global context; finally, the sampled and aligned feature map data pairs are weighted and fused based on the fused weight data, realizing pixel-level adaptive adjustment of the contribution of features at different scales, significantly improving the discriminative ability and task adaptability of the fused features.

[0015] In some embodiments of the first aspect of this application, the calculation of the local response weights includes:

[0016] Global average pooling and global max pooling are performed on the joint feature map data respectively to obtain average pooling feature data and max pooling feature data, and then the channel dimensions are concatenated to generate pooled concatenated feature data.

[0017] The pooled concatenated feature data is convolved to obtain local response map data, which is then normalized to generate local attention weight data.

[0018] Compared to existing technologies, the above embodiments have the following beneficial effects: By performing global average pooling and global max pooling on the joint feature map data respectively, the global semantic mean information and significant peak response of the feature channels are encoded respectively; further, pooled concatenated feature data is generated by concatenating the channel dimensions, which integrates the complementary advantages of the two pooling strategies and enhances the discriminative power of channel attention; then, the pooled concatenated feature data is convolved to extract the nonlinear interaction relationship between channels and generate more discriminative local response map data; finally, the response values ​​are mapped to the zero-one interval through normalization to form local attention weight data, which effectively suppresses irrelevant background interference and strengthens key feature channels related to local structure.

[0019] In some embodiments of the first aspect of this application, the nonlocal response weight calculation includes:

[0020] Based on the joint feature map data, matrix multiplication and scaling are performed to generate similarity map data;

[0021] The similarity map data is processed by the Softmax function to generate normalized attention map data;

[0022] The normalized attention map data is processed by the Sigmoid function to obtain non-local attention weight data.

[0023] Compared to existing technologies, the above embodiments have the following beneficial effects: by performing matrix multiplication and scaling based on the joint feature map data, the feature similarity between any two spatial locations is calculated and the problem of excessively large dot product values ​​is suppressed, generating stable similarity map data; further, by performing Softmax function operation on the similarity map data, the similarity is transformed into a probability distribution form, highlighting the long-range dependency between key locations and generating normalized attention map data; then, by performing Sigmoid function operation on the normalized attention map data, the output is compressed to the zero-one interval while retaining the possibility of many-to-many interactions, resulting in non-local attention weight data, thereby effectively modeling the global spatial consistency and contextual relevance of large-scale anomalies such as condensation.

[0024] In some embodiments of the first aspect of this application, the step of inputting the first fused feature data into the target detection branch and outputting screw loosening detection result data includes:

[0025] The first fused feature data is processed by two convolutions to output bounding box parameter data and first category probability data, respectively.

[0026] The bounding box parameter data is combined with the first category probability data to obtain the screw loosening detection result data.

[0027] Compared with the prior art, the above embodiments have the following beneficial effects: by performing two-way convolution processing on the first fused feature data, the bounding box parameter data and the first category probability data are output respectively, thereby achieving decoupled prediction of spatial localization and semantic classification of the loose screw target; then the bounding box parameter data and the first category probability data are merged to obtain the loose screw detection result data, ensuring that the detection result has both accurate geometric position information and reliable category confidence, effectively improving the detection rate and localization accuracy of the loose screw target.

[0028] In some embodiments of the first aspect of this application, the step of inputting the second fused feature data into the instance segmentation branch and outputting condensation segmentation result data includes:

[0029] The second fused feature data is processed by two convolutions to output segmentation confidence map data and second category probability distribution data, respectively.

[0030] The segmentation confidence map data is combined with the second category probability distribution data to obtain the condensation segmentation result data.

[0031] Compared with existing technologies, the above embodiments have the following beneficial effects: by performing two-way convolution processing on the second fusion feature data, segmentation confidence map data and second category probability distribution data are output respectively, realizing pixel-level existence confidence estimation and fine-grained semantic classification of the condensation area; then, the segmentation confidence map data and the second category probability distribution data are merged to obtain condensation segmentation result data, which not only accurately depicts the irregular boundaries of condensation, but also provides the category belonging probability of each pixel, significantly improving the segmentation integrity and semantic accuracy of large-scale condensation areas.

[0032] In a second aspect, the present invention also provides a battery pack anomaly identification system, comprising: a data acquisition module, an identification module, and an output module;

[0033] The data acquisition module is used to acquire internal image data of the battery pack to be inspected.

[0034] The recognition module is used to input the internal image data of the battery pack into a preset SGCF-YOLO model, so that the SGCF-YOLO model extracts multi-scale feature map data of three levels through a convolutional neural network, and performs sampling alignment, channel stitching, local and non-local response weight calculation and weighted fusion on each pair of adjacent scale feature map data in sequence to obtain multiple fused feature data; wherein, the multiple fused feature data includes first fused feature data generated by fusing the feature map data of the first level and the feature map data of the second level, and second fused feature data generated by fusing the feature map data of the second level and the feature map data of the third level; the first fused feature data is input into the target detection branch to output screw loosening detection result data; the second fused feature data is input into the instance segmentation branch to output condensation segmentation result data;

[0035] The output module is used to output anomaly identification results based on the screw loosening detection results data and the condensation segmentation results data.

[0036] Compared with existing technologies, the above embodiments of this application have the following beneficial effects: By acquiring internal image data of the battery pack to be detected, non-invasive perception of the internal state of the sealed battery pack is achieved, avoiding the safety risks brought about by disassembly and inspection; the image data is input into a preset SGCF-YOLO model, and multi-scale feature map data is extracted using a convolutional neural network, effectively capturing multi-level visual information from local details to global semantics; furthermore, by sequentially performing sampling alignment, channel stitching, local and non-local response weight calculation and weighted fusion on each pair of adjacent scale feature map data, a cross-scale adaptive feature fusion mechanism is constructed, overcoming the semantic ambiguity problem caused by fixed weight fusion in traditional methods; the first fused feature data generated by fusing the first-level and second-level feature maps is input into the target detection branch to output screw loosening detection result data. The second fused feature data, generated by fusing the feature maps of the second and third levels, is input into the instance segmentation branch to output the condensation segmentation result data. This ensures that the fused features with high spatial detail preservation are assigned to the small target detection task, while the fused features with both semantic richness and boundary integrity are assigned to the large-area region segmentation task. This allows for the simultaneous and accurate identification of two types of heterogeneous anomalies within a unified inference process. Finally, based on the two types of results, the anomaly identification result is output to complete the diagnosis of anomalies inside the battery pack. Overall, the synergistic effect of multi-scale extraction, cross-scale adaptive weighted fusion, and dual-task branch output enables the model to simultaneously identify small screw loosening targets and large-area irregular condensation areas with high accuracy. This solves the core technical challenge of existing single-branch visual detection methods in multi-scale anomaly coexistence scenarios, which makes it difficult to balance the detection rate of small targets and the segmentation accuracy of large targets.

[0037] In some embodiments of the second aspect of this application, the identification module includes: an alignment and splicing unit, a weight calculation unit, and a weighted fusion unit;

[0038] The alignment and stitching unit is used to sample and align feature map data pairs of adjacent scales and perform channel-dimensional stitching operations to generate corresponding joint feature map data.

[0039] The weight calculation unit is used to perform local response weight calculation and non-local response weight calculation respectively based on the joint feature map data to obtain local attention weight data and non-local attention weight data, and perform element-wise multiplication operation to obtain fused weight data.

[0040] The weighted fusion unit is used to perform weighted fusion on the sampled and aligned feature map data pairs based on the fusion weight data to obtain the corresponding fused feature data.

[0041] Compared with existing technologies, the above embodiments have the following beneficial effects: by sampling and aligning feature map data pairs at adjacent scales, spatial misalignment caused by resolution differences is eliminated, providing a geometric consistency basis for subsequent feature fusion; further, by generating joint feature map data through channel dimension splicing operations, complementary information of high and low-level features is integrated, enriching the feature expression before fusion; then, local response weight calculation and non-local response weight calculation are performed according to the joint feature map data to obtain local attention weight data and non-local attention weight data, which respectively capture the texture detail response in the local neighborhood and the long-range semantic dependency in the global scope; and the two types of weights are fused through element-wise multiplication operations to construct a dynamic gating mechanism that takes into account both local details and global context; finally, the sampled and aligned feature map data pairs are weighted and fused based on the fused weight data, realizing pixel-level adaptive adjustment of the contribution of features at different scales, significantly improving the discriminative ability and task adaptability of the fused features.

[0042] Thirdly, the present invention also provides a computer program product, including a computer program or instructions, characterized in that, when the computer program or instructions are executed, they implement the abnormal identification method for any type of battery pack of the present invention.

[0043] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements any one of the abnormal identification methods for battery packs of the present invention. Attached Figure Description

[0044] Figure 1 This is a flowchart illustrating a method for identifying anomalies in a battery pack, provided in some embodiments of the present invention.

[0045] Figure 2 This is a schematic diagram of the structure of a battery pack anomaly identification system provided in some embodiments of the present invention.

[0046] Figure 3 This is a structural diagram of an SGCF-YOLO model provided in some embodiments of the present invention.

[0047] Figure 4 This is a schematic diagram of an SGCFM structure provided in some embodiments of the present invention.

[0048] Figure 5 This is a comparison chart of the results of a screw loosening test provided in some embodiments of the present invention.

[0049] Figure 6 This is a comparison chart of the results of a condensation identification test provided in some embodiments of the present invention. Detailed Implementation

[0050] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0051] Example 1:

[0052] Please refer to Figure 1 To address the technical problem of high-precision synchronous identification of multi-scale anomalies within a battery pack in a single model in existing technologies, an embodiment of the present invention provides an anomaly identification method for a battery pack, comprising steps S1 to S3:

[0053] Step S1: Obtain internal image data of the battery pack to be inspected.

[0054] Step S2: Input the internal image data of the battery pack into a preset SGCF-YOLO model, so that the SGCF-YOLO model extracts multi-scale feature map data of three levels through a convolutional neural network, and performs sampling alignment, channel stitching, local and non-local response weight calculation and weighted fusion on each pair of adjacent scale feature map data in sequence to obtain multiple fused feature data; wherein, the multiple fused feature data includes first fused feature data generated by fusing the feature map data of the first level and the feature map data of the second level, and second fused feature data generated by fusing the feature map data of the second level and the feature map data of the third level; input the first fused feature data into the target detection branch and output screw loosening detection result data; input the second fused feature data into the instance segmentation branch and output condensation segmentation result data.

[0055] Furthermore, the fused feature data in step S2 can be obtained through the following preferred implementation method, including steps S21-S23, as follows:

[0056] S21: Sample and align the feature map data pairs of adjacent scales, and perform channel-dimensional concatenation to generate the corresponding joint feature map data;

[0057] S22: Based on the joint feature map data, perform local response weight calculation and non-local response weight calculation respectively to obtain local attention weight data and non-local attention weight data, and perform element-wise multiplication to obtain fused weight data;

[0058] S23: Based on the fusion weight data, the sampled and aligned feature map data pairs are weighted and fused to obtain the corresponding fusion feature data.

[0059] In this preferred embodiment, by sampling and aligning feature map data pairs at adjacent scales, spatial misalignment caused by resolution differences is eliminated, providing a geometrically consistent foundation for subsequent feature fusion. Furthermore, joint feature map data is generated through channel-dimensional splicing, integrating complementary information from high- and low-level features and enriching the feature representation before fusion. Local response weight calculation and non-local response weight calculation are then performed on the joint feature map data to obtain local attention weight data and non-local attention weight data, respectively capturing texture detail responses within the local neighborhood and long-range semantic dependencies in the global scope. The two types of weights are then fused through element-wise multiplication, constructing a dynamic gating mechanism that considers both local details and global context. Finally, the sampled and aligned feature map data pairs are weighted and fused based on this fused weight data, achieving pixel-level adaptive adjustment of the contribution of features at different scales, significantly improving the discriminative ability and task adaptability of the fused features.

[0060] Furthermore, the calculation of local response weights in step S22 can be implemented through the following preferred embodiments, including S221-S222, as follows:

[0061] S221: Perform global average pooling and global max pooling on the joint feature map data respectively to obtain average pooling feature data and max pooling feature data, and then concatenate them along the channel dimension to generate pooled concatenated feature data.

[0062] S222: Convolve the pooled feature data to obtain local response map data, and normalize it to generate local attention weight data.

[0063] In this preferred embodiment, global average pooling and global max pooling are performed on the joint feature map data to encode the global semantic mean information and significant peak response of the feature channels, respectively. Furthermore, pooled concatenated feature data is generated by concatenating the channel dimensions, integrating the complementary advantages of the two pooling strategies and enhancing the discriminative power of channel attention. This pooled concatenated feature data is then convolved to extract the nonlinear interaction relationships between channels, generating more discriminative local response map data. Finally, a normalization operation maps the response values ​​to the zero-to-one interval, forming local attention weight data, effectively suppressing irrelevant background interference and strengthening key feature channels related to the local structure.

[0064] Furthermore, the nonlocal response weight calculation in step S22 can be implemented through the following preferred embodiments, including S223-S225, as follows:

[0065] S223: Based on the joint feature map data, perform matrix multiplication and scale to generate similarity map data;

[0066] S224: Perform a Softmax function operation on the similarity map data to generate normalized attention map data;

[0067] S225: Perform a Sigmoid function operation on the normalized attention map data to obtain non-local attention weight data.

[0068] In this preferred embodiment, by performing matrix multiplication and scaling on the joint feature map data, the feature similarity between any two spatial locations is calculated, and the problem of excessively large dot product values ​​is suppressed, generating stable similarity map data. Furthermore, by performing a Softmax function operation on the similarity map data, the similarity is transformed into a probability distribution form, highlighting the long-range dependency between key locations and generating normalized attention map data. Then, by performing a Sigmoid function operation on the normalized attention map data, the output is compressed to the zero-one interval while retaining the possibility of many-to-many interactions, resulting in non-local attention weight data. This effectively models the global spatial consistency and contextual relevance of large-scale anomalies such as condensation.

[0069] Furthermore, the screw loosening detection result data in step S2 can be obtained through the following preferred implementation method, including steps S24-S25, as follows:

[0070] S24: Perform two-way convolution processing on the first fused feature data to output bounding box parameter data and first category probability data respectively;

[0071] S25: Combine the bounding box parameter data with the first category probability data to obtain the screw loosening detection result data.

[0072] In this preferred embodiment, by performing two-way convolution processing on the first fused feature data, bounding box parameter data and first category probability data are output respectively, thereby achieving decoupled prediction of spatial localization and semantic classification of the loose screw target; then the bounding box parameter data and the first category probability data are merged to obtain the loose screw detection result data, ensuring that the detection result has both accurate geometric position information and reliable category confidence, effectively improving the detection rate and localization accuracy of the small loose screw target.

[0073] Furthermore, the condensation segmentation result data in step S2 can be obtained through the following preferred implementation method, including steps S26-S27, as follows:

[0074] S26: Perform two-way convolution processing on the second fused feature data to output segmentation confidence map data and second category probability distribution data respectively;

[0075] S27: Combine the segmentation confidence map data with the second category probability distribution data to obtain the condensation segmentation result data.

[0076] In this preferred embodiment, by performing two-way convolution processing on the second fused feature data, segmentation confidence map data and second category probability distribution data are output respectively, realizing pixel-level existence confidence estimation and fine-grained semantic classification of the condensation area; then the segmentation confidence map data and the second category probability distribution data are merged to obtain condensation segmentation result data, which not only accurately depicts the irregular boundary of condensation, but also provides the category belonging probability of each pixel, significantly improving the segmentation completeness and semantic accuracy of large-scale condensation areas.

[0077] Step S3: Output the anomaly identification result based on the screw loosening detection result data and the condensation segmentation result data.

[0078] In practical implementation, as a preferred option, the SGCF-YOLO model used in this application, along with its structure and training dataset construction method, is described below:

[0079] I. Constructing the training dataset:

[0080] The present invention provides a method for constructing a dataset, including a graded torque control method and a thermal field simulation method. The graded torque control method is used to create a dataset on loose screws inside a battery pack, and the steps are as follows:

[0081] (1) Basic torque calibration: The safe tightening torque range of the screw is determined by using a torque wrench and used as the reference value T0.

[0082] (2) Define n states, denoted as level 1 to level n, with the reference value T0 as the center, according to the torque attenuation coefficient αi The loosening process is divided into n discrete states. Each state is T. i =α i T0, where i∈[0,n).

[0083] (3) For each state level, use a controllable torque tool to adjust the screws inside the battery pack to the corresponding torque value, and take an image of the inside of the battery pack in each state;

[0084] (4) Label the location and grade of loose screws in the image, generate bounding boxes and category labels, and pair the images with the labels to form a loose screw training dataset.

[0085] Thermal field simulation methods are used to create condensation datasets inside battery packs. Specifically, by combining the temperature gradient between the heat-generating elements (cells, busbars) and the low-temperature regions (casing, cooling pipes) inside the battery pack, a non-uniform condensation generation scheme is designed. The steps are as follows:

[0086] (1) Thermal Zone Control: A thermal simulation device for the battery pack is built inside the battery pack, dividing the simulated battery pack into 3 thermal zones:

[0087] High-heat zone: Cell simulation module (maintains temperature of 35-45℃ through heating elements to simulate cell heating during charging and discharging).

[0088] Medium temperature zone: busbars and terminals (temperature 20-25℃, simulating slight heating during current conduction).

[0089] Low-temperature zone: shell and cooling pipes (temperature 5-10℃, simulating the low-temperature zone under the action of the cooling system).

[0090] (2) Control the temperature of each zone and inject air with controllable humidity to induce water vapor to condense at the junction of hot and cold, and take internal images after the condensation stabilizes.

[0091] (3) Label the condensation area, generate a pixel-level segmentation mask, and pair the image with the mask to form a condensation segmentation training dataset.

[0092] II. Model Structure Design:

[0093] refer to Figure 3The diagram shows an SGCF-YOLO model structure. The backbone uses modules from the YOLO model to progressively extract high, medium, and low-resolution features from the image. Then, based on the original feature fusion structure in the YOLO model's neck region, SGCFM modules are embedded between feature maps of adjacent scales (e.g., between P3 and P4, and between P4 and P5) to dynamically weight and fuse features at adjacent scales. The head adopts the YOLO detection and segmentation head structure. The detection head outputs bounding box coordinates and class probabilities for the screw loosening task, while the segmentation head outputs segmentation masks and class probabilities for the condensation task, achieving unified output for object detection and instance segmentation.

[0094] The SGCFM module can be referenced. Figure 4 The diagram illustrates an SGCFM structure. SGCFM generates adaptive weights through local and non-local branches, dynamically weighting and fusing feature maps of different scales. Specifically, adjacent scale feature map pairs, including {P3, P4} or {P4, P5}, are input into SGCFM. This means upsampling the feature map of layer j to the resolution of layer i. This means downsampling the feature map of layer j to the resolution of layer i; at the resolution of layer i, upsampling the feature map of layer i+1 is performed to align with the resolution, expressed as: Will After processing by a 3×3 convolutional layer, the input is fed into the nonlocal branch and the local branch respectively to generate the nonlocal control field w. non Departmental control of the field loc Then, the final soft-gating weights are calculated using the Hadamard product: w i =w loc ⊙w non Their complementary weights are The two adjacent feature maps are complementary and weighted using weights and then fused for output.

[0095] After training the model, conduct tests and comparisons. The test results are for reference. Figure 5 The image shows a comparison of the results of a screw loosening test. Figure 6 The results of a condensation identification test are shown in the figure. The results clearly show the performance advantage of this method compared with some other mainstream methods, proving the practicality of this solution.

[0096] In summary, compared with the prior art, the above embodiments of this application have the following beneficial effects: by acquiring the internal image data of the battery pack to be detected, non-invasive perception of the internal state of the sealed battery pack is achieved, avoiding the safety risks brought about by disassembly and inspection; the image data is input into a preset SGCF-YOLO model, and multi-scale feature map data is extracted using a convolutional neural network, effectively capturing multi-level visual information from local details to global semantics; furthermore, by sequentially performing sampling alignment, channel stitching, local and non-local response weight calculation and weighted fusion on each pair of adjacent scale feature map data, a cross-scale adaptive feature fusion mechanism is constructed, overcoming the semantic ambiguity problem caused by fixed weight fusion in traditional methods; the first fused feature data generated by fusing the first-level and second-level feature maps is input into the target detection branch to output the screw loosening detection result. The data is processed by inputting the second fused feature data generated by fusing the second and third level feature maps into the instance segmentation branch to output the condensation segmentation result data. This ensures that the fused features with high spatial detail preservation are assigned to the small target detection task, while the fused features with both semantic richness and boundary integrity are assigned to the large-scale region segmentation task. This allows for the simultaneous and accurate identification of two types of heterogeneous anomalies in a unified inference process. Finally, based on the two types of results, the anomaly identification result is output to complete the diagnosis of anomalies inside the battery pack. Overall, the synergistic effect of multi-scale extraction, cross-scale adaptive weighted fusion, and dual-task branch output enables the model to simultaneously identify small screw loosening targets and large-scale irregular condensation areas with high accuracy. This solves the core technical problem of existing single-branch visual detection methods that are difficult to balance the detection rate of small targets and the segmentation accuracy of large targets in multi-scale anomaly coexistence scenarios.

[0097] Example 2:

[0098] Please refer to Figure 2 Based on the same inventive concept, the present invention discloses an anomaly identification system for a battery pack, comprising: a data acquisition module M1, an identification module M2, and an output module M3;

[0099] The data acquisition module M1 is used to acquire internal image data of the battery pack to be inspected.

[0100] The recognition module M2 is used to input the internal image data of the battery pack into a preset SGCF-YOLO model, so that the SGCF-YOLO model extracts multi-scale feature map data of three levels through a convolutional neural network, and performs sampling alignment, channel stitching, local and non-local response weight calculation and weighted fusion on each pair of adjacent scale feature map data in sequence to obtain multiple fused feature data; wherein, the multiple fused feature data includes first fused feature data generated by fusing the feature map data of the first level and the feature map data of the second level, and second fused feature data generated by fusing the feature map data of the second level and the feature map data of the third level; the first fused feature data is input into the target detection branch to output screw loosening detection result data; the second fused feature data is input into the instance segmentation branch to output condensation segmentation result data.

[0101] Furthermore, the recognition module M2 includes: an alignment and splicing unit, a weight calculation unit, and a weighted fusion unit;

[0102] The alignment and stitching unit is used to sample and align feature map data pairs of adjacent scales and perform channel-dimensional stitching operations to generate corresponding joint feature map data.

[0103] The weight calculation unit is used to perform local response weight calculation and non-local response weight calculation respectively based on the joint feature map data to obtain local attention weight data and non-local attention weight data, and perform element-wise multiplication operation to obtain fused weight data.

[0104] The weighted fusion unit is used to perform weighted fusion on the sampled and aligned feature map data pairs based on the fusion weight data to obtain the corresponding fused feature data.

[0105] In this preferred embodiment, by sampling and aligning feature map data pairs at adjacent scales, spatial misalignment caused by resolution differences is eliminated, providing a geometrically consistent foundation for subsequent feature fusion. Furthermore, joint feature map data is generated through channel-dimensional splicing, integrating complementary information from high- and low-level features and enriching the feature representation before fusion. Local response weight calculation and non-local response weight calculation are then performed on the joint feature map data to obtain local attention weight data and non-local attention weight data, respectively capturing texture detail responses within the local neighborhood and long-range semantic dependencies in the global scope. The two types of weights are then fused through element-wise multiplication, constructing a dynamic gating mechanism that considers both local details and global context. Finally, the sampled and aligned feature map data pairs are weighted and fused based on this fused weight data, achieving pixel-level adaptive adjustment of the contribution of features at different scales, significantly improving the discriminative ability and task adaptability of the fused features.

[0106] Furthermore, the weight calculation unit includes: a pooling splicing subunit and a local weight generation subunit;

[0107] The pooling splicing subunit is used to perform global average pooling and global max pooling on the joint feature map data respectively to obtain average pooling feature data and max pooling feature data, and then splice them along the channel dimension to generate pooled splicing feature data.

[0108] The local weight generation subunit is used to convolve the pooled concatenated feature data to obtain local response map data, and then normalize it to generate local attention weight data.

[0109] In this preferred embodiment, global average pooling and global max pooling are performed on the joint feature map data to encode the global semantic mean information and significant peak response of the feature channels, respectively. Furthermore, pooled concatenated feature data is generated by concatenating the channel dimensions, integrating the complementary advantages of the two pooling strategies and enhancing the discriminative power of channel attention. This pooled concatenated feature data is then convolved to extract the nonlinear interaction relationships between channels, generating more discriminative local response map data. Finally, a normalization operation maps the response values ​​to the zero-to-one interval, forming local attention weight data, effectively suppressing irrelevant background interference and strengthening key feature channels related to the local structure.

[0110] Furthermore, the weight calculation unit further includes: a similarity graph generation subunit, a normalization subunit, and a nonlocal weight generation subunit;

[0111] The similarity map generation subunit is used to perform matrix multiplication and scale based on the joint feature map data to generate similarity map data.

[0112] The normalization subunit is used to perform a Softmax function operation on the similarity map data to generate normalized attention map data;

[0113] The nonlocal weight generation subunit is used to perform a Sigmoid function operation on the normalized attention map data to obtain nonlocal attention weight data.

[0114] In this preferred embodiment, by performing matrix multiplication and scaling on the joint feature map data, the feature similarity between any two spatial locations is calculated, and the problem of excessively large dot product values ​​is suppressed, generating stable similarity map data. Furthermore, by performing a Softmax function operation on the similarity map data, the similarity is transformed into a probability distribution form, highlighting the long-range dependency between key locations and generating normalized attention map data. Then, by performing a Sigmoid function operation on the normalized attention map data, the output is compressed to the zero-one interval while retaining the possibility of many-to-many interactions, resulting in non-local attention weight data. This effectively models the global spatial consistency and contextual relevance of large-scale anomalies such as condensation.

[0115] Furthermore, the identification module M2 also includes: a detection processing unit and a detection result generation unit;

[0116] The detection processing unit is used to perform two-way convolution processing on the first fused feature data, and output bounding box parameter data and first category probability data respectively.

[0117] The detection result generation unit is used to merge the bounding box parameter data with the first category probability data to obtain screw loosening detection result data.

[0118] In this preferred embodiment, by performing two-way convolution processing on the first fused feature data, bounding box parameter data and first category probability data are output respectively, thereby achieving decoupled prediction of spatial localization and semantic classification of the loose screw target; then the bounding box parameter data and the first category probability data are merged to obtain the loose screw detection result data, ensuring that the detection result has both accurate geometric position information and reliable category confidence, effectively improving the detection rate and localization accuracy of the small loose screw target.

[0119] Furthermore, the identification module M2 also includes: a segmentation processing unit and a segmentation result generation unit;

[0120] The segmentation processing unit is used to perform two-way convolution processing on the second fused feature data, and output segmentation confidence map data and second category probability distribution data respectively.

[0121] The segmentation result generation unit is used to merge the segmentation confidence map data with the second category probability distribution data to obtain condensation segmentation result data.

[0122] In this preferred embodiment, by performing two-way convolution processing on the second fused feature data, segmentation confidence map data and second category probability distribution data are output respectively, realizing pixel-level existence confidence estimation and fine-grained semantic classification of the condensation area; then the segmentation confidence map data and the second category probability distribution data are merged to obtain condensation segmentation result data, which not only accurately depicts the irregular boundary of condensation, but also provides the category belonging probability of each pixel, significantly improving the segmentation completeness and semantic accuracy of large-scale condensation areas.

[0123] The output module M3 is used to output anomaly identification results based on the screw loosening detection results data and the condensation segmentation results data.

[0124] In summary, compared with existing technologies, the embodiments of this application have the following beneficial effects: by acquiring internal image data of the battery pack to be detected, non-invasive perception of the internal state of the sealed battery pack is achieved, avoiding the safety risks brought about by disassembly and inspection; the image data is input into a preset SGCF-YOLO model, and multi-scale feature map data is extracted using a convolutional neural network, effectively capturing multi-level visual information from local details to global semantics; furthermore, by sequentially performing sampling alignment, channel stitching, local and non-local response weight calculation and weighted fusion on each pair of adjacent scale feature map data, a cross-scale adaptive feature fusion mechanism is constructed, overcoming the semantic ambiguity problem caused by fixed weight fusion in traditional methods; the first fused feature data generated by fusing the first-level and second-level feature maps is input into the target detection branch to output the screw loosening detection result number. According to the method, the second fused feature data generated by fusing the feature maps of the second and third levels is input into the instance segmentation branch to output the condensation segmentation result data. This ensures that the fused features with high spatial detail preservation are assigned to the small target detection task, while the fused features with both semantic richness and boundary integrity are assigned to the large-area region segmentation task. This allows for the simultaneous and accurate identification of two types of heterogeneous anomalies in a unified inference process. Finally, based on the two types of results, the anomaly identification result is output to complete the diagnosis of anomalies inside the battery pack. Overall, the synergistic effect of multi-scale extraction, cross-scale adaptive weighted fusion, and dual-task branch output enables the model to simultaneously identify small screw loose targets and large-area irregular condensation areas with high accuracy. This solves the core technical problem of existing single-branch visual detection methods that are difficult to balance the detection rate of small targets and the segmentation accuracy of large targets in multi-scale anomaly coexistence scenarios.

[0125] Example 3:

[0126] This invention also provides a computer program product, including a computer program or instructions, capable of running on a computing device or stored in any available medium. When the computer program product is run on at least one computing device, it causes the at least one computing device to execute any of the battery pack anomaly identification methods of this invention.

[0127] Example 4:

[0128] This invention also provides a computer-readable storage medium storing at least one executable instruction that, when executed on a battery pack anomaly identification system, causes the battery pack anomaly identification system to perform one of the battery pack anomaly identification methods described in any of the above method embodiments.

[0129] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of this application may be practiced without these specific details. Similarly, for the purpose of simplification and aiding understanding of one or more aspects of the invention, in the above description of exemplary embodiments of this application, various features of the embodiments are sometimes grouped together in a single embodiment, figure, or description thereof. The claims, which follow the detailed description, are hereby expressly incorporated into that detailed description, wherein each claim itself is a separate embodiment of this application.

[0130] Those skilled in the art will understand that the modules in the system of the embodiments can be adaptively changed and placed in one or more systems different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components, except that at least some of such features and / or processes or units are mutually exclusive.

Claims

1. A method of recognizing an abnormality of a battery pack, characterized by, The method comprises: acquiring internal image data of a battery pack to be detected; inputting the internal image data of the battery pack into a preset SGCF-YOLO model, so that the SGCF-YOLO model extracts three-level multi-scale feature map data through a convolutional neural network, and sequentially performs sampling alignment, channel splicing, local and non-local response weight calculation and weighted fusion on each pair of adjacent scale feature map data to obtain a plurality of fusion feature data; wherein the plurality of fusion feature data comprises first fusion feature data generated by fusing the feature map data of the first level and the feature map data of the second level, and second fusion feature data generated by fusing the feature map data of the second level and the feature map data of the third level; inputting the first fusion feature data into a target detection branch to output screw loosening detection result data; inputting the second fusion feature data into an instance segmentation branch to output condensation segmentation result data; outputting an abnormality recognition result according to the screw loosening detection result data and the condensation segmentation result data. 2.The battery pack abnormality recognition method of claim 1, wherein The sequentially performing sampling alignment, channel splicing, local and non-local response weight calculation and weighted fusion on each pair of adjacent scale feature map data to obtain a plurality of fusion feature data comprises: sampling and aligning the feature map data pairs of adjacent scales, and performing channel dimension splicing operation to generate corresponding joint feature map data; respectively performing local response weight calculation and non-local response weight calculation according to the joint feature map data to obtain local attention weight data and non-local attention weight data, and performing element-by-element multiplication operation to obtain fusion weight data; based on the fusion weight data, performing weighted fusion on the feature map data pairs after sampling alignment to obtain corresponding fusion feature data. 3.The battery pack abnormality recognition method of claim 2, wherein The local response weight calculation comprises: respectively performing global average pooling and global maximum pooling on the joint feature map data to obtain average pooling feature data and maximum pooling feature data, and performing channel dimension splicing to generate pooling splicing feature data; performing convolution on the pooling splicing feature data to obtain local response map data, and performing normalization to generate local attention weight data. 4.The battery pack abnormality recognition method of claim 2, wherein The non-local response weight calculation comprises: performing matrix multiplication operation and scale scaling on the joint feature map data to generate similarity map data; performing Softmax function operation on the similarity map data to generate normalized attention map data; performing Sigmoid function operation on the normalized attention map data to obtain non-local attention weight data. 5.The battery pack abnormality recognition method of claim 1, wherein The inputting the first fusion feature data into the target detection branch to output the screw loosening detection result data comprises: performing two-way convolution processing on the first fusion feature data to respectively output bounding box parameter data and first class probability data; merging the bounding box parameter data and the first class probability data to obtain the screw loosening detection result data. 6.The battery pack abnormality recognition method of claim 1, wherein The inputting the second fusion feature data into the instance segmentation branch to output the condensation segmentation result data comprises: The second fusion feature data is subjected to two-way convolution processing, and segmentation confidence map data and second category probability distribution data are respectively output; The segmentation confidence map data and the second category probability distribution data are merged to obtain condensation segmentation result data. 7.An abnormality recognition system of a battery pack, characterized by, It comprises: a data acquisition module, an identification module and an output module; The data acquisition module is configured to acquire internal image data of a battery pack to be detected. The identification module is configured to input the internal image data of the battery pack into a preset SGCF-YOLO model, so that the SGCF-YOLO model extracts three levels of multi-scale feature map data through a convolutional neural network, and sequentially performs sampling alignment, channel splicing, local and non-local response weight calculation and weighted fusion on each pair of adjacent scale feature map data to obtain a plurality of fusion feature data; wherein the plurality of fusion feature data comprises first fusion feature data generated by fusing feature map data of a first level and feature map data of a second level, and second fusion feature data generated by fusing feature map data of the second level and feature map data of a third level; the first fusion feature data is input into a target detection branch to output screw loosening detection result data; and the second fusion feature data is input into an instance segmentation branch to output condensation segmentation result data. The output module is configured to output an abnormality identification result according to the screw loosening detection result data and the condensation segmentation result data.

8. The abnormality recognition system of a battery pack according to claim 7, wherein The identification module comprises an alignment and splicing unit, a weight calculation unit and a weighted fusion unit. The alignment and splicing unit is configured to perform sampling alignment on a pair of adjacent scale feature map data, and perform a channel dimension splicing operation to generate corresponding joint feature map data. The weight calculation unit is configured to perform local response weight calculation and non-local response weight calculation on the joint feature map data respectively to obtain local attention weight data and non-local attention weight data, and perform element-wise multiplication to obtain fusion weight data. The weighted fusion unit is configured to perform weighted fusion on the pair of sampling aligned feature map data based on the fusion weight data to obtain corresponding fusion feature data.

9. A computer program product comprising computer programs or instructions, characterized in that, The computer program or instructions, when executed, implement the abnormality identification method of the battery pack of any one of claims 1-6.

10. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 9. The computer program, when executed by the processor, implements the abnormality identification method of the battery pack of any one of claims 1-6.